
Computer Science from the Bottom Up (2016) - merlinsbrain
https://www.bottomupcs.com/index.xhtml
======
delsarto
Author here ...

Yes as pointed out many times not "computer science" and I somewhat regret the
name. However, it came out of me being a teaching assistant for people doing
computer science degrees. A surprising number of people got to 3rd year
operating systems courses without realising things like 2^10 is a kilobyte,
2^20 is a megabyte, etc. Let alone how a program was linked and loaded. I hope
for this to be helpful, there are plenty of similar resources but sometimes
the way one person says something resonates more than another.

I deliberately wanted to avoid x86-only to illustrate for similar reasons.
Unfortunately Itanium proved to be a poor choice, ARM would have been better,
but it gives me something to update if I get time! However, much of the basic
content still remains relevant many years on.

~~~
acbart
Isn't it amazing how people pass courses, even perhaps demonstrate mastery at
a point in time, but manage to get to later courses without fully
understanding things? Students end up with a very strange mental framework by
the time they graduate, and it seems like most students actually know
shockingly little. I don't know that there's a solution, or even that it's an
issue. To me, this is simply a reflection of how people learn.

Regardless, this seems like a nice little document for those 20% of students
who are still willing to read supplementary materials. Then again, this is
short and clear enough that if it were properly chunked within a course and
had graded assignments attached, many students would probably actually skim
it.

If you ever want to develop this some more, I hope you'll consider something
like Runestone[0], in order to give it some auto-graded questions along the
way!

[0]
[https://runestone.academy/runestone/default/user/login?_next...](https://runestone.academy/runestone/default/user/login?_next=/runestone/default/index)

~~~
henrikschroder
When I did my CS programme decades ago, we all started with Scheme, which is
very high-level, and forced everyone to focus on the algorithms, the math of
it, instead of what the hardware is doing, or how the Scheme interpreter is
implemented. It gets you going, thinking about values and execution and
iteration and recursion.

Starting with bits and bytes and hardware would be pretty goddamn boring, I
think. You'd lose a lot of students that way.

That said, in the third year we had a course in analog electronics, which was
basically transistors and logic gates.

Following that course was one in digital electronics, where we all built our
own little toy 8-bit computer, wiring the CPU ourselves, writing the microcode
ourselves. I'll never forget the a-ha moment when you realize that your
instruction set are just binary patterns representing which wires to put a
current on, which units to toggle on and off. The instruction to move a value
from a register to an address in RAM has to look like _this_ , because you
need to toggle the read input on the correct register, and the write input on
the RAM unit, and everything else has to be off. Blew my mind at the time.

The clock was manual if you wanted to, so you could step through and watch
your little CPU run a program, or you could set it to like 1Hz and watch the
thing go. And from there, you can sort of get how a modern computer works,
it's just a matter of going from 1Hz to 1GHz, wider buses, wider instruction
sets, but it's no longer "magic" how the CPU works, it's all ones and zeroes,
for a reason, and you now know that reason.

~~~
burfog
Scheme is deadly boring. You'd lose a lot of students that way. Starting with
bits and bytes and hardware would be pretty goddamn fun, I think.

I first really got into things with assembly language for DOS. It was
interesting to directly control the IRQ controller, real-time clock, interval
timer, and keyboard interface. These were all motherboard chips that could be
messed with.

Years later I passed a mandatory Scheme class. I tolerated it to get my
degree, but I was furious. I handed in just enough assignments to pass the
class. If the degree had started with Scheme or required very much of it, I
would have found something less miserable to do with my life.

~~~
lbatx
You make an interesting (unsupported) assertion here. You, who find talking to
an IRQ controller, real-time clock, etc. interesting, find Scheme boring,
therefore others (who may not share your interests in such details) will also
find it boring. Bit of a logical fallacy there...

~~~
acbart
I've run a lot of surveys of introductory students trying to find what topics
are more or less interesting to them. A part of my dissertation was committed
to it, actually.

At this point, I'm more or less certain you'll rarely find situations where
you have a mass-appealing context. One students' dream context is another
students Most Boring Possible. You're probably better off having many diverse
contexts and hit all the MUSIC guidelines (eMpower students, Useful to their
long/short term goals, make students Successful, make it situationally and
domain-based Interesting, and give people opportunities to demonstrate that
they Care about each other).

------
yters
While not technically all of what's covered in CS, in my experience with a PhD
in Comp. Eng., 8 years as an AF comm officer, and 3.5 years in the commercial
sector as a soft. eng., this is vastly more useful than most of what's covered
in a CS curriculum.

The CS curriculum probably made more sense back in the day when everyone was
essentially an embedded developer. But nowadays, the most useful knowledge I
have is the low level mechanics of how things like the OS and networking
protocols work. S/W eng. classes are a bit useful, but mostly knowing how to
write in C++, Java, and now Python has gotten me most of the way. As it is, I
have almost never run into a situation where most of my CS classes have been
relevant. And, where they are relevant, it can be covered by a week course in
the basics.

I feel the CS curriculum would be much better service for students if it
covered more of the knowledge of how to get things done. And not in a faddish,
framework du jour manner, but there are constant elements throughout all the
fads that a good developer should learn cold, and are not covered very well,
at least in my 8 years in CS academia.

IMHO the real problem with CS is that it's driven by AI envy, and much of what
is considered important only makes sense in light of the assumption the human
mind is basically a computer, and CS is all about how to recreate a human
mind. However, almost none of that line of thought matters in the real world,
and is most likely false.

~~~
chrisseaton
> the CS curriculum

There is no 'the' CS curriculum. You must be thinking of one particular
school's CS curriculum, like maybe your own? Another school's CS curriculum is
going to be wildly different.

~~~
yters
Most CS curricula I've seen have commonality, at least in the US and UK, with
a significant focus on math, algorithms, datastructures, and so on. A lot is
interesting, but most is useless for normal work. I think it all should be
kept, but the curricula should also be designed with the fact that most
students will not become CS researchers, and will have normal programming
jobs.

A curricula, OTOH, that prepares a student to be a good developer should also
have a heavy emphasis on: \- #1 is write a lot of code with a focus on good
coding practice, preferably in a combination of Python and Java or C++ \-
Understand Linux and be proficient with command line tools

------
gumby
Here’s a slightly different take: The Secret Life of Programs
([https://nostarch.com/foundationsofcomp](https://nostarch.com/foundationsofcomp)
). It starts with a practical set of things and then ends with some survey
overviews for people who want to know more.

A complement, not really an alternative, to this pdf.

(I fumble fingered this the first time and left out the link! Unfortunately I
can't delete the confusing comment but fortunately it is being downvoted away)

------
dillonmckay
This seems more for OS fundamentals than full-on CS, still good, though.

------
userbinator
Previous discussions:

[https://news.ycombinator.com/item?id=13249675](https://news.ycombinator.com/item?id=13249675)

[https://news.ycombinator.com/item?id=7611093](https://news.ycombinator.com/item?id=7611093)

------
smitty1e
Seems an excellent place to mention
[http://linuxfromscratch.org/](http://linuxfromscratch.org/)

------
barbs
Related: nand2tetris:
[https://www.nand2tetris.org/](https://www.nand2tetris.org/).

 _" This site supports a course and a textbook that guide students and self-
learners through the construction of a modern, full-scale computer system -
hardware and software - from the ground up."_

------
Thorentis
> "This bit is crap"
> ([https://www.bottomupcs.com/chapter02.xhtml](https://www.bottomupcs.com/chapter02.xhtml)
> under "Reordering")

Might want to proofread some of this and remove the ... proof-reading notes?
Not sure what you thought was crap about this section?

~~~
delsarto
I think in my mind at the time I was comparing it to Hennessy and Patterson;
something that is obviously playing a in a completely different league!

Over time I have become a bit more realistic :) I've stopped worrying if it's
better or worse than anything else. As long as it's factually correct, I think
a rising tide floats all boats so the more we all write and read others work,
the better off we'll be.

------
monoideism
Looks like a decent resource for Unix OS / system programming, but it's
definitely not computer science.

~~~
lbatx
Agreed. I don't see how you can leave out (among other things) databases, Big
O notation, networking, and call it a computer science primer. Good for what
it is, but misnamed.

------
hootbootscoot
This is great. It covers a pretty wide range of stuff one is presumed to know
and allows for both a big picture view and sufficient detail for some "hole-
filling" and connection between ideas. I would consider this an interesting
lecture series.

------
arm1c
Does anyone know if there's a book like this? Basically intro to OS but
conceptual stuff only - for someone who didn't take it in school and wants to
learn the high level details, not to the level normally covered in a college
course.

~~~
FiberBundle
Computer Systems - a Programmer's Perspective

------
m10i
I have this favorited/bookmarked for the foreseeable future. Thank you for
working on this (I hope it's still an active project if readers point out
discrepancies)

------
quocble
Not very good to be honest. Nothing about schedulers, bootstrap, and most of
it is very general information. it doesn't give actual clear picture how
everything comes together, and it is very system specifics (unix). CS should
be agnostic to any system architecture. You do cover binary , but the more
fundamental question what is the foundation of binary mathematics. It goes
back to Turing machine, and how transistors are built and how you compose them
into bigger units, and then you talk about CPU architecture, the adder,
multiplexer, the PLU, etc.

~~~
malandrew
Can you recommend one or more resources that you think do a better job
achieving a bottom up approach to CS?

------
yellow_lead
This looks like a great resource. I wish I had it for my OS class.

------
gumby
Here’s a slightly different take: starts with a practical set of things and
then ends with some survey overviews for people who want to know more.

A complement, not really an alternative, to this pdf.

------
rodneyzeng
Call it Information industry corners from bottom up.

------
TwoNineFive
I remember reading this a few years back.

I stopped reading at some point because there were so many errors, unfinished
bits, and just flat-out garbage.

Sorry to the author but this needs to improve. It's a good start, but you need
to invite fixes and implement them. Put your email address on every single
page and invite fixes and then implement them.

This could be an awesome resource, but right now it's too full of errors to be
useful.

Nobody should be recommending this. Nobody who had actually reviewed it all
would recommend it.

~~~
delsarto
Everyone who tries to create something eventually comes up against being told
their work is flat-out garbage. Unfortunately I don't think there is a
vaccination for it, and one must just take their chances and hope to build a
mental immunity so it doesn't ruin your day. It's sad to say that many don't
develop a resistance, and I think we lose many good contributors that way.

~~~
outoftheabyss
It's always good to take constructive criticism but when the negative
commenter contributes little of worth, both in the comment and to the wider
community, I think it is safe to ignore.

Thanks for sharing

