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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How can I learn to code in a practical environment?

7 点作者 PaperclipTaken将近 13 年前
University has so far taught me how to write algorithms, how to document code, and plenty of valuable abstract concepts. When I graduate, I'm estimated to be worth 80k.<p>But I don't know how to code. Sure, I can go into C++ and write a graph algorithm to do x or y, but as soon as I start trying to write a program that might be useful to someone, I find myself switching between Google and a blank screen for several hours, maybe writing a few lines here or there but eventually giving up entirely.<p>I want to learn, but I have no idea where to start. All of my experience is formal and all of my theoretical knowledge feels wasted because the only way I can implement it is to have someone else do it for me. I've tried internet tutorials but so far I've just felt stuck.<p>What are some steps I can take to reverse the situation?

7 条评论

mb_72将近 13 年前
When you are sitting and looking at a blank screen, why are you stuck? Is it a problem with comprehending the problem, or a problem with breaking it down?<p>This is what works for me: 1) get general understanding of problem to solve 2) break it into steps or pieces 3) code pieces<p>Now, 2) might (hell, might? probably will!) reveal step 1) wasn't complete, so go back and improve your understanding, then move back to 2)<p>Over time you develop the ability to do a 'top down' approach like this, while also having a parallel 'brain space' that considers application architecture, customer requirements, good programming practices and so on.<p>Besides this 'concept of programming' (which is very personal, I'm just sharing how it works for me after ~20 years), don't give up and don't feel overwhelmed. In my experience, except for very rare 'super-programmers', good software is developed slowly, steadily, and built up one solid piece at a time. Break your 'useful program' down into pieces, and celebrate the achievement of developing (and testing!) each piece.<p>It gets easier (and then harder, but it gets easier first). :^)
Noxchi将近 13 年前
As others mentioned, you need to start with small projects and work your way up. Remember that Google is your teacher, there is no other way to learn how to code practically. If you're not Googling, you're not learning.<p>There are many, many areas of programming and no course will cover them all, or even one wholly. You just work on new stuff and you will retain what you use frequently. This knowledge gets more vast the more you code.
评论 #4328414 未加载
codegeek将近 13 年前
"I find myself switching between Google and a blank screen for several hours"<p>This is normal for anyone who codes, even the pros and experts. So do not sweat over this thing.<p>Now, on the question of how to code/learn, I suggest you start with a small target/end goal. For example, "Build User management system" or anything like that. Then, pick a language of your choice and start coding. While you do that, you will google 100s of things, read stackoverflow plenty of times and bang your head on the screen as well. But at the end, you will be happy when that code finally compiles and run successfully or you don't get a 500 error in the web app. Stick to that project, finish it off no matter how small it seems like. You will learn a lot in the process. I am doing exactly that right now with web programming/dev. using Python/Flask framework. Last night, I learnt the best way to generate user activation links and how to use them. Simple stuff but I learnt like 10 things doing this alone.
orangethirty将近 13 年前
Start right now. Don't waste time deciding. Write a short list of applications that you would like to build. Then pick the one you like best. You might not finish it entirely, but you will find something that will look more attractive. Keep moving. Start a new application every week. Do differents things. Focus on learning the flow of code and dont worry about optimizing too much. Also, forget what you were taught in school about speed. In the real world, people focus on how stable the program is, how safe it is, how easy it is to use, and how fast it is. I also reccomend that you find a local startups/tech group and join them. Start talking. Tell them that you are studying and want to get your feet wet. I'm sure someone will give you a chance to learn.
slurgfest将近 13 年前
You say you can write a graph algorithm. All you need to do is follow through and stick to a project long enough to research the necessary stuff and finish.<p>You might start with small projects. You may be able to find some online course which walks you through making small projects (rather than the typical algorithm stuff).
pizza将近 13 年前
Make small projects that you want/need, e.g. a utility that changes volume based on current time. That way, there's some drive to complete projects. You could also freelance, as money is a good incentive for getting things done.
countessa将近 13 年前
Find a job coding - even if it is part time or as a intern. Nothing will get you up to speed faster than having to push code live on a functioning app.