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: How to learn CS and programming on your own?

8 pointsby curious16about 2 years ago
As someone from a STEM field (non-CS&#x2F;math) how do you learn programming and fundamentals of CS on your own by the side?<p>Is there any particular order of subjects you can follow?<p>Books or courses that were particularly helpful to you when you were in a similar situation?

8 comments

ofalkaedabout 2 years ago
For me the most productive method has been to have a project, pick a language, get a introductory book for that language and dig in. Start working through the book and doing the exercises and immediately apply what I learn to that project. Making progress on my project how ever small or poorly executed it may be helps greatly in advancing and as I progress I find it gives a much more clear understanding of the more advanced ideas since I see them in context of a real application and not just as idealized text book examples.<p>I supplement this with reading a more advanced book which I understand little of and do not worry about understanding or applying, I find it helps keeps my mind engaged while working through banal exercises.<p>I have also found putting in the time to understand the long pedantic conversations&#x2F;arguments some people have in various online forums to be quite valuable, they tend to be about nuances&#x2F;minutiae of the language and this is something which books and the like fail to teach. This is actually what brought me to HN, when it comes to long seemingly pointless pedantry about code I have found no where better and I have learned a great deal from it.
评论 #34854727 未加载
robayeabout 2 years ago
I personally think Harvard&#x27;s CS50 courses can get you pretty far.<p>CS50: Introduction to Programming with Python - <a href="https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;python&#x2F;2022&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;python&#x2F;2022&#x2F;</a><p>CS50: Introduction to Computer Science - <a href="https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;x&#x2F;2023&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;x&#x2F;2023&#x2F;</a><p>Projectbook: 100+ Project Ideas - <a href="https:&#x2F;&#x2F;projectbook.code.brettchalupa.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;projectbook.code.brettchalupa.com&#x2F;</a>
gregjorabout 2 years ago
CS and programming describe different fields with only some intersection. Think physicist vs. engineer, or biologist vs. physician.<p>You learn any complex subject (CS) or skill (programming) with deliberate study and practice. Good teachers and mentors can help a lot.<p>You seem to express a bias to how schools work, conflating formal <i>education</i> with <i>learning</i>. You can easily start programming today with all of the free open source languages, tools, resources, and people available online.
评论 #34855090 未加载
Rev359aabout 2 years ago
Start with the basics, Understand conditions, loop, functions, classes and data structures. They are basically same in all the languages.<p>Once you get the feel that you can build a lets say a calculator in any language of your choice then advance further.<p>Once you start feeling comfortable go to next level and try to make a software or application for a dummy company like a library system or a hotel. At this point you have to ask yourself if you want to stay in the backend or frontend and then that&#x27;s another discussion for later
Leftiumabout 2 years ago
This is a well-written book that is accessible to beginners. If I started over I would want to start here: <a href="https:&#x2F;&#x2F;eloquentjavascript.net" rel="nofollow">https:&#x2F;&#x2F;eloquentjavascript.net</a><p>I started with Logo Writer (in 1st grade, didn&#x27;t even realize I was learning programming). One of my ideas is to create Logo Writer for VR&#x2F;MR. Both as a learning tool and to aid in creation of VR environments&#x2F;experiences.
mattbgatesabout 2 years ago
Taught myself programming at 12 years old... long story short, I wanted to build games. Visual Basic 3 was what I had. I tried and tried... would just move object-oriented things on the platform. Had no clue what else to do. Went to sleep one night... had a dream about coding... woke up... and I&#x27;ve been a coder ever since. Of course, I did eventually read up on it, but it made so much more sense after that dream.
dswilkersonabout 2 years ago
I am a computer scientist and a computer engineer. I recommend that you learn to code first. After that, the motivation behind the computer science is a lot more clear and you will learn it much more easily.<p>Learning to code means:<p>* Absolutely learn to type correctly and without looking; if you are not willing to do this, then do not bother with this field.<p>* Learn one editor really well; most people who are serious use gnu emacs or vi (vim?); I use gnu emacs.<p>* Learn a revision control system; these days, everyone will expect you to know git; get a github account, which is really cheap, and put all of your projects there; it makes it easy to collaborate with others; learn the correct way to write git commit messages.<p>* Start with the C programming language and the build tool gnu make; have someone show you how to write a simple makefile to build your projects.<p>* Have someone show you how to compile using, say, gcc so that the compiler outputs the assembly files (.s) annotated with the C input: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;137038&#x2F;how-do-you-get-assembler-output-from-c-c-source-in-gcc" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;137038&#x2F;how-do-you-get-as...</a><p>* Write lots of little C programs and compile them and look at the assembly langauge with the C input interleaved with it.<p>* Maintain all of that in a github repository named, say, c-examples; write regression tests and run them every time you change anything.<p>* For any code repo you have called, say, foo, make another github repo called foo-notes; maintain a todo list in that repo, possibly in mulitple files; also maintain a list of relevant notes related to the project; also maintain another file or files of proposed changes or future work; doing this makes it easy to coordinate with others; DO NOT PRETEND TO KEEP EVERYTHING IN YOUR HEAD.<p>* Go through a book on C, say, The C Programming Language, and for every feature they mention, write a little program using it and a test for that.<p>* Learn to write C and read assembly before going on to any other language.<p>* After getting fairly competent at C, get a data-structures book and implement all of the primary data structures, such as linked lists, hashtables, red-black trees, etc.<p>* Build something you want, such as a tool to process your logs; you might want to use flex to process the input; write documentation for your project; if you put it in a file Readme.asciidoc in your repo, then github will run asciidoc on it and display it on the main screen of the repo.<p>Doing all of that, including learning all the idiomatic folk ways of doing things, like how to type without looking, how to write makefiles idiomatically, writing regression tests for everything you do, writing down EVERYTHING in the foo-notes repo, checking it off when done, etc. is a LOT of work; if you are not willing to do all of that, then pick a different field.<p>After you have built a few things, you might consider learning how the machine structures work, such as the memory hierarchy; learning this will help you write faster code. You might also want to study asymptotic analysis of algorithms which will help in picking the right data structure for a problem.
评论 #34857096 未加载
评论 #34855768 未加载
carbonBasedRbtabout 2 years ago
This is an exemple of an experience to learn programming specifically, although i was a teen when i applied these steps ( blindly ):<p>- Get the basics of programming from written ( no videos ) tutorials available online. Many are good quality and you skim through at your own pace.<p>- Pick a &quot;difficult&quot; compiled language, like C++. You&#x27;ll also get insight on how interpreters for languages such as js or python work as well, and the low level stuff will make the high level concepts trivial to understand further down the line.<p>- Pick one or more simple and fun projects to do alone: a console text-based adventure, a glitchy platformer with SDL or SFML, a web scrapper with python, a tool to automate a task you find annoying in Batch script.<p>- Once you&#x27;re there, reach out to programming communities. I used to go to irc channels. I&#x27;m not a big fan otherwise, but now some discord servers are full of people you can get insight from now and well-meaning people, who would be happy to show you some strings if you ask nicely.<p>- If you are in trouble, remember to make a minimal reproducible example of your issue with as few code as you can, more often than not this can lead to you finding the solution by yourself.<p>- If this doesn&#x27;t work and you struggle with something, don&#x27;t be afraid of recognising your ignorance: this stuff is not simple, no one guesses it all alone, ask for help while showing you did try other available solutions given your current knowledge.<p>- Be patient and learn to read code from other projects as well as documentations, this will provide incredible insight about expected&#x2F;standard approaches for common problems.<p>- Rest, having pauses up to 1-2 weeks during the early process will help you integrate this complex stuff naturally, no need to burn yourself out. You may occasionally think about it during a walk or a shower and that&#x27;s where the familirity builds up.<p>- Pick-up some boring books such as Bjarnes Stroutrup&#x27;s one and read it without thinking too much. This can serve as reference without needing a network connection and that&#x27;s invaluable. I can recommend other books for this purpose to read mindlessly if you&#x27;re interested.<p>- Recognize your improvments, especially in the early stages the learning curve is incredibly rewarding, feel good about having a little square moving in your window, show it to your friends !<p>- Get into more serious maths, a good way to do that is to get the hang of linear algebra through parametric equation, solving 1 or 2 degree equations, vector and matrix, in the context of computer graphics. Graphics helps having satisfying feedback, identify issues intuitively, while exploring the basics of these concepts.<p>- Find a more serious project to work on, maybe you already have an idea, have fun and keep digging :)<p>[Edited: typos and formating]