All I Need To Know To Be A Better Programmer I Learned In Kindergarten

转载 2015年07月10日 08:52:23
The Codist Logo

All I Need To Know To Be A Better Programmer I Learned In Kindergarten

Apr 4, 2007

Programming is complicated stuff, but a lot of what makes a good programmer isn't all that different from the earliest learning we did in school.

The inspiration for this list came from the essay "All I Really Need to Know I Learned in Kindergarten" by Robert Fulghum at

1. Share everything.

Use open source where possible, and contribute to it when you are able. The collective wisdom of the entire community is better than the limited vision of a few large companies.

2. Play fair.

Give other technologies, frameworks, methodologies and opinions a chance. Don't think your choices are the only ones that work. The other choices may very well be better than yours; it doesn't hurt to check them out with an open mind.

3. Don't hit people.

Like #2, don't attack people just because they happen to use .Net or Java or PHP (I learned my lesson there!). Sometimes they might be more usable and useful than you think. You can learn a lot more from someone when you are not pounding them to a pulp.

4. Clean up your own mess.

Strive to deliver code that works. Never expect QA to find all of your bugs for you. Test your code often, both narrowly and broadly.

5. Don't take things that aren't yours.

Follow the licenses for stuff you use, don't just steal it and claim innocence later.

6. Say you're sorry when you hurt somebody.

Code reviews are a good but rarely used idea. Mentoring programmers with less experience than you helps the entire team. Just don't criticize people openly. Learning is not belittling people. Sometimes people will listen and sometimes they won't. Sometimes you might learn a lot from people you think are inferior to you.

7. Wash your hands before you eat.

Try to understand things before you set out to write code. Do prototyping, check out examples on the web, talk with other folks who do it, or even just play around. Architecting something you've never done before or worked with is tough cold turkey. The end result will work much better if you start with a clue.

8. Flush.

Don't be afraid to replace, rewrite, refactor or give up on something that is crap. Sometimes "when in doubt throw it out" is the best philosophy. Never fall in love with your code.

9. Warm cookies and cold milk are good for you.

Yes, programmers should be well supported in their work environment. A good chair, a quiet place to work, a decent computer and tools that make coding better and easier are essential. Managers should act as umbrellas to keep the crap from flowing down to the programmers. As a programmer, don't accept a life of lowly servitude. If the employer treats you poorly then find one who treats you better.

10. Live a balanced life - learn some and think some and draw and paint and sing and dance and play and work every day some.

I like Google's deal where 20% of your time is devoted to whatever you think it worth working on. Employers should (discretely) offer nap rooms or game rooms or some kind of chillout environment. Programming is hard mental work; sometimes you really need to give your brain a rest. Refuse to routinely work 80 hour weeks as the quality of your work will wipe out any gains in hours.

11. Take a nap every afternoon.

Working 24 hours a day doesn't make you more productive. Take breaks, go home, take a real nap. Often I have solved nasty problems by going home, and the solution came to me as I was driving away, or the next morning.

12. When you go out in the world, watch out for traffic, hold hands and stick together.

Community is good for the soul; read blogs, learn about new languages or frameworks, participate in discussions and see what other people are doing. Just doing your job isn't going to make you a better programmer. Keeping your head down means you will eventually be obsolete.

13. Be aware of wonder. Remember the little seed in the Styrofoam cup: the roots go down and the plant goes up and nobody really knows how or why, but we are all like that.

Every day something new and wonderful appears in the programming (and technology in general) world. Check it out. Be amazed. Learn something new everyday. It keeps your mind fresh, your options open, and your skills up to date. If you think programming is boring or dead then you may need a new career.

14. Goldfish and hamsters and white mice and even the little seed in the Styrofoam cup - they all die. So do we.

Code goes stale and dies. Sometimes you just have to bury it and do it again. Fight against keeping terrible code bases around just to save money.

15. And then remember the Dick-and-Jane books and the first word you learned - the biggest word of all - LOOK.

You won't learn anything at all if you don't try. Everything I learned in programming came from trying new stuff and generally playing around. Every morning I read a lot of sites to see what is happening in the programming world; I have been doing this since my first job in the early 80's (when it meant reading catalogs and magazines).

See, programming is easy when you look at it through 5-year-old eyes.


  • 1970年01月01日 08:00

POJ 3692 Kindergarten (补图的最大独立集||匈牙利算法)

Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7291   A...
  • Mr_Treeeee
  • Mr_Treeeee
  • 2017-08-29 22:09:16
  • 145

Friends ---102笔记

开始解释题目的含义:  sonogram: An image, as of an unborn fetus or an internal body organ, produced by ultraso...
  • dingxy
  • dingxy
  • 2008-05-07 11:02:00
  • 1875


All You Need is Beyond a Good Init: Exploring Better Solution for TrainingExtremely Deep Convolution...
  • guojingjuan
  • guojingjuan
  • 2017-03-07 17:16:58
  • 407

【Codeforces Round 362 (Div 2)E】【公式推导+快速幂+费马小定理】PLEASE a[i]=(1-a[i-1])除2下n次项 n为连乘数

E. PLEASE time limit per test 1 second memory limit per test 256 megabytes input s...
  • snowy_smile
  • snowy_smile
  • 2016-07-28 09:46:18
  • 746

老友记台词学习笔记 SE01EP01(七)

  • wings_king
  • wings_king
  • 2007-11-13 23:33:00
  • 1315


  • 2009年07月24日 17:01
  • 13KB
  • 下载

ExtJS建立大型项目应用教程实例总结Tutorial:Writing a Big Application in Ext

ExtJS建立大型项目应用教程实例总结Tutorial:Writing a Big Application in ExtFrom Learn About the Ext JavaScript Libr...
  • zfrong
  • zfrong
  • 2009-03-11 10:49:00
  • 4676

数学拾遗 all the mathematics you missed but need to know[Garrity].pdf

  • 2014年07月28日 17:27
  • 37.76MB
  • 下载

杭电1023——Train Problem II

Train Problem II Problem Description As we all know the Train Problem I, the boss of the Ign...
  • lishuhuakai
  • lishuhuakai
  • 2012-09-30 15:10:09
  • 4721
您举报文章:All I Need To Know To Be A Better Programmer I Learned In Kindergarten