Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Help with programming efficiency and speed?

This is embarrassing to admit, but I just started a new job, and within a month, my manager has asked me to come to his office so he can talk with me about my lack of progress on the projects I've been given to work on.  This has happened about 4 times.

Finally this last time I just asked him - should I look for another job?  He said no, that I was misunderstanding his intentions.  He says he wants me to improve and that he wants me to think about ways I can get my projects done faster.

I am a slow programmer.  I've been in IT for 17 years, and about 13 of those years have been spent doing computer programming in several different languages, small and large companies, on small and large teams.

I love programming.  But I'm not gifted.  For me, personally, I don't mind being slow at it.  I don't mind the struggle to understand something.  But in the real world - no employer has patience for that, or the ability to "give me more time".  Employers want you to finish as quickly as possible and be accurate.  I don't have speed but I do have passion.

I don't know if I would say I am smart.  I fall apart inside when put on the spot during a verbal face to face discussion.  I don't think on my feet very fast.  I feel the need to mull it over and think about it for a while -- instead of giving a gut reply to a pointed question that usually I regret a few minutes later.  I'm a plodder, not a sprinter.

Okay, enough of that.

What can I do to become faster?

Are all of you super fast and genius programmers?  

I'd like to hear from those of you who are.  Are there key things you do with every project that you feel are crucial to finishing quickly?

I'd also like to hear from those of you who are perhaps plodders like me, who enjoy programming but aren't very fast.  If you feel that you have improved - I'd like to learn about your journey.

Thank you,

Tom
SOLUTION
Avatar of Cluskitt
Cluskitt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I totally agree with Cluskitt and with COBOLdinosaur.

I am someone who makes a good outline of what I want to do - so that there is a design plan and then I plunge in but I do not program straight away. What I do is write pseudo code in comments and usually with pen/paper (there are pens - I use frixion pens - that rub out amazingly well, heat sensitive, it makes me feel better using a pen than a pencil for some odd reason).

I then check if the logic is there in pseudo code and when I see that it matches the design I program it in, line by line. That way it does not seem as though I'm programming heaps - I am only programming one class, one function, one line - breaking it up in small bits just like COBOLdinosaur mentions.

What I do notice is that the design is crucial and knowing exactly what you want to write per section is crucial as well. But taking it line by line ensures you also test each line as you go.

I use a kind of variable table to test as go, especially with complicated loops. That way I can test with pen and paper to see if the code should produce what it is intended to produce.

A small background about myself:
I was a software developer that was seen as "much faster" as any other. I used to get the more complicated developing algorithms given to me to do, because almost anyone else would take a week to write it while I finished it (tested and working) in a day. That seems extreme but it is what it is. I headed out of software development mainly because I found it "easy" and wanted the more complicated aspect of IT - managing, leading and instructing IT people.

Because I have coordinated, led and educated programmers with exactly the same issues you face, I also know that people who program like you do have some very important skills that are needed in a software development team.

Many young and inexperienced software developers jump in, forget or do minimal design and program what they think is best. They spend hours debugging, testing and ensuring their code is working. Hand it in - and I bet within a year their code has been debugged, retested and changed a million times.

Your code on the other hand, will definitely be well thought out, well structured and even though you spend more time finishing it - the company spends much less time debugging it, retesting it and I'm sure most of your code will still look the same after a year!

As my lecturer told me when I was still learning how to program (15 years ago) - 90% of the programming code is written in 10% of the time. The other 90% of the time is spent debugging what messy programmers have written. My lecturer was trying to change our mindsets into creating good structured, well designed, easy to read and well programmed code. It should be called the Art of Software Development. And you are performing an art form, one that if you write it correctly the first time round saves the company 90% of time later on.

Another very good suggestion that Cluskitt mentioned is ensuring you save good functions and code and make them easily accessible when you write new code. There is nothing worse than reinventing the wheel! When I start to write new code I always first check if I've not done something similar before or if someone on the internet has not done it before in Open Source. There are so many examples of code everywhere that most code has already been written. It is just a matter of finding it - understanding the code you have found, making the changes to the code that is needed and implementing it in the right place in the right away.

Understanding and making small changes to your own old code is always quicker than writing it again. And the same principle counts for helper functions written by other people.

What programming language are you programming in currently? I am sure we could find a good set of reference sites with many code examples. Next to that, I would do what Cluskitt suggests - start making a library of functions you have written. Useful functions that can be used time and time again - and saves you a lot of time in programming.

I hope my thoughts help you in some way to realise that the skills you offer actually save the company money and time in the long run. And I hope that your company will realise that before they waste a lot of money on revisiting code created by the younger generation.
Avatar of Tom Knowlton

ASKER

I currently write in C#.  At our company, I'd say 99% of what we write has no visual interface or GUI.  In other words, my world consists of console applications that run on the command line (in our case visualcron), DLLs and WebServices (and sometimes Windows Services).

Our code runs in a scaled environment.  I am new to writing code for this environment, but my understanding is that code that runs okay on just ONE machine with ONE request at a time to do some work --- does not or may not run as well when that same application is being run thousands of times a second.  Or, SQL queries that work okay on tables with 100,000 rows do not run as well as tables with millions of rows.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is also a good resource:
http://www.programmersheaven.com/
Here is my summary of what's been posted so far:

Cluskitt
-Have someone create the models for me (have someone do the design).
-Gather code snippets into a library, one I take with me from job to job.  Make the functions project-agnostic so they'll work in almost any environment.
-Likewise, many functions can be created that will increase your programming speed.

COBOLdinosaur
-Remember that regardless of language, the logical sequence is the same.
-Write down the sequence using pen and paper.
-Create placeholders (method stubs) for the methods you will call (I've noticed that VS will auto create a exception in the methods it creates for you to ensure that they get implemented)
.Once the list is created I take a break (I presume to let the subconscious simmer a bit)
-Return and begin coding.  Soon you will have a shell that should be syntactically and logically correct, but most of the functionality is missing.
-Next step is to work through each subroutine.  I almost always test each piece before going on to the next.  then for some strange reason the overall app has almost no problems when I test the whole thing.
-Every big application is a collection of little pieces.

Wiesje
-Write pseudo code in comments and usually with pen/paper.
-If / when pseudocode matches the design, begin coding.
- I am only programming one class, one function, one line - breaking it up in small bits just like COBOLdinosaur mentions.

-Leverage what has already been done in the Open Source community.

http://stackoverflow.com/questions/143088/open-source-c-sharp-projects-that-have-high-code-quality

http://stackoverflow.com/questions/155217/good-c-sharp-code-samples


-Understanding and making small changes to your own old code is always quicker than writing it again. And the same principle counts for helper functions written by other people.

Luckily there are many many many sites available with good help files and libraries of C# code.

C# language resources online:
http://msdn.microsoft.com/en-us/library/aa287464(v=vs.71).aspx
http://msdn.microsoft.com/en-us/vstudio/hh341490

Others to try:
http://www.csharp-examples.net/
http://oreilly.com/catalog/csharpess/examples/
http://en.csharp-online.net/CSharp_Code_Snippets

and here on EE!

-Check-out refactoring:

Martin Fowler wrote a great book about Refactoring (and a workbook that goes with it). See: http://martinfowler.com/refactoring/.

-and Design Patterns

Design Patterns by Gamma, Helm, Johnsen and Vlissides. Have a look here for their site: http://hillside.net/patterns

I also have the Metsker book with a C# focus.

-programmersheaven.com
Is there an industry term for the kinds of activities that have been described?

I want to do some more research online about programming efficiency and speed.  What keywords might produce the results I am wanting?
Oh that is a great article... especially point 3! Silly of me to have forgotten that.

I am always complaining about those programmers that do not know how to type.
So much time is wasted not being able to type quickly.

Point 8 - is also very useful. I myself use AutoHotKey. It is great for having shortcuts that you have created yourself. For instance: you could let AutoHotKey set up a new method by hitting the windows-m key combination.... just a small example.

And on Point 9: A very very useful book I have forgotten to mention to you - Code Complete by Steve McConnell - It is like a bible to me - although I believe I know most of it off by heart. Do purchase it - if you know everything in that book I'm sure you're programming speed will improve as well.

On the other points - thanks for sharing this article - I am sure to use some of the other points now too!

PS if you are thinking of using AutoHotKey, let me know - I can always help you set up things you need!
Thanks guys!

This is great information for me and a beginning.