TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Do most schools teach programming the wrong way?

6 pointsby noob_engabout 2 years ago
I recently came around this post: https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35758587<p>I found out that Waterloo CS uses How to Design Programs(HtDP) to teach programming. I have had the same realisation while working through HtDP.<p>I realised that I was taught programming all wrong. It was always about looping constructs or chunking out sphagetti code into functions in the wrong manner. No one taught me to think about data first and then in functions that the data should go through. Instead I was taught to head first start writing sphagetti code and then seek for repetition to build functions out of it.<p>I see popular schools using languages like Python or C as their introductory languages in CS departments where students have no background in computer architecture or electronics and teaching them in the first course to do bit manipulation and all low level memory stuff. The students get stuck in syntax and memory manipulation hell. When they come out of the course, very few of them can turn unclear problem descriptions into code until they are given &quot;fill in the blanks&quot; type of instructions. And no one teaches you to read documentation also. That is another biggest flaw.<p>Of course, systems programming is important. But not as a first course where you have no idea about the underlying electronics. The old school hackers did that because they were much close to the hardware and had idea about electronic circuits and design. Teach C or other low level stuff later on.<p>I see curriculums of top schools like MIT, CMU, Berkeley. Everyone is participating in the same wrong rat race. I don&#x27;t know what kind of engineers they are producing.

4 comments

akhayamabout 2 years ago
I agree that languages close to hardware are the wrong starting point to introduce a newbie to programming. And I see a change happening already—e.g. Stanford changing the introductory programming course to JavaScript in 2017: <a href="https:&#x2F;&#x2F;stanforddaily.com&#x2F;2017&#x2F;02&#x2F;28&#x2F;cs-department-updates-introductory-courses&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stanforddaily.com&#x2F;2017&#x2F;02&#x2F;28&#x2F;cs-department-updates-i...</a>. I suspect that other top schools will follow suite whenever someone has the will and courage to design a new course in a higher level language. It’s a lot of work and the incentives for university professors aren’t aligned with making such a big investment into something that isn’t glamorous. In other words, don’t hold your breath.
评论 #35760862 未加载
john_the_writerabout 2 years ago
I think C and C++ are excellent languages to start on. Not Python though.<p>Here&#x27;s why:<p>C and C++ are close to the metal, and learning about memory, how it&#x27;s allocated and how it&#x27;s used is super important later. Not perhaps for a while but knowing how memory works and how DB paging works 100% does come into play when working with higher level languages.<p>The problem with learning it later is. Why bother? If you learned how to use a calculator first you&#x27;d never learn to multiply. Why bother?<p>Once you&#x27;re in the working world you don&#x27;t have time to do deep dives, into why your app is slow, you just add more hardware.<p>If you learned Ruby first (a language I personally use every day), then you&#x27;d miss all the subtleties.<p>Now for why Python is a bad first language. Python has frozen memory, and that&#x27;s hard to explain. It&#x27;s hard to look at the down sides of the language if you don&#x27;t understand why they&#x27;re bad. (not that I don&#x27;t think it&#x27;s a good language)<p>Like in Elixir, there&#x27;s no while loop. Recursion is often used to simulate it. BUT, that&#x27;s so much slower than while and for.<p>I think Uni is the last great time we get to really learn something, with no other thought, than &quot;I need to learn this&quot;
评论 #35761672 未加载
debanjan16about 2 years ago
You are quite right. You can also find the book PLAI by one of the authors of HtDP, Shriram Krishnamurthi. The way he teaches programming languages is eye opening too.<p>I looked at CMU&#x27;s curriculum once. The first course they take is based on a language called C0 which is a safe version of C. But the amount of syntax and memory handling you had to learn in a first course was intimidating. The main concepts remained in the background. Although I am not sure how it happens in the actual class. But the number 1 contender amongst CS schools shouldn&#x27;t let their freshmen go through such hellhole.
platevoltageabout 2 years ago
&gt; When they come out of the course, very few of them can turn unclear problem descriptions into code until they are given &quot;fill in the blanks&quot; type of instructions. And no one teaches you to read documentation also. That is another biggest flaw.<p>The fact that some CS grads end up taking bootcamps after graduation says a lot.