Fog Creek Software
Discussion Board




Training

Joel, in your whole working life, how much job training would you say that you received and how much do you think that it would be worth?

For me, I estimate that I've received 6 weeks of formal job training in 10 years of working in Silicon Valley.  One company sent me to a two week course to learn their product as a user before I started programming on it.  One company paid and sent me to a one-day conference.  Five companies (or so) allowed me to attend a conference using the free expo pass.  If I added up the occasional times that there were brown bag lunches to learn something or somebody sat with me for half an hour to teach me one thing, that would be the rest of the time.  All told, I'd estimate the value of training provided by companies to me to be worth between $25,000 to $35,000 total.

If you included things that I learned to do (or not to do) by reading other people's code or by watching other people run their businesses, you might add a few more weeks onto that.

I ask because managers (including myself) often talk about preferring less experienced people and being willing to teach them (rather than hiring more experienced people).  But, from my own experience, we are pretty dishonest: managers talk a lot about teaching but, mostly, we only teach a little bit.  After all, it isn't really reasonable to expect a manager to be a top-notch, full-time, dedicated educator.

Daniel Howard
Wednesday, March 03, 2004

I took a one week MFC/ATL COM class with George Shepard once.

That's about it.

Oh yeah, and two days of management training at Microsoft.

So, 7 days.

That said... when I was an intern at Microsoft my mentor made an off-the-cuff comment about (for i=0; i<strlen(s); i++) that was worth three weeks of "classroom" training. And just being at Microsoft taught be so much about software development that formal classroom training paled by comparison.

Working at a good company or even working for a good manager/mentor is much better training than anything that happens in a classroom.

Joel Spolsky
Fog Creek Software
Wednesday, March 03, 2004

Ok, what was the comment?

Kyle
Wednesday, March 03, 2004

Probably something along the lines of "fool, don't you realize it is going to call strlen a lot more often than you actually need to?"

Mr. Fancypants
Wednesday, March 03, 2004

"it is going to call strlen a lot more often than you actually need to?"

Well, it could be that string s is changed inside the loop (which means that strlen(s) is not invariant of that loop) -- in this case you have to call strlen before every iteration... So maybe the comment was that it's actually necessary to have strlen there :))

Davidson
Wednesday, March 03, 2004

My quibble, I guess, is with calling it "training".  While I agree with all these truths, "hanging around and watching a senior person work" is not exactly equivalent to "training".

Furthermore, the junior programmer learns a lot in the first 6 months and then it tappers off pretty quickly.  Thereafter, there is really no more training: just applying and re-applying the same habits and techniques that he learned from his mentor.  Unless there is conscious effort, "training" effectively ends.  Sadly, if the new programmer really wants to learn after that, he has to study things himself.  Or, he goes to a new company and be exposed to a new set of habits and techniques which he can compare and contrast with what he's learned.

Daniel Howard
Wednesday, March 03, 2004

Davidson -- good point, though I think the other case (when the strlen() is being called once per loop rather than once) is more likely to be an issue in the real world.

Often people who are decent programmers but don't have tons of experience make assumptions like "the compiler will optimize away all those strlen calls" when in reality it won't because doing so would be problematic (eg. it would cause a problem in the case you mentioned where the string changes in the loop, etc). 

It is one of those cases that crop up (particularly in C/C++) where a human looking at the code could make a huge optimization and a compiler can't.... but the fact that the compiler can't isn't immediately obvious to most.

Mr. Fancypants
Wednesday, March 03, 2004

"I ask because managers (including myself) often talk about preferring less experienced people and being willing to teach them (rather than hiring more experienced people)."

I find the opposite to be true.  It seems if you don't have the skills, it's hard to even get interviewed, nevermind hired then trained.

Chris
Thursday, March 04, 2004

Daniel Howard> Sadly, if the new programmer really wants to learn after that, he has to study things himself.  Or, he goes to a new company and be exposed to a new set of habits and techniques which he can compare and contrast with what he's learned.


Very true! I would add also "exposed to new people" because we learn a lot from our colleagues.

Davidson
Thursday, March 04, 2004

Regarding the string changing within the loop:

Depending on how often the string is likely to change, it may be more effecient to only update the ending condition (string lenght) only when the length of the string is actualy changed.

If it is likely to be changed on most iterations, then checking the lenght may be appropriate, but if it is unlikely, or if it doesn't happen very often, then updating the ending condition value when the length change would be more appropriate.

Danilo
Thursday, March 04, 2004

I think that the few times I've been to "training" it was a mixed bag.  I've been to a couple vendor specific courses, took a general java course from a university, and have been to a few conferences.  It really depends on the instructor.

I think that if you have a specific application you're trying to learn, then a course with a responsive instructor is a good option *if you've played with the application first.* 

As for continued training, I'm a big fan of user's groups.  And having a bit of slack at work to browse tech sites, read articles, and download demos/open source tools is a huge help.

Dan Moore
Thursday, March 04, 2004

"Often people who are decent programmers but don't have tons of experience make assumptions like "the compiler will optimize away all those strlen calls""

Actually, in my experience, a programmer who understands that the compiler does optimization at all won't make this error (assuming invariant).

Most programmers I have dealt with come from the "I need to know the length of the string.  Hmm... strlen()" crowd.  A limited few understand the concept of O(n) vs. O(n^2), etc, but that's probably a result of being in a business programming environment.

Dignified
Thursday, March 04, 2004

I didn't use strlen(), I used while (*s) { ... s++; }

Should be working
Thursday, March 04, 2004

I'd prefer

for (; *s; s++) {...}

because I find it clearer than the while()-variant suggested by "Should be working". If I needed to preserve the original beginning, I'd use

for (char *t = s; *t; t++) {...}

It's not overly cryptic, IMO. At least not if you're used to pointer arithmetics.

foo
Thursday, March 04, 2004

Both forms of using a pointer in this case are just pretentious.  Using strlen() (once outside the loop if you only need it once) and a standard integer index is much more clear.  Yes, anyone who knows C/C++ well can decode the pointer-arithmetic versions in short order, but it is an extra mental step...for absolutely NO GAIN.  In fact, due to pointer aliasing vagueness the pointer arithmetic version is likely to get less optimization than the integer array index version.

Understanding pointers is really important for all the reasons Joel states, but using them willy-nilly in cases where they don't really belong is just mental masturbation.

Mr. Fancypants
Thursday, March 04, 2004

When criticizing the value of just gaining experience against training, the assumption of course is that the training has a certain value to it.

Its my experience that training is not all that valuable.  So while experience doesn't necessarily give you that much 'training' value, a lot of training won't either.

Training is however useful if I'm not motivaited enough to learn something on my own.  This is a lot like not being motivated enough to read the book, and going to watch the movie instead.  Takes a while to read the book, but the value is so much greater.

Training can also be good if your instructor is very knowledgeable in their field, so that you can ask som fundamental questins and get good explanations, but that is rare.  There is such a trainer in the GSM workd:  Gunnar Heine.  But he's also one who's published several books on the subject, so quite exceptional.

The general value in training, is to be movitivated to figure something out, and to have somebody to ask when you get stuck - getting stuck can be a major drain on time.

Matthias Wandel
Saturday, March 06, 2004

Those that can .... do. 
Those that cannot.... train.

Mr. Analogy  (formerly The real Entrepreneur)
Sunday, March 14, 2004

Training is good.

training = spark
real work = fire

Training is never enough to become an expert in an area, but it sure helps get you into places where you get the experience to become one...

Bram Borak
Thursday, March 18, 2004

I worked developing "training software" for some time in the mid nineties.  Admittedly this is different than hands on training, but the difference may be more a matter of degree.  Typically, at least in large companies, training is a matter of checking a checkbox, for legal reasons, or because something went wrong once and someone demanded that everyone be "trained" so that it would never happen again.

I remember working for several months, highly paid (this was the 90's after all) on a training program for a large multinational, about the Americans with Disabilities Act.  One thing that was abundantly clear from the result was that nobody was going to learn a damned thing from it.  Yet the company I contracted for (a group of tech writers with contacts, who hired me in to turn a "script" into software) had been turning in work like this for years and had more contracts coming from this client.

One day as I slaved away at my highly paid s**t shoveling, light dawned:  Nobody actually cares if anyone learns anything from it!  The company buying this crud is doing so because they get a break on their liability insurance if they can say all their managers were trained!  Life got a lot easier, I finished the project, and went on to much more rewarding, albeit less lucrative work elsewhere.

I'm not an advocate of pair programming as a daily practice - it would drive me up a tree quickly.  But I've always learned the most by sitting with a colleague who knew something I didn't and solving a couple problems together.  Formalized training is very, very hard to do well - the odds are much better that you'll get your time wasted than that you won't.  A well recommended book is a much better investment of time or money.

Tim Boudreau
Friday, April 09, 2004

*  Recent Topics

*  Fog Creek Home