Pseudocode AKA Stop and Think

From Wikipedia:

Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.  It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading.

My definition:

A way to force you to think through your program before coding.  Really thinking through what variables you’ll need, what outputs you’ll need. It helps further on with the design. It allows me to work through some of the decision points that I’ll need to program later on, such as:

  • Should I use a macro variable or by groups?
  • Do I need to keep around the results from every simulation or just the end results? Which results do I need?
  • Where do I need counters?
  • Do I need break logic or define my loop with a do while instead?

This is an ideal situation, and I admit I don’t do it all the time. Sometimes experience allows me to skip this step, and sometimes I think experience allows me to skip this step and I shouldn’t.  There are many times, when I wish I hadn’t.

But basically, its a step that says, STOP AND THINK. Because thinking before doing makes things go faster. It’s also a great way to create a program structure that you can then pass on to someone else to actually code, if that’s an option.

What I’ve Learned From Being a Consultant

Things I’ve learned from being a consultant

Working from the government pays the bills, consulting on the side pays for toys :).

Organization

I’m the only working on this project, so you’d think you can organize it any way I’d want, right? No. At any time the client can ask for anything, including the full code and it is my belief if they’ve paid for it then they should get it. The code is mine, but was developed for them so they can have it. Maintaining code isn’t very much fun so I don’t worry too much about putting myself out of a job.

Time Management

Clients want things with a quick turnaround. Sometimes this means doing things at lunch time or spending time after work. When its my own time and means less tv or vacation time, it gets spent wisely. Also, see Organization. Being organized saves me and the client time. The time taken to organize things is probably equivalent to billing for time spend search for things.

Communication Skills

Rarely does a client ask for what they end up with the first time around, unless its repeat such and such for me.  This means working with clients to flesh out questions. If you get it wrong, then you waste time and that time gets billed to the client.  People generally don’t like paying for work that wasn’t what they requested. Especially, since I’m sure what they said was clear in their mind. Communication isn’t only listening to what a person says, its hearing what they want and sometimes that isn’t said.

Different Tool Sets

If a client uses SPSS, SAS, or R, then that’s what you’re working with on this project.  It’s good to know at least the basics in a few languages and how to look up things in those languages as well.

Design

If I can generate the results on time, on budget that’s great. If those results are copy and paste insert into the manuscript/PDF/powerpoint presentation that’s 10 times better.  I’ll admit some of the designs would never had occurred to me, but come from clients requests.  However, seeing something once I can learn and adapt that design to other uses.