13 ms·
The Benjamin Franklin method for learning more from programming books
- zitterbewegung 9y agoBooks present information in various ways. Some books have questions that you can answer yourself to teach yourself how to do things. It looks like this author would be a fan of Learn C the Hard way by Zed Shaw. But, if you are buying a book to learn how to do something coming in with some kind of goal is more instructive than reading a book and regurgitating the answers. The author has a good idea on how to make the tutorials in a book into questions but at the end of the day you will teach yourself only what it is in the book.
- bluehat 9y agoHeretic. Kernighan and Ritchie is the one true gospel.
- disgruntledphd2 9y agoProtestant maybe? His chapter about K&R certainly has the feeling of Luther's 95 theses.
- dslama 9y agoIf you enjoyed the Franklin quote in this article, check out his autobiography. It is a gold mine of "life hacks", demonstrated via accounts of Franklin's remarkable life. It seems to be one of the original American self-help books :)
- programmer_dude 9y agoWhat are some other life hacks you found enjoyable from the book?
- kthejoker2 9y agoHe just had a very Feynman-like way (or Feynman had a Franklin-like way) of seeing the world. He sees confirmation bias, the dangers of saying yes, the power of positive thinking, failure as a teaching tool, the power of a nebulous "them", habit chaining ... But my favorite quote/section is on his 13th virtue, humility. Frankling was told by a friend to stop being so proud, and so he introduced a habit of always being extra modest when espousing his opinions, adding "I imagine" and "perhaps" instead of "undoubtedly" and "certainly." Anyway, he goes on to say while it wasn't a total success, he felt he'd been pretty successful in habituating that modesty for 50 years, but pride is a hard thing to subdue, "for even if I had completely overcome it, I would probably be proud of my humility." !!
- yesenadam 9y agoHe ruled up a book with virtues—the ones he wanted to improve in—down the side of the page, the days along the top, and drew black dots at the end of each day next to each virtue he'd lapsed in. And tried to have less black dots with every day. That was the most valuable thing I got from that book. I tried it once, decades ago.
- zachrose 9y agoHe also wrote this epitaph for himself in his 20s: The Body of B. Franklin, Printer; Like the Cover of an old Book, Its Contents torn out, And stript of its Lettering and Gilding, Lies here, Food for Worms. But the Work shall not be wholly lost: For it will, as he believ’d, appear once more, In a new & more perfect Edition, Corrected and amended By the Author. And also essays on farting and choosing a mistress.
- daryllxd 9y agoThat's actually super smart. I usually try to log my habits/daily things to do (write in journal, exercise, spend at least an hour reading a book etc.) but doing it for virtues sounds like a good idea. What did you get from doing it? Why'd you stop?
- bluehat 9y agoGutenberg link, for the lazy http://www.gutenberg.org/ebooks/148 http://www.gutenberg.org/ebooks/148
- mark_h 9y agoStandardebooks link for the lazy, and discerning: https://standardebooks.org/ebooks/benjamin-franklin/the-autobiography-of-benjamin-franklin https://standardebooks.org/ebooks/benjamin-franklin/the-auto...
- el_cid 9y agoThank you so much for this site! What a gold mine.
- chrisweekly 9y agoWow, that site is incredible. Thanks for the tip!
- owenversteeg 9y agoThat looks nice, but I wish there was an option to view it as simply formatted HTML too. There's something nice about just being able to click the link and have it there.
- zappo2938 9y ago"I grew convinc'd that Truth, Sincerity and Integrity in Dealings between Man and Man, were of the utmost Importance to the Felicity of Life." I live my life according this. I've regretted many mistakes along the way. I have never regretted telling the truth. I might withhold the truth. I might knowingly let people assume things, but that is their own fault. I will not lie. The problem after reading this in high school is that I became a lover of truth which I later learned is a philosopher.
- bluehat 9y agoSo much for Sincerity and Integrity in Dealings between Man and Man I guess :p
- taneq 9y agoTechnically I believe a philosopher is a lover of wisdom, rather than just truth. But I guess you could rightly argue that truth is a subset of wisdom... :)
- zappo2938 9y agoBecause I love something doesn't mean I'm good at it. A T.S. Eliot fan might appreciate this comment.
- j05huaNathaniel 9y agoTL;DR Read book. Practice without cheating.
- bluehat 9y agoThis guy is nuts. Basically every article I look at I wind up reading multiple times and get new information each time. If I had the attention span to keep reading them I would probably keep learning too...
- old_haus 9y agoI admit that even simple articles often have nuance that many would benefit from better exposure. Yet, a limited attention span would seem to be eclipsed simply by have better options in the vast sea of material not yet seen.
- bluehat 9y agoIn a world where you have a massive backlog of good content, yes. Unfortunately, I struggle to find content which is both high quality and easy to learn from. Do you have suggestions?
- old_haus 9y agoThat is a fair statement. I suspect that this poses challenges on a number of levels, including what areas on finds of interest and how they prefer to be engaged. Between work, family, and school my opportunities to indulge are more limited than I would prefer. Recently I had an opportunity to listen to old lectures by Prof Malan (I understand that newer version of these lectures are now available on edx.org). When I am in the mood for something tied to current events, I enjoy taking time to read Krebs (krebsonsecurity.com) or catch up on conference presentations that I missed (still working my way through the material from ShmooCon).
- yesenadam 9y agoHe doesn't really mention that the reason chess players and musicians can take more with each glance at a position/page is that they see in chunks, not individual elements - that comes from learning the patterns, e.g. in chess "short-castled white king with pawn on h3", in music "C7 chord with melody on the 7th" etc. It's just like adding more layers to a neural network, each layer building things from the elements of the previous one. Or like us reading a page of writing - we don't have to look at each letter like a beginner reader, and barely at some individual words. I guess looking at a C for-loop is like that for someone who's seen 1000s. Apparently chess masters don't look at more positions and moves than a beginner; they just see so much more, and intuitively only look at the best moves in a position (mostly anyway). Learning to improvise jazz seems different to Franklin's method, in that you don't listen to a jazz great's solo, put it aside and later try to reconstruct it; you have to play it exactly, writing it out if necessary, and play it over and over until it starts to become intuitive; until the muscles learn it. And that must be done with many different solos. And copying just one person just makes you a clone of them. I guess learning programming doesn't have that essential element of imitating the styles of individual great programmers, although maybe for some people it does.
- yesenadam 9y agoQ. Who are the great programmers, with inimitable or at least unmistakable and unique styles? Is there such a thing, as happens with music improvisers, composers, artists, writers?
- golergka 9y agoUsually, you have no choice but to follow the style set by the lead of your team, which he typically expresses in code reviews and design decisions. So, extrapolating it further despite my lack of personal experience – perhaps, Linus?
- savanaly 9y agoThe analogy between music and programming holds at this stage. I can guarantee you all the musicians in this band [0] had their own distinctive style to some degree or another and would have even loved to have been paid to perform it but the fact is most professional musicians come in and have to be subservient to the style of the bandleader. And it's no different for coding. [0] https://www.youtube.com/watch?v=hNbsnBZOwqE https://www.youtube.com/watch?v=hNbsnBZOwqE
- truculation 9y agoThis sounds like an excellent idea. However, what about choice of material? We pick a musical piece to learn because we enjoy the tune and how it sounds. How should a beginner choose which code to memorise?
- mzzter 9y agoReminds me of this article: https://medium.com/@markpapadakis/interesting-codebases-159fec5a8cc https://medium.com/@markpapadakis/interesting-codebases-159f... A curation of good codebases by someone who studies a lot of them.
- thro1237 9y agoHe lost me when he said this: "Tensorflow: This is the finest Google codebase I ‘ve studied. Great design, very high quality code, and easy to understand how everything fit together." Tensorflow is the worst code you can learn from a library design perspective.
- yesenadam 9y agoWhy is that? (I know nothing about it, just would love to hear why you say that)
- naveen-varshney 9y agogreat post.
- deleted 9y ago[deleted]
- je28jeje2 9y agoMade me think of the Suzuki method in music: https://en.m.wikipedia.org/wiki/Suzuki_method https://en.m.wikipedia.org/wiki/Suzuki_method
- __strisk 9y agoMost programming books do not let you pause to reflect. They just go on and on. Consider Fluent Python by Luis Ramalho. If you read through the book, you will not get much out of it. However, if after each chapter, you try to come up with a practical application of the concepts discussed, then you will have a better chance at building a mental model around the topics. The code presented is just a solution to a problem. You need to come up with more problems. Basically, don't be a passive learner. Be an active learner.
- tw1010 9y agoI would say that's a problem with video (or a live lecture), not with a book. Books give you all the time in the world to pause and reflect.
- wccrawford 9y agoYeah, it's strange to me that a book should try to force a person to come up with their own activities. Perhaps they should suggest it strongly, but so should a good how-to-learn class, saving all that ink on all those pages from saying the same thing.
- Tehchops 9y agoIn the case of "Fluent Python", the author fairly explicitly calls out it is not for rote learning of the basic language: > ..."if you read it too early in your Python journey, it may give you the impression that every Python script should leverage special methods and metaprogramming tricks."
- disgruntledphd2 9y agoBut if you are familiar with a lot of the concepts and the basic syntax of Python, its wonderful. I never understood how all the magic methods in Python worked (and how nice they were) until I read that book. I haven't finished it, but because of it am now able to write and read Python much, much better.
- gt_ 9y agoReading this left me with a complex feeling... On one hand, I am glad to say I have been practicing the given advice for many years. On the other, I am intimidated at the notion that others learn anything useful without doing so.
- deleted 9y ago[deleted]
- mch82 9y agoDifferent learning styles are appropriate for different learners, stages of learning, and lesson types. What's important is that you found a learning style that works for you and that you can build on.
- kaputsmack 9y agoSkip to the last paragraph. The rest is just fluff and the author trying to show he knows fancy names for everything. This whole post could have been condensed to just that.
- thesmallestcat 9y ago> Traditionally, there are two ways to study a page like this: > 1. Type out every line of code > 2. Copy+paste the code from their website, maybe play around and make small changes Um... wut? How about: 3. Read the code. Think. If you're reading programming books as practice, and think you're supposed to copy the code examples to learn, you're doing it wrong. If you need eval() to figure out what's going on, you need to spend more time practicing the basics, then step up to the book.
- rootlocus 9y ago> 3. Read the code. Think. While this is definitely what I do, for some reason, I always believe I'm not doing things "they way you're supposed to", so I almost never argue when articles don't mention doing things the way I'm doing them.
- d0m 9y agoYeah, I've never typed any of the code examples of programming books.. I just read it to understand the concepts. Often I can go really fast when most of it is familiar, but when something catch my attention I work hard to decipher and understand it. if I can't, I'll re-read the chapter or search online. As a side note, it would be great to have more programming books written like this. I.e. We assume you already know language X so here are the differences and why; focusing mainly on specific code examples and gotchas of the new language. I would prefer semi-pseudocode: import { drawDragon } from 'drawing' <other imports..> function(screen) { screen.render(drawDragon.new('red')) } By semi-pseudocode, I mean that I'm okay with not having the program in its full completeness with the less important part being abstracted away, but for the concepts that are being explained to be detailed, thorough and well documented. As a fun exercise, one could take a big programming book and trim it down to a 1/10th (or more). There are so many useless sections. Most great devs are good at skipping through the bullshit.. why not just remove that part entirely! Reason is probably monetary or politic. I.e. can sell to a larger audience by being more beginner friendly and/or need to have a certain amount of page and follow a template to be published.
- JDevlieghere 9y ago> Let’s face it, programming books suck. While I agree that there are a lot of bad books out there, I don't agree that programming books suck in general. I very much prefer a well structured book over one of those chaotic tutorials that leave me with more questions than answers. Especially for languages where the "why" matters a lot more than the "how". > It’s a lot like the way you may have already been doing it, just with more learning. Maybe that's the reason why I disagree. Indeed, they way I read a book is by putting its content into practice.
- Zhyl 9y agoOne of the best examinations of learning, especially with structured media as described in the article, actually comes from a video game: The Witness. A summary of how it does it and why it is so good can be found in this 10 minute demo from creator Jonathan Blow: https://www.youtube.com/watch?v=rDSrYiheVow https://www.youtube.com/watch?v=rDSrYiheVow
- el_cid 9y agothanks for this! I had trouble going through some programming courses, and going in parallel with the teacher. But I never made the connection - to just watch it first and try to reproduce it on my own after. Simple and brilliant advice!
- demircancelebi 9y agoI've been trying to help one of my friends learn basic coding skills, and the method we used was similar. First, there would be a problem we wanted to solve, I would walk through with him to the solution, and write the code as we speak. By the time we were done, I'd let him study the code for a bit, delete everything, and wanted him to rewrite it. James Koppel (author of the blog) helped me saw the whole thing from another perspective, and I also loved that he has a high Signal-to-Noise ratio.
- wccrawford 9y agoThis is basically how I'd been telling people to learn from programming tutorial videos for years: Do the exercise with the video. Do it again, only referencing the video when necessary. If you used the video a lot, do it a third time. If it doesn't stick after a third time, it probably isn't going to without more tutorials, so go ahead and continue on. I'm betting most people get enough out of the second time, though, especially after doing this a few times and getting the hang of it. And it's more or less what I've always done, though maybe not exactly following those steps.
- swah 9y agoReminds of the ole "Practice does not make perfect. Only perfect practice makes perfect."
- deleted 9y ago[deleted]
- sus_007 9y ago" This is also why a smart code-completion tool can guess a long sequence of code from the first couple lines. With a better mental representation, understanding code is simply less work. " => Is the author protesting against the use of auto-completion/Intellisense feature of most of the modern IDEs ?
- pleasecalllater 9y agoIMHO it's very good, and decreases the typing time ONLY if you understand the code, and you know what it's doing. Too often I have seen programmers with a strange approach: "I don't need to know, I don't need to think because I have my IDE".
- dqpb 9y agoNo
- firasd 9y agoI think a good learning trick that's an intermediate point between the two approaches he discusses (copying the sample code vs. closing the book and write the code yourself) is to write a different program based on what you can see in the sample code. That's how I learn tech myself--I already have some other project in mind, so I rarely sit down to build 'sample' apps with any sincerity. I try sample code to the extent needed to run it without errors, then integrate patterns from it into some other code I was meaning to write in the first place. To use the Benjamin Franklin analogy, it would be like Franklin having the articles he was seeking to understand open before him, but adding new paragraphs in between the original text, or re-purposing the article into a speech. This is a very common pedagogical approach of course--hence the cliche phrase 'left as an exercise for the reader.' The subtlety is that this is usually a hypothetical exercise on top of an already hypothetical problem, whereas if I have my own project in mind, I am far more motivated to figure things out.
- tombert 9y agoOne of my go-to projects for learning a new language is implementing Conway's Game of Life (while trying my best to follow the idioms of the language). I feel that project is easy enough to not get terribly frustrating, but not entirely trivial, forcing you to think a bit about how you are going to structure it.
- mercer 9y agoWhat I like about languages with REPLs is that I can just copy-paste stuff and then muck about at various points of execution to get an idea of how things work, or prod at the different parts.
- baldfat 9y agoMy technique: I read the book till I get stuck and start back at page one till I get stuck again. I'm a little stubborn I guess. Different Program Books Make Different Goals. My favorite are that there is a higher point to be made. My favorite books of this type have been made by Matthias Felleisen. Little Schemer helped me to understand the though process more than learning a specific language. How to Design Programs was super dense but it took me through the process of actually designing programs in a logical manner. http://www.ccs.neu.edu/home/matthias/HtDP2e/ http://www.ccs.neu.edu/home/matthias/HtDP2e/ My favorite domain specific book has been: Hands-On Programming with R. It also was more about here is a logical problem and this is a way to solve it. http://shop.oreilly.com/product/0636920028574.do http://shop.oreilly.com/product/0636920028574.do
- acmeyer9 9y agoThis is a great technique to learning. I taught myself how to code after college and found doing my own version of this helpful. The only slight difference in the technique I used was I found it easier to learn when I had something I wanted to build in mind. This helped both in both direction, what to learn, as well as forcing me replicate code for my own use, like the Ben Franklin technique. Hope others find it useful too.
- criddell 9y ago> I found it easier to learn when I had something I wanted to build in mind I don't understand how you can learn this stuff in any other way. I think it's a little bit like learning a musical instrument. One can read lots of stuff about guitars and music theory and how to play the guitar, but none of that matters until you pick up an actual guitar.
- RickJWagner 9y agoAh, the diamond in the mountain of trash! This makes sorting through the political noise on HN worth it.
- tommorris 9y agoSounds pretty similar to SQ3R. https://en.wikipedia.org/wiki/SQ3R https://en.wikipedia.org/wiki/SQ3R
- westurner 9y ago> Read your programming book as normal. When you get to a code sample, read it over > Then close the book. > Then try to type it up. According to a passage in "The Autobiography of Benjamin Franklin" (1791) regarding re-typing from "The Spectator" https://en.wikipedia.org/wiki/The_Autobiography_of_Benjamin_Franklin https://en.wikipedia.org/wiki/The_Autobiography_of_Benjamin_... EBook: http://www.gutenberg.org/ebooks/148 http://www.gutenberg.org/ebooks/148
- closeneough 9y agoFor those who are looking for ways to improve on how we learn, I recommend the book "Make it stick": http://www.makeitstick.net/ http://www.makeitstick.net/ It was a real eye opener for me.
- wainstead 9y agoFor similar content in video lecture form, "Learning How To Learn" covers the same topics, and is free from Coursera: https://www.coursera.org/learn/learning-how-to-learn https://www.coursera.org/learn/learning-how-to-learn It's taught by Barbara Oakley, and the content of her book "A Mind For Numbers" is complementary to "Make It Stick."
- henrik_w 9y ago+1 for the Learning How To Learn MOOC. Short and easy to follow, but high quality content.
- riskable 9y agoI think this article is interesting but it's really only skirting around the edges of the topic of "learning programming" or patterns or a new language or whatever. A good programming book is written from a an understanding of what programming is: Puzzle solving. A lot of people think programming is a creative work--and it is to some extent--but if you've ever looked at a block of code and thought to yourself, "this could be written better"--you should realize that, "coding better" is really an exploratory action. You won't know if it's better until you actually run it or someone else reads it and agrees that it is easier to read, makes more sense, etc. Writing software is fundamentally an act of discovery. If anything has proven this it's the recent Spectre and Meltdown vulnerabilities. Yes, we're 99% sure how our code will perform while in operation but we can never be absolutely 100% certain. Because the CPU, the memory, the chipsets, and other hardware are really just exceptionally reliable laboratory equipment and our experiments (software) have been shown to work precisely as expected almost all the time. A good programming book will provide plenty of code examples but when it comes time for the reader to practice what they've learned a truly great book will provide the reader with puzzles to solve.
- codingdave 9y agoThe books he is talking about were not originally about instruction in a language. They were great reference books in the days before Stack Overflow, or even before the web had so much info on it. Now, if you want to argue that they are outdated, I may buy that... but saying that the entire series is unhelpful just because it doesn't match their/a better learning style.... seems like a big misunderstanding.
- tombert 9y agoI'm actually not entirely sure how I learned how to program (I'm self-taught); I doubt it was just "one magic thing", but I am a big believer in the "learning-by-doing" approach for this kind of stuff. If I recall, I think the thing that made everything stick was me reading through one of those "Sams: Teach Yourself C in blah days", then downloading Code::Blocks and making a very simple OpenGL application involving bouncing boxes (which happened to coincide with the physics class I was taking). I remember using that book for reference for when my code wasn't compiling, but I found it difficult to derive "some example where I calculate a Fibonacci sequence" to "making cool stuff like a game" without just ditching the book and trying it. tl;dr, I somewhat agree with this article. You have to figure this stuff out for yourself to really "understand" it and become a good programmer. It's a language, after all. You don't just learn French by reading one intro-to-french book.
- travmatt 9y agoI’m much the same and I always feel odd trying to answer that question. I learned programming by immersing myself in the subject and trying and reading and talking about as much as I could. There was never a magic bullet, besides the fact that the returns on persistence began to compound.
- jihadjihad 9y agoUntil a few weeks ago I had never bought a programming book, instead electing to learn on the job. I've noticed that since I'm not a novice programmer anymore, by far the most efficient way to learn is to use the method in the article. I've been working through K&R C and have been doing exactly what the article says--read the code, understand how it works, then write it. When it breaks, go back and learn why. After a few exercises, you'll find yourself adding your own flair and style, which is essential for your growth as a programmer. Plus, it's a much more fulfilling feeling of accomplishment when you can create something from scratch, rather than copy-pasting.
- vaskebjorn 9y agoI've been reading the Norton Edition of Franklin's autobiography and some of the excerpts in the back of the book are pretty amazing. A lot of them pretty vicious European responses to Franklin's approaches, especially his list of virtues. For instance D.H. Lawrence: http://xroads.virginia.edu/~hyper/lawrence/dhlch02.htm http://xroads.virginia.edu/~hyper/lawrence/dhlch02.htm
- yesenadam 9y agoHehe thanks, that was fun. Well, Lawrence ranted similarly about everyone, with enough truth to make you think for a moment he might be totally right. He got his schtick from his wife Frieda, who'd gotten it from a love affair with the Austrian psychologist Otto Gross, a "champion of an early form of anti-psychiatry and sexual liberation", "proto-feminist and neo-pagan" etc.
- achileas 9y agoThis is a pretty common learning technique, one that's been validated in cognitive psychology and cognitive neuroscience research, and one that in grad school (in a different field) I would teach to undergrads that were struggling in the classes I TA'ed. I only wished I had learned it as an undergrad. For more conceptual learnings, I would instead write questions that capture the main ideas of some subsection or whatnot, then at the end of the chapter, close the book, answer the questions, and summarize the questions. Then go back and check the answers. It takes longer, but active recall helps memory encoding.
- HiroshiSan 9y agoOne thing I haven't seen mentioned in the article or the comments is that the Franklin Method is just deliberate practice applied to writing.
- yesenadam 9y agoIt's not clear what you mean "just deliberate practice". He was imitating a style he liked, trying to acquire to ability to write like that. Using the method in programming seems different, in that it's not the particular writer's unique style you're trying to acquire, but other things.
- HiroshiSan 9y agoDeliberate practice as defined by K. Anders Ericsson.
- mgeorgoulo 9y agoOf course, the same method can be applied to reading other people's code. Actually, that's analogous to what Franklin did. He tried to capture the essence of a finished work of which he approved. Using a phrase-book in such a manner wouldn't be beneficial. And programming language books are much like phrase-books: guides to syntax. Other kinds of programming books, in the category "Do X with Y programming language" are best avoided. They tend to look like phone-books. It is best to decouple X from Y.
- alphaIuGN59 9y agoPerhaps, instead of reading Programming books, people should master the core tenets of programming first such as OO from such books as "clean code", "Code complete". That will make it easier for readers to understand and retain information from programming books?
- ams6110 9y agoI don't find the complete code examples to be that bad. Yes, if you just copy and paste and maybe tinker a bit you will miss a lot. If you type them in blindly like a secretary typing a dictation you will miss a lot. But if you type them in, and study each line as you go, not proceeding until you understand what that line is doing and why it's there, a working example can be very helpful.
- kaycebasques 9y agoMildly related: here’s a post I wrote about applying Charlie Munger’s principals of effective education to technical documentation: https://wordsmithweekly.com/blog/effective-education https://wordsmithweekly.com/blog/effective-education