Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While it's based on C, a large chunk of the content is simply a great introduction to number representations in other bases such as binary and hexadecimal etc. Fundamental knowledge and very well explained, and a few insights I've not seen before.


Thanks, I wanted to post it after it was finished and revised. I also wanted to add more sections, but somebody was faster than I expected (thanks for posting it tod!). I suppose Getting to hn will add some valuable feedback in the first place.

I will probably add some more content in the coming weeks.


>Fundamental knowledge

yes? no? hard to say

The number of times I've needed this knowledge during all years of formal education and then years of work would be probably around 3.

Then I started working with C and close to hardware and it became something that I need everyday.

It's feels like bit proficiency is only useful in some very specific domains.

Thought: is HTTP foundational knowledge nowadays? after all whole world is built on it

if not, when will it become?


If you're a web developer and your product relies on HTTP, then HTTP is absolutely fundamental knowledge.

Similarly, if you're a web developer and your language doesn't even have integers, then understanding twos compliment is probably not fundamental.

That said, the people who proudly know the very least amount possible to perform their day job usually are not top performers.


Over years I've found that "top performer" is not purely about skill, often it is *just* about motivation, desire to move stuff ahead, to get things done, to improve current state of affair.

Like, rarely stuff is so hard that it requires some outstanding skills.


Like you say it really depends on what your job is. For me those bit algo's for a few years were my jam. I was moving data between 4 different CPU types and across 3 different network transports depending on the project and 4 different OS's. You need to know your bits when moving data between diff arch types and across different transport layers. These days most of that same sort of thing I did then? I would drop it into a json text stream and call it a day.


I think it's fundamental because understanding it goes hand-in-hand with understanding how computers actually work. When I interview applicants, I usually ask one or two questions about bitwise operations for this reason -- an engineer who knows how machines work at a very low level is valuable even if their work is not low level.


I think if you work with UUIDs, it's worth learning about bitwise stuff. So backend developers in general. It's not a day-to-day skill, but it is one I've used at just about every job in the last decade to elegantly and efficiently solve hard problems regarding idempotency and randomness.


When would you want to perform bitwise operations on a UUID?


A UUID is a bunch of bit fields packed together: the version/variant, and depending on the version, fields for the datetime, MAC address, node ID, etc. You'd use bit ops to both construct and extract the fields.


Say you need 5 UUIDs derived from one (say a primary key and some set of idempotency keys). You can mask them.


Or if you work directly with hardware, as I do. I use bitwise stuff constantly. Or if you're doing certain obscure kinds of highly optimized mathematical operations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: