by digi_owl · 10y ago · 0 comments
https://www.amazon.com/Code-Language-Computer-Hardware-Softw...
I still say there are that many layers of abstraction, maybe more. Individual bits, ganged as words, with logic to treat as such, and ability to store and move along a bus. Then you add the ability to act on data: Control logic, arithmetic units, caches, and interpret data as instructions -- microcode running in the CPU, and processor instructions.Now move up to main memory, storage subsystems, networking, graphics (GPUs!!) etc. etc. etc. That gets you through the hardware. Now add software: BIOS, operating system, drivers, user space code, compilers, interpreters, it just goes on and on. And for every one of these giant groups of something, there are just so many logical groupings and abstractions.
It's like individual cells in a body, forming organelles, forming organs, forming creatures. So many layers of organization. Amazing beauty.
But always at the bottom of the pile, there is a switch.
Last year I saw a talk [1] where the guy told the story of a bug on web application. It was a scheme->js (based on bigloo) framework. Many servers were involved only one had the bug, some exception, digging led an arithmetic issue (some NaN or oo), then to a floating point issue, many wrong theories about low level architectures. Turns out it was a locale problem, changing the libc parsing of float (, vs .). Who said text was easy ?
[1] was lucky and proud to grab a seat at C. Queinnec (of L.I.S.P) jubilee.
On that note, my laptop had developed this issue that it will no longer see the charger if i leave it plugged in across a sleep cycle.
Only way i have found to temporarily remedy this is to unplug the charger at the wall, wait, and eventually it will momentarily think it has been plugged in before going back to an unplugged state.
This is where using multiple debuggers simultaneously is extremely helpful. Where the control flow diverges is where the problem is likely to be. The other skill that's valuable is binary search --- narrowing down the "window" between when everything is still OK and when something goes amiss, gets you exactly where the bug is.
https://blogs.oracle.com/ksplice/entry/attack_of_the_cosmic_...