5 Programmer Principles to better yourself

2016-09-21 10:19:08 admin Perl Interests 0 Comments

Larry Wall said there are 3 great virtues of a programmer: laziness, Impatience and Hubris.

  • Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it.

  • Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to.

  • Hubris: The quality that makes you write (and maintain) programs that other people won't want to say bad things about.

You can take them as virtues or rules, be lazy (but not the good kind of lazy), be impatient, have hubris. There are also other virtues and characteristics that define or represent a great programmer. We’re going to name a few principles that as a (perl) programmer you should follow to better yourself. We’ll also let you fill in a few, this is not a restricted list so it should be great so see the community's opinions as well.

1 Write readable code, not show my muscle code. We all want to show what we got on occasion or oftenly, depending, but trying to be more clever than the rest just for the sake of it, while coding, is detrimental. Code should be easy to read and understand, by others as well. Be clever but don’t complicate things just because you can, showing who’s better is not something productive in a team environment.

2 Don’t code more than you need to. Solve your problem with as little code as possible, and get better at it every time. Implement the features that you have given to you, it may be tempting to create code that works in all sorts of situation, but if it’s not necessary don’t do it. Don’t try to solve problems that don’t exist.

3 Name things properly. You won't be the only one that will read your code so other people (or you in a year's time for example) will have to understand everything that’s going one there. This is very valid in perl as there’s more than one way to do it, so your way might not be the next programmers way. Use comments if necessary, but don't go overboard with them, make sure your comment has an actual purpose. Also keep them updated when you change code.

4 Be creative and organized. Seems a bit of a paradox. Be creative and don’t get bogged down in paradigms, coding is a very creative process, you’re actually making things, but know what you want to do from the start. Don’t wing it, don’t get excited at your first idea and go from there. Have a plan from the start, one that encompasses the entire functionality that you have to build.

5 Don’t be stubborn and ask for help when you get stuck. No matter how good you are, sometimes you just get bogged down and ego shouldn't be a part of it. There’s always something new to learn and asking for help is a great way to see things differently and get a bit of perspective. 

Take our list and put into a real scenario, see where it applies and how it applies. When you worked through problems or faced difficulty did you find yourself in the above paragraphs? Also, share with the community what principles do you follow to get better every day, one step at a time.

Leave a comment


Subscribe to our newsletter!

Make sure you never miss the interesting stories of Perl startups, apps and projects.