TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Benjamin Franklin method for learning more from programming books

574 点作者 nancyhua超过 7 年前

34 条评论

yesenadam超过 7 年前
He doesn&#x27;t really mention that the reason chess players and musicians can take more with each glance at a position&#x2F;page is that they see in chunks, not individual elements - that comes from learning the patterns, e.g. in chess &quot;short-castled white king with pawn on h3&quot;, in music &quot;C7 chord with melody on the 7th&quot; etc. It&#x27;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&#x27;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&#x27;s seen 1000s. Apparently chess masters don&#x27;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).<p>Learning to improvise jazz seems different to Franklin&#x27;s method, in that you don&#x27;t listen to a jazz great&#x27;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&#x27;t have that essential element of imitating the styles of individual great programmers, although maybe for some people it does.
评论 #16393084 未加载
评论 #16394134 未加载
评论 #16390556 未加载
评论 #16392129 未加载
评论 #16392811 未加载
评论 #16395745 未加载
评论 #16393952 未加载
firasd超过 7 年前
I think a good learning trick that&#x27;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&#x27;s how I learn tech myself--I already have some other project in mind, so I rarely sit down to build &#x27;sample&#x27; 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.<p>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.<p>This is a very common pedagogical approach of course--hence the cliche phrase &#x27;left as an exercise for the reader.&#x27; 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.
评论 #16392589 未加载
评论 #16401450 未加载
__strisk超过 7 年前
Most 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&#x27;t be a passive learner. Be an active learner.
评论 #16391322 未加载
评论 #16392977 未加载
dslama超过 7 年前
If you enjoyed the Franklin quote in this article, check out his autobiography. It is a gold mine of &quot;life hacks&quot;, demonstrated via accounts of Franklin&#x27;s remarkable life. It seems to be one of the original American self-help books :)
评论 #16390562 未加载
评论 #16390284 未加载
评论 #16390275 未加载
tombert超过 7 年前
I&#x27;m actually not entirely sure how I learned how to program (I&#x27;m self-taught); I doubt it was just &quot;one magic thing&quot;, but I am a big believer in the &quot;learning-by-doing&quot; approach for this kind of stuff.<p>If I recall, I think the thing that made everything stick was me reading through one of those &quot;Sams: Teach Yourself C in blah days&quot;, then downloading Code::Blocks and making a <i>very</i> 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&#x27;t compiling, but I found it difficult to derive &quot;some example where I calculate a Fibonacci sequence&quot; to &quot;making cool stuff like a game&quot; without just ditching the book and trying it.<p>tl;dr, I somewhat agree with this article. You have to figure this stuff out for yourself to really &quot;understand&quot; it and become a good programmer. It&#x27;s a <i>language</i>, after all. You don&#x27;t just learn French by reading one intro-to-french book.
评论 #16399123 未加载
JDevlieghere超过 7 年前
&gt; Let’s face it, programming books suck.<p>While I agree that there are a lot of bad books out there, I don&#x27;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 &quot;why&quot; matters a lot more than the &quot;how&quot;.<p>&gt; It’s a lot like the way you may have already been doing it, just with more learning.<p>Maybe that&#x27;s the reason why I disagree. Indeed, they way I read a book is by putting its content into practice.
jihadjihad超过 7 年前
Until a few weeks ago I had never bought a programming book, instead electing to learn on the job. I&#x27;ve noticed that since I&#x27;m not a novice programmer anymore, by far the most efficient way to learn is to use the method in the article. I&#x27;ve been working through K&amp;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&#x27;ll find yourself adding your own flair and style, which is essential for your growth as a programmer. Plus, it&#x27;s a much more fulfilling feeling of accomplishment when you can create something from scratch, rather than copy-pasting.
zitterbewegung超过 7 年前
Books 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.
评论 #16390292 未加载
baldfat超过 7 年前
My technique: I read the book till I get stuck and start back at page one till I get stuck again. I&#x27;m a little stubborn I guess.<p>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.<p>Little Schemer helped me to understand the though process more than learning a specific language.<p>How to Design Programs was super dense but it took me through the process of actually designing programs in a logical manner.<p><a href="http:&#x2F;&#x2F;www.ccs.neu.edu&#x2F;home&#x2F;matthias&#x2F;HtDP2e&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.ccs.neu.edu&#x2F;home&#x2F;matthias&#x2F;HtDP2e&#x2F;</a><p>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. <a href="http:&#x2F;&#x2F;shop.oreilly.com&#x2F;product&#x2F;0636920028574.do" rel="nofollow">http:&#x2F;&#x2F;shop.oreilly.com&#x2F;product&#x2F;0636920028574.do</a>
codingdave超过 7 年前
The 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&#x27;t match their&#x2F;a better learning style.... seems like a big misunderstanding.
riskable超过 7 年前
I think this article is interesting but it&#x27;s really only skirting around the edges of the topic of &quot;learning programming&quot; or patterns or a new language or whatever. A good programming book is written from a an understanding of what programming <i>is</i>: Puzzle solving.<p>A lot of people think programming is a creative work--and it is to some extent--but if you&#x27;ve ever looked at a block of code and thought to yourself, &quot;this could be written better&quot;--you should realize that, &quot;coding better&quot; is really an exploratory action. You won&#x27;t know if it&#x27;s better until you actually run it or someone else reads it and agrees that it is easier to read, makes more sense, etc.<p>Writing software is fundamentally an act of discovery. If anything has proven this it&#x27;s the recent Spectre and Meltdown vulnerabilities. Yes, we&#x27;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.<p>A good programming book will provide plenty of code examples but when it comes time for the reader to practice what they&#x27;ve learned a truly great book will provide the reader with puzzles to solve.
demircancelebi超过 7 年前
I&#x27;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&#x27;d let him study the code for a bit, delete everything, and wanted him to rewrite it.<p>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.
vaskebjorn超过 7 年前
I&#x27;ve been reading the Norton Edition of Franklin&#x27;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&#x27;s approaches, especially his list of virtues. For instance D.H. Lawrence:<p><a href="http:&#x2F;&#x2F;xroads.virginia.edu&#x2F;~hyper&#x2F;lawrence&#x2F;dhlch02.htm" rel="nofollow">http:&#x2F;&#x2F;xroads.virginia.edu&#x2F;~hyper&#x2F;lawrence&#x2F;dhlch02.htm</a>
评论 #16395899 未加载
closeneough超过 7 年前
For those who are looking for ways to improve on how we learn, I recommend the book &quot;Make it stick&quot;: <a href="http:&#x2F;&#x2F;www.makeitstick.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.makeitstick.net&#x2F;</a><p>It was a real eye opener for me.
评论 #16392880 未加载
thesmallestcat超过 7 年前
&gt; Traditionally, there are two ways to study a page like this:<p>&gt; 1. Type out every line of code<p>&gt; 2. Copy+paste the code from their website, maybe play around and make small changes<p>Um... wut? How about:<p>3. Read the code. Think.<p>If you&#x27;re reading programming books as practice, and think you&#x27;re supposed to copy the code examples to learn, you&#x27;re doing it wrong. If you need eval() to figure out what&#x27;s going on, you need to spend more time practicing the basics, then step up to the book.
评论 #16391740 未加载
评论 #16391205 未加载
Zhyl超过 7 年前
One of the best examinations of learning, especially with structured media as described in the article, actually comes from a video game: The Witness.<p>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:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=rDSrYiheVow" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=rDSrYiheVow</a>
bluehat超过 7 年前
This 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...
评论 #16390393 未加载
achileas超过 7 年前
This is a pretty common learning technique, one that&#x27;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&#x27;ed. I only wished I had learned it as an undergrad.<p>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.
acmeyer9超过 7 年前
This 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.
评论 #16392305 未加载
alphaIuGN59超过 7 年前
Perhaps, instead of reading Programming books, people should master the core tenets of programming first such as OO from such books as &quot;clean code&quot;, &quot;Code complete&quot;.<p>That will make it easier for readers to understand and retain information from programming books?
wccrawford超过 7 年前
This is basically how I&#x27;d been telling people to learn from programming tutorial videos for years:<p>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.<p>If it doesn&#x27;t stick after a third time, it probably isn&#x27;t going to without more tutorials, so go ahead and continue on. I&#x27;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.<p>And it&#x27;s more or less what I&#x27;ve always done, though maybe not <i>exactly</i> following those steps.
评论 #16391650 未加载
truculation超过 7 年前
This 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?
评论 #16390427 未加载
westurner超过 7 年前
&gt; Read your programming book as normal. When you get to a code sample, read it over<p>&gt; Then close the book.<p>&gt; Then try to type it up.<p>According to a passage in &quot;The Autobiography of Benjamin Franklin&quot; (1791) regarding re-typing from &quot;The Spectator&quot;<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Autobiography_of_Benjamin_Franklin" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Autobiography_of_Benjamin_...</a><p>EBook: <a href="http:&#x2F;&#x2F;www.gutenberg.org&#x2F;ebooks&#x2F;148" rel="nofollow">http:&#x2F;&#x2F;www.gutenberg.org&#x2F;ebooks&#x2F;148</a>
mgeorgoulo超过 7 年前
Of course, the same method can be applied to reading other people&#x27;s code. Actually, that&#x27;s analogous to what Franklin did. He tried to capture the essence of a finished work of which he approved.<p>Using a phrase-book in such a manner wouldn&#x27;t be beneficial. And programming language books are much like phrase-books: guides to syntax.<p>Other kinds of programming books, in the category &quot;Do X with Y programming language&quot; are best avoided. They tend to look like phone-books. It is best to decouple X from Y.
tommorris超过 7 年前
Sounds pretty similar to SQ3R. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;SQ3R" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;SQ3R</a>
ams6110超过 7 年前
I don&#x27;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.<p>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&#x27;s there, a working example can be very helpful.
sus_007超过 7 年前
&quot; <i>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.</i> &quot;<p>=&gt; Is the author protesting against the use of auto-completion&#x2F;Intellisense feature of most of the modern IDEs ?
评论 #16391712 未加载
评论 #16392278 未加载
kaycebasques超过 7 年前
Mildly related: here’s a post I wrote about applying Charlie Munger’s principals of effective education to technical documentation: <a href="https:&#x2F;&#x2F;wordsmithweekly.com&#x2F;blog&#x2F;effective-education" rel="nofollow">https:&#x2F;&#x2F;wordsmithweekly.com&#x2F;blog&#x2F;effective-education</a>
el_cid超过 7 年前
thanks 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!
HiroshiSan超过 7 年前
One thing I haven&#x27;t seen mentioned in the article or the comments is that the Franklin Method is just deliberate practice applied to writing.
评论 #16395978 未加载
RickJWagner超过 7 年前
Ah, the diamond in the mountain of trash!<p>This makes sorting through the political noise on HN worth it.
gt_超过 7 年前
Reading this left me with a complex feeling...<p>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.
评论 #16393896 未加载
评论 #16391685 未加载
je28jeje2超过 7 年前
Made me think of the Suzuki method in music:<p><a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Suzuki_method" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Suzuki_method</a>
naveen-varshney超过 7 年前
great post.
评论 #16394035 未加载