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.

How can a high school student learn to code?

8 pointsby gschilleralmost 12 years ago
I'm a rising high school senior. I've studied some Python before on my own, but I want to take my skills to the next level. What should I do to practice? Any advice for an aspiring programmer?

13 comments

jasonkesteralmost 12 years ago
Same thing you&#x27;d do if you were just out of college and you wanted to learn programming. Or if you were 41 years old and wanted to learn programming. Or if you were 13 with your first computer.<p>Build something.<p>Scrape together seven dollars and register a domain name, then sign up for AWS&#x27; Free Tier and figure out how to get a simple website up and running on an EC2 instance. At that point, you&#x27;re officially just as capable of building a software product as anybody here.<p>Figure out what you want to build (starting with a small idea would make things go a lot smoother), then learn the things you need to build it. Django would seem a logical choice since you already know Python. But Ruby is pretty much the same language, so you won&#x27;t have any more trouble getting up to speed in Rails. It doesn&#x27;t really matter, since the real skill you&#x27;re learning is &quot;building things&quot;.<p>While you&#x27;re at it, you should probably Derek Sivers&#x27; &quot;No Speed Limit&quot; piece (<a href="http://sivers.org/kimo" rel="nofollow">http:&#x2F;&#x2F;sivers.org&#x2F;kimo</a>) to make sure you realize that there&#x27;s no requirement to crawl along at the same pace as the terrible comp-sci classes you&#x27;ll have available over the next half dozen years. If you&#x27;re determined, you might find you&#x27;re really really good at this stuff by the time you graduate high school.<p>Good luck!
mindcrimealmost 12 years ago
I kinda think that everyone learns differently to some extent, and that there isn&#x27;t one universal &quot;best way&quot;. So what worked for me, or anybody else, might not be right for you... so take this with a grain of salt.<p>My preference is to just pick a project and start hacking, and force yourself to learn what you need to know to complete the next step of the project. I think it works better if you are actually enthusiastic about the project, but just picking something &quot;at large&quot; to have a focal point is fine.<p>It doesn&#x27;t have to be something big and elaborate, especially in the beginning. You don&#x27;t need to say &quot;I&#x27;m going to write a Facebook clone&quot; right away. Start small, but grow it as you learn.<p>Maybe you just want a program to randomly generate D&amp;D characters or something. Fine. Write that as a command line program. Then come back and slap a UI on it using wxPython.<p>Later, port it to being web based using Pylons&#x2F;Pyramid, Turbogears or whatever. Once you have a web based version, add login&#x2F;logout, multi-user capability, user profiles, an activity stream, a REST API for external users, XMPP notifications, etc., etc., etc.<p>Then build an Android app version that uses the REST API.<p>Anyway, you get the picture. Just starting building and &quot;jump in over your head&quot; and force yourself to learn as you go. Go to the reference material, Google, Stack Overflow, mailing lists, whatever, if and when you get stuck, then build some more. Lather, rinse, repeat.<p>That&#x27;s more or less how I&#x27;ve learned most of what I know about programming, other than a few times when I just decided &quot;I want to learn X&quot; and picked up a book on it and ran through the example code and read the book... but inevitable I get to a point where I need to actually take that and try to turn it into <i>something</i> tangible.<p>Like I said, this approach may or may not work for you, but maybe give it a shot and see how it goes.
serylalmost 12 years ago
Hey gschiller!<p>I&#x27;d suggest learning a little software engineering, it&#x27;ll be invaluable to you later on. Organizing the way you develop your code is pretty damn essential to tackling real-world projects.<p>If you&#x27;re already building simple tools and apps there are a couple of things you should really master.<p><pre><code> * Version Control [1][2] * Packaging python eggs [3] * Command line parsing [4] * Configuration [5] * Documentation generation [6] * Unit Testing [7] </code></pre> If you can get comfortable with the above concepts and tools before you&#x27;re deep into school, you&#x27;re going to be head and shoulders above most of your peers.<p>First, setup a github account if you don&#x27;t already have one. Make sure you&#x27;re committing your code, keep a history of small, succint changes. Learn branching and merging!<p>As the others have suggested, pick up a project! Whatever you want to build (this keeps it interesting) and integrate in the above tools. Set it up as a package, give it cli options, have it load a default config file if it exists, or use sane defaults. Document your functions; you&#x27;ll be spending a majority of your time reading code, so make it useful for others.<p>Most importantly, get yourself some unit tests. Build your application one function at a time. Test it with nose. After it&#x27;s doing what you want, commit the changes in git, push to your github branch, and onto the next one.<p>If you&#x27;re having issues with python in particular, pickup an irc client and join #python on freenode. The community there is pretty excellent and if you&#x27;re at a difficult point, it&#x27;s likely someone can point you in the right direction.<p>Lastly put together a blog. While you&#x27;re going through all of this, document what you&#x27;re doing. Put together a couple things you learned when you tackle a difficult problem. Write about what things you had the most trouble with. This will pay back for you two fold; you&#x27;ll reflect on the material which will help your understanding, and you&#x27;ll also be setting yourself up for success when you&#x27;re ready to either start your first internships or jobs.<p>[1] <a href="http://git-scm.com" rel="nofollow">http:&#x2F;&#x2F;git-scm.com</a><p>[2] <a href="https://github.com" rel="nofollow">https:&#x2F;&#x2F;github.com</a><p>[3] <a href="http://www.pip-installer.org/en/latest" rel="nofollow">http:&#x2F;&#x2F;www.pip-installer.org&#x2F;en&#x2F;latest</a><p>[4] <a href="https://github.com/docopt/docopt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;docopt&#x2F;docopt</a><p>[5] <a href="http://docs.python.org/dev/library/configparser.html" rel="nofollow">http:&#x2F;&#x2F;docs.python.org&#x2F;dev&#x2F;library&#x2F;configparser.html</a><p>[6] <a href="http://sphinx-doc.org" rel="nofollow">http:&#x2F;&#x2F;sphinx-doc.org</a><p>[7] <a href="https://nose.readthedocs.org/en/latest" rel="nofollow">https:&#x2F;&#x2F;nose.readthedocs.org&#x2F;en&#x2F;latest</a>
WestCoastJustinalmost 12 years ago
I think it depends on what you want to learn. If you wanted to learn Ruby on Rails, then I would highly recommend the Ruby on Rails Tutorial [1]. It is about 15 hours of hands on videos and labs, which will help you create a working application. You can also check out RailsCasts [2], which has many hands on videos. Or get a subscription to Safari Books Online [3], where you can get digital copies of the latest technical books on many many topics. You can use these to teach yourself pretty much anything technical. I cannot stress this enough. Get used to reading a book and teaching yourself the topic. Over your career you will need to be continually learning, the sooner you understand this the better!<p>Zed Shaw has a site called <i>Learn Code The Hard Way -- Books And Courses To Learn To Code</i> [4] which look pretty good. I have never downloaded them, but from what I&#x27;ve read they are hands on labs which teach you Python, Ruby, C, SQL, and Regex. Worth checking out.<p>I would also highly recommend learning Linux and&#x2F;or Mac. Just download virtualbox and play around with linux (ubuntu is pretty friendly). Most programming jobs will be simplified if you at least understand Linux and you know how to get around the command line via ssh.<p>[1] <a href="http://ruby.railstutorial.org/" rel="nofollow">http:&#x2F;&#x2F;ruby.railstutorial.org&#x2F;</a><p>[2] <a href="http://railscasts.com/" rel="nofollow">http:&#x2F;&#x2F;railscasts.com&#x2F;</a><p>[3] <a href="http://my.safaribooksonline.com/" rel="nofollow">http:&#x2F;&#x2F;my.safaribooksonline.com&#x2F;</a><p>[4] <a href="http://learncodethehardway.org/" rel="nofollow">http:&#x2F;&#x2F;learncodethehardway.org&#x2F;</a>
dryghalmost 12 years ago
I have been programming for about a year and a half. I am now in college and am developing a web application for my start up. I think &quot;getting to the next level&quot; is often a big problem for those teaching themselves programming. There seems to be a plethora of resources available to beginners, but not as many &quot;intermediate&quot; lessons.<p>My suggestion is to pick a category - whether it is games, web development, mobile, etc - and start a project there. As others have said, dive in over your head. Take it one step at a time, it will be slow at first. No matter what you are doing, utilize search engines and Stack Overflow. They are your best friends. Don&#x27;t worry if you use a framework and feel completely overwhelmed at first - it&#x27;s normal. Also, learn Linux. It will make your life easier, and give you a better understanding of how operating systems work.<p>Lastly – just some general advice about something I have learned. You will hit some rough patches where you spends hours or even days on something trivial. This is part of the learning process. Becoming a better programmer means you organize your projects differently, and you learn how to debug more efficiently. Something cool about this though – sometimes you have an error and try 10 different fixes. None of them work. This is not wasted time – you just learned 10 new things, and chances are next time you will be able to debug a little bit more quickly.
csensealmost 12 years ago
&gt; What should I do to practice [programming]?<p>Write programs.<p>&gt; Any advice for an aspiring programmer?<p>Debugging programs is a big part of how you learn. Don&#x27;t be afraid to put print statements in your program to see what the values of variables are at various points in time. Don&#x27;t be discouraged when something doesn&#x27;t work -- any good programmer has spent hours or even days finding and fixing a bug that&#x27;s turned out to be trivial.<p>Don&#x27;t be afraid to throw out a project and start over. Your second attempt is often much better than the first.<p>Learn version control. Git is the de facto standard, and if you master it, it will improve your productivity greatly as your projects get larger.<p>If possible, find someone online or in real life who&#x27;s also interested in programming, you can bounce ideas off each other and work together on projects. It&#x27;s sometimes easier to get and stay enthusiastic about a project if someone else is relying on you to make progress on it.
zachlattaalmost 12 years ago
Hey! I&#x27;m a high school student myself. I&#x27;d love it if you could shoot me an email at zchlatta (at) gmail.com. It&#x27;s always nice to meet others who share my interests.<p>It really depends on your current skill level. I&#x27;d recommend setting a goal for yourself to reach. Say you&#x27;re interested in game development. You could set the goal of learning pygame[0] before the next Ludum Dare[1]. If you&#x27;re not comfortable with Python itself, you may want to check out Learn Python The Hard Way[2].<p>[0] pygame - <a href="http://www.pygame.org/news.html" rel="nofollow">http:&#x2F;&#x2F;www.pygame.org&#x2F;news.html</a> [1] Ludum Dare - <a href="http://www.ludumdare.com/compo/" rel="nofollow">http:&#x2F;&#x2F;www.ludumdare.com&#x2F;compo&#x2F;</a> [2] Learn Python The Hard Way - <a href="http://learnpythonthehardway.org/" rel="nofollow">http:&#x2F;&#x2F;learnpythonthehardway.org&#x2F;</a>
mathattackalmost 12 years ago
All great advice here. I would toss in that you should make sure that your topic is fun, and interests you. (There&#x27;s plenty of time for boring work later in life!) If you like games, create a game. If you like Math, visit projecteuler.net.<p>If you are interested in potentially majoring in Computer Science in college, take Udacity, or look up Harvard&#x27;s CS50 for an idea of what you&#x27;ll be getting yourself into. It&#x27;s tough to major in CS without having some comfort with programming and (more important!) patience with debugging when you arrive on campus.
crimezone20xxalmost 12 years ago
Scour code that you find interesting and write a piece of software.<p>The best advice I was ever given was to think small and in terms of &quot;pieces&quot; or &quot;parts&quot; of a program as a whole. Write something that doesn&#x27;t do anything, well...for lack of a better term...&quot;useful&quot;.<p>Don&#x27;t think too grand when you&#x27;re just getting started, though. That&#x27;s not to say don&#x27;t dive right in, but take it simply at first. A few lines at a time.
wturneralmost 12 years ago
If you are into audio stuff you can do what I did and learn Javascript within the context of building little sound generators and audio file sample trigger players. I now understand a good amount of DOM manipulation,CSS,semantic HTML and Javascript patterns as a result.
future_gradalmost 12 years ago
Create.<p>It takes knowledge to build correctly. By creating you will end up pushing yourself into a cycle of learning and production.<p>Your willpower will fuel your creation; harness it.<p>Never be ashamed to ask, be ashamed for not having the courage.
tekknolagialmost 12 years ago
Definitely check out Codecademy, read the Learn Code the Hard Way series for languages you want to learn, try and make some tiny utilities for things you need (example: python Twitter client from the command line), etc.
lorenzopicolialmost 12 years ago
Yes, create is the most important part. I learned most of what I know taking online courses from Stanford or Coursera or lynda.com