131 points · by thunderbong · 2y ago · 117 comments
Still, in some ways it’s a good thing. People can write good code without knowing what an ALU is, much less a flip flop.
The bigger problem is that there is little incentive these days to write good code at all; those who do of necessity know more than just their tiny domain.
You render videos, text, etc. The thing is, they are not modified further, they are shown.
When you "render" to HTML, you "render it again" for display. So it's not rendering in "Computer Science Sense", hence making the usage wrong.
Otherwise, JIT and interpreted would mean the same thing, but they're not. Because JIT allows tons of other things from a techincal point of view.
I asked my grandparents what that was about. They said they were out for rendering to pick them up.
SSR simply refers to the "render" method of the react-dom package being called on server. It's similar to, but distinct from template engine/MVC-style server side generated HTML.
But I haven’t tried to design a (extremely primitive) chip since I was in college, so there’s plenty for others to laugh at me for too.
In the context of servers, it's accepted usage to use "baremetal" to mean "running on the physical host's operating system" as opposed to in a VM or container.
But I recall the other meaning from OS class.
Web developers can write shitty code because most of the time the bottleneck is in the database. You just need to write code thats faster then the database and you don't need to optimize beyond that.
Now all the optimizations center around pointless refactorings to keep up with the newest technology trend.
Also if people are using RDS with EBS, they'll think storage IO is ~500x slower than a modern NVMe disk really is, which will warp their perception of how well an RDBMS should scale. Their gp3 SSD storage comes with 3k IOPS baseline up to 16k[0]. lol. "SSD storage". The volume size "scales" up to 16TB. You can get a new condition P5410 for $420 retail: 8 TB/drive with 100x the performance of a maxed out EBS volume.
Similar misconceptions must exist with application performance. Lambda advertises being able to scale up to "tens of thousands" of concurrent requests[1]. My 6th gen i5 can do that with a few GB of RAM allocated to a single JVM process...
[0] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/general-...
[1] https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-...
Let me put it this way. If you did everything right, then the slowest part of your web application is usually the database. Now you may find problems in the web application and fix bottlenecks there but that's not what I'm talking about. I'm talking about the primary bottleneck.
In web basically the database is doing all the work the web application is just letting data pass through. The database is so slow that the speed of the web application becomes largely irrelevant. That's why languages like ruby or python can be used for the application, that's why C++ is rarely needed.
This ultimately makes sense logically. The memory hierarchy in terms of speed goes from CPU cache to random access to fs with fs being the slowest.
Web applications primarily use fs as it's all just about manipulating and reading state from the db. while a triple A game primarily runs on random access. Games do use the fs but usually that's buffering done in the background or load screens.
This is why your reply doesn't refute a single thing I said. It doesn't matter if dbs use nvme. FS is still slower than an in memory store by a huge magnitude. Not to mention the ipc or network connection is another bottleneck. Web apps need to only be trivially made magnitudes faster then then the ipc and database and it's fine.
Your batch calls to the db are only optimizations to the db which is still magnitudes slower then ram. Try switching those batch requests to in memory storage on the same process and keep the storage from bleeding pages to the fs and that will be waaay faster.
After you fix that the bottlenecks of most web apps lie in the http calls and parsing and deserializarion of the data. But usually nobody in web cares for that stuff because like I said the db is way slower.
Do you think a game engine can afford to do this stupid extra parsing and serialization step in between the renderer and the world updater? Hell no. That's why web developers can put all kinds of crap in the http handlers, because it doesn't matter.
Though I will say I have seen a bottleneck where parsing was actually slower than access to redis. But that's rare and redis is in-memory so it's mostly the ipc or network connection here.
That is because most of the time web developers are bad at database things, it isn't an intrinsic property of database engines.
A modern database engine on a single AWS VM can readily support 10M writes/sec through disk storage, not even in memory. And run operational queries against that data at the same time. Most web apps don't have requirements anywhere close to that. In practice, you are much more likely to run out of network bandwidth to the database than database throughput if your systems are properly designed. Even the database engines themselves are usually bandwidth bound these days.
Additionally database engines usually exist as separate processes or servers necessitating need for ipc which is another intrinsic bottleneck.
If an AWS vm can support 10 million writes/sec to disk storage then a stateless web app on the same vm should be even faster doing the same reads and writes to in memory storage.
I can agree with your latter statement that io can become the bigger bottleneck these days.
Which brings me to another point.
Virtualization ensured you could decouple (to an extent) the behavior of an operating system from the actual hardware used underneath. Therefore, some hardware knowledge is often ignored, but you still need to know about the OS.
With containers, you are decoupling the application from the host operating system! Which means some OS knowledge is often ignored.
That said, abstractions can be leaky. Most of the time and in the most common scenarios, you can ignore the lower level details. No one develops a simple website thinking about NUMA cores or C-state transitions. But if you want to really squeeze every ounce of performance, or if if you run very complicated systems, then you still need to peek at the lower levels from time to time. Which means looking at the hypervisors for virtual machines (assuming you can... on public cloud you cannot), or looking at the operating system for containers.
Yes and no. The host’s kernel is still running the show, which catches people by surprise. Reference Node (or more accurately, libuv) incorrectly reporting CPU count by relying on /proc/cpuinfo, etc.
> But if you want to really squeeze every ounce of performance
Or if your C-suite orders a massive reduction in cloud cost. My company’s devs were recently told to cut vCPU allocation by 50%. Then, when they did so, they were told to do it again. My team was told to right-size DB instances. In fairness, some of them were grossly overprovisoned. ZIRP was quite a thing.
Unsurprisingly, this has resulted in a lot of problems that were being papered over with massive headroom.
Or B/G if you don’t. Still very little downtime.
containers are just a fancy "tar" package with a fancy "chroot". they shouldn't really have ever been viewed as being decoupled from the host operating system. you're still just installing software on the host.
I could have picked up the same set of books and obtained the same knowledge with a more CS focused background. The hardware stuff is harder to pick up compared to software when self learning (for most - I know counter examples). But it’s by no means impossible.
Point being, I don’t agree with the author. If you’re a cloud native engineer and you want to learn the lower levels of abstraction, you can. But the point of cloud native is that you don’t need hardware knowledge and you can focus on your product/users/hobbyist itch instead.
If I want to play with hardware, I have to buy it. I also risk having to replace it when I let the magic smoke out.
Or at least that's always been my intuition about getting started.
The list can be long and at the end, for software you need a laptop, for electronic you need a laptop + many things. And those things can cost (the shipping cost more, actually).
It's about exposure to syscalls, C, assembly, lower level debugging and just making sure people aren't afraid to touch that layer. Same goes with other foundational knowledge like packets and networking protocols
What I think the author is getting at with '8-bit' is that presenting children with a complete machine that is simple enough to understand from top to bottom gives a foundation that they can build on when they encounter more complex systems later on.
They are a much better target for teaching children about hardware.
One of the main benefits of teaching on 8 bit micros is they function like basic HW Harvard state machines, meaning their code execution is easily predictable and explainable form the diagrams on paper/whitrebaord, to the disassembly in the debugger in practice, as every CPU instruction takes exactly one clock cycle, there's no memory caching, no PLL and various multipliers and dividers for the 50 on-chip clock domains and IRQ tables, but they have on single clock from an external oscillator from which the CPU, RAM and FLASH memory, and all peripherals run on only that clock meaning it's easier to draw clock/signal diagrams to show "on this rising edge the CPU fetches the instruction, on the next clock edge, the ADC triggers the sampling, etc"
Secondly, 8 bit micros come in DIP packages easier to breadboard and are 5V tolerant meaning you can just hook them up to USB, and most of the times they have high current pins with Schottky diodes meaning you can have them rectify AC voltage or direct drive LEDs without transistors.
Thirdly, IMHO, 8bit ASM disassembly, like the Atmega AVR, is much easier to follow and understand in the debugger for beginners than the 32 bit ARM due to lower instruction count and simpler less powerful instructions that are always 8 bit, and less features that can confuse you like configurable IRQ tables or powerful instructions that cand do two operations at once per clock cycle for extra performance or optimized instructions that are 16 bit instead of 32 bit to save code space like the ARM Thumb.
8bit micros like the old Arduinos are far ore capable for learning and hobbyist tinkering than people give them credit for. People just needlessly fixate against them because "32 bit is bigger than 8 bit".
My $0.02.
Also, I can see there is a case for using a simple modern design such as Cortex-M as a base but - as the peer comment also says - it’s really not the case that a Cortex M7 is conceptually simpler than a 8-bit design.
The mentality is that computing is cheap and developer time is expensive. Write an inefficient function that wastes several thousand compute cycles but saves an hour of developer time is given priority in most cases.
This mentality works great when the function is only run a few million times (or much less) over its lifetime. But when it gets added to some popular library; distributed across millions of machines; and used thousands of times each hour on each machine; those wasted cycles can really add up.
What percentage of worldwide compute (with its associated wasted electricity and heat) can be attributed to inefficient code? Spending a few hours optimizing some popular code might actually do more to help the environment that driving an EV for an entire year.
I come very much from the old world - I learned to code on graph paper, as that was how you saved your work, and being able to wield a scope and iron was kinda mandatory for being able to meaningfully use a computer.
As tech grew up, so did I - and while it’s useful to be able to understand what is happening from clicking a button in a gui down to electrons tunnelling through a bandgap, particularly when it comes to debugging the truly arcane, I actually find that the level of abstraction I carry around in my head sometimes gets in the way.
I look at newer techies bouncing around with their lofty pyramids of containerised cloud based abstracted infrastructures, and I almost envy the superficiality of their engagement - I can’t help but look at it and see immense complexity, because I see behind the simple and intuitive userland, and that makes me run for vim and some nice bare metal where I know what my hardware is doing.
Maybe I’m just getting old.
Layer after layer of abstraction, along with immense bloat. I've run immensely complex web properties on hardware 20 years ago, that dwarfed what the average dev deploys today, yet without all that cruft?
Well, let play php and node, and use laravel as an example. Eaily 10000x the codebase, for the same result.
It's not efficient, or lean, or performant at all.
But it does do one thing.
Allow people without extensive security, database, and coding experience to push safe code quickly.
You can throw a new grad at Laravel, and they're off to the races.
I liken it to C replacing assembler. A way to abstract.
It is sad though.
But is it humanly possible to know details in every level of abstraction? There should be a balance between abstractions and knowing some details beneath some layers of abstraction. What do you think?
I’ve recently become interested in how data makes it from {INSERT,SELECT} to the disk, and so set about understanding that. You can read Postgres or MySQL’s source code and use a debugger to understand how it goes through that layer, then strace to follow the base syscalls, then blkparse to watch it go to the device driver. From there, you can experiment with forcing OS page cache drops to see when a “disk read” isn’t really a disk read, and also observe read-ahead behavior. I’ve skipped the device driver layer for now, but beyond that you can also use dd to observe changes to the raw block device. The latter is easier on a simplistic level with a few bytes at a time.
You have to be genuinely interested in this stuff though, because there are precious few companies who are going to pay you to play around like this all day.
there's a pretty comfortable parser generator in there as well (lemon), that I found nicer than bison when I was still messing around with them instead of just defaulting to recursive descent as I do these days.
An idiot admires complexity, a genius admires simplicity, a physicist tries to make it simple, for an idiot anything the more complicated it is the more he will admire it. If you make something so clusterfucked he can't understand it he's gonna think you're a god cause you made it so complicated nobody can understand it.
After 50 odd years of computing which began soldering my own from TTL chips and transistors in the 1980s I find the only way to navigate current levels of abstraction is to join the kids in their kind of optimistic, faith-based wishful thinking, just let go and float above it all.
But every now and again something goes wrong and absolutely nobody but people like you and I can even imagine what it might be.
More terrifying is meeting people with very inflated job titles, in positions of enormous wealth, power and responsibility, whose knowledge of even the most elementary physics and logic is absent. They're actually kind of proud of that, and positively celebrate ignorance all the "things they don't need to know". Part of me finds that insulting and disrespectful.
I switched schools and majors to a Computer Engineering course taught primarily by EE professors, hoping to learn about the lower-level stuff so I didn't feel so ignorant. I learned about logic gates, K-maps, BJT transistor characteristics, N/P-well doping, VLSI, and so forth. All was going swimmingly for me until it came time to take a physics course on crystal structures. At that point I realized that the rabbit hole goes very, very deep -- much deeper than I could ever hope to really fully "understand" from the quantum level all the way up to Java code.
Recognizing that I only had so much time and mental capacity to learn about the whole system, I had to come to peace with knowing that I would have to choose a layer in which to increase my expertise and then largely stick to that. For me that started out being architecture-level operating system coding in C and some assembly, but I popped up the stack a smidge to then get to C and applied cryptography.
I'm now one of the few people at my company that (IMO) understands operating systems at all. The organization is deathly afraid to do anything with the kernel that's being deployed in their Cloud instances, and most view it as some mystical "black magic" that just works if you don't touch it. Hardly anybody fully understands what a so-called "container" actually is, but they sure know all the API calls to "make the container work" and push container images around repositories. They're often surprised when things that I know will be issues with their containers ahead of time happen to them. Whenever they run into problems, they'll often open two dozen Stack Overflow tabs and try copying and pasting stuff until something seems to work. People approach me as some sort of mystical oracle who can bestow arcane knowledge of syscalls and what not when their Stack Overflow searches turn up dry.
I feel like the pendulum perhaps has swung too far into the layers of abstraction in our universities, but I'm not sure what to do about that. I wonder what will happen as people like me ride off into the sunset.
Subjects and skills that were requisite basics a generation* ago, become advanced, under the hood topics for specialists. The next generation of people need different skills in the day to day.
This post is a great account of what that feels like from the inside, from the perspective of the newer generation learning these (now) ‘advanced’ topics.
(Funnily enough, I don’t (yet) see anyone commenting "real men write assembler" - a skill that has long ago moved from required by all developers to super-specialized and not particularly useful to most people.)
*I am using the word generation in the broadest sense as it relates to cycles of technology
Civil engineers still need to understand calculus and how to analyze structural integrity even though they can rely on modern computer modeling to do the heavy lifting.
All engineers are expected to have some requisite level of knowledge and skill. Only in software do we accept engineers having the absolute bare minimum knowledge and skill to complete their specific job.
Not that we shouldn't use modern tools, but having a generation of developers unable to do anything outside their chosen layer of abstraction is a sad state of affairs.
You can require that your frontend engineer absolutely must have good assembly knowledge but you'll pay more for them and fall behind your competitors. You can require that your DBA knows how to centre text with CSS, but you'll pay more for them and fall behind your competitors. You can require that the people managing the data centre understand the internals of the transformer architecture or that the data scientists fine tuning it understand the power requirements and layout of the nodes and how that applies to the specific data centre, you'll just pay more for someone who understands both.
Everyone requires the bare minimum knowledge to accomplish their job that's pretty much the definition of "require" and "minimum", limited by your definition of someones job.
"software" is such a ludicrously broad topic that you may as well bemoan that the person who specifies the complex mix of your concrete doesn't understand how the HVAC system works because it's all "physical stuff".
> but having a generation of developers unable to do anything outside their chosen layer of abstraction is a sad state of affairs.
Whether it's sad depends if they're better in their narrower field, surely. It's great if we can have a system where the genius at mixing concrete to the required specs doesn't need to know the airflow requirements of the highrise because someone else does, compared to requiring a large group of people who all know everything.
In absolute numbers, there are probably more people today who understand the fundamentals of computer hardware then there were 40 years ago, but it's a much smaller percentage of all the computing professionals.
This is the normal state of affairs, and is really the only reason we can build meaningful software systems. Software is much too complicated, to understand even one layer of abstraction can be a multi decade journey. The important thing though, is that when the abstractions are leaky (which they always are), the leakiness follows a good learning curve. This is not true for cloud though.
Likewise how much must a software engineer understand about how hardware works before they able to do a good job?
At some point in time there is diminishing returns for someone to be truly “full stack”.
Most software engineers just produce websites and nothing that impacts the safety of other humans. Other types of engineers have to ensure people do not die.
If that was true, then there would be opportunities for entry into professional software engineering careers. Because the only opportunities there are for software engineering jobs are opportunities for "senior" software engineers. Which entails much more than the absolute bare minimum knowledge and skill.
So there's some inconsistency going on within the mindset of people who measure competence and fitness in engineering, in the broadest sense of the concept of engineering.
Maybe engineering itself, then, isn't even remotely the noble profession it is widely believed to be? Maybe engineers and even scientists aren't that really intelligent? Or intelligent at all? Maybe science and mathematics should be abandoned in favor of more promising pursuits?
If a software engineer "signs off" on software design, they have no personal or professional liability in the eyes of the law, or anywhere near the same expectations and professional/ethical oversight that comes with the territory of being a PE.
Until a "Software Engineer" can basically look a company in the face and deny a permit to implement or operate a particular stack/implementation, this will not change.
And yes, I am fully aware that this software engineer would basically become an "approver of valid automated business process implementations". This would also essentially be a social engineering exploitable position for implementing nepotistic dominion over a business jurisdiction. Hence why I'm not sure it is even a desirable path to go down.
Funnily enough my day job is writing software for structural engineers (and I am a licensed engineer). Your comments are absolutely on point. One of the most important discussions I have with senior engineers is "how will we train tomorrow’s engineers, now that the computer does so much work?"
40 years ago, the junior engineers were the calculators, using methods like moment distribution, portal frame, etc… today the computer does the calculation using the finite element method. Engineers coming straight out of school are plunged right into higher level work right away - the type of work that junior engineers a couple of generations ago might not have seen for 5-10 years.
My first career development discussion with a senior engineer was "Just work for 10-15 years, then you'll know what you need to be a good engineer."
I have discussed this under the theme of Generation Gap (https://www.youtube.com/watch?v=5gqz2AeqkaQ&t=147s, 2:27 - 8:58), and have a similar conclusion to you: what at first appears as a different generational approaches are actually different facets of a well-rounded, senior technical skill set. Maybe the kids are just learning things in a different order than we did?
Pat Gelsinger et al's discussion of the demise of the tall, thin designer is another interesting perspective (https://www.researchgate.net/profile/Avinoam-Kolodny/publica...)
I do not think it is requisite that _all_ developers have that knowledge.
(And sometimes these mainstream, practical, everyday skills stick around in funny ways: https://www.hillelwayne.com/post/linked-lists/)
Innovation stalls, improvements take longer to materialize. Machines become obsolete but there's nothing to replace it yet.
Fewer people in fundamental roles is a risk, a danger to our economic chain. We could become quite vulnerable, even crash.
If the author wants people with the lower level skills then they should filter resumes based on the degree. But then they will probably be missing higher level skills.
In the end there is not enough time to learn everything in 4 years. If you add a new class then an old class has to be dropped or modified.
I'm in integrated circuit / semiconductor design and we aren't going to even look at someone with only a computer science degree. We look at people with electrical and computer engineering degrees. Even a bachelors degree is not really enough anymore. 90% of the new grads we hire have a masters degree and there is still a ton for them to learn on the job.
If the author thinks people should have 8-bit computer experience then ask the question during the interview. If the author wants to ask about operating system topics then ask those during the interview.
I've worked with some interns and new grads that didn't have the skills I thought they should. So I added those things to my list of interview questions.
A few bright spots, however, would be gaming (the constant need to pay attention to new GPUs), and smart home/arduino type stuff.
Also, anecdotally, the best SREs I’ve worked with have had homelabs. I maintain it’s a good signal.
On one hand, you can have a router at home from your ISP, and everything seems to work fine. On the other hand, there are a lot of existing misconfigurations and security issues with these routers, which ISPs used to update their firmware automatically.
If people can set up and operate a basic Debian server and a bit of networking that I suspect is more than enough for a cloud where anything lower is concealed anyway
You’ll not realize that you could pay $1k for the server and run it yourself instead of renting forever.
You’ll never learn that arranging your cables nicely and labeling everything takes five times as long and is 100% worth it.
Or maybe you will. These things happen in waves.
Pretty soon developers will be measured by how fast they can tell an LLM what to build for them.
One was at a well-known SaaS “here’s a spreadsheet we call a database” company. I knew way more about Python than the interviewers, which became a problem because I used its stdlib to blow through the tasks they had. I then had a second interview, where they effectively asked me to code DFS. I am terrible with LC. I explained DFS perfectly, but struggled to turn it into code. The interviewer even commented that it had nothing to do with the position (you don’t say).
The other was at a quant trading firm. I had multiple interviews, ranging from “can you use a programming language to accomplish tasks” (again, Python and its stdlib was quite helpful, and wasn’t met with pushback), to DB-specific questions, to Linux internals. All of it felt extremely on-task, and had they not required me to relocate for a remote position (?!) I would’ve taken the job in a heartbeat.
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
This is of course exaggeration, and many great programmers did in fact start with BASIC, but more importantly, Dijkstra wrote this in 1975, when BASIC really did have some glaring flaws. '10 PRINT "HELLO WORLD"\n 20 GOTO 10' has appealing immediacy, but it sets students down the path to spaghetti code. A modern structured BASIC, or perhaps MicroPython, is a much better starting point.
And that's problematic on an 8-bit machine. IMO, an educational computer should have a flat address space without paging. Paging isn't relevant to modern computers; it complicates things without teaching anything valuable. The natural address bus for an 8-bit machine is 16 bits wide, and that limits you to only 64KiB address space without paging. For simplicity, the frame buffer should live in this address space too, so you don't have much left for a modern programming language (ideally stored in ROM in the same address space), especially if you want things like user-friendly error reporting and built-in documentation, which you probably do (think of QBASIC).
Therefore, I think a 16-bit computer is better. I'd prefer something like a 16-bit version of Ben Eater's breadboard CPU[0], using SMD components on a PCB to allow for speeds fast enough for interactive graphics. All chips should also be available in DIP for easy breadboard experimentation too. It should support fully static operation, with a pause switch and a single-step clock button, indicator LEDs for all the registers, and test points everywhere you might want to inspect with an oscilloscope. It should have a simple GPU that just converts a 320x240 1-bit monochrome frame buffer to VGA, with memory access interleaved with the CPU. The CPU can poll for vblank. Support for PS/2 or similar serial keyboard input, with a FIFO buffer so you don't lose keystrokes. A very primitive distinction between user space and kernel space, where some RAM is read only unless the program counter is in ROM. Although I generally like the PEEK/POKE anywhere freedom of the old 8-bit machines, I want this feature so it can support a memory monitor and disassembler in ROM, which is jumped to by triggering the single non-maskable interrupt. The monitor can copy all the registers and framebuffer to the kernel RAM on entry and and restore them on exit, so it's always possible to inspect things or debug any problems you might run into and continue afterwards. Data storage could be via a simple audio interface, like the cassette tape data storage on old home microcomputers. Advances in both software and audio recording hardware should make this substantially faster and more reliable than it was back them.
This computer would have maximum observeability and ease of understanding, while still being advanced enough to be user friendly and interesting. It should even be powerful enough for games, which will provide some extra motivation.
[0] https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2...
https://www.thebyteattic.com/p/cerberus-2100.html?m=1
It doesn't match your concept precisely but it has concretely implemented a good combination of observability and capability - graphics, sound, keyboard support. The BASICs can be safely ignored in favor of Forth, which goes directly to the point of tangibly understanding the machine - Forth programs are already structured code, interactive, with extensible syntax, but they also let you crash the computer in moments with a bad memory write. The pedagogical value is immense within an 8-bit environment.
AI is further proof that our systems aren’t simply getting easier to build around.