11 ms·
I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware. CPUs are powerful enough to
by pasta 9y ago
I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware.
CPUs are powerful enough to use a naive fade transition. But coders who are aware of the internal workings can make it even faster on todays hardware.
Great article and imho still relevant on todays much more powerful computers.
- lifthrasiir 9y agoYou should have said "thinking outside of the abstraction" instead. Bits are implementation details. The very knowledge of linear-feedback shift register is essential in this particular example. > CPUs are powerful enough to use a naive fade transition. But coders who are aware of the internal workings can make it even faster on todays hardware. Not really. No one would do the fade transition---or more accurately, the regional alpha blending with a fixed color---in CPU nowadays exactly because GPUs are much more capable in that job, and such a job is actually fairly easy in most abstractions used because it is an integral part of UX and whatever. The ability of leveraging all resources and determining their efficient utilization is a key.
- maccard 9y agoI dont particularly care for your generalisation about younger coders, as a younger coder. There are many of us who do care about the low level details of our code, and take extra care to write good performant code. To make a generalisation about "older" programmers - I have the feelings that older coders are stuck in their ways and aren't willing to change their behaviours, and when a younger coder tries to suggest improvements, they're hand waved away because we have less experience.
- pasta 9y agoWell I was not trying to blame. And I 100% agree there are loads of good coders of all ages. But knowledge about inner workings helps to understand what is going on and what can be improved. So I don't say you should use a non GC language for example. But knowledge about memory management can help to understand memory leaks.
- oh_sigh 9y agoOP said "a lot of", not all. Which is probably true, because you needed to know it in the past, and now you don't. Chill out.
- oblio 9y ago> You needed to know it in the past, and now you don't Well, that's not a very interesting statement by itself, though? We used to need to know how to use clubs back when we lived in caves, but I don't see myself practicing with one any time in the near future :)
- oh_sigh 9y agoYes, I don't know why you seem to think I would disagree. A lot of people needed to know how to ride a horse back in the day to get from place to place. Now, in the west, you may just learn to ride a horse for pleasure and nothing else. It doesn't mean you should take offense to someone stating that fact though. Really, one just comes off as insecure when doing that.
- peteretep 9y ago> I have the feeling that knowledge > about bits is lacking by a lot of > younger coders. And I also think > this is what causes bloatware From a management perspective, I wonder if people find older developers miss obvious solutions that involve throwing small amounts of money and/or hardware at business problems, and instead turn to "clever" solutions that are costly in terms of extra developer time needed for developer and maintenance. Certainly when running technology in an SME I found my gut feelings about many cost/benefit questions were often invalidated by the ever-decreasing cost of computing power, both in terms of physical hardware and cloud resources.
- afpx 9y agoIt depends on the person, obviously. But, I hope you sprinkle in a few of those types of analysis questions in your standardized interviews so that older people like me even have a chance. It hurts (both emotionally and financially) to be rejected by younger teams because they assume things about me that aren't true. I now get the dreaded "has too much experience and would be bored" rejection line all too often.
- fundabulousrIII 9y agoThere is only one way to go there. Start a consultancy and be your own boss. That is about it for us older folks. Most of your customers don't want stellar code: they want you to fix what is broken (which is simple enough).
- xorcist 9y ago> I wonder if people find older developers miss obvious solutions that involve throwing small amounts of money and/or hardware at business problems, I regularly see the exact opposite: People throwing money and hardware at problems instead of doing the simple and obvious thing. I guess that makes me officially old.
- eru 9y agoYou can often see a bit bump in complexity when going from single computer to some kind of cluster environment (be that hadoop or similar). That complexity also often decreases efficiency. So it can be useful to think a bit to be able to stay on one machine. But making those trade-offs is exactly what engineering is about, and what's hard. So talking in the very abstract is seldom useful.
- afpx 9y agoRecently, I started helping out data engineering teams improve performance of their big data processing pipelines. Man, was I shocked. Very smart, highly educated, mid-level and even senior software engineers seem to know very little about bits these days. When they'd run into a memory issue, their natural response was to just spin up a few more servers and throw another terabyte of memory at the problem. Makes sense, I guess - until their CFO saw their pretty exponential curve in infrastructure costs.
- hasenj 9y agoIt's lucrative for SaaS providers to convince developers that they don't need to care about performance. Just throw more memory at your problem. We'll be there to provide you all the hardware you need. wink wink.
- Illniyar 9y agoAnd did knowledge of bits help solve the memory issue?
- afpx 9y agoThat was implicit. Of course it did! :-) And, cut server costs in half, too.
- auggierose 9y agoI like bits, too, but cutting it in half means it is still exponential ;-)
- afpx 9y agoTo be fair, the savings are way above 50%, honestly. But, I didn't want to claim a bigger number without digging in more, and 50% was a very conservative upper bound. But, yeah, you're right.
- MichaelGG 9y agoI've done stuff where memory usage shrank from 30-60GB to under 2GB, and load times went from many minutes to essentially instant (mmap on the bits Vs needing to build objects).
- keithnz 9y agothere's still the whole other world of coders doing "embedded" software. They are still happily bit fiddling in blissful ignorance of web development fads. I only do a little bit these days, but one of the micros I program only has 20bytes of RAM to work with and requires bit magic. :)
- digi_owl 9y agoSadly many these days conflate "embedded" with RPi, Beaglebone or some other SoC on a board...
- eru 9y agoEven the chips you find on your credit card have quite a lot of RAM these days, don't they?
- spatulon 9y agoIn the automotive world (with the exception of infotainment and assisted/autonomous driving systems), ECUs have amounts of RAM measured in kilobytes, not megabytes. I've left the industry now, but I /think/ the powertrain ECUs I worked with usually had around 256KB of RAM.
- fundabulousrIII 9y agoThat is a fascinating world to me. I've about 25 years C, rudimentary intel x86 asm and good ability to understand new hardware. Seems to me that at 40+ this is an industry that I could still be of use in. Any pointers?
- smnscu 9y agoAgreed. I like this list of somewhat common bit hacks (the popular Bit Twiddling Guide): graphics.stanford.edu/~seander/bithacks.html
- oblio 9y ago> I have the feeling that knowledge about bits is lacking by a lot of younger coders. I optimize for what they pay me for now. I also optimize for what I think they will pay me in future. The super efficient C solution might be an salary dead-end when management also accepts a huge Hadoop solution :)
- Illniyar 9y agoWhy? I mean if you look at the majority of work that programmers do today - frontend/backend web development and apps, there is no need to have knowledge about bits. In fact, if I see someone using binary operators in languages such as Java,JS,Ruby etc... I'll immediately consider it bad code, regardless of context - it's just not the right tool for the level of abstraction in these languages. The fact is that in these products (frontend/backend web development and apps) the performance profile is dominated by bad algorithms, wrong data structures, slow libraries, missing db indexes etc... which knowledge about bits help absolutely zero with. Large binaries are also not dominated by code you write but rather by using too broad libraries or simply from huge assets. The only thing I'd consider knowledge of bits to be of any help to a run of the mill developer these days is the knowledge that floating point numbers don't multiply/divide well - but that kind of knowledge can be imparted without really diving into how bits work.
- bitexploder 9y agoThis 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"?
- mysterydip 9y agoAgreed. There's plenty of applications even today where this kind of mentality is helpful (embedded or real-time systems, for example). It's not even necessarily about squeezing cpu or memory performance, but finding a solution that is "native" to how computers work: binary bits.
- throwaway2016a 9y agoI find it incredibly hard to believe that any young code with a freshman level Computer Science education would now know bits inside and out. Then again, I went to college 10 years ago and I went to one of the better schools so maybe they don't teach that anymore? I also acknowledge that with the invention of "code bootcamps" a lot more coders have never been to college than before. Effectively, I think, creating two types of programer that has nothing to do with age. Both types have their applications they are good at.
- wmu 9y agoI'm a low-level programmer and it's the first time I come across the linear-feedback shift register. I would say it's rather a part of digital circuits design. Now, when FPGAs become more and more popular, people will be forced to learn VHDL languages and then different lesser-known techniques will surface. (It's a naive prediction, I know.)
- thesimon 9y ago>Now, when FPGAs become more and more popular, people will be forced to learn VHDL languages and then different lesser-known techniques will surface. Isn't that already part of a normal CS degree? We needed to learn VHDL to program a Atmel ATTiny for class.
- maffydub 9y agoAre you sure you learnt VHDL? As I understood it, the ATTiny isn't an FPGA but an 8-bit microcontroller. Learning some form of assembly language at university is (probably) reasonably common. Learning VHDL (for programming FPGAs) is less common - I did for my Computer Science degree, but this was about 15 years ago, so I don't know if it's still common.
- ctw 9y agoJust one data point, but I'm currently at school for Computer Engineering and we learn and use VHDL and Verilog for several courses. We use it to program Altera FPGA's.
- maffydub 9y agoGlad to hear it's still being taught! I was using Altera FPGAs too, although I suspect they're quite a lot higher gate count now. (My second year project was an FPGA implementation of the EDSAC computer from the 1940s - https://en.wikipedia.org/wiki/Electronic_delay_storage_automatic_calculator. https://en.wikipedia.org/wiki/Electronic_delay_storage_autom...)
- laydn 9y agoI agree. Unfortunately, it feels like there is so many people out there lacking the fundamental engineering background to write software. I once spent an hour "optimizing" a piece of code that ran in 15 minutes, which tested an embedded system. The resulting code ran in 4 seconds. The root cause was a complete misunderstanding of how microprocessor interrupts work. I spent a week re-writing a 4000 line C-function, which ended up to be around 50 lines of code, doing the same thing. The root cause was a complete misunderstanding of how state machines should be constructed. These types of rookie mistakes by itself don't worry me. But the "trend" seems to be that young coders graduate with less knowledge about the underlying hardware on which their software will run. I feel like just like Mathematics and Physics, low level programming / microprocessors / computer architecture classes should be part of many university curriculum. (Oh and I think they should teach about version control systems in college as well, but that's the topic of another story!)
- LeifCarrotson 9y ago> lacking the fundamental engineering background to write software.... young coders graduate with less knowledge about the underlying hardware on which their software will run. There's a lot of software being written in Excel macros and Wordpress web development. These tools actually get work done - they automate things that were not automated before, they publish things that were not published before, and they generate revenue and improve productivity. Young coders, and the authors of these programs, should not be forced or expected to go through low-level programming classes to get work done. The tools are good enough and the hardware is fast enough that for 99.99% of all projects, they don't need this expertise. I say this as someone with an EE degree (from less than a decade ago) consisting of classes that spanned the entire pyramid of complexity: from analysis and simulation of individual transistors, through construction of a CPU on an FPGA, through writing an RTOS for a microcontroller, up to programming a web server. That understanding benefits me greatly in what I'm doing today. But I work with plenty of people who don't have that background. For all the business logic that seems to be found in any software project, that's just fine. Most of the work is in translating people's desire for the software to "do what I want" into actual requirements and then codifying those requirements into a database or UI. For construction of state machines, they should use a library or have someone more competent construct the framework and let them implement the actual states, and when the work requires an understanding of how microprocessor interrupts, they should defer to someone who understands that technology. And yes, they should teach some version control in college as well. It would be enough to give students one major project that ends up with the filename laydn-Project-complete-final-actuallyfinal-3-done-8-29.zip, which just worked a minute ago after which you barely changed anything and now it's completely broken, and that thing that worked once stopped working at some unknown time in the past. Then just mention that git and svn are things that exist.
- dakom 9y agoAnecdotal evidence - I cut my teeth on C and a dabble of asm as a kid (even writing z80 opcodes directly for fun!). I vaguely remember wrangling bits to drive logic. I also wrote webpages as Apache C modules with binary logic to parse requests :D That was a long time ago in tech terms (~15 years). In the intervening gap I spent most of my time in scripted languages (as3, c#, etc.). Result? I don't know how to wrangle bits anymore. The added speed increase I'd add almost definitely isn't worth it (for example, flash and unity games, web services, etc.). That doesn't mean it isn't worth it for the end product - I rely on Unity, Adobe, Google, etc. to worry about those optimizations so I can stand on their shoulders and benefit. But in terms of cost/benefit, getting into that stuff myself (again) just didn't make sense for most of my professional needs.
- ksk 9y ago>I rely on Unity, Adobe, Google, etc. to worry about those optimizations so I can stand on their shoulders and benefit. It seems to me like they might be doing the same thing! For all the supposedly smart people they hire, TBH I can't think of a single product that feels fast/performant to me.
- dakom 9y agoUltimately that's a subjective call. If I had to write the Unity Editor and enable it to hit the targets they do - man I don't even know where to start. Seems like voodoo to me, personally I'm extremely impressed but I admit it might just be my lack of knowledge of what's possible now (last time I did low-level graphics stuff was amateur mucking around with mode 13h and SDL)
- seanwilson 9y ago> I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware. I don't think this is true. I used to code in assembly and knowledge of bits is largely irrelevant the vast majority of the time now outside of graphics algorithms and low-level number crunching. Algorithmic growth and memory usage are always going to be important though.
- i_cant_speel 9y agoI think that working with bits is still a standard part of a Computer Science program. I took a class last year dealing with logic gates and bits. I also have a couple of friends that went to other schools that also took the same kind of class. While the information is nice to know and helps every once in a while (like understanding these articles better), I just don't think it's nearly as necessary to know as it used to be.