6 ms·
This just seems wrong to me. There are plenty areas of programming where knowing a little bit about internal data representation, either in memory or in your da
by bitexploder 9y ago
This just seems wrong to me. There are plenty areas of programming where knowing a little bit about internal data representation, either in memory or in your data store can help you make better choices. Not everyone needs to be a system programmer, but folks still need general computer awareness. We just aren't far enough from the CPU yet. Sufficiently advanced understanding of algorithms implies computer architecture awareness to me.
I get what you are writing about here, that higher level concepts dominate programming many common apps today, but it seems like a weird place to allow yourself to have a knowledge gap.
- deanCommie 9y agoIt shouldn't feel wrong to you. In today's connected big-data world, the vast majority of your performance latency is from querying your data (if you structure your db incorrectly), followed closely by client to server communication. That's the p90 use case for development people are doing.
- lorenzk 9y agoWhat's a "p90 use case"?
- bitexploder 9y ago90th percentile use case
- roadnottaken 9y agoHa I thought it was related to P90X somehow https://en.wikipedia.org/wiki/P90X https://en.wikipedia.org/wiki/P90X
- bitexploder 9y agoSo many simple things are only easy if you know bits. Interpreting a packet capture, poking at memory, designing cache friendly data structures, ... It is like second nature to me. If it isn't required (obviously it isn't, it must at least be a strong competitive advantage). I am not that old. I don't have get off my lawn moments. I grew up (really learned at least) on a processor (P133) where bits started mattering less, but they still mattered.
- pennaMan 9y agoWhat are some good resources to learn about bits?
- jeffreygoesto 9y agoThere are some quite good pages, I don't remember the exact titles, but the first results are quite ok: https://www.google.de/search?q=bit%20hacks https://www.google.de/search?q=bit%20hacks
- bitexploder 9y agoYou can write mostly C code. Each processor will have different quirks. https://en.wikipedia.org/wiki/CPU_cache https://en.wikipedia.org/wiki/CPU_cache https://www.akkadia.org/drepper/cpumemory.pdf https://www.akkadia.org/drepper/cpumemory.pdf These are great places to start. Especially Ulrich Drepper's PDF on memory. edit: even simple things like looping can require knowledge of "bits" and "memory layout" and "CPU cache" to write the fastest code. Most people don't need to write the fastest code though.
- Illniyar 9y agoNever needed to interpret a packet, I intercept communications at the 7th layer to troubleshoot things - namely http connections. I don't poke at memory, I use a profiler that tells me what every piece of code and variables I use take in memory. I don't design cache friendly data structures, I use redis. I would wager that my experience is closer to the development situation and needs of the majority of programmers. I don't see why knowledge of bit operations are necessary to do a good programming job.
- bitexploder 9y agoThese are good points. At some point architecture and systems like Redis will become the only tools that can reliably implement these behaviors if no one ever learns about bits. Similar to how hard it can be to outperform compilers in many areas when writing assembly by hand. Then again there are programming disciplines where you have to know all of this and more. It ultimately comes back to those capable of implementing the tools/frameworks/compilers and those that just use them. Safe crypto libraries are impossible without bit wrangling. I will still argue that having these skills has at times saved order of magnitudes of time for me. Maybe it wasn't worth all the effort I spent if it only saves time once in a while. Then again I haven't been a full time developer in like 11 years, now I break other peoples software for a living and bang bits together on a weekly basis :)