I mean, at the end of the day, if you really understand your language of choice, you know that it is jusf a bunch of fancy libraries and compiler tricks of top of C. So in my mind, I’m a fully evolved programmer in a language, when I could write anything I can write in that language in C instead.
- 0 Posts
- 21 Comments
Rednax@lemmy.worldto Programmer Humor@programming.dev•top 5 unsolved problems in computer science9·1 month agoI have this experience with a certain type of pedestrian traffic light “button”.
I quote button, because nothing physically moves when you press it. I’m not sure if it registers pressure or heat, but you don’t even feel anything move when you press it.
Usually when you press the button, a red text lights up on the button, telling you to wait. This text gives you feedback that the button registered your press, and the traffic light will schedule a green light for you.
However, sometimes you didn’t press hard enough, and the text doesn’t light up. Simple solution: press harder.
But there is a scenario where it doesn’t matter how hard you press, the button won’t light up. You keep staring at it, while slamming the damn thing with the fury of a Hulk wealding Mjolnir. Still, nothing lights up. The reason: the light instantly went green, so it never needed to light up the text telling you to wait. And all that time slamming your fist on the button, could have been spend crossing the intersection. Instead you have been standing there, looking like a drunk person having a fistfight with an inanimate object.
Rednax@lemmy.worldto Programmer Humor@programming.dev•Does this exist anywhere outside of C++?1·3 months agoConsidering std::cout should only directly be used when you are too lazy to place breakpoints, I totally get the decision to auto-flush.
I remember a javascript library where the was a function that returned, according to the documentation, “a color”. Did it return an object with 3 fields? Were those fields RGB or some other color scheme? Is it a string encoding a color? What format is that string? None of these questions could be answered without just running the code, and analyzing the object you got back.
Rednax@lemmy.worldto Programmer Humor@programming.dev•Why do people faint at the sight of plain-text code?10·5 months agoDo you mean that programming languages are hard to read/write, or that the languages themselves are poorly designed?
In the former case, I invite you to read machine code. Not assembly, but straight machine code. Just zeros and ones as far as the editor can see. Any popular language is better than that.
In the latter case, I invite you to look at the design of an arbitrary natural language. Weird grammer rules, regional differences, loan words that don’t fit in, etc. No programmming language is worse than that. Although I would argue that Javascript has all of those problems too in some degree.
Simple solution: only allow lower case characters in file names.
Of myself of the now dead purpetrator?
Rednax@lemmy.worldto Programmer Humor@programming.dev•Surely "1337" is the same as 1337, right?123·1 year agoThe worst thing is: you can’t even put an int in a json file. Only doubles. For most people that is fine, since a double can function as a 32 bit int. But not when you are using 64 bit identifiers or timestamps.
But I love coding at work?!
The problem is that every living entity in a 10 kilometer radius around me, seems to be hellbent on getting me to do anything but coding. Refining work estimates, fixing badge access rights, fixing a driver issue, telling people that you cannot do 1000 things at the same time, teaching the new developer how shit (doesn’t) works, mangling Jenkins into a functional state again, explaning that thing I did a year ago but is only now used (it was very high prio a year ago), writing documentation that noboby ever reads, progress meetings, specialty group meetings, knowledge sharing meetings, company wide meetings, etc.
I have a ton of legs. Waayyy more than 2.
What can I say? They were cheap, and I love chicken.
I don’t believe that is true. It might surprise you how often testicles are eaten.
Even in Javascript, the ?? operator checks explicitly for null or undefined. So it added undefined, but not 0 or false. But adding undefined sounds like a good addition for this operator.
See the Javascript section of: https://wikipedia.org/wiki/Null_coalescing_operator#Examples_by_languages
All those faces judging their peer scream: You filty human-attention seeking whore! Why are you not up here, with us, judging the lowly humans from up top, huh?
Rednax@lemmy.worldto Programmer Humor@lemmy.ml•diff tools cannot handle moving code blocks8·2 years agoAt least a good diff tool will ignore whitespace diffs.
Rednax@lemmy.worldto Programmer Humor@lemmy.ml•When you are looking to hire and date at the same time5·2 years agoI also can’t figure out why their selection is what it is. But Thales is not really 1 company. Tacticos is developed by the Dutch branch (note that the location of this job is Hengelo), which means it is treated as a Dutch company for export control purposes, not a French one.
My guess would be that they have existing export contracts for new versions of Tacticos to these countries.
Such thoughts can be very Satisfactory indeed.
My C++ teacher taught me to be against unions. He made everything class based instead.
This is terrible programming advice.
Considering that portals are quite literally linked in a spatial manner, it would make sense that they physically cannot move independantly. Moving the orange portal would also move the blue portal. Or from a different perspective: the portals are always fixed in space, but their surrounds can move.
But that does not make the question shown here untestable. It just means the output portal will have a velocity of it’s own.
How to test: place 2 portals next to each other on a wall. Then apply propulsion gel in front of the orange portal. And finally move yourself at high speed through the orange portal.
If your speed is unchanged after exiting the blue portal, but your velocity has been inverted with respect to the direction that the wall is facing, we can conclude option B must hold.
But how does the Rust compiler do that? What does it actually check? Could I write a compiler in C that does this check on a piece of Rust code?
C is so simplictic, that if I can write a piece of functionality in C, I must understand its inner workings fully. Not just how to use the feature, but how the feature works under the hood.
It is often pointless to actually implement the feature in C, since the feature already has a good implementation (see the Rust compiler for the memory safety). But understanding these features, and being able to mentally think about what it takes in C to implement them, is still helpfull for gaining an understanding of the feature.