News for hackers. Stuff that matters.
Re:Low Level Bit Hacks You Absolutely Must Know by jacquesm on Friday May 11, 2018 @11:33AM (#17048070)
What is this now, junior programming lessons?

You absolutely must know these because they're dead obvious and if you're just starting out with learning programming these are some of the first things you will/should learn, right after how computers store data.

Re:Low Level Bit Hacks You Absolutely Must Know by biggerfisch on Friday May 11, 2018 @12:58PM (#17048904)
While yes, these are pretty simple statements, most of them only being 2-3 operations, I think you might be interested to know that not every programming curriculum even covers "how computers store data". I know a fair few programmers who came from backgrounds that either never touch the difference between an integer and float, or if they did, it was only to the point of "this one stores fractions, this one doesn't".

For example, no python course for scientists is going to go on in-depth about the difference between big and small endian - it just doesn't matter when you're trying to make a simple graphical model, it's far too low level. Binary operators work and are useful in JavaScript, but how many 6 week frontend bootcamps are going to cover them?

What I'm getting to here is that I don't think you can just dismiss things like this because your coding background covered them - there's some pretty clear gaps in a lot of peoples' knowledge and educating them is likely only a good thing.

Re:Low Level Bit Hacks You Absolutely Must Know by ShroudedNight on Friday May 11, 2018 @05:32PM (#17050947)
> "this one stores fractions, this one doesn't"

This sounds like a fast trip to the land of direct comparisons of floating point numbers.

Further info: https://randomascii.wordpress.com/2012/02/25/comparing-float...

Re:Low Level Bit Hacks You Absolutely Must Know by kuriho on Saturday May 12, 2018 @07:18AM (#17053516)
Isn't it sad that most of todays junior programming curricula favour copy+pasting 10s of main() method only "applications" over explaining data types and some basic bit twiddling?