Not enough programming to please me
Got distracted some today (not that I’m upset about it in all cases)
so didn’t get as much code done as I liked. I think I worked out a
circular buffer in my SimpleProducer class, though. Refactoring
it right now. I wonder if I should have code that compiles in here
before I go on writing a whole bunch of methods?
Decided to refresh my memory on the various code smells.
ExpensiveSetUpSmell
is an interesting one, where setUp() relates to the JUnit method
that is called on unit tests to set up instance variables before tests
are run. It’s also interesting to note that the author says they have
spent eight years developing his skills. There’s a link to code
smells in unit
tests, but it
links to a PDF that I don’t really feel like opening.
CodeSmellMetrics is a
nice laundry list for the lazy among us; things to keep your nose open
for. Of course, so does
CodeSmell itself. CodeSmell
seems somewhat drawn from Refactoring: Benefits and Disadvantages
of an Amazing
Technique.
On a somewhat unrelated note, text can
smell too.
As always happens when I hit the PPR, I got sidetracked. Some good comments in MeaningfulNames. Ottinger’s Rules for Variable and Class Naming. Some people say not to use “Object”, “Manager”, “Data”, or “Handler” in class names.
MethodsShouldBePublic might be trying to assert that every method should be public, but I find that a bit hard to swallow. Michael Feathers asserts that you may have made a private method because “the private method places the object in an inconsistent state that you don’t want to publish to the world (which could indicate that you need to refactor more)”. I thought this was OK, and Ron Jeffries seems to back me up here further down with his talk about a method that needs to do two complex things, so it calls two shorter and more specific methods.
Having problems with a RH 7.3 network install at work, apparently. Perhaps something to do with the 4Suite package; I think it was originally corrupt, but I’ve since fixed it (I think) and the error is supposedly still occurring. Need to set up a RH 8.0 APT repository too, if the RH 8.0 errata directories have been created and propagated.
Made a bunch of modifications to my .emacs file too, so I need to
repost that. I’ll probably do that right after this entry. There’s a
bunch of stuff in there I can refactor to “[not] repeat [myself]”
(Pragmatic Programmer reference again). Found M-/ in JDE
today; there was much rejoicing.
I have a meeting tomorrow at 1430 EDT. Bless the client that understands I’m up until… well, now, and I like to get a full night’s sleep. Maybe I’ll even have time to run out to Just Fresh for lunch tomorrow, though I have ingredients for Fajitas that I’ve had since last week. If I don’t use them, they’re going to spoil soon, I bet. O, the complications of modern life.