18 ms·
Computer Science from the Bottom Up
- brundolf 6y agoThis seems highly focused on systems; I wouldn't call it representative of "Computer Science" as a whole. Only maybe 2-3 of the classes in my computer science degree were focused on this kind of stuff. Still seems like a good resource, just perhaps mislabeled.
- macintux 6y agoI’m surprised you had that many. My CS program had nothing comparable that I can remember. Definitely not computer science.
- brundolf 6y agoWe had one called "Systems Programming" that was a whirlwind intro to everything Unix (6 weeks on bash, 6 weeks on C, 6 weeks on Perl, a mishmash of SSH and everything-is-a-file and Unix-philosophy, etc) We had another called "Operating Systems" that focused on things like concurrency, building a really basic memory pager, etc (mix of C and Java I think) And we had one other called "Networking" that was sort of along the same lines as "Operating Systems" but focused on, well, networking. Mostly Java; we wrote our own application-layer protocols, that sort of thing But yeah pretty much everything else - including the more "concrete" programming courses like Data Structures and Algorithms - was fairly abstracted away from any specific system
- macintux 6y agoNice, and now that I think of it we did have an operating systems class. I know better than to trust 25-year-old memories.
- michaelcampbell 6y agoMy undergrad CS degree I don't think contained any sort of OS course, other than maybe a survey of them but there was a graduate level class that was required for any higher degree. I took it before I graduated with an undergrad because it was interesting, and it was quite extensive as I recall. That was well over 20 years ago, however.
- ivankolev 6y agoThat sounds a lot like part of the UofT CS program.
- elcapitan 6y agoYeah it's basically an Operating Systems book like Tanenbaum's "Modern Operating Systems".
- zerkten 6y ago> This seems highly focused on systems; I wouldn't call it representative of "Computer Science" as a whole. I'd agree with this, but it fits with how a certain set of schools teaches their core. They will teach a set of related classes around the topics here: computer architecture, operating systems, and networking, because this is often central to their research interests. Others will scatter this information across a number of unrelated courses to check the box, or skip it entirely because their research doesn't touch as heavily on these topics. Further research on the author suggests they are from New Zealand. I'm from the UK and live in the US. What I see taught in US CS degrees is somewhat different from what I saw in the UK, and heard about from friends in continental Europe. I imagine the author's experience is similar. A further bias from the author, and I'm making big assumptions, is that see value here because they've worked in places that do lot of system programming. Mentions of VMware and Red Hat on https://www.wienand.org https://www.wienand.org.
- nicklecompte 6y agoI was a math major (in the US) so I don’t recall exactly, but I think my university offered both BA and BS degrees in computer science, where the BA focused more algorithms and complexity (overlap with math majors) while the BS focused on operating systems and hardware (overlap with electrical engineering majors). For postgraduates there is an academic MS in computer science versus a more practical MEng in software/computer engineering. I think this is a good system - and also indicates that we are speaking somewhat past each other on what a “computer science” education looks like.
- zerkten 6y agoI think it's good to offer more options, but the focus on BA/BS in the US is weird. In the UK, it was common circa-2000 for: 1. BSc, BEng, MSc monikers to be meaningless across universities, but to be used consistently at the establishment. 2. Multiple degree paths to be available that went from something advertised as computer science to computer engineering. 3. A straightforward path directly into master's level computer science education. You couldn't make an assessment based on BS vs BA because the curriculum may be similar in both cases. Oxford used BA whereas Durham used BS with both producing solid graduates that can't be differentiated in most work (further research or industry.) My experience in the US is that hiring has kind of perverted the nature of discussions like these. The focus is on a few select algorithms and maths courses whereas the folks who've done the systems work are arguably better prepared for many real world tech roles. The last half of your degree has to be more interesting and reflective of the individual, right?
- _wldu 6y agoYears ago, systems was the general purpose CS degree. I guess it is/was classical CS. Today, there are many specialties (data, security, algorithms, etc.), but many top-ranked CS schools still offer a traditional systems degree.
- Yottaqubyter 6y agoThe reason for the name seems to be because of its focus on systems. I do agree that the way it's labeled isn't the best, but it's not trying to be representative of all Computer Scionce. In fact, it seems to specifically be trying to have a different focus than a cs degree: > This book aims to move in completely the opposite direction, working from operating systems fundamentals through to how those applications are complied and executed.
- brundolf 6y ago"opposite direction" tends to imply "the same content, just with a different order/framing". Whereas the OP leaves out the majority (not all, but more than half) of what people tend to put under the term "computer science" completely
- userbinator 6y agoYes, the same comment appears whenever this comes up on HN. Bottom-up would actually be something more like Nand2Tetris or Petzold's code.
- nicklecompte 6y agoThe introduction is a much better description: > In a nutshell, what you are reading is intended to be a shop class for computer science. Young computer science students are taught to "drive" the computer; but where do you go to learn what is under the hood? And “Shop Class For Computer Scientists” or “Systems Engineering From The Bottom Up” would have been better titles. It’s simply misleading to suggest a course comprehensively covers “computer science” without covering algorithms or complexity, among many other things.
- ggggtez 6y agoThis is not computer science. I see nary a reference to data structures or algorithms, or math of any kind. These are all engineering concerns, not science.
- neatze 6y agohmm, applied science is not engineering ?
- ravi-delia 6y agoApplied science is engineering, by and large, but it's worthwhile to have different words for different things. 'Engineering' is one, 'Science' is another, even though the latter is useful to the former. Of course, Computer Science is almost no science, most degrees are some blend of math and engineering.
- jll29 6y agoAs with anything that entirely depends who is at work. Watching Linus Torvalds is going to make you arrive at your answer, but if you followed Don Knuth, you may have to reconsider.
- globular-toast 6y agoComputer science isn't science.
- jll29 6y agoA program often is a model.
- Jtsummers 6y agoPast discussions with comments (including the author addressing the naming issue): https://news.ycombinator.com/item?id=13249675 https://news.ycombinator.com/item?id=13249675 (2016, 157 comments) https://news.ycombinator.com/item?id=21903007 https://news.ycombinator.com/item?id=21903007 (2019, 77 comments)
- dang 6y agoAlso Computer Science from the Bottom Up - https://news.ycombinator.com/item?id=7611093 https://news.ycombinator.com/item?id=7611093 - April 2014 (44 comments)
- deleted 6y ago[deleted]
- optimalsolver 6y agoI think these CS books should start with a philosophical look at what kind of thing computation actually is, rather than diving straight into UNIX file system structures with barely any context. But I guess that would be computer science from the top down.
- hctaw 6y agoGood book on that is Introduction to the Theory of Computation by Michael Sipser. One could argue it's from the very bottom up, not much practicum lies in that text.
- zaksingh 6y agoThis book was one of the best parts of my CS degree. It's the only textbook which I read cover-to-cover because the writing and narrative were so cohesive. Highly recommend.
- maweki 6y agoI am a theorist and I would say, that the bottom - as it is the foundation - is mathematical logic. And you start from there. Baffingly enough: All this theory is easily understood with 7th-grade math. Approaching from some specific piece of engineering is surely top-down.
- akersten 6y agoYeah, the first page of this book being "Everything is a File in Unix" is already so high-level and far above what I would call the "bottom-up" of computer science that this book should be renamed "Unix from the bottom-up." The "bottom" of computer science would be mathematically explaining what it means to compute, and building up to the abstraction of a Turing machine, and eventually getting to a concrete implementation of what we call programming and code. This book has code on page 2 - but code is nowhere near the bottom.
- mattwillmart 6y agoDo you know a book like this? Sounds interesting to me as someone who is very interested in computing, but never went to university. Specifically "mathematically explaining what it means to compute, and building up to the abstraction of a Turing machine" Thanks
- xbar 6y agoSimilar but different from https://www.bartlettpublishing.com/site/product/programming-from-the-ground-up/ https://www.bartlettpublishing.com/site/product/programming-...
- wrnr 6y agoThe ELF binary format, really? This is like a course advertising itself as an introduction to normative ethics and proceeding to lecture people on canon law in the 14th century in Flanders. Like sure if you into obscure shit this might be interesting but dunno what one has to do with the other.
- Joker_vD 6y agoWell, more like the common law in the 21st century in the USA. Quite useful in nowadays practice, but obviously neither universal nor eternal. But could be a good starting point as a running example, or a reference point when comparing to the "civil law" systems.
- megous 6y agoNot sure what's obscure about ELF. Almost every one of the programs I use is wrapped in ELF format, except for maybe a bootloader and scripts. If you want to learn from bottom up, then learning what programs are seems like an obvious approach.
- snicker7 6y agoLooks more like computer engineering than computer science.
- MithrilTuxedo 6y agoYeah, that kinda bothered me too. >Computer Science is no more about computers than astronomy is about telescopes.
- kingkongjaffa 6y agoIn the beginning, bell labs invented the transistor...
- tachyonbeam 6y agoI mean there were vacuum tubes and relay machines before that :) IMO relays are a bit easier to understand than transistors because it's a bit easier to understand how to implement various logic gates with them with only very basic knowledge of electronics. Also, very satisfying clicking sounds: https://www.youtube.com/watch?v=JZyFSrNyhy8&t https://www.youtube.com/watch?v=JZyFSrNyhy8&t
- pc9 6y agoDoes anyone have a comparison between this and Computer Systems: A Programmer's Perspective? I was planning to read that book and this looks like a similar resource.
- qntty 6y agoCSAPP is like the theory behind low-level (C/C++/etc) programming. This is more like a sketch of the concepts behind operating systems. CSAPP is also much longer and more technical. Where they overlap CSAPP is going to be much more complete.
- Joker_vD 6y agoSlightly off-topic, but... am I the only one who is troubled by the fact that the explanations of "fork and exec" are almost never, ever, discuss the rationale for picking this design instead of "CreateProcess()" a.k.a. "just_launch_this_exe_file()", or even acknowledge this alternative design? A student would probably expect that to launch an app, there is a system call that would do exactly that: you pass it the name of the application/executable file, and it launches. Instead, there is a small dance of duplicating itself and then re-writing one of the copies--try not to get tangled up in the legs while doing that! The fork+exec has many unobvious advantages over CreateProcess, but also disadvantages, and one of them is that it's, in my opinion, a completely unexpected approach: I can't think of any other system object that can only be created by first copying another already existing object and then overwriting the newly created one if needed. Files of any kind (folder/pipe/socket/etc)? Memory mappings? Signal handling? Process groups/sessions? Users/groups? The processes seem to be unique in this regard. How did people come up with this approach? That would be an interesting discussion, I think. Instead, it's just described as the completely self-justified, with description of "zombies" thrown in the end for boots: and the zombie processes are pretty much an accidental artifact of early UNIX design; if the fork was returning not only globally visible (and therefore unstable) PID but also an fd associated with the child process, neither wait/waitpid syscalls nor reaping duties of PID 1 would have been necessary.
- kccqzy 6y agoWell we do have a library call for launching a new process called posix_spawn(3), but it's complicated mainly because they are a lot of options you want to configure when launching a process: which file descriptors would you like to close, which would you like to share with the newly created process, what uid the new process should have, what working directory it should have, etc. It's just a large and complicated call. But with fork/exec, all of that setup becomes just normal code you run after fork but before exec. You want the child not to have a certain file descriptor? Just close it after fork. You want to drop privileges when running the child? Same thing, just setuid/setgid/setgroups after fork. You want to set up resource limits for the child? Again just setrlimit after fork. It avoids a lot of complexity in the system call itself. (Naturally, it adds some other complexity elsewhere.)
- mariodiana 6y agoI can't be the only one, but I feel pretty sure I'm in a minority among computer programmers. This "bottom-up" approach is just not the way my brain works. I definitely feel I'm a top-down sort of thinker and learner, and this puts me at a disadvantage, regarding the literature and approach in this profession. Are the terms describing the two approaches here "empirical" versus "rational"? I'm talking about building bit by bit as opposed to getting an overview and then drilling down. I definitely feel like I benefit from the second. And I almost feel like it may not be too strong to suggest that I'm actively harmed by the first. Something like the author's approach is great, for my purposes, when I already pretty much understand something. But I can't start here. Again, I feel like I'm in a minority. But anyone else have this turn of mind, too? How do you cope? Do you just look for other materials?
- rambambram 6y agoYou put into words what I've been feeling for a long time. So I guess you're not alone. I 'cope' by just turning it around: finding some meaningful project, decide what I want it to be, and then find out one step at a time how to get closer. That starts with me finding out - and then being comfortable enough with - a big overview of the project. Somehow I keep coming back at the 'work is like a hill' metaphor from Ryan Singer in his book Shape Up (from basecamp). https://basecamp.com/shapeup/3.4-chapter-13#work-is-like-a-hill https://basecamp.com/shapeup/3.4-chapter-13#work-is-like-a-h...
- AlanSE 6y agoI think it would be good to re-package this information, but for me, the critical thing that stuff like this accomplishes is comprehensiveness. You have to go through so many classes at school just to have all the knowledge base covered at all. Everything is compartmentalized by default, so that's kind of the mother of all bottom-up approaches. Top-down takes time and reflection, and re-packaging.
- beckman466 6y agoJust read page one and two and I already LOVE the conversational style of writing from the author. Who the hell decided we should write textbooks in such a dry and formal way (this has been my experience). Maybe the textbooks fail me because the author is not able to translate their excitement into text (I have ADD, so there's that too)? Of course it's also due the nature of the copyright/IP system, together with the hierarchies inherent to capitalism. The competition between workers selling their labor works to the advantage of employers/capitalists. Anyway, learning is basically just a long conversation where we learn about the feedback loops about whatever concept or system we are trying to understand and interact with. For me this author's style (and others like him) works a million times better to do that in an intuitive way.
- thamalama 6y agohttps://csunplugged.org/en/ https://csunplugged.org/en/ “Computer science” is a terrible name. Astronomy is not called “telescope science”, and biology is not called “microscope science”.
- tantalor 6y agoTelescopes and microscopes are subjects of theory of optics, which studies the nature of light. The "computer" in "computer science" is referring to turing machines, automata, etc, which are subjects of theory of computation, which studies the nature of computable functions.
- wildmanx 6y agoAs much as I appreciate such material, but this is not "computer science". Maybe "computer engineering", or some mix of "software engineering", "systems engineering", those things. Computer science is about algorithms, complexity, possibly foundations of programming languages, cryptography, database theory, those things. Not about Unix or file formats. Those are important too, but not "computer science".
- mikedilger 6y agoI'm disappointed this didn't start from "sand", quantum mechanics, silicon doping, electromagnetism, electronics, transistors, gates and latches, etc. Also, Computer Science is a much broader field than what this website addresses including very little science but actually a mixture of math (e.g. P vs NP stuff) and engineering (both hardware and software), this website addressing a subset of the engineering part.
- ChrisArchitect 6y agoanything new added? Some earlier discussion: 1 year ago https://news.ycombinator.com/item?id=21903007 https://news.ycombinator.com/item?id=21903007 4 years ago https://news.ycombinator.com/item?id=13249675 https://news.ycombinator.com/item?id=13249675 7 years ago https://news.ycombinator.com/item?id=7611093 https://news.ycombinator.com/item?id=7611093
- froh 6y agois there some real "bottom up" curriculum? in retrospect I feel lucky to have grown with the tech: * TI58C programmable calculator, a handfull of registers, load store, conditional jump, that's it, essentially a very simple assembly-like language. * then CBM basic, two letter variable names, only globals, line numbers and goto/gosub * then (turbo) pascal with scopes, still single process unicore everything * then a little 6502 assembly (not my cup of tea) * then OS/2 and unix, and Linux when it started, multiprocessing (and multi user) on unicore * ...and proper computer science (as in von Neuman, Turing, Chomski hierarchy, compilers, sorting searching and complexity, graphs, etc) * then chroot * then virtualization (on the mainframe lol, but with Linux) * then containers and in parallel to the virtualization axis threads and green threads I'm grateful this allowed me to grow into the concepts step by step and grow an intuition for what's happening. and I wonder if there is some kind of "bottom up" curriculum somewhere that follows such a path?
- randcraw 6y agoComputer Engineering departments and degrees emphasize the stuff you mention more than CS does. CE largely extends its focus on software up to networking and O/Ses and down to compilers and instruction sets. And on the hardware side, from motherboards, interconnects, and peripherals down to CPUs, with side trips into non-PC architectures like SoCs (e.g. Raspberry Pi) and GPUs. The CE emphasis seems to be on the engineering tradeoffs of computer hardware design and implementation (at the symbolic level) and how it interacts with software. However, CE doesn't seem to take the next step down into VLSI or power or heat management or chip failure or transistor microelectronics, largely which remain the purview of EEs. Not all CE programs are strict about these emphases, however. Some adopt the name CE without moving appreciably away from mainstream CS. I suspect the name 'CE' better serves some professors' priorities and helps them sell their work as being rooted in engineering rather than in the abstractions and symbols rooted in math, from whence CS came.
- giveexamples 6y agoa real bottom up would start from transistors, universal xor, flip flop memory, code execution, algorithmic complexity, data structures, abstraction, recursion, graphs, concurrency, distributed system design.
- photojosh 6y ago> transistors, universal xor, flip flop memory, These are the 'bottom up' of computer engineering, which are implementation details (my course included semiconductor physics as well). Computer science tends to look at theoretical constructs like Turing machines instead of these. The remaining topics which are indeed computer science.
- cowanon22 6y agoIf you truly want to learn computer science from the basics, I would recommend starting with Nand to Tetris https://www.nand2tetris.org/ https://www.nand2tetris.org/ and the corresponding book and labs (and Coursera courses), along with Code the hidden language... They cover how a computer is actually build from first principles. After this, Structure and Interoperation of Computer Programs and the Algorithm Design Manual.
- mhh__ 6y ago> All modern architectures would be considered RISC architectures no no no no no no no no It is sort of like RISC on the inside (uOps), but x86 is __not__ RISC on the outside, which means it has to have a thumping great decoder and a bunch of microcode using power all the time. Locally even if the microarchitecture could be considered a RISC, the architecture of an X86 computer cannot be considered RISC both on account of the irregularity of the instruction set and the limits to instruction-decode throughput because reasons already mentioned.
- asimpletune 6y agoI mean, they do provide a footnote explaining further: > Even the most common architecture, the Intel Pentium, whilst having an instruction set that is categorised as CISC, internally breaks down instructions to RISC style sub-instructions inside the chip before executing.
- mhh__ 6y agoThat's what I'm saying is wrong. Note that the instructions are RISC style i.e. some fairly large instructions decode into a pretty small number of micro-operations, which implies said "RISC" operations are actually quite bulky. Issue-width isn't everything, but ARM chips are really showing the limitations of x86.
- mhh__ 6y agoAddendum: "Wrong" is also wrong. More nuanced would be to say that for an introduction to architecture (i.e. for an engineer to draw a trend line with a fat pen on a graph), this is the kind of detail that actually matters when it comes to intuition-building, so it's misleading.
- RcouF1uZ4gsC 6y agoI think modern architectures are neither RISC nor CISC. Successful modern architectures have adopted features of both. Even the most RISC architecture these days likely has AES instructions. Even the most CISC architecture is using RISC like micro ops.
- pope_meat 6y agoThis is a free ebook, so i'm not complaining, but this part did make me laugh Atomic Operations Explain what it is. and in case anyone is curious: https://wiki.osdev.org/Atomic_operation https://wiki.osdev.org/Atomic_operation
- xuesj 6y agoIt's a good book of introduction of CS. I hope I could read this book when I was a student at university.