
Computer Science from the Bottom Up (2013) - Chesco_
https://www.bottomupcs.com
======
delsarto
Thanks, I wrote this!

It was a bit of a different time, when docbook was the way to publish, when
Itanium was the 64-bit architecture, things like go and rust didn't exist and
we used bitkeeper. But most of it is still relevant, and despite acquiring 2
kids since I started still have some ideas.

Yes yes, it's not Alan Turing-esque computer science. I have taught algorithms
and data structures courses as well as operating systems courses to "computer
science" students and this is more the second obviously. You gotta know both!

All I can say is that being a professional now for some time, anyone who knows
this stuff is welcome in my team, no matter if we're bit banging hardware or
writing JavaScript. When you have some concept of what's happing underneath,
you write better code and, more importantly, are a better debugger.

I'm mostly cloud-y devops-y these days ... But when your CI triggers a kernel
panic or a crash in some low level libray, it's nice to be able to go digging
and send a patch upstream to fix it :)

~~~
ivoras
Just as idle inquiry about the "CS" term, do you think the name "Computer
science" would still apply (and did it always apply) to things such as CPU and
OS architectures, the toolchain, etc - basically the subject of your e-book?

I am under the impression that there's a distinction between "Computer
Science", which is algorithm and data structure design and analysis, and
"Computer Engineering" which is basically everything else, from the hardware
level up.

Or is this mostly a European distinction?

Because my friends who do "real CS" at various universities generally avoid
anything which has to do with hardware and practical operating systems, and
are basically mathematicians working on problems relatable to computers -
their language of choice is TeX, not C. More like Turing instead of Torvalds.

~~~
60654
I'm not the OP, but have spent more than my share in CS departments in the US.
:) I think it's more of a EU/US distinction.

In the US, CS departments typically include both the theory (of computation,
algorithms, data structures, complexity, etc) as well as a healthy dose of
applied CS, which then divides up into: systems (operating systems,
networking, etc), applications (scientific computing, AI, etc), interfaces
(graphics, HCI, etc) and a number of other ones depending on the department.

This topic definitely fits into intro-level material in a systems division of
a CS department in the US. In comparison, US "computer engineering" tends to
include much more emphasis on the hardware (including CPU design, circuits
design, etc) and overlaps with CS in low-level aspects of systems. How about
it?

------
gravypod
I've been rattling this idea around in my head and, although it may sound
crazy, I think C is a little high level to start an adult out on.

I know many people won't agree with this but all of the people I admire in the
world of CS and everyone who is a true scottsman for all intents and purposes
loves dipping down to a lower level once and a while. I think the best way to
learn about computer science it to program for a machine so simple anyone can
understand how every bit works. No magic.

One such example of this is old retro computers. Systems like old Z80
machines. If I wanted to teach everyone how to be an amazing programmer I'd
start them out on an old broken computer, help them fix it and get it working,
help them get programming and wet their feet copying in some hex values to get
some binaries programs working, start them up with a notebook and give them
"homework" of a few really useful routines to write for themselves in
Assembly. They'd write the assembly and compile it with pen and paper so ther
really understand what's going on. Then we'd write an assembler together, then
from an assembler we'd write up a standard library, then from there we'd get
to a compiler for a language they make up. After that the sky is the limit.
Maybe help them start writing their own ROMs for the machines and see where
they can take it. (Maybe 6 months to 1 year)

If someone was able to get through that they'd really, truely, understand
everything in the computer. Funnily enough that's what most of my CS education
feels like right now (except much less fun and I'm learning less then I would
from this). Intersplice these sessions of training with lectures of computer
architecture, basics of electronics, how each of the components in the
computer works, different protocalls and why they are used. You'd be very well
rounded and pretty much well suited for many programming jobs. Follow this up
with a slow maybe 5 week transition period where you come back to a modern
computer, learn some C and why C was made, learn some LISP was made, and then
apply that to real world projects while only introducing new technologies and
concepts only when they are of imediate use and then allow the student to
learn directly from taking advantage of the benifits of these technologies.

I think a student would come out very well rounded from something like this. I
wish I could pay for an education like this.

~~~
Ar-Curunir
Computer science is not about computers; where does stuff like algorithms fit
into this?

What is a "true scottsman" of CS? Low level programmers? What about people
that have pioneered the theory of computer science? The likes of Karp,
Valiant, Cook, Blum, Vazirani, Papdimitriou, Micali, Goldwasser, Goldreich,
Shamir, Rivest and etc.?

I doubt these people know the inner workings of computers, but they have
revolutionized our view of what it means to compute.

Increasingly today the underlying architecture, for most intents, is becoming
irrelevant (to first order of magnitude). The biggest gains are not made from
superoptimizing compilers, but from algorithmic efficiency. That doesn't
figure anywhere in your curriculum.

I think your curriculum would be great as an intro to computer architecture,
or even as a series covering the topic, but I don't think it's an adequate
introduction to computer science.

~~~
realo
Maybe I am too old, but from my vantage point, "Computer Science" and
"Algorithmic Science" are really two entirely separate fields.

Computer Science is exactly what the OP talks about: computers, CPUs,
implementation details, hardware, plumbing, etc... One needs actual hardware
on the table to work this out. Imperfect hardware, with latencies, clock
issues, etc... THAT is true computer science, IMHO, and is very near
Electrical Engineering.

On the other hand, Algorithmic Science really is an applied form of
mathematics. One does not actually _need_ a computer to design, understand,
invent algorithms. A brain, paper and pen are enough.

Those are two different sciences, and I suspect very few people are actually
great (world class) in both simultaneously. It is futile to imagine that a
single school curriculum would adequately form people in those two very
different topics.

I could add that where I work, we have in-house the two kinds of people: a
couple of mathematicians for the (amazing algorithms) and a few very picky
low-level programmers who actually implement the algorithms with blazing fast,
hand-crafted code. The two groups would never dream of doing the other's job.

~~~
asimpletune
Science is the pursuit of truth, whereas engineering is the art of balancing
resources and time to achieve a concrete goal (like a product). In that sense,
Computer Science is the pursuit of observing, classifying, and predicting of
computation phenomena, whereas Computer Engineering is the actual practical
matter of building things that take advantage of computation phenomena.

~~~
perfmode
Best distinction so far.

------
ensiferum
But this isn't a comp sci book really since it doesn't actually cover any comp
sci topics such as the analysis of computer programs, algorithms and data
structures.

~~~
gravypod
That's one portion of computer science. Computer science encompases, in my
mind, the study, operation, maintnence, and information that is required to
perform computing tasks of the modern era.

It's no use to know about algorithms and complexity if you only know how to
sort punch cards as that isn't a modern day computing task.

A computer sceince background inherently implies software development
background. This also includes an understanding of low level implementation
and backing hardware that makes computation possible so you may understand the
limitations of the hardware and how to engineer within those constraints.

An algorithm that takes infinite time for 1 instruction is O(1) and still
constant time. An algorithm that takes infinite memory for every run is still
a constant memory complexity. Knowing this tells you nothing about how
implementable these algorithms are and thus a focus on only this algorithm and
datastructure portion of computer science is useless without practical
applications and an understand of how to go about implementing and discovering
your own data structures and algorithms for real life tasks.

~~~
Ar-Curunir
Algorithms and complexity theory are independent of any physical model of
computation; they capture _what it means to compute_.

The entire field of theoretical computer science stands as a counterexample to
your comment. Computer science is not about software engineering.

~~~
Klockan
Computer science assumes that the code is run on a machine with a very
specific set of operations since otherwise you wouldn't be able to calculate
time complexity. The set of operations were deliberately chosen to be a
reasonable abstraction of a modern computer. Thus computer science would look
very differently if computers had different capabilities.

For example, lets say that a new computer could switch places of two blocks of
memory in constant time no matter their sizes. That would completely
revolutionize computer science since many of our old results hinges on the
fact that moving memory takes linear time.

~~~
Ar-Curunir
The extended Turing thesis says that whatever is efficiently computable in one
"reasonable" model of computation, is also efficiently computable in another
reasonable model of computation.

Of course, the truth of this thesis has been called into question with the
advent of quantum computers, but it holds otherwise.

------
33a
More specifically operating systems from the bottom up. The title suggests
this is far more comprehensive than it actually it is.

------
DonaldFisk
This is very Unix, C, and Intel specific, to the exclusion of practically
everything else. It's quite a good introduction to some aspects of those, but
the title should be changed to make this clear.

------
sepetoner
As someone who was trained on the hardware side of EE, but has a passion for
general CS and is truly fascinated by it, I believe this book will be perfect
for me. I have programmed on and off for years with varying levels of
intensity, but have never truly understood and studied the lower level aspects
of what I was doing. My programs range from robot control to web apps, but all
have been on the uppermost levels of abstraction.

I will read this over the course of the next few days and edit this comment
with my thoughts and notes.

~~~
gravypod
If you want to try something out but get put off by some of the C frustrations
like dealing with memory and working out how to deal with the standard library
you should pick up a cheap copy (or download the free copy) of Structure and
Interpretation of Computer Programs. It's a book that walks you through,
program by program, all of the basic concepts of programming languages,
computation, and programming in a clear and orderly mannor. You'll learn LISP,
which to someone who works on lower level systems may not be of any use to
you, but it is choosen because it is the simplest language to learn that will
allow you to on your own pase explore different concepts dealing with
computation.

The book is well worth the $10s you pay for it and it isn't written like a
textbook and more like a tutorial/walk through the park of computer science.

~~~
peller
I remember trying do do that years ago, and getting hung up as a newbie on
there being a million different LISP implementations. I think I tried to use
Racket, if I remember correctly, but whatever I picked didn't support some of
the book's LISP statements out of the box. Any recommendations for a more
friction-free experience?

~~~
kazinator
I remember trying to learn a garbage-collected language with curly braced
blocks, functions and infix operators years ago, but was hung up on there
being a million implementations. I think I tried to use Java, but was hung up
on the book's C# statements that weren't supported out of the box. Any
recommendations for a more-friction free experience?

How about this recommendation: _use the exact same language that your book or
tutorial teaches!_

Racket has even gone out of its way not to be named Scheme (it was a Scheme
once called PLT Scheme, but changed its name). Scheme, in turn, went out of
its way not to be named Lisp.

A tutorial that purports to be about Lisp is quite probably about a
traditional language which has characteristics such as the symbol nil being a
self-evaluating expression representing the empty list and Boolean false.

~~~
gravypod
I don't think this is a fair comparison to what the GP is saying. You can pick
up pretty much any book on programming for the C-style and more then 90% of
the information will transfer over. Classes may be omitted in some, reqired in
others. The same may apply to types. But after they see a compiler warning
you're likely to google it and figure out what's wrong very easily.

On the other hand most people, who are quite professional in our field I might
add, don't even know the names of the most used LISP derivatives. Many also
don't even realize they have one built into their browser that is perfectly
adequate for satisfying the desires to explore functional programming and
general computation principles.

This isn't a statement of malice or even a bad question from the GP. It is
confusing and we only have ourselves to blame for this (ourselves being the
world of people who want FP to become more mainstream in the SE world).

Look at the stark differences in these two websites:

    
    
       - http://racket-lang.org/
       - https://www.rust-lang.org/
    

What we need is this (with much less crap):

    
    
       - https://www.python.org/
    

And what we don't need is this (with all of this text and few examples of what
you CAN do):

    
    
       - http://julialang.org/
    
    

Granted these are for different markets but the point still stands. If you
want adoption by the general software development communities we must make a
good case as to why this move should be made. Historically this required a few
factors

    
    
       1. A better alternative to at least 1 problem *
       2. A simple unified way of introducing people to the change
       3. Simple support for the rollover. Or at least simple enough as to not overpower the benifits presented by switching over.
    

* = Something that has already been done by the FP community.

You have to understand that peeople call it like they see it and when they see
Lots of Insane and Silly Parrens they see LISP and no name change will
disaccosiate Scheme, Racket, and LISP in the eyes of the average programmer.
I've been using functional languages for a good part of my life as a
programmer and I feel they ARE the same. The ideas are common even if their
presentation isn't.

The only LISP-Like languages that have sucessfully hid from the tarnished name
of LISP are JavaScript and Python and they've managed to develop their own bad
raps for themselves in the eyes of some programmers.

No progress will be made by barrating people. Prucussive maintence works on
tools and gear, not peers.

~~~
bogomipz
>"Many also don't even realize they have one built into their browser that is
perfectly adequate for satisfying the desires to explore functional
programming and general computation principles."

Are you referring to Javascript being a LISP dialect here? I've heard this
occasionally but I also though that the one predominant feature of LISP was
that of homoiconicity which I don't believe applies to Javascript or is that
not correct? Thanks.

~~~
gravypod
JavaScript IS lisp with 1) a new syntax and 2) more things bolted on top that
make it a non-LISP language. There are two things under the catagory of
JavaScript. The Functional size and the Imperative side. It's the only
language in the lisp family that allows you to write both, neither, or some
combination in the same program. I say neither because other paradigms can be
expressed from within JavaScript that will not be expressable in most FP and
Imperative languages without some muscle involved in forcing it to do so.

Watch David C.'s talk on JavaScript the Good Parts to see this diamond in the
rough.

~~~
lispm
> It's the only language in the lisp family that allows you to write both,
> neither, or some combination in the same program.

Where did you get that from?

Almost all Lisp dialects allow you to write functional and/or imperative code.

------
anjc
Every CS degree I know teaches aspects of every level at once. I can't think
of any course which, over time, goes from a high level downwards. It wouldn't
make sense.

------
munaf
I think Nand2Tetris got this approach right:

[http://www.nand2tetris.org/](http://www.nand2tetris.org/)

------
caleblloyd
At my school (NCSU) Computer Engineering was taught from the bottom up -
Assembly was 100 level, C was 200, Java was 300. Advanced topics covered CPU
caches and memory hierarchies, CS never got those.

Computer Science was taught from the top down - Java in 100 level and
C/Assembly were touched on in 300 level. Advanced concepts were data
structures, operating systems, and algorithms, CE never got those.

Most of us are hacking on web apps these days anyways in which a baseline from
either CS or CE is fine.

------
WhitneyLand
First impression was wow, I've forgotten how much I've learned over the years.
You would learn a lot this way.

However it's hard to call it computer science without specific attention to
data structures and algorithms. What about information theory, networking,
database systems, and some kind of AI related course?

------
lloydde
Is this more about the science vs the trade? I do wonder if a practical
foundation helps people understand and go deeper into the science.

When I did a computer science degree from the University of Victoria, Canada,
1996+, it more started from the "bottom". Though if I remember assembler was
being moved or removed from second second year. On the other hand before I
finished for new students discrete mathematics, matrix algebra, and
differential equation courses were also being dumbed down or eliminates. By
the time I finished course catalog had a lot of "software engineering".

~~~
lloydde
UVic has a helpful graph of their course requirements now:
[https://www.csc.uvic.ca/Program_Information/Undergraduate_St...](https://www.csc.uvic.ca/Program_Information/Undergraduate_Studies/images/CSC_Major2015_000.jpg)

from
[https://www.csc.uvic.ca/Program_Information/Undergraduate_St...](https://www.csc.uvic.ca/Program_Information/Undergraduate_Studies/major.htm)

For course details
[http://web.uvic.ca/calendar2016-09/CDs/CSC/CTs.html](http://web.uvic.ca/calendar2016-09/CDs/CSC/CTs.html)

[http://web.uvic.ca/calendar2016-09/CDs/SENG/CTs.html](http://web.uvic.ca/calendar2016-09/CDs/SENG/CTs.html)

------
arcaster
This reminds me of the computer engineering coursework I completed before
switching to CS during my time at university. Interesting stuff sure, but a
great way to overwhelm a beginner.

------
spchampion2
I so wish I could have learned CS this way in college. I ended up doing EE
instead, which really came down to a preference for the order in which I learn
things.

------
stephenboyd
This is similar to the practical side of the CS education we got at The
Evergreen State College, except fancy high-level stuff like Unix and C wasn't
covered until long after we learned to write simple programs in
assembly/machine code on virtual Von Neumann machines that we implemented
ourselves.

------
c4n4rd
Based on the comments I see here (about how they wished to learn CS, or CS vs
EE), I wish this book had a different title with more of an indication that
this is a operating systems book (though not 100%). Computer Science is more
than what is presented here.

Big O Notation/Data Structures/Algorithms, ala Dr. Knuth

Proof and theorems

Computer architecture and design (NAND gates and the like)

Language design, interpretation, and implementation

...and much more.

Do not get me wrong, I believe this book is valuable (BIG 'THANK YOU' to Ian
Wienand for it). I just wish the title could have been different.

~~~
userbinator
I agree, the book isn't very "bottom-up" at all, perhaps with the exception of
"Binary and Number Representation" being the second chapter; the rest of it
looks like OS stuff.

 _This_ is what I'd consider "bottom up":

[https://www.amazon.com/Code-Language-Computer-Hardware-
Softw...](https://www.amazon.com/Code-Language-Computer-Hardware-
Software/dp/0735611319)

~~~
MattSteelblade
My choice for bottom-up book: The Elements of Computing Systems: Building a
Modern Computer from First Principles [https://www.amazon.com/Elements-
Computing-Systems-Building-P...](https://www.amazon.com/Elements-Computing-
Systems-Building-Principles/dp/0262640686/ref=ed_oe_p)

~~~
impappl
This is also known as the "nand2tetris" course:
[http://www.nand2tetris.org/](http://www.nand2tetris.org/)

Great book!

------
blueatlas
My first job after graduation (CS) was writing code in 6502 assembler for
business phones (I know, I'm dating myself). What I learned there was the
basis for code I write even today. There's nothing like understanding from the
ground up.

------
thegabez
Thanks for making this wonderful resource!

------
jeisc
check these open articles from The VLDB Journal

[http://link.springer.com/search?query=&search-
within=Journal...](http://link.springer.com/search?query=&search-
within=Journal&facet-journal-id=778&package=openaccessarticles)

------
quantum_state
Excellent list! Thanks for sharing ... Merry Xmas & Happy New Year.

------
grondilu
IMHO if you're not learning computer science from the bottom up, then you're
not really learning computer science.

------
mjhea0
You can read this online here ->
[https://www.bottomupcs.com/](https://www.bottomupcs.com/)

~~~
sctb
Thanks, we've updated the link from [http://feederio.com/book/33/computer-
science-from-the-bottom...](http://feederio.com/book/33/computer-science-from-
the-bottom-up).

