How to improve productivity?

Started by
8 comments, last by liquiddark 19 years, 9 months ago
I want to solicit suggestions for specific code-level techniques people use that actually affect the speed at which programs are developed. I'm already using test-first development, YAGNI, and refactoring every day, although their short-term effect on code velocity seems to be negative - but the long-term effect appears generally positive, so I'm not complaining. I find top-level acceptance tests more useful overall in a pure testing sense than low-level unit tests, although of course I try to write both when time is available. Take this as a baseline for suggestions, if you will, or offer suggestions as to how they negatively impact code velocity (I don't find this to be the case, but I'm open to other points of view). As an example of something that affects velocity & productivity, I prefer to work in C# and even VB6 rather than C++, simply because they allow me to ignore many of the complex syntax issues which plague that language. I would very dearly love to be as productive in C++ as in C#, but at the moment that goal is very far away. Furthermore, for the scope of the projects I'm working on, C# is a more appropriate technology to use. A second consideration makes matters a bit more complex: I'm usually required to use specific technologies for most development efforts, and these tend to be very high-level, not very testable, and lacking in widespread development communities, which means practice-level development techniques are the only approach to improving flow. I do this both for a living and as a hobby, and as time goes by I get more worried that I'm never going to become a highly productive programmer. This isn't an acceptable outcome. ld
No Excuses
Advertisement
Many swear by the Python language as a productive tool.

Regardless, the more proficient in a language you are, the more code you'll be able to understand, and therefore write, and therefore reuse.
Any links on these? "test-first development, YAGNI, and refactoring". I would like to improve some of my coding styles.

Toolmaker

You Aren't Gonna Need It
Test driven programming
Refactoring

Also look around the rest of that Wiki if you have the time, it is full of useful programming info.

Now won't someone rate me helpful!? ;)

(edit: didn't the tag once work here?)
Quote:Original post by Toolmaker
Any links on these? "test-first development, YAGNI, and refactoring". I would like to improve some of my coding styles.


"test-first" programming - keeps you moving.

When the main purpose of your activity is to write tests and then make them pass you always have a very obvious short term goal. You also get very quick feedback. It keeps you motivated. Also the idea is to write tests that fail and then code to make them pass, rather than to write code and then tests to prove the code you've written is wrong and needs fixing. The first gives you positive feedback, the second is a bit negative really and can be demoralising.

See also the chapters on unit testing, test-first programming and refactoring from dive into python. As Chris says Python helps as it is very flexible and easy to do 'difficult' things. The prinicples here though can be applied in many languages.

Refactoring is good to help give you a feel for the bigger picture and how to change your design without changing its behaviour (i.e. without breaking it). This can be very helpful if you are stuck with a bad design and don't know where to begin adding a new feature. Start by refactoring.
Quote:Original post by liquiddark
I want to solicit suggestions for specific code-level techniques people use that actually affect the speed at which programs are developed.

I'm already using test-first development, YAGNI, and refactoring every day, although their short-term effect on code velocity seems to be negative - but the long-term effect appears generally positive, so I'm not complaining. I find top-level acceptance tests more useful overall in a pure testing sense than low-level unit tests, although of course I try to write both when time is available. Take this as a baseline for suggestions, if you will, or offer suggestions as to how they negatively impact code velocity (I don't find this to be the case, but I'm open to other points of view).

As an example of something that affects velocity & productivity, I prefer to work in C# and even VB6 rather than C++, simply because they allow me to ignore many of the complex syntax issues which plague that language. I would very dearly love to be as productive in C++ as in C#, but at the moment that goal is very far away. Furthermore, for the scope of the projects I'm working on, C# is a more appropriate technology to use.

A second consideration makes matters a bit more complex: I'm usually required to use specific technologies for most development efforts, and these tend to be very high-level, not very testable, and lacking in widespread development communities, which means practice-level development techniques are the only approach to improving flow.

I do this both for a living and as a hobby, and as time goes by I get more worried that I'm never going to become a highly productive programmer. This isn't an acceptable outcome.

ld


What sort of things do you program? Who uses them? This could help choose a better set of tools.
If you use VB 6 still, I would advise moving to VB .net. I moved and the new features were great! I moved to C# because I find the syntax to be much better.
How do you use unit tests?
Quote:Original post by GnuVince
What sort of things do you program? Who uses them? This could help choose a better set of tools.


I have basically two separate fields of endeavour:

1) Business code - heavily networked, database-centric, relying more and more on MS technologies to get things done, primarily function as an add-on and maintenance programmer. Work is in VB6, C++, and C#.

2) Game code - I've got a long-term plan here. I started with modding Unreal Engine games, which was pretty easy. Now I'm writing simple games from scratch, concentrating on being able to grow tools and game code simultaneously. The game I'm working on currently is a tile-based wargame. Next project will probably be a language of physics & engineering, starting with something like ODE and adding optics, electromagnetics, thermodynamics, and chemical considerations, leading to a software toy for unit creation. Work is entirely in C# & DirectX right now.

Quote:Original post by DrGUI
If you use VB 6 still, I would advise moving to VB .net. I moved and the new features were great! I moved to C# because I find the syntax to be much better.

Insofar as is possible (I'm required to do plenty of VB6 day-to-day at my job), I've moved to C#.

Quote:How do you use unit tests?

I use them test-first and during refactoring of old code. My basic methodology is to write a test, then write or rewrite code so that it satisfies that test.

ld
No Excuses
Quote:Original post by liquiddark
Quote:Original post by GnuVince
What sort of things do you program? Who uses them? This could help choose a better set of tools.


I have basically two separate fields of endeavour:

1) Business code - heavily networked, database-centric, relying more and more on MS technologies to get things done, primarily function as an add-on and maintenance programmer. Work is in VB6, C++, and C#.

2) Game code - I've got a long-term plan here. I started with modding Unreal Engine games, which was pretty easy. Now I'm writing simple games from scratch, concentrating on being able to grow tools and game code simultaneously. The game I'm working on currently is a tile-based wargame. Next project will probably be a language of physics & engineering, starting with something like ODE and adding optics, electromagnetics, thermodynamics, and chemical considerations, leading to a software toy for unit creation. Work is entirely in C# & DirectX right now.


Well then, I'm sorry but you're stuck. C# and .NET are pretty much the most productive you will get in a Microsoft environment, and since both the language and the environment are too rigid too allow some cool things that could increase productivity, the thing that's gonna help you the most is learning the language, the class library and the environment really well.
Quote:Original post by GnuVince
Well then, I'm sorry but you're stuck. C# and .NET are pretty much the most productive you will get in a Microsoft environment, and since both the language and the environment are too rigid too allow some cool things that could increase productivity, the thing that's gonna help you the most is learning the language, the class library and the environment really well.


This points out a clarification I should have made in the beginning: I'm not looking for TECHNOLOGY fixes. Certainly, if someone knows of a large repository of free code that does a huge amount of stuff, I'm not going to object. But my primary need is for tricks in the environmental, mental, research, and process domains.

ld
No Excuses

This topic is closed to new replies.

Advertisement