views:

2351

answers:

25

Musicians practice scales, arpeggios, etc. every day before they begin playing "real" music. The top sports players spend time every day practicing fundamentals like dribbling before playing the "real" game.

Are there fundamentals that programmers should practice every day before writing "real" code?

+12  A: 

Keep updating yourself. Read blogs, play around with new upcoming frameworks, libraries.

Spend more time on StackOverflow :)

Mihir Mathuria
+1 Though the last point can be quite counter-productive.
Helper Method
+32  A: 

Add documentation on yesterday's code !

Jerome WAGNER
gah! ban! [15 chars]
Neil N
Best practise in this field would be to comment the code from today, so your first task would be to assign time to do it today. :-)
Marcel
This is crucial. Reminding yourself what you were doing yesterday helps you get back into the groove from 5pm the previous afternoon.
Andres Jaan Tack
@Marcel, I find that if I document after I write the documentation is a lot better because it's written by someone who doesn't understand the code fully. If I comment at the same time the comments are more like bad pseudocode which is unhelpful.
tster
+12  A: 

Stretch your wrists and arms, I guess.

Do scientists practice before they perform tests? Do civil engineers practice before they draw up plans in a CAD device of some sort?

The answer is no. The two things you mentioned involve manual, physical processes. Programming is a mental exercise, so as long as you're alert and of sound mind, you're good to go.

Stefan Kendall
+43  A: 

Answering a question on SO every day seems like good practice. Look for questions that require you to do some research, think a little, or stretch your imagination. Such activity may well be useful in your "real" project.

JYelton
If you can't find one to answer, use that same time to find someone smarter than you with similar interests, and see what other things they've written.
Chris Thornton
Thanks - I've been trying to do this. Although, I've found SO to be a little too addicting sometimes...
Jacinda S
@Chris What a simple yet great idea.
Epaga
+6  A: 

Reading code that looks unfamiliar because it's written in a different language, or written by someone with a different style than yourself.

James Thompson
+6  A: 

Yoga! So when you can't figure out a problem, you have a way to relax :)

ggfan
+4  A: 

Thinking/problem solving.

And learning how to say "No".

ChrisF
What do you mean exactely by "how to say no"?
Helper Method
@Helper - when someone comes along and asks "can you just change this" or "can you just add this option".
ChrisF
+2  A: 

Are there fundamentals that programmers should practice every day

Yoga to cope with having to deal with idiots (living and software) all day

or:

Field stripping automatic weapons if you have a more direct approach to the problem.

Martin Beckett
+4  A: 

The Pragmatic Programmers suggest learning a new language every year. Working toward that goal seems like a pretty decent daily exercise falls right out of it.

Chuck
+21  A: 

CodeKata comes to mind. I think this line of thinking is exactly what led them to create it. From their home page:

How do you get to be a great musician? It helps to know the theory, and to understand the mechanics of your instrument. It helps to have talent. But ultimately, greatness comes from practicing; applying the theory over and over again, using feedback to get better every time.

How do you get to be an All-Star sports person? Obviously fitness and talent help. But the great athletes spend hours and hours every day, practicing.

But in the software industry we take developers trained in the theory and throw them straight in to the deep-end, working on a project. It’s like taking a group of fit kids and telling them that they have four quarters to beat the Redskins (hey, we manage by objectives, right?). In software we do our practicing on the job, and that’s why we make mistakes on the job. We need to find ways of splitting the practice from the profession. We need practice sessions.

Neil N
Given how bad the Redskins were last year, that might have been an attainable goal.
HLGEM
@HLGEM, lol so true.
Neil N
If CodeKata is too sedate, you might find Gymkata more appealing. http://en.wikipedia.org/wiki/Gymkata
mcliedtk
+5  A: 

Practice typing.

Less friction getting thoughts into code == more productivity.

John at CashCommons
+1 Academics and programmers often think of their interests as mental things with only the vaguest of ties to the physical world. Especially in the case of coders though, all of our coding is tied to the physical world via typing, else it isn't really code. This is the one often overlooked skill that you will use in every bit of code in every language from your first program until your last. It is not trivial to be proficient at it.
Dinah
+3  A: 

Talk to your users. Ask them questions about their jobs.

You're a programmer. You know how to program. Users know their jobs. Your job is to make their job easier.

Learn as much as you can about their job - ask them what the biggest pain in the buttocks is and what might make it easier.

Remember - they are your customer. They are the ones who will be using whatever you make on a daily basis. Get a rapport with them. Talk to them - every day if possible.

It'll make dealing with the inevitable unexpected problems that much easier to deal with.

David
+2  A: 

Study/Practice the fundamentals of programming I would say.

  • Design Patterns

  • OO programming, functional programming, procedural or whatever paradigm you are using/ want to use or study

  • Design Testable methods/classes (this can be true depending on what you are using).

  • Programming logic and algorithms

And, as many have said on this thread, take a look at SO would help a lot!

Diego Dias
+4  A: 

just keep repeating "I will not try to debug my relationship(s) with [significant] others"

Jay
+5  A: 

Proper hygiene.

Flemish Bee Cycle
From my experience, this actually has a NEGATIVE correlation with coding skills.
slacker
Not in my experience. The clearest thinkers I know have good hygiene and are fit (probably correlates with discipline).
temp2290
+9  A: 

As a developer I like to get away from just code every now and then, and think more about problem solving / algorithms:
Enter Project Euler, a great way to test your maths and coding skills.
(For those of you who haven't come across it, it's a series of mathematical problems that require both coding skills and an understanding of the maths behind it; it's good for brushing up on both!)

(...oh, and just to stop any arguments now, it is pronounced "Oiler", not "Yuler"!)

Savara
Thanks for suggesting Project Euler! I hadn't come across it before, and it's great.
Jacinda S
+1 for the guidance on pronouncing it right, something lacking almost everywhere.
DarenW
another suggestion is codingbat.com
starcorn
+1  A: 

Any sort of puzzle game is good. Sudoku, jewel games, physics games ("space physics" on my Droid!), etc.. Follow-up with Euchre or Gin during lunch.

Chris Thornton
+2  A: 

I will prefer Tai Chi Chuan instead of Yoga....because it will improve your health, your concentration and you can use the martial art moves when the problem is the interface between chair and keyboard: The user :)

Juan Carlos Arteaga
+2  A: 

I would suggest that programmers do the following:

Read the following books:

  1. Write Great Code I by Hyde
  2. Write Great Code II by Hyde
  3. Design And Validation Of Computer Protocols by Holzmann
  4. Numerical Recipes 3rd Edition: The Art of Scientific Computing by Vetterling
  5. The Dragon Book (and any book by Aho + Ullman )
  6. Knuth's books

Understand: 1. Formal Methods 2. Compiler Design

x

Xofo
+3  A: 

Topcoder.com ..you can practice old competition puzzles in C++, Java,Python, C#

yogsma
Thanks. I think Topcoder.com is great. I also found a similar site recently called codechef.com that seems to operate on the same principles but doesn't have as large of a following yet.
Jacinda S
+3  A: 

I would recommend meditation to anyone who has to do lots of critical thinking on the daily basis. Perks include developing patience, control over emotions, calmness of mind. All of the above are critical in field of Software Development.

a_person
+1  A: 

I like what Chris said in one of the comments above. So much so that I thought it deserves its own answer:

[On SO], find someone smarter than you with similar interests, and see what things they've written.

Epaga
+1  A: 
  • Refactoring code.
  • Study your editor.
  • Solve puzzle. (ACM /uva/ problems, Projecteuler problems)
gmunkhbaatarmn
A: 

Customer Service.

Most paying jobs - programming, garbage collector, politician, nurse, bartender - all have three requirements, looked at from the top.

  • Keep your coworkers happy, including your boss.
  • Keep your customers happy in the short run, so you make money.
  • Keep your customers happy in the long run, so you have stability.

Practice customer service, and focus lightly on these three things. Everything else is gravy.

Dean J
A: 

Healthy Mind, Healthy Body.

mens sana in corpore sana is not just a statement of how you would like to be, but also a path to achieving that:

  • keep your mind healthy by learning to think properly about your world. Avoid unhealthy thoughts. This will also stop you from acting in an unhealthy fashion (food, sloth) or worrying yourself to death.
  • keep your body healthy by learning to look after it. Regular exercise, healthy food. Fitness is an important aspect of being able to think straight.

Whichever side you attack first, you will find that it invariably leads to the other side as well. It is not possible to be mind without body. Nor is it possible to be body without mind.

Daren Thomas

related questions