"I know how to program, but I don't know what to program"

link: http://www.devdungeon.com/content/i-know-how-program-i-dont-know-what-program

非常好的文章. 虽然这句话听起来像是novice说的, 可是软件行业是一个持续学习的行业. 一个方向的专家可能就是另外一个方向的新手. 所以不管你是一个新手, 还是已经是某个方面的专家, 都推荐看看这篇文章. 简单有效的办法就是从复制别人的作品开始:)

In the software community the general attitude is "don't reinvent the wheel." It's almost frowned upon if you rewrite a library when a mature and stable option exists. While it is a good rule in general, novices should not be afraid to reinvent the wheel. When it is done for learning or practice, it's totally OK to make a wheel! It is an important part of learning. For example, write your own version of ls, mv, wget, or cowsay. If you want to go the game route then make clones of Pong, Tetris or Space Invaders. They don't need all the same features or have to be exact replicas, but you start with your goal and a blank slate, and you make it happen.

Don't get the notion that you need to have the best idea ever before you write a program either. I've seen the same mentality with musicians. Trying to create a masterpiece on their first attempt, putting all their energy in to one song and not seeing a bigger picture. The bigger picture being, you will write LOTS of songs over time, not just one! The first song you write will probably be bad and you will probably toss it. That's OK! Don't try to want to write the most epic 10 minute blow-your-face-off legendary piece of music on your first attempt. You need to learn the process of songwriting, learn from your own experience, and put in the hours every week practicing. You're going to write bad programs before you write good ones. Get over it, get through it, and get the experience so you can start to improvise on demand in any key. 多尝试几个项目, 不要一开始就奔着把这个项目做牛B

You might be wondering how cloning existing programs will help you come up with new ideas though. Well, like music, it requires creativity. With music, how does playing someone else's song help you learn to write your own music? Well, you have to understand how other people do it first. You have to understand how they structure things and what patterns they use. After you've done this enough times you start to see the bigger picture and then you have a wealth of knowledge to draw upon. You put together little pieces you learned from different places and re-use some of the patterns you saw. You might tweak the patterns, combine them, or break them completely. As they say, you need to learn the rules in order to break them. In programming we have common patterns like MVC. That is one stable and accepted pattern for writing software. In music, we have common progressions. For example I-V-vi-IV. Of course that's not the only one, but it's a good one to know!

In short, it's a combination of experience and creativity. Creativity is an aspect people often overlook in programming, but it is crucial. Have you ever noticed how many programmers are also musicians? Music involves a lot of technical analysis, structure, and patterns although many people consider it a purely creative endeavor. Programming is often seen as a strictly technical act although it is mostly a creative endeavor. You can foster creativity by cloning programs. As you make them, you will find yourself thinking of new ways to tweak the program or maybe even a personal feature to add. It will also inspire ideas for totally new projects. The creativity comes out along the way, but you need to learn to play some cover songs first.

Over time, you'll see how you can apply programming to almost everything. You can automate tasks and tackle practical problems. You'll have no problem coming up with a big long list of things you'd like to make but won't have time for. You'll also be able to solve problems on the fly. "Oh, there's an Excel spreadsheet with 100 sheets that needs to be reformatted, split in to separate files, and converted to a csv? Coming right up!" Don't get hung up on trying to come up with the next best thing. Write programs that you will use. The ideas for other projects will come along the way. 之后你就能逐渐将编程应用在许多事情上, 自动化任务和解决实际问题等. 不要老想着做牛B的项目, 把手边的事情做好, idea自己就会过来.

comments powered by Disqus