Archive for April, 2004

PVCS Is the biggest pain of my day.

Wednesday, April 28th, 2004

I would take a pay-cut if I were allowed to use CVS or subversion. It’s not the Lock-Modify-Unlock vs. the Copy-Modify-Merge workflow. Although I do prefer the latter there are ways to work around the locked files. I think that my biggest problems are..

  • file based branching.
  • no easy way to update.
  • lack of automatic merging.
  • no good support for deletes

Where I work we run concurrent projects for the same system so we do our development in branches, and merge in fixes from the trunk. It’s a pain because whenever we work on a file that not been branched we need to specifically branch it. That means we need file by file knowledge of each files repository status.

There is also no easy way to update. First we have to do a get against the HEAD/Trunk representing the current release, and then try the same get against the label on our branch. Most often resulting in an error but we have not found a better way to automate this task.

There is no automatic merging. So if a project affects 100 files and there were no changes in HEAD/Trunk since they were branched, I still have to manually merge changes into 100 files. I don’t understand why since there are no conflicts. So I actually developed a hack work around out checking out the HEAD/Trunk revision of all the files that have my branch label on them then I do a get on the branch label overwriting all the files and then check all of the files back into HEAD/Trunk. I hate this though because if I don’t do my homework correctly and there were changes to HEAD/Trunk since the files were branched I will just clobber all of the changes, not good form.

Finally there is no way to delete a file without removing all revisions of it everywhere in the repository. So I move a Java class to a new package, it results in a delete, and a create in a new location. Not that I like losing the revision history in tools like CVS, but PVCS won’t even let me remove the file with out removing all traces of it everywhere in the repository(actually you can later restore the file later but you don’t know it went missing). So if I need to delete a file from my development branch nobody better try to rebuild the production release. I’ve resorted to keeping a list of files I would like to delete but I’m not really sure if I will ever be ready to commit to following through knowing the consequences.

All in all PVCS is a huge headache. Somedays it consumes more of my precious time and mental energy than coding. I hope that if anyone out there is considering using PVCS they reconsider.

Enthusiastic Thumbs up for Spring Framework

Sunday, April 25th, 2004

The IOC, Dependency Injection wave is coming into shore for Java developers. The whole IOC idea certainly isn’t new, its just good design.

  • Prefer Delegation to Inheritance
  • Program to Interfaces
  • Decoupling

It seems that something as “simple” as a framework to support these principals would have been happened a long time ago. It’s not that you can’t have good design without a framework, but a good framework should help facilitate good design, and consistency across a system.

One quick disclaimer, I’m endorsing Spring because I have used it and I have gotten results that I’m very pleased with. I’m a little concerned that PicoContainer is falling into the background. From what little I’ve seen PicoContainer seem to be the technically superior IOC container implementation. Unfortunately superior IOC doesn’t seem to be the driving force. The real killer-app of the IOC arena is J2EE simplification, and that’s Spring.

It’s hard to integrate an architecture technology like Spring into a real project with it’s own established architecture. I aimed for the target of the greatest opportunity, our DAO layer. Our application uses generated DAO’s laden with customizations, which present a number of problems.

  • Customizations make them very hard to regenerate or tweak
  • Profuse boilerplate code makes them very verbose and hard to read.
  • Crosscutting concerns like error handling are hard to change
  • The verbose boilerplate code encourages cut and paste(and associated errors)

Enter Spring, with its IOC. All the boilerplate code is isolated to one place, with callbacks for the code that really does vary. No more worrying about resources not being handled correctly because a novice was in cutting and pasting. We can still use code generation for the easy PreparedStatementCreator’s, and ResultReader’s, and we can add our own custom PreparedStatementCreator’s and not have to worry about the generator accidentally clobbering them. Transactions are now declarative and we didn’t need to worry about managing them in the application code or using Session EJB’s.

Our DAO layer just got about 10 times more manageable, and it was easy. I will be looking for more opportunities to let Spring make my life easier, and I would encourage any one else to do the same.

What's up with all of this stupid reality TV

Sunday, April 25th, 2004

This reality TV craze has been bothering me for a long time. Most of these programs are unethical, and anti-social.

I've had many discussions with friends about reality TV's ethical considerations. Most of the tune-in factor is the emotional nature of the interactions. The problem is that viewers are treating other people’s exploitations as entertainment. Sure the people on these shows are consenting but when is the consented exploitation of individuals for entertainment really any different than prostitution? The only difference that I see is that reality TV is more socially acceptable. The people on these shows have their different motivations; money, fame, or what-ever, but in the end they are attempting to achieve these goals through exploitation. I think that it is morally wrong to contribute to this exploitation by providing a viewership.

I think that these shows are also very anti-social. Conversations that I have are quickly turning from satisfying into in-depth analysis of Boston Rob's survivor strategy. I remember a quote and I can't find it's source but it goes, “Small people talk about people, medium people talk about events, and big people talk about ideas.” I'm seeing “Big” people all around me turning into small shallow people. People are starting to find the excitement in their own lives by watching fabricated events on TV. I would rather watch something educational or socially redeeming, but I can’t because of all of this reality TV drivel.

I can only hope that the sensational nature of reality TV is going to be its undoing. These shows are going to have to one up each other until they reach a level that the people are going to reject them. In the mean time I will remain a strong critic.