programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

nsfw936421, in Shower thought:

This has to be a joke right?

tja,
@tja@sh.itjust.works avatar

No, jokes on the internet are illegal because nobody recognizes them as jokes

ImplyingImplications, in Oh yay new features

There are thousands of sci-fi novels where sentient robots are treated terribly by humans and apparently the people at Boston Dynamics have read absolutely zero of them as they spend all day finding new ways to torment their creations.

dbilitated,
@dbilitated@aussie.zone avatar

but you need to hit it with a hockey stick otherwise the science doesn’t happen

xmunk, in “It’s not that hard”

Elon Musk loves to speak confidently about shit he knows nothing about. This leads to him being a confident speaker on every topic… I just wish we could figure out a way to shut him up.

knfrmity,

The French had a pretty good way of shutting up insufferable rich asshats.

skwnssmnstr,

Does it rhyme with “vaseline”?

Sailing7,

Yes. Yes it does :D

stown,
@stown@sedd.it avatar

I’ll grab my Ovaltine.

DarkDarkHouse,
@DarkDarkHouse@lemmy.sdf.org avatar

I’ll grab my gasoline

Stern,
@Stern@lemmy.world avatar
Hazzia,

Considering how often his cars and rockets seem to explode, I’d say that was a good call

hemmes,
@hemmes@lemmy.world avatar

Maybe I’m out of the loop - what’s he been saying about software?

Draghetta,

This post’s image man

It’s not that hard™

hemmes,
@hemmes@lemmy.world avatar

Oh. This post’s image has him talking types in January and the “obligatory” image above has someone saying he’s been talking software in December, so I thought maybe Musk has been spewing about software for a few weeks or something.

FrostyTheDoo,

Twitter is a software, he’s been saying stupid stuff about how it works for the last year+

hemmes,
@hemmes@lemmy.world avatar

Okay gotcha. Thought maybe there was a headline I missed.

Squibbles,

December from '22 not '23. The image was from a few months after he took over twitter and was still going on about that stuff and how it was doing all these useless things that needed to be removed or rewritten. I just remembered another one about how he was going on about a single request to twitter causing thousands of RPCs or something? I think that’s not really unheard of in a microservices infrastructure and it’s not like they’d be synchronous. There’s probably tons of calls that go to things like tracking, analytics, or cross DC sharing I would imagine for such a large and high volume service like twitter.

hemmes,
@hemmes@lemmy.world avatar

Okay gotcha. Yeah I just thought I missed a new headline or something.

bleistift2,

needed to be removed or rewritten

Literally any developer can tell you that. It doesn’t even matter what codebase we’re talking about. It always needs to be rewritten.

Ephera,

One example that stuck with me is that he said some shit along the lines of 80% of Twitter’s microservices being superfluous and he’ll be shutting them off.

Yes, the dev teams just spent 4/5 of their time building shit no one asked for. It just annoys me so much, because anyone with basic reasoning should be able to work out that this cannot possibly be the case, but it’s easy to give it the benefit of the doubt.

Well, except that many, many Twitter outages followed.

MajorHavoc, (edited )

Well, except that many, many Twitter outages followed.

Yeah. As a software dev, it was pretty awkward explaining this to colleagues who rely on Twitter/X.

“It sounds like you think Twitter is a software company and that Elon is utterly unqualified to run a software company. That can’t possibly be true, right?”

…Then we end up doing the “Concerned Padme” meme…

Squibbles,

When he took over twitter there was a bunch of stuff he was spouting about things like Twitter’s stack needing a full rewrite and such. Going so far as to fire the engineer that challenged him on it during a live spaces thing if I recall correctly.

hemmes,
@hemmes@lemmy.world avatar

Ah yes I remember that. I thought maybe there was something new he was going on about specifically.

MotoAsh,

He would have to know what he’s talking about to be specific.

MajorHavoc,

You would think so… And yet months of instability on a previously rock solid platform says he did not.

Bonehead,

The rockets are fine. SpaceX has a team specifically designed to distract Musk and keep him away from the actual work on the rockets. Tesla didn't have that though. That's how we ended up with that lame presentation with the weird "S3XY" acromin. That was really the point I realized that he was just an idiot frat boy with too much money. He really is his own worst enemy.

Pringles,

What’s your source on the spacex team distracting him? I can’t find anything supporting that. I do find some interviews from anonymous employees saying it’s calmer now that he’s so focused on twitter.

winterayars,
sdoorex,
cupcakezealot,
@cupcakezealot@lemmy.blahaj.zone avatar

the thing about spacex is everything they do is because of nasa and government.

the only thing spacex has going for it is the fact that they can spend a billion dollars exploding a rocket five times before it slightly works the sixth whereas the government can’t do that.

Bumblefumble,

As someone who does know about this field, and absolute despise Musk, that’s not quite true. SpaceX is very successful thanks to help from the US government, and despite the influence of Musk, but also because they are a team of very competent people who have actually innovated and pushed the boundaries of launch vehicles. To say they have nothing going for them and are being propped up by the government is not at all accurate, and they have been much more succesful than traditional government contractors.

zalgotext,

To say they have nothing going for them and are being propped up by the government is not at all accurate

That isn’t what they’re saying though, is it? They’re saying that SpaceX has the ability to fail more than NASA, because they’re not a government organization funded solely by taxes.

cupcakezealot,
@cupcakezealot@lemmy.blahaj.zone avatar

very successful thanks to help from the US government

rockSlayer, in Rust project startup kit

It’s just the natural progression of things

unrelatedkeg,

I mean you’re not wrong, but it kind of skips a lot of in-between steps.

agilob, 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.

NocturnalMorning, in You can have anything you wan...

Does this include all future invented programming languages?

silasmariner,

No, the flip side of this wish is your knowledge is frozen in time to when you make the wish and can never be updated. You gradually become more and more outdated as you fail to grasp even the simplest of changes to all languages in current usage.

MaggiWuerze,

At that point your fame as a Rockstar Dev (I hate myself for typing that) will allow you to transition to a cushy ceo position.

funkajunk,
@funkajunk@lemm.ee avatar

The ol’ monkey’s paw

NocturnalMorning,

Well damn, that’s kind of evil.

jubilationtcornpone, in You can have anything you wan...

Instantly granted all programming knowledge

“Well what the… God damnit! Who the fuck thought that was a good idea? Fucking JavaScript architects!”

orrefailaT,

Every npm package gets downloaded into your brain, immediately collapses into a black hole

rushaction,

My gods. I think this just gave me flashbacks to this week.

I was recently battling node’s import/require shenanigans trying to figure out how to import a typescript module in my basic program. I feel this so hard.

I walked away utterly hating the language and its ecosystem. Utterly defeated, I gave up.

AVincentInSpace, 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.

rimu, in Revisiting code I wrote last year
@rimu@piefed.social avatar

Writing really good comments is an under-appreciated skill.

lurch,

Even though comments are very helpful, often it’s even enough to name variables and methods/functions really good. At least do that. You don’t want i, j and value. Believe me. You want rowCount, colCount and deliveryOption instead. You just may not know it now, but you will, when it has to be changed in a few months.

aksdb,

Where comments are useful most is in explaining why the implementation is as it is. Otherwise smart ass (your future self) will come along, rewrite it just to realize there was indeed a reason for the former implementation.

loutr,
@loutr@sh.itjust.works avatar

Comments are good when you’re doing something weird to handle an edge case or something. But yeah most of the time clear variable names, and extracting complicated code to a dedicated and clearly named function, are enough.

There are only two hard things in Computer Science: cache invalidation and naming things.

Phil Karlton

ooterness, in You can have anything you wan...

My head canon is that Tony Stark has a superpower: everything he builds works the first time.

If it’s really complicated, like an entirely new Iron Man suit, then it might malfunction once in an amusing way. Then he tightens a screw and it’s perfect. It never fails outright or bricks itself.

In my experience, this is not how hardware or software development goes. I want this power so much.

hexabs,

He is an Artificer, plain and simple

greenskye,

Agreed. It’s comical how he’s seemingly able to rapidly build stuff that requires experience in multiple high end fields and then he even surrounds himself with his own tech and is not buried under maintenance hell for it all.

My alternative head canon is that he’s actually only good at building AIs and Jarvis and Friday are the ones who actually make all of his crazy ideas work.

Xanvial,

In a What If? episode, he made a suit that can transform into a racing car without creating AI first

NewAgeOldPerson,

Let’s have a Futurama/Avengers cross over.

QuazarOmega, (edited ) in what the hell is happening in ultramarine linux

What’s Fyra tho?

Edit: I guess it’s this: fyralabs.com
Very disappointed in the lack of cats ;(

Justas,
@Justas@sh.itjust.works avatar

It just means 4 in Swedish, like en/ett, två, tre, fyra, fem …

state_electrician,

Femboi?

NovaPrime,
@NovaPrime@lemmy.ml avatar

Pretty sure it’s the patron goddess of the fyre festival

HiddenLayer5, (edited ) in Rust project startup kit
@HiddenLayer5@lemmy.ml avatar

For people who don’t know, there is already a fully Rust OS: www.redox-os.org

Microkernel too which is pretty cool.

rambling_lunatic,

IIRC the filesystem was literally just a text file.

spez,

I have heard about Redox. What’s the difference between a microkernel and a kernel? Does redox use the linux kernel? Or has the guy written that in rust too?

vrighter,

lots and lots more IPC. So lots and lots of context switches. So worse performance

ptz, in I don't wanna show mine either
@ptz@dubvee.org avatar

I’ll show you mine:

Spoiler[There’s nothing here].

Beanie,

wow my history is identical :0

what a coincidence

TrickDacy, 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, 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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 18878464 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 10502144 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/Resources/views/logs.html.php on line 38