Wednesday, 30 March 2011

And For My Next Trick...

==========
Code Complete (Steve McConnell)
- Highlight Loc. 26555-58  | Added on Wednesday, February 23, 2011, 07:25 AM

We become authorities and experts in the practical and scientific spheres by so many separate acts and hours of work. If a person keeps faithfully busy each hour of the working day, he can count on waking up some morning to find himself one of the competent ones of his generation. — William James
==========
Code Complete (Steve McConnell)
- Highlight Loc. 26597-99  | Added on Wednesday, February 23, 2011, 07:35 AM

If you're working in a competitive software market, half of what you now need to know to do your job will be out of date in three years. If you're not learning, you're turning into a dinosaur.
==========

Could everyone please stop inventing cool new things so that I can catch up? Thanks.

Monday, 28 March 2011

Integrity

==========
Code Complete (Steve McConnell)
- Highlight Loc. 26538-42  | Added on Wednesday, February 23, 2011, 07:24 AM

Programming work is essentially unsupervisable because no one ever really knows what you're working on. We've all had projects in which we spent 80 percent of the time working on a small piece we found interesting and 20 percent of the time building the other 80 percent of the program. Your employer can't force you to be a good programmer; a lot of times your employer isn't even in a position to judge whether you're good. If you want to be great, you're responsible for making yourself great. It's a matter of your personal character.
==========

Saturday, 26 March 2011

Brace Yourself

==========
Code Complete (Steve McConnell)
- Highlight Loc. 24021-30  | Added on Wednesday, February 23, 2011, 07:14 AM

After I published the first edition of this book, Hank, one of the programmers who reviewed the manuscript, said "I was surprised that you didn't argue more strongly in favor of a brace style that looks like this: for ( ...)    {    } "I was surprised that you even included the brace style that looked like this: for ( ...) { } "I thought that, with both Tony and me arguing for the first style, you'd prefer that." I responded, "You mean you were arguing for the first style, and Tony was arguing for the second style, don't you? Tony argued for the second style, not the first." Hank responded, "That's funny. The last project Tony and I worked on together, I preferred style #2, and Tony preferred style #1. We spent the whole project arguing about which style was best. I guess we talked one another into preferring each other's styles!"
==========

I was forced to switch brace style once. It was a valuable lesson in egoless programming. At the time I found it really painful. That was the bite of ego. Now I look at the old brace style I used and think it was stupid. But I would switch back if a project mandated it.

Thursday, 24 March 2011

The Medium is the Message

==========
Zen and the Brain: Toward an Understanding of Meditation and Consciousness (James H. Austin)
- Highlight Loc. 3994-95  | Added on Monday, February 21, 2011, 07:13 PM

The bar code on the jacket of this book is an example.
==========

Book?

Tuesday, 22 March 2011

Egoless Programming

==========
Zen and the Brain: Toward an Understanding of Meditation and Consciousness (James H. Austin)
- Highlight Loc. 3695-97  | Added on Sunday, February 20, 2011, 12:51 AM

Joshu Sasaki-roshi: Form or rules are very important. We are not trying to keep you inside of them but to cut off your ego. This is very important as a way of teaching. To cut off your ego is the first step in Zen practice. Joshu Sasaki-roshi1
==========

Cutting off your ego is also an important step in programming practice. Don't be precious about 'your' code. Chances are, it's not 'your' code anyway. It's code that someone else has paid you to write.

If someone points out a better way to solve a problem, the correct response is to thank them and learn.

Sunday, 20 March 2011

This Computer is Stupid

==========
Code Complete (Steve McConnell)
- Highlight Loc. 7804-7  | Added on Saturday, February 19, 2011, 01:18 PM

If you often find yourself suspecting that the compiler or the hardware made an error, you're still in the realm of superstition. A study conducted many years ago found that only about five percent of all errors are hardware, compiler, or operating-system errors (Ostrand and Weyuker 1984). Today, that percentage would probably be even lower. Programmers who have moved into the realm of understanding always suspect their own work first because they know that they cause 95 percent of errors.
==========

I've certainly been in this position in the past. In my early programming career I would often cry tears of frustration, convinced that the computer was stupid and wasn't doing what I'd told it to do. Because of course, I always write perfect code.

Now I know that if I find myself railing against the stupidity of the computer, then I've probably made a stupid mistake somewhere in my code.