Tuesday, February 19, 2013

I wonder why that is.


Barry Ritholtz:

To put this into some context: The blog has garnered ~half a million comments over nearly 11 years. That is also the number of monthly unique visitors. Do the math, and you realize the individual visitor-to-comment ratio is > than 132 to 1.

This ratio is similar to that of large media sites. For example, The Guardian has found that less than 1% of all readers actually leave a comment.

Saturday, February 9, 2013

Odometer-style Naming


Naming things is most important when writing code. Variable names and function names can make a lot of comments unnecessary. This shortens the code and creates less distraction. Reading code with good naming is like reading an outline of the work done by the program code. The code should be like an outline.

I automatically carry over my programming skills to my work with AutoCAD. Good naming for drawings and for blocks in drawings makes it easier to find the files I'm looking for. Let me give you an example.

The job I'm working on might have three main parts: Parts A, B, and C. (At my job, we actually use single letters to identify the main parts of a job. If you don't, you might want to look for maybe a three-letter abbreviation for each major part.)

Part A of the job might have Assembly Type 1, Type 2, and Type 3.

Part A Type 2 might have a Right-hand and a Left-hand sub-assembly. I would name these A2R and A2L.

The other guy at work might name them AR2 and AL2. (In the old days, he would have had long, wordy names for them. He has since taken to modeling his filenames after mine. But he doesn't get the nuance that this post describes.)

My naming works like an odometer: The rightmost character changes most often, and the changes are fewer as you step to the left. This is not by accident. It makes the file system automatically put things in order for me. I don't want all the "Rights" for Part A to be listed together. I want all the Type 2 of Part A to be listed together. That's what my naming gives me.

Maybe -- sure, maybe it works because I have adapted my way of thinking to take advantage of the way the computer works. But that's exactly what you want to do, to be good at this stuff.

And the naming rules that evolved during my many years of learning to program, those same rules work very well for my work with AutoCAD.