programming.dev

felbane, to programmer_humor in Fitbit Clock Face

I unironically love this and would use it as my watch face just to get a reaction from my coworkers. Link?

Landless2029,

Yep. I switched. Doubt anyone will notice tho

JPDev, (edited )
Stoney_Logica1, to programmer_humor in Fitbit Clock Face

Hopefully that’s not a resting heart rate.

NightAuthor,

They’re just excited about posting this image online.

bane_killgrind,

If this is a photo for a bug report, it might have made his week.

xenoclast,

I’m sure it isn’t… but you’d be surprised how much resting hr goes up with age.

wreckedcarzz, to programmer_humor in Fitbit Clock Face
@wreckedcarzz@lemmy.world avatar

But a json file is used for storing settings and the like, not for providing real-time data, yeah?

felbane,

API calls often return json. It’s just a data format.

TexasDrunk,

deleted_by_author

  • Loading...
  • aniki,

    You mean programming an ingestion routine to process json, surely, right?

    eerongal,
    @eerongal@ttrpg.network avatar

    That’s friend’s name? Jason Parsor

    A_Very_Big_Fan,

    I mean, I’ve never used JSONs before but I imagine you could still write to them in realtime at least, as inefficient as that sounds lol. So you could probably get the same results on an actual text editor if you could modify it to update the text automatically when it detects a change instead of prompting the user

    Winter8593,

    I think:

    1. that’s the joke
    2. this is just a watchface template, not an actual file being updated constantly
    Daxtron2,

    No it’s used for all types of data transfer and real time data as well.

    cyborganism, to programmer_humor in My coding skill V/S My GitHub Repositories

    As a side note, I find it incredible how much programmers have such little knowledge of how to use Git properly.

    Even the most amazing developers I’ve worked with found themselves completely unable to manage their repos properly.

    Cold_Brew_Enema,

    I use Git all the time and still have no idea how to use it

    starkzarn, to programmer_humor in My coding skill V/S My GitHub Repositories

    I don’t know how you got a picture of me, but I demand it is removed!

    hypnotic_nerd,
    @hypnotic_nerd@programming.dev avatar

    Nailed it 😜

    agilob, to programmer_humor in Yes
    @agilob@programming.dev avatar

    Before nginx was a thing, I worked with a guy who forked apache httpd and wrote this blog in C, like, literally embedded html and css inside the server, so when he made a tpyo or was adding another post he had to recompile the source code. The performance was out of this world.

    Schmeckinger,

    There are a lot of solutions like that in rust. You basically compile the template into your code.

    bazsalanszky,
    @bazsalanszky@lemmy.toldi.eu avatar

    This reminds me of one of my older projects. I wanted to learn more about network communications, so I started working on a simple P2P chat app. It wasn’t anything fancy, but I really enjoyed working on it. One challenge I faced was that, at the time, I didn’t know how to listen for user input while handling network communication simultaneously. So, after I had managed to get multiple TCP sockets working on one thread, I thought, why not open another socket for HTTP communication? That way, I could incorporate a fancy web UI instead of just a CLI interface.

    So, I wrote a simple HTTP server, which, in hindsight, might not have been necessary.

    AVincentInSpace, to programmer_humor in When you forget to set a boundary conditions in your logic

    Maybe they meant your account is 915 days old as of this year?

    Username,

    I think that’s fairly obvious with the smaller text and context.

    davel, (edited ) to memes in Apology
    @davel@lemmy.ml avatar

    The first user I blocked was the AutoTL;DR bot. GTFO with machine summaries.

    How to Use ChatGPT to Summarize an Article: ChatGPT tends to oversimplify things or even hallucinate sometimes, so fact-checking is essential.

    Which means I’m discussing articles with people who read dumbed-down hallucinations of articles.

    ryannathans,

    Everyone’s own version is a hallucination too

    juli,

    I like them for a quick overview, like the introductory paragraph of a wikipedia article. I hadn’t questioned that bot so far

    GammaGames, to lotrmemes in Apology

    Were these images prompted from the human? It’s for a meme, I don’t really see the harm if it was decent quality

    juli,

    Yes

    You can judge yourself, somehow it’s not yet deleted programming.dev/…/289fbb3c-99b2-4a25-ae68-ed85089…

    Kyre,

    That's actually pretty cool. I know it's popular to hate on AI but it is an accomplishment that it can do stuff like this.

    _Gandalf_the_Black_,

    Yeah, I think it’s all about context. If it’s just part of a personal project or something you’re sharing with a few friends, it’s a useful tool. If it’s being presented as real art or even used commercially, that’s when the issues start coming up.

    Sabre363, to memes in not this again

    It’s ok, jesus can just get some guy on the street to deal with the cross for him.

    prole,

    Right? What a lazy bum, couldn’t even carry his own cross through the streets. Pussy.

    treadful, to memes in not this again
    @treadful@lemmy.zip avatar

    There was a community built around this on Reddit, wasn’t there?

    KreekyBonez,

    was it a car crash video/gif sub? sounds familiar.

    I also remember a dank meme with a sketch of jesus and a helicopter pilot, with different dumb captions, like “hit this bong before you takeoff, bro, trust me, my son”

    ramirezmike,

    that sounds familiar. I was inspired by this post though

    treadful,
    @treadful@lemmy.zip avatar

    Oh, this is OC? Sure not what I was thinking about then. Good job OP.

    ramirezmike,

    thanks! likely the one funny meme I’ll ever make 😂

    WarmSoda,

    Pretty sure that was also inspired by another post or comment. One thing I love about lemmy is people bouncing stuff off each other. It’s great

    TrickDacy, to programmer_humor in The Holy Trinity of JavaScript
    @TrickDacy@lemmy.world avatar

    Are people really not using the strict equality operator?

    BatmanAoD,

    It’s still pretty bad that the normal equality operator is as bad as it is.

    TrickDacy,
    @TrickDacy@lemmy.world avatar

    If you’re provided a tool that solves a problem, I don’t really get ignoring that and continuing to focus on that solved problem as if it weren’t solved because you think all the tools should solve it on principle

    bitcrafter,

    That’s a little bit like saying, “I don’t understand why people continue to complain about the landmine sitting right there on the ground. We’ve painted it red so you can easily walk around it, so how has the problem not been solved?”

    TrickDacy,
    @TrickDacy@lemmy.world avatar

    Linters are standard practice in any decent shop. You want to change the language to destroy backward compatibility for one already-solved issue

    bitcrafter,

    Land mines are painted red in my shop. You want to change the language to remove a land mine that everyone competent already knows enough to step around. The problem has already been solved, so why are you continuing to complain about it?

    Just to be clear, I’m not actually calling for JavaScript to change, I’m just pointing out that people are right to point out this as being a problem. Having said that, if everyone competent uses linters now so that this feature isn’t used in practice anymore, then getting rid of it shouldn’t even break anything, and arguably code which would break is already broken because it uses an operator that no one should be using, so you shouldn’t be using this code anyway.

    TrickDacy,
    @TrickDacy@lemmy.world avatar

    I can sort of get down with what you’re saying, but on the other hand, we all have design constraints, inside and outside of programming, I think this is a very minor one

    bitcrafter,

    Sure, but it is also a very gratuitous and pointless design constraint.

    masterspace, (edited )

    Using linters in a professional setting is more like moving all your actual employees into a different office and letting them use robot avatars in the original office who can never step on that landmine.

    The benefit of this is that millions of other robots continue to depend on the original office being exactly as it is and many of them will never change or update, nor is their any need for them to.

    Breaking backwards compatibility on the web needs much better reasoning than ‘I don’t want to use a linter’.

    riodoro1,

    I think nobody said anything about wanting to fix this. We’re just making fun of how absolutely dumb this is.

    sbv, to programmer_humor in The Holy Trinity of JavaScript

    Sorry, 0 == ‘t’? What?

    jtk,
    @jtk@lemmy.sdf.org avatar

    Yeah, it’s true. I knew all the other ones, had to put that one in the dev tools console to believe it. I was just happy to know === continues to be sane in that comparison.

    Limitless_screaming, (edited )
    @Limitless_screaming@kbin.social avatar

    that's not "t", it's "\t" which is just a tab. There's also "\n" for newline.

    MinekPo1,
    @MinekPo1@lemmygrad.ml avatar

    yeah but why is a single character string containing a tab equal to zero ???

    Limitless_screaming, (edited )
    @Limitless_screaming@kbin.social avatar

    That would be weird if a string containing a space wasn't equal to 0 " " == 0, but that's not the case in JS. If you think that "" and " " being equal to 0 is weird then I agree, but since they are, you should expect "t" and "n" to equal 0 too.

    Ephera,

    The == operator in JS will try to cast the things being compared and do all kinds of ‘smart’ assumptions about what equality means. This is why everyone uses === instead…

    8bitguy,

    Unless you enjoy inviting the chaos.

    sbv,

    It’s a slash-t in the comment. Maybe kbin has different rendering rules for comments?

    https://sh.itjust.works/pictrs/image/7026f17a-f237-49d3-8d80-28632876acdb.png

    Limitless_screaming, (edited )
    @Limitless_screaming@kbin.social avatar

    Oh, in that case I replied to @MinekPo1 with my answer to that. BTW can you see the slash in: t and "t".

    sbv,
    Limitless_screaming, (edited )
    @Limitless_screaming@kbin.social avatar

    My bad. I just edited it. "t" t It's displaying correctly on Lemmy.world. So it seems like another Kbin only issue.

    Sonotsugipaa,
    @Sonotsugipaa@lemmy.dbzer0.com avatar

    It still makes no sense though

    Limitless_screaming,
    @Limitless_screaming@kbin.social avatar

    If " " wasn't equal to 0, it wouldn't make sense, but since a string containing a space equals 0, you'd expect the same to apply to a string containing a tab or a newline. (or at least I'd expect that)

    FaceDeer,
    @FaceDeer@kbin.social avatar

    I admit I have never dabbled in javascript, despite being a proficient programmer. I now dread to ask... would any string that contains only whitespace == 0? " \t\n \t " for example?

    Limitless_screaming,
    @Limitless_screaming@kbin.social avatar

    Yes, it would. Just like a string of spaces " " == 0, but it isn't that bad; === is Javascript's version of == in other languages, and, thus, you should be using it if you don't want that wonkiness.

    == is just for convenience, like when you want to make sure that the user didn't leave the form empty and the button shouldn't be greyed out, and other UI stuff. Without these kinds of features JS wouldn't be used in so many toolkits.

    atx_aquarian,
    @atx_aquarian@lemmy.world avatar

    Ok, I always mistakenly assumed === was the identity operator in JS, too. TIL, thanks! As much as we like to poke fun at JS, every time I’m taught the rationale behind some aspect of it, I find it redeeming and even a little endearing.

    bitcrafter,

    The explanation given to you makes it sound like == was deliberately designed to be a more convenient version of ===, but what actually happened was that == used to be the only equality operator in JavaScript, which meant that if you didn’t want it’s auto-coercing behavior then you needed to go out of your way to add additional type checks yourself. Because this was obviously a tremendously inconvenient state of affairs, the === operator was introduced later so that you could test for equality without having to worry about JavaScript doing something clever underneath the hood that you weren’t expecting.

    masterspace, (edited )

    The explanation given to you makes it sound like == was deliberately designed to be a more convenient version of ===

    I mean technically == was deliberately designed to be a more convenient version of other languages’ == operator… Just specifically more convenient for light UI stuff since that was all JavaScript was supposed to be used for at the time (or all they thought it would be used for).

    But give programmers a way to write and execute a small script and someone will eventually use that to try and write an emulator that emulates the computer it’s running on, so the web evolved into more complicated applications, and then that convenience turned out to be wildly inconvenient, not to mention horribly unexpected for programmers coming from other languages, so then they added the triple equality to match other languages.

    Blackmist,

    You have to remember that the underlying principle of JavaScript seemed to be “never throw an error”, even if what it’s being told to do is weapons grade bollocks.

    Sheeple, to programmer_humor in When you forget to set a boundary conditions in your logic
    @Sheeple@lemmy.world avatar

    It’s cryptocurrency. What did you expect. THAT garbage is bound to be poorly coded.

    LufyCZ, (edited )

    It’s an exchange, not a cryptocurrency.

    Check your facts before you start the hate train.

    Also, most cryptos have state of the art programming. They have to, because any little hole or vulnerability puts millions or billions of dollars at risk.

    Sheeple, (edited )
    @Sheeple@lemmy.world avatar

    It’s an exchange for a cryptocurrency of the same name I did my homework

    reev, (edited )

    It’s an exchange where you can exchange a token of the same name (their token). The primary purpose is not for that token, it’s mainly known for being an exchange.

    LufyCZ,

    You’d get an F then mate.

    The fact that they have a token is in no way relevant to the fact that we’re talking about an exchange here.

    SpaceNoodle,

    Ah yes, the most secure code possible: brand new, closed-source, and written by the lowest bidder.

    reev,

    If you’re talking about the exchanges, sure. If you’re talking about crypto, all of the major cryptos are open source.

    LufyCZ, (edited )

    There’s no lowest bidder here, how’d you even come up with that?

    People employed in crypto are usually very well paid, because they have to be good at their jobs.

    The absolute majority of cryptocurrencies is fully open source.

    Seriously man, educate yourself before spitting nonsense.

    Edit: I’d appreciate if anyone downvoting me provided their reasons for doing so, preferably with sources to back them up. I’m happy to provide examples to back my arguments up if requested.

    MadhuGururajan,

    Website: “915 days in a year”, you: “they are well paid and good at their job”. Anyone seeing your comment: 🤨

    LufyCZ,

    Anyone reading the thread would understand that I’m talking about crypto, not exchanges.

    Well done though, peak comedy

    000, (edited )

    State of the art programming, all with the goal of scamming people.

    Crypto programmers don’t “have” to do anything because they are working on an illegitimate, unregulated security.

    LufyCZ,

    Have you heard of Indian call centers? Let’s ban phones, let’s ban email, let’s ban gift cards, let’s ban bank accounts.

    The fact that the technology is also being used to scam people doesn’t mean that the whole thing is bad. There are numerous use cases beyond illegal activity, and you focusing on a tiny fraction of the whole thing just shows that you don’t actually want to understand, but that hate is your only way of expressing, that you don’t understand it.

    Here, read up. They’ve got studies and sources for their claims.

    krotti,

    Last time I checked all of those had real world value before the scams started.

    For cryptos, it seems to be the other way around. They are trying to solve issues at the cost of having issues that are unacceptable and unfixable.

    LufyCZ,

    It may seem like it, but it sure isn’t like it. You’ll obviously hear about the bad and nothing about 5he good, unfortunately that’s how media works nowadays.

    Do you want to elaborate on those issues that are unacceptable and unfixable? I’m not saying there aren’t any, but you’re describing a trade-off, and crypto isn’t the only thing in the world with trade-offs.

    Fiat is a great example - conveniet, nice, until it starts hyperinflating, until people use it to fund wars, until the government confiscates it because you insulted a politician on Twitter.

    krotti,

    From scams to just cyber attacks with no safe guards would make everything impossible to handle. There is no bank covering you or insurance. People dying, losing keys etc drive deflation. BTC/Mining coins are destined to die. Maybe there is something there, but it certainly isn’t finance.

    Inflation is necessary for multiple reasons, but you can read on that yourself. Such as; what would happen if everyone considered holding to money an investment? IMO these facts make Fiat sound so much better…

    LufyCZ,

    no safe guards

    That’s the point.jpg

    You’re free to hold your crypto on an exchange, you’re free to buy a hardware wallet and do your due diligence when confirming transactions, you’re free to create a multisig for your coins and tokens to introduce multiple factors for signing.

    But it’s your choice.

    people dying, losing keys

    That’s on them, it’s like stuffing money into a mattress and not telling your family.

    mining coins are destined to die

    Mining’s not great for sure, but “destined to die” makes no sense.

    Inflation is necessary so that people spend the thing

    That’s kinda funny, because in the case of Ethereum, the deflation comes from people using and spending Eth on gas.

    I’m also not saying that Ethereum is the perfect currency to replace fiat, the utility there comes from everything that’s built on top of it.

    Widen your horizon, crypto isn’t just a medium for payments.

    krotti,

    That is the problem. 1 Fuck up and your money is gone. Whether that is someone else, you, CVE, it’s gone and everyone elses in that network.

    By death I was wrong; Difficulty wont kill a coin. Though that then has other issues.

    I doubt you understand how bad deflation is for a currency, or you are in this for the money?

    LufyCZ,

    Hardware wallets are safe, multisigs are safe. You can be safe if you put in the effort. If you don’t want to do it, that’s your call, doesn’t mean the system sucks.

    Yeah difficulty is adjusted depending on how many “devices” (simply put) are mining, the target is a specific blocktime.

    What’s gonna kill bitcoin is the ever decreasing issuance, but that’s not the problem of crypto nor mining for that matter, just bitcoin.

    Have you skimmed over the point that I think that Ethereum (one of the few sustainably deflating cryptos) isn’t just a currency but also a base for other things that may also serve as a currency?

    Also, it’s not bad for the currency itself, just for the economy around it. And again, I’m not saying Ethereum should replace the dollar.

    000,

    Scam call centers are illegal and get shut down often. Great example if you want to somehow convince people that crypto isn’t a scam.

    LufyCZ,

    So you’re saying that scamming through crypto isn’t illegal and that the people behind it don’t get caught?

    You’re comparing apples and oranges, it doesn’t work like that.

    Crypto is the “phone” or “email” from my example, it’s just a medium.

    So yeah, good job showing you don’t understand how it works

    000,

    What’s your endgame here, you need us to buy shitcoins you lost money on or something?

    LufyCZ,

    Nice, well done, let’s attack me personally instead of having a conversation. That will get you far in life.

    000,

    You feel attacked because you lost money on crypto scams? That sucks.

    LufyCZ,

    I feel attacked because you attacked my integrity instead of trying to have a useful conversation.

    That’s fine though, people are scared of things they don’t understand, that’s a well known fact.

    Have fun falling behind

    twix,

    I dunno, been seeing quite a few posts from indieweb.social/ that do kind of give a bad impression…

    LufyCZ,

    Yeah, you hear about the things that go wrong and not about the ones that don’t.

    I’m not saying everything is perfect, obviously it isn’t, but the people on here are talking about how incredibly shit it is without any redeeming qualities, which just simply isn’t true. It’s harder to prove a negative (that things aren’t bad), especially since nobody’s gonna write a “no protocol got hacked today, $x billion is safe” article.

    twix,

    My general problem with cryptocurrency is their environmental impact / resource usage compared to traditional payment systems.

    LufyCZ,

    It’s a problem that’s being solved. Bitcoin will probably suck in this regard forever, but Ethereum for example has migrated over to a much environmentally friendlier system.

    Growing pains, but I think that we’re on a good path going forward.

    moon, to memes in Appreciate all the content though

    same, but it’s the Picard maneuver instead

    I love you both🥰

    dependencyinjection,

    So it isn’t just me. I commented a while back to FlyingSquid I see them and ThePicardManeuver all over the place.

    SendMePhotos,

    I’ve seen so many creative names here, I love it. Flying squid?! Picard maneuver?! What else is there?!

    moon,

    cum

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 171

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 143360 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php on line 260