3 ms·
Without judgement, this feels like a switch up. It seems to me that the prior author did not suggest they were necessary, but instead ambient, available, and in
by tel 2y ago
Without judgement, this feels like a switch up. It seems to me that the prior author did not suggest they were necessary, but instead ambient, available, and interesting. Indeed for many they are not useful.
At the same time, that might be a good indication of passion: a useless but foundational thing you learn despite having zero economic pressure to do so.
In the domains you have worked on, what are examples of such things?
- bluepizza 2y agoIt is not a switch up. The author said that an engineer would find these during their journey, and I am asking when. I don't have a strongly held opinion here, I literally want to know when. I am curious about it.
- valicord 2y agoBitmasks, enumerating combinations (subsets), parsing binary data, ...
- jfyi 2y agoCryptography, parity checking, sorting, image processing, optimization...
- krisoft 2y ago> I literally want to know when When the curious engineer is reading a book about their choosen programing language. Most likely in the part which describes operators. Or when they parse something stored in binary.
- tel 2y agoPersonally, I think it’s possible to not encounter them. I surely avoided them for a while in my own career, finding them to be the tricks of a low-level optimization expert of which I felt little draw. But then I started investigating type systems and proof languages and discovered them through Boolean algebras. I didn’t work in that space, it was just interesting. I later learned more practically about bits through parsing binary message fields and wonder what the deal with endianness was. I also recall that yarn that goes around from time to time about Carmack’s fast inverse square root algorithm. Totally useless and yet I recall the first time I read about it how fun a puzzle it was to work out the details. I’ve encountered them many times since then despite almost never actually using them. Most recently I was investigating WASM and ran across Linear Memory and once again had an opportunity to think about the specifics of memory layout and how bytes and bits are the language of that domain.
- bluepizza 2y agoI've mostly done corporate Java stuff, so a lot of it didn't come up, as Spring was already doing it for me. I've first got to enjoy low level programming when reading Fabien Sanglard breaking down Carmack's code. Will look into WASM, sounds like it could be a fun read too.
- about3fitty 2y agoI found them in 2015 when I was maintaining a legacy app for a university. The developer that implemented them could have used a few bools but decided to cram it all into one byte using bitwise operators because they were trying to seem smart/clever. This was a web app, not a microcontroller or some other tightly constrained environment. One should not have to worry about solar flares! Heh.
- jfyi 2y ago> trying to seem smart/clever Nobody that uses bit flags do it because they think it makes them look clever. If anything they believe it looks like using the most basic of tools. > One should not have to worry about solar flares! Do you legitimately believe that a bool is immune to this? Yeah, I get this a joke, but it's one told from a conceit. This whole post comes off as condescending to cover up a failure to understand something basic. I get it, someone called you out on it at some point in your life and you have decided to strike back, but come on... do you really think you benefit from this display?
- Apfel 2y agoI've come across bitwise shift operators literally once in enterprise webapp world, specifically on this precise problem: https://stackoverflow.com/a/12900504/13238134 https://stackoverflow.com/a/12900504/13238134. I made a concerted effort to understand the code before I made any effort to adapt it to the repo I was working on. I'm glad I did (although honestly, it wasn't in the remotest bit necessary to solve the task at hand!)
- sroussey 2y ago> trying to seem smart/clever. Maybe. Every time I write something I consider clever, I often regret it later. But young people in particular tend to write code using things they don’t need because they want experience in those things. (Just look at people using kubernetes long before there is any need as an example). Where and when this is done can be good or bad, it depends. Even in a web app, you might want to pack bools into bytes depending on what you are doing. For example, I’ve done stuff with deck.gl and moving massive amounts of data between webworkers and the size of data is material. It did take a beat to consider an example though, so I do appreciate your point. Coming from a double major including EE though, all I have to say is that everyone’s code everywhere is just a bunch of NOR gates. Now if you want to increase your salary, looking up why I say “everything is NOR” won’t be useful. But if you are curious, it is interesting to see how one Boolean operand can implement everything.
- crystal_revenge 2y agoI said: > someone who has "curiosity, passion, focus, creative problem solving" regarding programming would find this on their journey. Whereas you are describing someone who merely views programming as a job. It's perfectly fine to view programming as "just work" but that's not passion. All of the truly great engineers I've worked with are obsessed with programming and comp sci topics in general. They study things in the evening for fun. It's clear that you don't, and again, that's fine, but that's not what we're talking about. Software for you is a job. I work in software because it's an excuse to get paid to do what I love doing. In the shadow of the dotcom bust most engineers where like this, and, they were more technical and show more expertise than most software engineers do today.
- mewpmewp2 2y agoIt might be an indication for passion, but not knowing them does not indicate lack of it. The thing is there are unfathomable amount of such things to learn, and if somebody doesn't stumble upon them or won't spend time with them it doesn't indicate lack of it.
- crystal_revenge 2y agoI'm sorry but bitwise operators are the most fundamental aspect of how computing works. If you don't understand these things it does indicate a lack of passion, at least in regards to programming and computation. Bitwise operators are not a particularly complex topic and extend from the basics of how logic is implement in a computer system. Personally I think ever one interested in programming should have, at least once, implemented a compiler (or at least interpreter). But a compiler is a substantial amount of work, so I understand that not everyone can have this opportunity. But understanding bitwise operators is requires a minimal investment of time and is essentially to really understanding the basics of computing.
- mewpmewp2 2y agoGuess I have a lack of passion then, despite building countless of full stack side projects and what-not even before I knew these could make me money at my teenage years. I started out with PHP using txt files as storage in my teens so none of what you said would be relevant to what I've experienced, and that was I would say almost 20 years ago. And in my high school years I took part of coding competitions where I scored high nationally without knowing any of bitwise or otherwise things, despite deeply enjoying those things. This weird elitism drives me mad, but maybe truly I haven't done enough to prove my worthiness in this arena. Maybe PHP or JavaScript is not true programming.