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 become a better programmer?

8 pointsby ashhimselfover 10 years ago
This post has been inspired by https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8697772 (Ask HN: How or where to begin learning mathematics from first principles?)<p>I would describe myself as a semi competent programmer but I would say I am more on stack overflow looking for solutions to my problems then actually fixing them myself. I tend to understand examples of code more than actually reading the documentation. Is there a book or website I could follow which would make in time a more competent programmer that an organisation would want to hire?<p>What I am doing now.<p>- Programming daily and better learning how best to use cakePHP. - Following some courses on code school (Particularly Angular

7 comments

Softlyover 10 years ago
So, in my eyes, competency in programming isn&#x27;t about knowing everything there is about programming. It&#x27;s about finding knowledege. There&#x27;s no shame in looking for similar problems on stack overflow (so long as you don&#x27;t directly copy if you&#x27;re in a place which that sort of things matters) and you slowly start to see patterns in your problems, which makes you look a lot smarter than you actually feel.<p>Unfortunately, you do need to get good at reading doc and code examples. Thankfully you generally get both, but not always.<p>Having some SysAdmin knowledge goes a long way; terminal command on Windows, Mac and Linux can be a real life saver when all the fancy GUI stuff fails.<p>The best way to get experience is to actually get involved in coding something medium to large. Its not easy just to jump in, but a lot of open source projects can have some very easy bugs to fix.<p>To help with recruitment, I add everything I can to github. Even if its bad code it will at least show improvement if you keep going with it (I still cringe at my first attempt at python).<p>A friend of mine wrote a book about getting hired (helpfully titled &quot;Getting Hired&quot;) in the computing industry, it offers some great advice about the employability side of things: <a href="http://books.stuartherbert.com/getting-hired/" rel="nofollow">http:&#x2F;&#x2F;books.stuartherbert.com&#x2F;getting-hired&#x2F;</a><p>Hope that helps!
onion2kover 10 years ago
If you want to be more employable then you need to concentrate on the skills that <i>aren&#x27;t</i> coding[1]. Develop your communication skills, your organisation skills, being a better fit in to company culture (going for drinks with coworkers for example). Faced with two candidates who can both do the job, pretty much every hiring manager will give the job to the person who&#x27;ll be easy to work with and a better fit in the team than the person who can write fancy code.<p>[1] Assuming that you <i>can</i> code. If you can take a spec for a site and turn it in to working code then you&#x27;re already good enough.
mc_hammerover 10 years ago
try programming a multiplayer game - they encompass all things computer, to a more thorough degree than other things, for example security - anybody can make php site, but can you make on that cant be exploited, the players cant make a cheat and fly around or they players cant keep spawning items they want, its a challenge even for senior devs.<p>a game has: packet level networking, multiplayer, graphics, direct input from keyboard&#x2F;mouse, security or anti cheat, copy protection, server&#x2F;client model, physics or collision detection, video integration or codecs, oop, modules or libs, etc...<p>and you get to optimize your game (and to see time you optimize, how much each tweak changes the FPS)... it might even be mandatory to optimize your game... whereas with php if its not fast who really will notice. at least thats my thinking -- also its very possible to make a web based game with cakephp+websockets+angular.<p>what do u think?
rtwsteover 10 years ago
I don&#x27;t find &quot;courses&quot; useful really. I prefer following the intro guide for a technology (let&#x27;s say Django) to set up something simple like a blog. Then try make something more complicated using Stackoverflow and other online resources for help.
_RPMover 10 years ago
Take all the advice here with a grain of salt. Start programming everyday. The language you use is irrelevant.
codenutover 10 years ago
always be coding
smt88over 10 years ago
Same way you get better at anything: practice!<p>Here are some additional tips:<p>1) Learning to code has a lot to do with how well you Google things and how easily you give up.<p>Needless to say, you should be great at Googling and not give up easily.<p>2) Break new things into smaller chunks.<p>If it seems like something is too hard, figure out the first step. Google it if you can&#x27;t do it yourself yet. Then move on to the next step.<p>Every program can be distilled down to very small, very simple parts that are then assembled into something more complicated. It doesn&#x27;t matter how complicated the end result is: the basic parts are still the same.<p>(Note that this always applies to web development, but not always to lower-level stuff.)<p>3) Stop using PHP.<p>It&#x27;s inconsistent, and it has these weird mashups of features from other languages that add to the confusion. It is harder to learn other languages when coming from PHP.<p>I think that Go is a great language to learn on because it&#x27;s simple, consistent, and explicit. By explicit, I mean that there isn&#x27;t a lot of &quot;magic&quot; going on underneath your code.<p>You may also want to check out Python, which has some weird &quot;gotchas&quot; (e.g. inconsistent naming of iterating functions), but is mostly a good learning language.<p>Java is the traditional beginner&#x27;s language, but that philosophy has come under fire. I still think it&#x27;s a good way to learn fundamentals, though. Java has a lot of vanilla implementations of concepts from object-oriented-programming theory.<p>3b) If you continue to use PHP, turn on strict errors when in development mode. Also use phpStorm (not free) or NetBeans (free). They understand PHP shockingly well.<p>Using a good IDE is surprisingly vital to learning and coding quickly. You&#x27;ll want to be able to CTRL+click on classes&#x2F;methods&#x2F;functions to go to their definitions (among many other useful shortcuts).<p>4) If using PHP, Ruby, Python, or Node, learn how to write unit tests and start writing them.<p>This is incredibly important. They&#x27;re not that fun or interesting, but you <i>need</i> to get comfortable with them. Not only do they make you much faster at finishing an app, they also make you a better programmer by forcing you to write only testable code.<p>5) Learn what the following mean and make them your religion (Google is your friend here):<p>- (Related to #4) Test-driven development<p>- &quot;Premature optimization is the root of all evil.&quot;<p>- DRY (don&#x27;t repeat yourself)<p>- Principle of least astonishment<p>- &quot;You aren&#x27;t gonna need it&quot;<p>6) Always have a mission.<p>If you get up and say, &quot;I&#x27;m going to learn how to make a single-page app today,&quot; you&#x27;re not going to learn it. You need to have a real, finished product in mind.<p>That&#x27;s what professional coding is (plus getting paid), so that&#x27;s what you should practice. Many of the philosophies I mentioned above actually require knowing what you want to accomplish.<p>So as you go through your life, think of apps you want to create and write down your ideas. Don&#x27;t remove ideas because they&#x27;re hard -- remove them because you&#x27;re not interested in them anymore.<p>7) Look around at different APIs.<p>There are a ton, and you can mash them up in really interesting ways. There are APIs for payments, text&#x2F;video&#x2F;instant&#x2F;audio messaging, cars, movies, maps, places, government data, weather, finance, <i>and so many more things</i>.<p>There are countless projects you could put together in a weekend that use all of these different APIs. Do it for fun or profit, but make sure you learn how HTTP APIs work! (Strict REST APIs are a fairly rare subset of HTTP APIs, but you should definitely understand REST principles, as they pop up everyhwere.)<p>8) Ask the right questions.<p>Don&#x27;t ask &quot;how do I do [x]?&quot; on Q&amp;A sites or forums. You can just Google stuff like that. &quot;How do I write cookies in JavaScript?&quot; There are a million answers. &quot;How do I send an HTTP request in PHP?&quot; Again, a million answers.<p>If you really want to grow, take chunks of your code that are clunky or inefficient and ask people if there are better ways to write them.<p>So instead of saying, &quot;how do I do [x]?&quot;, say &quot;I&#x27;ve done [x] like this. Is there a better way to do it?&quot;<p>That&#x27;s how you learn. You&#x27;re basically turning the anonymous experts in those communities into your personal mentors.<p>9) Seriously think about taking some classes.<p>Fundamentals are important and will save you lots of time and Googling. I&#x27;d highly recommend a class on relational databases as well.<p>I don&#x27;t know anything about boot camps, but if you try one out, make sure you &quot;Ask HN&quot; about it.
评论 #8698994 未加载
评论 #8700325 未加载