Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What are the things that took you only a little time to learn, but had a big payoff? And how long did it take to learn enough before the they began to pay off?

For instance, I’m not a master of regular expressions, but it probably took a couple of hours to understand the basics enough for to start using them and they come in handy on a regular basis.

share

migration rejected from stackoverflow.com Aug 11 at 18:36

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as not constructive by Mark Trapp Dec 17 '11 at 3:44

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

12  
I’m not a master of regular expressions, but it probably took a couple of hours to understand the basics enough for to start using them and they come in handy on a regular basis. Tip: First you don't use a tool when you should because it seems too difficult to learn. Then when you finally learn it you start to use it when you shouldn't. Be careful not to abuse regular expressions where they are not appropriate. –  Mark Byers Jan 11 '11 at 14:15

38 Answers 38

Two things:

  1. Learn to type. And learn hotkeys while you're at it. Unplug the darn mouse and learn to completely drive a computer with a keyboard. You'll be WAY faster in time.

  2. Psuedo-coding before real-coding. Here's how it works. Let's say I'm going to write a function. The first thing I do is write out the pseudo code:

.

def someFunc(x, y):
   # Verify that x and y are correct
   # Transform x
   # Notify master service of transformation
   # Apply transform to y
   # Send message to user
   # Return new value

Then, I flesh out the implementation. And, most importantly, I preserve the pseudo code. The result is a well-documented function!

def someFunc(x, y):
   # Verify that x and y are correct
   ...

   # Transform x
   ...

   # Notify master service of transformation
   ...

   # Apply transform to y
   ...

   # Send message to user
   ...

   # Return new value
   ...
share

From time to time I ask myself what I would tell to the past-myself if I could send a message through time-continuum, or what to suggest to a newbie asking me "what should I learn now?".

My first answer is: a scripting language.

Not a specific one, but one which you can use to write some "quick and dirthy" stuff to get your results immediately. Perl, Python or Ruby may be good choices. For me learning Python has been a good investment.

My second answer is: a functional programming language.

Learning it gives you a good elasticity, and you finish in solving quickly problems with a few well-crafted lines, for instance placing a good foldl instead of 30 lines of code. Often this kind of functionality is also available in non-functional language (again, take Python, suggestion: see itertools, how nice is that?).

My third (and last) answer is Regex.

As other users pointed out, this is a totally good skill to know. Combine it with a good regex-aware editor and you'll be fast as light in boring, repetitive and error-prone jobs.

share

Writing things up clearly for other programmers and also for management - letting people know what you're doing and why, clearly, articulately and succinctly.

share

Agile and in particular Estimation:

The ability to collaborate on generating estimates.
Over the years doing estimates had always been one of those black arts that leads and managers did without real feedback or explanation to make the plans fit the schedule.

But over the last few years the rise of agile (especially scrum) has opened my eyes to a whole set of new tools for planning and estimation. I am now a die hard fan of the ability of scrum to accurately estimate (after a couple sprints to calibrate) the cost of a project and quickly identify when things are getting off track.

share

Writing software typically requires you to keep track of thousands of tiny subtasks. During my first years as a professional software developer, I learned how to do this efficiently. Later on, I discovered that David Allen has described this methodology in his book Getting Things Done. Since then I wished I was taught this at school.

share

I agree with regular expressions.

Some of you are going to hate this, but SQL is another one. You can do some nifty things with it. It may not always be the best answer, but when you are using a relational database, strong SQL skills can help you 1) write better SQL, and 2) give you more options in partitioning logic. I'm not saying to put gnarled SQL in place everywhere, but there are times when a grouping, aggregation, built-in analysis functions, or common table expressions can save you time and energy in getting data set up so the client can use it more efficiently.

Finally, business analysis. Although some would not consider this a programming skill, it goes hand-in-hand with problem solving which is a programming skill. Several times in my career, asking the right questions in the analysis phase saves needless complication and coding. Less code is better.

share

Saying no.

We programmers tend to get excited when faced with potential fun challenges. In fact, there are more of them than we could ever possibly get to.

If we try to tackle all of them, we'll finish none of them.

share

Refactoring without fear, including "coding-in-reverse", where your net daily LOC is negative. Fewer lines, but well structured ones improve maintainability, velocity and longevity for the software and help you and your team meet the ever-changing needs of the business.

TDD, version control repositories, and responsive rollback (if needed) serve to reduce this fear.

share

I like the question, a lot. As a professional developer, I'm learning things all the time and after all these years, I want to know what has helped me the most to stay employed and have a comfortable living but as a result of the contributions and positive impact that I've created with the products and services that I successfully built and shipped. There's no other way for me to measure success.

I continuously ask myself this very same question all the time and since long time ago. I think is a very honest way to evaluate you in the mirror.

I like the investment term that you used: "return on investment" or aka ROI. Ultimately a successful career is the result of the accumulation of multiple smaller successful investments and minimizes or cut your losses; yes you can have losses also. But if you play the game well: re-invest your winnings and minimize or cut your losses, you will be rewarded with a comfortable living and some decent savings, or better have your own mini Microsoft, mini Google, etc.

Ok back to reality with some very pragmatic programmer skills examples.

In my case, I can easily say 2 things have given me a very good ROI, and it hasn't stop, they keep giving me every day. A very good sign of a good investment: they keep giving to you even when you are sleeping! Let me check...ok the market has closed and my online statement was just updated, so I have fresh numbers:

English = 1*10x12 %

SQL = 1*10x9 %

Unix = 1*10x9 %

:-D

Seriously.

English (my native language is Spanish) opened many doors to me and exposed me to the widest array of programming material known today.

SQL, when I originally studied E-R theory, and SQL as an implementation of that, we only did it on the chalkboard and on paper exclusively. The concept had like 5-7 years of being announced, and commercial SQL databases were very expensive and unavailable for small universities. I really liked it and learned all about the E-R theory: entities, tuples, relationships, primary key, foreign key, joins, normalization, etc. There were not free things like PostgreSQL or MySQL, which I wish I had had. The first DB that I had all for myself was MS SQL 6.0; I think it was the first release of a SQL database product from Microsoft.

Unix – Linux/GNU tools, what can I say about my favorite OS and associated tools?

The interesting thing about these programming skills, is that they have been stable for the longest time: they are not the latest hot buzzword or you don't see them being used as a fashion statement. They are just sitting there, not making too much noise but they are solid as the Gibraltar rock. You can easily research some old "skills" that were very popular in their time and now they are obsolete or almost dead: PowerBuilder comes to mind. No, these skills can be boring but they are solid investments and keep giving me very juicy returns, year after year.

share
  1. Understanding the problem on paper before realizing its solution in code.
  2. Discussing the problem (and its potential solution) with other human beings before realizing its solution in code.

(Yes, these are programming skills.)

share

Test-driven development.

What a great thing for refactoring, performance optimization, diagnosis, debugging.

The best is this.

Write some tests. This can be hard, depending on the overall requirements. But it's far easier than writing the final application.

Hack code until the tests pass. This can be so much easier when there's a focus of just a bunch of tests which are failing. When other "clever" or "good" ideas arise, they can be set aside in "TODO" comments while the main deliverable functionality gets completed.

A review of the TODO's may reveal some things which should have been in the tests to begin with. Things which were overlooked when creating the initial test cases.

Write more tests and repeat the loop of coding until the tests pass.

And the cleanup/simplification/refactoring pass is so much more fun when there is a set of tests that proves that the removed code really was useless.

share

Approach salary negotiations like a programming problem.

share

The most recent one that I can recall is LINQ. Spent about a week studying it, can't say that I know enough now, but it really boosted my productivity. A pity I didn't learn it earlier.

share

Here's a few:


  1. Classes
    1. Inheritance
    2. Polymorphism
  2. Constructors/Destructors
  3. Perl Memoization
  4. Javascript Closures
  5. Stack Overflow/Wiki Codes
share

Good knowledge of the version control software you are using can save a lot of time and effort.

share

Adapting a good and consistent coding style

Without it it'd be impossible to code anything larger than a few hundred lines of code.

share

It really depends on what kind of software you develop. Looking at the big picture I would say that learning Domain-Driven Design and Design Patterns had a really nice return as I would communicate more efficiently, design better software and find clever solutions to annoying problems.

share

KEYBOARD SHORTCUTS

You spend all day in your IDE/Text Editor. Memorizing the keyboard shortcuts takes an hour, getting used to them takes a day, and they can save you HUGE amounts of time, a little bit at a time, for the rest of the life of that IDE/Editor.

share

Mastering a text editor. How curious nobody told that…

share

My computer science degree and high GPA and all has helped me to get a foot in the door, but my physical looks have helped me to propel myself to a much cushier position in life. So, I work out regularly, eat lots of nuts, eggs, protein powder and I wax and bleach myself.

share
1  
+1, Health is very important, however it is not really a skill, but it is a skill to maintain it. –  Emmad Kareem Nov 17 '11 at 16:56
3  
That is pathetic and disgusting. And, pathetic and disgusting as it is, true. –  mjfgates Nov 17 '11 at 18:11

Proper (and Verbose) Naming Conventions

It is so much easier to write and return to code when you follow a a strict naming convention. This not only references CamelCase vs delimited_convention, but is also many other things.

ie:

$is_valid = true
$valid = true;

In this case, one might have no clue what $valid contains later in the code. Is it a boolean? An array of valid strings? Who knows

$is_valid is better as it denotes that this is likely a boolean expression. An even better convention is denoting your variable type and scope in their name.

ie:

$fb_valid = true;

Where f denotes a function scope variable, and b denotes a boolean type.

Admittedly this is overkill, but it makes code so much easier to read and understand no matter where you jump into it. You do not have to find the variable declaration to see if you are using it correctly.

share
11  
Hungarian notation again? :) This might be useful for dynamically typed languages such as PHP. For statically typed languages (C/C++, Java, Pascal, ...) this is an overkill and violates the DRY principle (one has to write an information about the type twice). That just calls for a moment when you change a variable type and not its name. –  Karel Petranek Jan 11 '11 at 21:55
12  
You've got the right idea, but IMHO you're not getting the whole picture. I the fb is going to make things VERY difficult to read for anyone who doesn't know what's going on, and its help will be minimal (though PHP's shortcomings might make this necessary). The idea is to make code flow as close to normal language as possible. Above all, you want to tell what a variable actually holds with its name. areGetParametersValid and isCurrentStringValid are a little better, but you're still not saying what valid means. Try areGetParametersValidIntegers or isCurrentStringValidAddress :D –  Gordon Gustafson Jan 12 '11 at 1:16

Design Skills

People respond to good design, even if objectively they know better. You might have a good product. If your good product also looks and feels nice, you have a great product.

share

Regular Expressions

Comes in handy in so many places.

share

Liberal use of asserts and using an alwaysAssert() function to leave the ones that have negligible impact on performance on in release mode. This massively improved my productivity because:

  1. I now have sanity checks that run every time my code runs, with real inputs, not just the cases I thought to test.

  2. If anything is amiss, my code fails fast, close to the root of the bug, not slowly, due to the secondary or tertiary effects of the bug.

  3. Let's face it, some code is just hard to unit test, and the tests never get written. If you don't have tests per se, sanity checks are the next best thing.

  4. Asserts can be written as you go along, without disrupting your mental flow, rather than having to be added as a separate step.

  5. Using asserts adds compiler/interpreter checked documentation of assumptions that would otherwise be implicit.

I can't really say how long it took me to learn to use asserts. I gradually came to like them by reading Walter Bright's code. Walter Bright loves asserts and made assert ultra-powerful in D, and D has since become my favorite language.

share

Just in case this gets left out...

UNIX tools such as bash, grep, find, tail, awk, sed, ..., curl, ssh, ... ok you get the idea.

You can learn them as you need them. You can do incredible things with them when you plug them together. You can automate a lot of repetitive work with these. You can save a LOT of time. Loads of tools, freely available, maintained by people who really care, easy to install.

I'm still learning. Just now I needed to convert some gif files to png: sudo apt-get install gif2png ; gif2png -O *

share
5  
One of the most useful skill sets to have, no matter what languages I am using, what type of software projects I am working on. Shell utilities and shell in general are always getting used. People need to embrace piping. –  Orbling Jan 11 '11 at 21:55
2  
There's also ImageMagick: sudo apt-get imagemagick; for i in *.png; do convert $i $i.jpg; done. The good thing about it is that it converts basically everything to everything. –  kizzx2 Jan 12 '11 at 16:19

Not directly a programming skill (but then nor are many of the others in the list) but decent communication skills.

While they come more easily to some than others they are absolutely something you can learn and do so in a relatively short space of time (start with presentation skills which are straight forward and the principals are applicable to far more than just formal situations, and assertiveness which I was interested to find out isn't just about shouting and being forceful, it's closer to the opposite).

I'm not the most knowledgeable, I'm not the smartest, but I can explain what I think and why I think it's right and important in a way which non-programmers can understand.

Financially that's been worth more to me than any specific technical skill (and thinking about it has probably resulted in a greater overall level of happiness / satisfaction as if you can clearly express yourself you're far more likely to get your own way, or at least be content that if you're not getting your own way it's not because you were misunderstood).

share
1  
+1 for pointing out that communication skills can be learned. Too often, people assume that communication skills are simply present or not. While aptitude is always a factor, one can absolutely improve communication skills! –  Stephen Gross Nov 17 '11 at 17:49

For me, it has been by far Functional Programming.

Once you learn what it is and how to do it, you see it eveywhere. The function style, when used appropriately, can leads to much simpler solutions than imperative counter parts and can be an excellent tool in your tool belt when stuck.

Learning functional programming is probably a bit trickier than say, Regular Expressions, because functional programming isn't about a programming language it is about a mindset. Particularly, avoiding mutation, emphasis on data transformation, etc. However, you can pick it up pretty easily if you use it consistently. I would recommend starting at Project Euler

Also, shameless plug here, learning functional programming doesn't just mean that you have to learn a language that won't benefit your day job. If you are a .NET developer, F# provides an excellent way to get started with functional programming.

share
1  
Huh, maybe I should kick the ol' F# tires then! –  Ryan Hayes Jan 12 '11 at 3:06
2  
You can do FP in any language. Most modern languages support some form of them either with lambdas or top-level/block-level functions and first-class functions. Once you grok the basic idea, they can be implemented in any language. –  chakrit Jan 12 '11 at 5:33
1  
@chakrit, yes, but the techniques are better optimized in a functional language. Lazy evaluation helps too. –  dan_waterworth Jan 12 '11 at 6:12
1  
I wish I could up vote it more than once. –  MAK Jan 12 '11 at 15:38

Design Patterns

I just started work and they've been invaluable to me since they allow you to specify high-level constructs and be reasonably confident that you can fill in the blanks when going to implement without having to re-architect the entire app for each bug fix.

share

Design Patterns

Hands down, I came relatively late into design patterns a few years ago but it's been one of the most major influences on my programming. Design Patterns starts to "re-train" your brain to see what different design patterns can be applied to a problem. The more fluent you become in them the easier it gets. It's a real paradigm shift and design patterns is one of the few subjects I think should be mandatory in any programmer's education.

It's equally important to know anti-patterns. Knowing and recognizing them is important to eliminate common mistakes and redudancies in your code and projects

share
2  
+1 anti-patterns. Sometimes developers with experience in design patterns will shoe-horn them in where they are marginally (at best) appropriate, but it is almost always better to recognize and fix an anti-pattern. –  Wonko the Sane Jan 11 '11 at 16:52

What programming skills have provided you the best ROI?

The same ones that are hardest to share with my teammates.

Random-pausing as a performance tuning technique. It is extremely easy to learn. The first time I remember using it is around 1978, when I was debugging some communication software in ASM for a "mini-computer". It just seemed like the natural thing to do. The computer's "halt" button was right on the front panel, asking to be pressed. I can't understand why it is not better known. What we have instead is a whole mythology.

Dynamic Dialogs as a desktop-UI coding technique. I stumbled on this around 1985, and it took about a year to work the bugs out. It allows complex dynamically changing dialogs to be coded, and even simple ones can be done in about an order of magnitude less code. It does it by taking off the programmer's hands the job of incrementally changing the display.

share
1  
+1 for random pausing.... awsome !! –  explorest Jan 11 '11 at 20:12
1  
Also +1 for random pausing. In an obviously slow Java application a quick few jstack can show the problem area. –  Tom Hawtin - tackline Jan 11 '11 at 21:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.