Hacker News new | comments | ask | show | jobs | submit login
Introduction to Computer Organization with X86-64 Assembly Language and Linux (sonoma.edu)
245 points by ingve 6 months ago | hide | past | web | favorite | 23 comments

Interesting study hint by the author (Robert Plantz) . I have never thought of it this way , but it probably makes sense:

> " Do not copy and paste code. We all copy code, and we all like to see our programs work. Copy and paste is the fastest way to do that. But if you type in the program, even if you are copying it, you are forced to read every single character. This is the fastest way to learn the programming language. As you know, getting a single character wrong can mean the difference between a working and non-working program. "

Instinctively I always studied computer languages this way. Typing the code makes you also think about it, it is also much more easier to try your own versions.

I'd argue that it would be even better, if I wrote the program samples with pen in a real notebook. Using different colors and imitating syntax highlighting could be even better.

I've been planning to get a physical programming/cs notebook for years.

I have a few handwritten notebooks on CS and it was a mistake. You're right about the improved retention, but I cant search my notes or reorganize them very easily. I've started using cherrytree instead and having the ability to search through years worth of notes with regex is very handy.

Maybe the solution could be to keep them in both versions, digital one for reference and a physical one for learning and retention.

For the digital one, one can just copy and paste, use abbreviations, templates etc. so it doesn't take a lot of time.

Obviously the physical notes are only necessary in learning new and hard material. For example one might keep a notebook for C programming, Assembly, Basic Algorithms, Discrete Math etc.

I must admit that I've never tried to print my digital notes, which I keep in org-mode and export to pdf using tex. I guess that could also help for studying. You could take notes with hand, highlight things, put stickers on it etc.

I am planning to purchase a laser printer with refillable toners to print books, papers and my notes. I don't know why but having a physical copy of things help me learn them much easier. It could be that it is the only way I learned in school.

On a sidenote, during highschool I could only write essays with real pen and paper. But now I'm used to firing emacs and writing prose. Maybe I could also train myself to read textbooks on a computer efficiently.

In the late '80s/early '90s (college), I took notes on paper and typed them up the evening of the class. The benefits I found:

* Better engagement in class vs typing in class * Better short and long term retention of learned material * Easier exam prep due to better retention * Higher grades vs not doing this * Able to share useful notes with others

In my business life, I've found similar benefits. The primary difficulty is forcing myself to follow the pattern. It's easy to think "I've got this" and not type up a set of notes.

I'd imagine doing this on a daily basis would require some discipline.

I also had similar thoughts in college. I planned to scan my notes from time to time and thereby have them digitized. I never went through with it. The system that worked for me was to write a date on each paper, keep all notes in a stack, and organize them into topics in chronological order when needed.

I always struggle with physical organization, whether it be tidying up my room, or planning my days. I hope this will improve with age, but for now I try to work around my deficiencies. For example in college I never had the discipline to study everyday, although I almost never skipped a class and I always took notes. It wasn't that I wasn't interested in the things thought, but I just couldn't. I also cannot tidy up my room, although I know it would benefit me hugely. I always postpone getting a haircut, washing clothes etc. to the moment when it becomes absolutely unbearable.

So I don't think I'd have nearly enough willpower to take all my notes physically and then daily type them into the computer. In business life what I can do is to create a virtual filing system for organizing notes. For example I could divide the year in 52 weeks, open a folder for each of them, inside these folders I could open other folders for projects. I could then symlink those weekly folders into other directory listings for Clients and Projects etc. By doing this minimal work, I'd have a working system that would keep me out of my naturally inclined chaos. During internships I devised a similar system for email, and it had worked remarkably good.

We still have this in Indian colleges.

Apropos of nothing, I'd like to add my own rec for CherryTree. I started using it about a month or two into my new job, and in the year since, it's been a fantastic resource, allowing me to recall and review take and projects I'd all but forgotten just a few weeks later. Especially good for programmers with the rich support for language syntax highlighting. You can't mix languages in a single node, and the info feature is a minefield of surprise behavior, but overall, an excellent utility!

A guy i knew in college had an electronic pen that would write ink on the paper, but also store it digitally & convert to text. Maybe worth exploring if you want the best of both worlds

I tried this for a while, and honestly didn’t find it helpful. A big part of it for me is developing muscle memory, so writing code out by hand sidesteps that.

Also, I became keenly aware of a nervous tic that was making me try to hit command-S on the notepaper.

I learned a lot of programming back in the 80's by typing in programs from magazines. It was great until you got to the page of DATA statements...

Yes. And while some can type in code in order to learn programming, to others everything looks like those DATA statements. Why can't we respect different learning styles? Plenty of people have learned via copy-paste or by "find the bug," in already transcribed code, etc.

Plenty of people have learned via copy-paste

In my experience, that almost always means "for sufficiently small values of 'learned'." These are the people who can glue stuff together and make something that seems to work, but are completely lost when it comes to debugging or even just writing original code.

In IT there are some absolute gurus who learned that way. There isn't time to do much but Google things, because of the broad assortment of problems that crop up. What you're missing is T, the variable that gives these people the experience to start recognizing patterns in the snippets and building their own original solutions, building their own template libraries, frameworks, etc. You may not code that way, but like I said, people learn differently... Original logic vs. referential logic are like yin and yang; they eventually balance each other out no matter the starting point. You can just as easily point at those who write original code and say they are the ones with the perennial NIH attitude; to whom Googling is a misuse of the human brain, even if it could save hundreds of man-hours.

Assembly hexdumps were worse variation of that.

I do this while learning a new language, and something else that helps is to make little changes as well. Rename some variables, store x+y in an intermediate variable before printing it, print to stderr instead of stdout, annotate a type that could be inferred. It accelerates learning by quite a bit for me

I completely agree. It's far too easy for me to type things on autopilot and fool myself into thinking I've understood them. But making some changes usually reveals any misunderstandings right away.

It also helps me enormously to rename ALL variables and function names from examples. Yeah, it's a total pain and can even get confusing. But it keeps me actively engaged with the examples and makes a much clearer separation between USER-chosen names and actual LANGUAGE keywords!

Also a good way to learn an editor like Vim or Emacs

Even better: try taking out parts of the code you think you don't need, or don't recognize, and see what goes wrong.

I've learned this through experience. Every time I use snippets of code from somewhere I inevitably have to change it a bit. With code I take the time to write out by hand this is never usually a problem. I've usually got a good idea how the piece of code works and can sometimes even change it as I'm copying it out. But with code I copy and paste, I always end up struggling to figure out how it works while i'm trying to make it work with my code.

I've come to learn that taking the initial extra time to write it out by hand is definitely better than having to spend more time trying to figure it out and fix it later.

I look forward to read this. Thanks for posting the link.

> "You might well ask why you should study assembly language, given that I think you should avoid writing in it. I believe very strongly that the best programmers have a good understanding of how computer hardware works. I think this principle holds in most fields: the best drivers understand how automobiles work; the best musicians understand how their instrument works; etc."

Also great to recap my CS courses.

Just skimming over the table of contents, this isn't what I would consider computer organization, at least from a comparison against Patterson & Hennesey

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact