Pencils Down

This weblog is about my experiences in software development

Browsing Posts published in September, 2008

I think we have a fairly standard database that looks like a parts BOMB.  Someone had the neato idea to use cascading delete in the project.  Hibernate’s cascading delete will follow any required foreign key and delete the children it finds there in a cyclical manner.  Good idea, huh?

No.  This means parent entity Parent with a primary key of ParentPrimaryKey MUST cascade it’s primary key to all children.  So, entity Child has a primary key of ChildPrimaryKey PLUS ParentPrimaryKey.  This continues all the way down your entity tree.  This example assumes simple row id’s for primary key.  If there was some other overriding attribute which makes every primary key a composite, like SystemThatThisEntityLivesOn, then every level has one of those plus all the parent’s.

Then we realize, we can’t actually delete some of the lower level entities because they are a lot of work to create.  So, we configure Hibernate to stop at those entities.

Now if we step back and look at the entity diagram for our database it is not uncommon for an entity at a lower level to have close to 20 component parts of a primary key that have cascaded down.

But, we only delete via cascade a very small subset of the entity tree.

Now, throw into the mix some developers who don’t understand the above features of a relational database or Hibernate in general and we now can’t use the LowLevelEntityId composite object that Hibernate generates as that is ‘unclean’.  We are to flatten all of these id’s wherever used.

Our group is using JBuilder (on Windows) with ClearCase (UNIX) for version control.  I hadn’t used JBuilder for quite a while having gone the route of NetBeans and lately Eclipse for a couple of years now.  I have never used ClearCase before.  I get the impression it is an old product.  The configuration seems very 1970’s IBM-ish, versus subversion which I have been using for some time.

JBuilder has taken the interesting step into the open source world.  They bundle Eclipse with a short list of plugins and a UML graphing package.  This is good and bad.  Eclipse is good, but if we use a non-supplied plugin then the JBuilder warranty is void.  They also crippled a couple of standard features of Eclipse that verge on making it useless. 

The UML graphing package is supposed to allow reflexive interaction between code and the graphics.  However, it kind of doesn’t work.  The product attempts to create ‘magic’ class diagrams for every package, but doesn’t do it correctly so things get lost/broken.  Then you have to poke around in the source/model tree to delete the junk they created so it will work again (which may mean some of your work just disappeared)

But, let’s get to the BSOD.  Either JBuilder (possibly) or ClearCase (possibly) or some silly internal big brother file access watcher (more likely) bit of code will arbitrarily overwrite system memory in the TCPIP system driver causing a BSOD.  This can be caused by starting JBuilder, associating your project with ClearCase, refreshing your project, not doing anything at all in JBuilder for an extended period of time or best yet, typing into a java source file.

This was kind of surprising.  I have been a long time Windows user so BSOD’s are like old friends (that you want to forget).  Aside from this junky code somewhere in this environment I haven’t seen a BSOD for several years now.

Well, it’s a commercial product call JBuilder.  Yes, but all the software was bought some time ago without a service agreement.  The company will not pay by the hour to figure it out.  The expectation is any support will just point at the other players and plead innocent.  Instead we have systems engineer types frantically trying all kinds of derivations: new/different Windows image, new/different ClearCase plugin, new/different Virus Protection s/w, …

Needless to say, the project is running behind schedule.  There are other reasons for this, but it’s hard to write a line of code without wondering if the next keystroke is going to kill your machine and possibly delete some of your work.

Designer Irony

No comments

I am working on a site for a marketing company.  They mostly specialize in concept marketing, things like brand and image.  And, like every other marketing company on the planet these days, they do a fair amount of web design as well.

The design for the site I am working on was designed using a non-standard font face as the primary font.  Like everything else it defaults back to Arial et al if that font is not installed on the client browser.  There was originally some discussion about auto-download of the font if it’s not there, but that is really not so cool in the web world.

So, step back and review:

  • The site was designed using that font.
  • The people at the marketing company all have this other font installed.
  • The people that work at the marketing company will see a web site.
  • Most everyone else on the planet does not have that font installed. 
  • They will see Arial and company, effectively a very different site.
  • Effectively a different brand image of a branding company.

Neat huh?

So, at big defense contractor inc, we are developing a small piece of a multi-billion dollar, multi-year project.  The basic idea is do a certain task over a network versus having field personnel running around in jeeps getting shot at.  Sounds like a good idea.

Of course, we have to accomodate all the currently installed h/w and s/w systems out there as we become a middleman for moving this stuff around.  Again, seems like the logical thing to do.

In the typical environment there are people called Systems Engineers who have been beating the bushes for months ahead of s/w teams getting involved to gather all the details on the current h/w and s/w.  These people are fully qualified to do this kind of work.  Again, seems like a good thing.

Now we hit reality. 

The typical system we are attempting to work with had been developed by a small company somewhere in the midwest.  Like any company after n years they no longer actively promote or develop that product.  Yes, you can call the help desk for support and get an answer.  You can not ask for changes or things like coding details as that knowledge is probably not available anymore, i.e. that programmer is retired in ‘97.

Well, what’s the big deal?  Surely the US armed forces has upgraded their systems!  No.  It is STOP that once something works in the field it stays in the field, is never updated or replaced until it breaks.

So, ok, then there is a large user base to talk to about how they are actually using the systems.  Yes, they exist.  No, you can not talk to them, they are busy getting shot at while driving around with the data that we are supposed to transmit over the network (see start of article above).

Google Chrome

No comments

Downloaded this on home machine running Vista.   It feels IE7-ish: big stupid buttons, lots of screen space used in wierd ways.

I haven’t played too long, but it looks like some developer stuff is buried underneath with the Google Gears engine.  Can’t wait to play more.

More disturbing is that web page size appears to be ‘enlarged’ somehow.  I poked at a few sites I go to all of the time and they all appeared to be magnified.  I didn’t see any obvious zoom feature that could be turned off.

My only real concern here is Chrome gets well-adopted (you can bet it will) and then Chrome becomes yet another browser target that has to be specially crafted in web page generation css and html.

We’ll see.

I have been struggling on a Joomla site that started out with the quaint idea of table-less design.  If you read any of the jibberish out there the current web development thinking is that tables are passe’ and css-only layout is the way to go.

Great idea.  Let me know when you find a browser that does anything consistently. 

Surprisingly, I have been finding that IE does a better job at layout than FF.  I guess this makes sense as IE accounts for all kinds of developer hacks whereas FF and the like take the high road: if you don’t follow the rules I quit.  However, the result is that IE appears to layout ‘better’ than FF.  So, taking a noble approach really doesn’t work.  Yet another surprise, huh?

Some of the simple things that can be done easily with a table layout but can be done painfully using css: virtually any vertical spacing, being exact about width, ditto height.  These are not unusual features of a web page.  I think it’s great that the W3 committees get together and design really interesting features, but give me something that works, today.