Archive for April, 2009

Coding Your GUI in a Web Browser is a Love/Hate Relationship

Thursday, April 30th, 2009

WebDevel.jpg

I've been adjusting my web app today and it's been one of the most interesting and frustrating days in a while. It's possible to get reasonably quick turn-around with the web pages, which is nice, and they can look pretty nice, but the problems with the little things are frustrating beyond belief.

I had a problem with an HTML table, and it was a little off on the right end. Just a few pixels, but it was something I didn't want to see in the app, and I was determined to fix it. I ended up spending more than an hour trying to find the issue only to see that it was a bad colSpan referencing a non-existant column in the table. Firefox didn't mind it, but Chrome did. Arrgh.

I also had issues with a table row that was a little too tall. I could not figure out what the reason was, as I looked at all the elements and there wasn't a reason. Then I scanned the code again and found a CSS height: tag and that was fixing the height of an element. Duh.

So it's nice to be able to make the quick changes, but many times, it's a puzzle to see what you've done wrong when the browser makes assumptions about what you wrote and how you wanted to see it.

Lessons We Should have Learned from Jurassic Park

Wednesday, April 29th, 2009

cubeLifeView.gif

One of my favorite lines from Jurassic Park is when the new arrivals to the park are having lunch and discussing for the first time the concept of having living dinosaurs walking around at the same time as modern man. All the scientists agree that it's not necessarily a good idea, some going so far as to say it's a horrible idea. The quote is from Dr. Ian Malcolm:

I'll tell you the problem with the scientific power that you're using here: it didn't require any discipline to attain it. You read what others had done and you took the next step. You didn't earn the knowledge for yourselves, so you don't take any responsibility for it. You stood on the shoulders of geniuses to accomplish something as fast as you could and before you even knew what you had you patented it and packaged it and slapped it on a plastic lunchbox, and now... you're selling it... you want to sell it!

So how does this effect software development? Easy. There are tools like Eclipse, and frameworks like Spring that allow decent-to-marginal developers to take such terrific shortcuts that they never really have to have the discipline to really make the system they create stable, reliable, maintainable.

In short, they get to hack their way to something that works, without ever really taking responsibility for the system they're building. Let me give you a case in point, but this is by no means the first time I've seen this type of thing happen.

The one app I've been looking a lot at recently is a Tomcat web system that should be a fairly simple collection of servlets doing data collection, aggregation and serving it up. Nothing fancy, but there are details to the process that are important to get right. The developer didn't choose the traditional approach, but rather decided to use Eclipse and Spring to make it easy to re-wire the application at a later date. Tons of interfaces, hard to navigate the code and find what's doing what, and for an app that should have a dozen classes, at most, this is saying something.

But it's classic Spring.

Meaning that the XML configuration files are equally as important as the code it uses. I've had quite a bit of experience with apps like this and in the end, it's always a support nightmare as the configuration of a real app that does a single, well-defined, and well-designed function does not need to have the level of configuration that a Spring app does, and because of that, there's a tremendous risk of messing things up when you do have to do a slight modification.

Now if this developer had to really design this system without using Spring or Eclipse, then they'd have to see where the data was that they needed, and leverage that. They'd say "listen, parsing XML is OK, but it's no way to get the dozen parameters I need - I'll get those from a properties file - or a database." When you have to do it, you think about what's necessary and what's not. You are forced to design the system.

Now, in the hands of a good designer, I have no doubt that Spring can assist in the development process. But in the hands of someone looking to skip a lot of the work, it's a dangerous tool. You have to understand the tools to effectively use them. Just like Jurassic Park.

In the coming days and weeks, I'll be taking over this application and there are a lot of things that I'll be changing. I might rip Spring out completely. The problem isn't that hard, and the configuration issues are one of the major brittle features of the system. Something has to give, and I'm not convinced that Spring is adding the kind of value that it's meant to.

There's nothing wrong with getting a leg up with tools like Spring and Eclipse, but when using them means that you don't really understand what's going on in the workings of your application, then these tools are doing you a disservice. Any developer needs to understand first, and then work on the ease of development.

There really is no free lunch.

Virtualization is Nice, but It’s no Silver Bullet

Tuesday, April 28th, 2009

servers.jpg

The Shop is very fond of using virtual machines for lots of things. And in many ways, I can see it. They make it easy to clone a machine - even move it if the physical hardware has problems. They are reasonably efficient, and for processes and programs that only need a fraction of a machine, they are a great way to isolate one from another without investing in a complete machine for each task.

But I've come to learn the dark, evil side of them.

Greed.

Yup, greed.

It comes from the people that configure them. Say I ask for a VM, they are going to assume that it's not a "big deal", and give me a single core and a little memory. Not too surprising, most tasks don't need a lot. But when you get one that does do something significant, the "cookie cutter" approach that VMs allow gets a little cramped.

When you need a multi-core machine, get the machine. If it's a VM, then you need to go back and say "yeah, but I need another core", and the ensuing "Why?" is something you have to deal with. It's not horrible, but it's what you're going to end up doing more with VMs than when you get hardware that's typically going to be a little more than you need.

I'll get by... but I know now that I need to be asking for "non-standard" VMs with more than one core. I'll learn.

FIrefox 3.0.10 is Out

Tuesday, April 28th, 2009

Firefox.jpg

This morning I noticed that Firefox 3.0.10 was out with the complete set of release notes consisting of:

and that's it. Certainly sounds serious, so I got the latest version and will run with that. It's a nice thing that they have the auto-updating feature as I'm not sure how many folks would take the time to go to the web site every time there's a security update.

Adding Polish and the First Production Deployment

Monday, April 27th, 2009

WebDevel.jpg

Well... it's been another great day. I added a lot of polish to the second web page of the site, and now it can plot normalized greeks - normalized by the thresholds for the selected Portfolio. It makes them all out of 100, assuming they don't breach the thresholds. It was a nice little addition and I know they are really going to like it.

Also, the support crew finally got the production box working, and it's running just fine. Great news, because now I can update Test to include all the additions I've made to the system - the new JavaScript drop-down menus, the ability to link to the base data I'm displaying, and of course, help and how to contact us. It's going to be great.

Then I'll tag it and write up some release notes so that they can keep track of things the way they normally want to. It's all very fair, I just didn't know I needed these things, so this first release was a little 'sketchy'. The next one will be better.

So a good day, and lots of good style improvements on the pages. It's looking like a real site now. Can't wait to do the next page.

The iPhone Coming to Verizon?

Monday, April 27th, 2009

iPhone.jpg

Hmmm... I read this article this morning and it brings to the front an interesting possibility - getting an iPhone while retaining my Verizon service. The single biggest reason I haven't gotten an iPhone to date is the fact that it's not available on Verizon and we have the big family plan, etc. and don't really want to leave Verizon. I've heard a lot of issues about the AT&T coverage not being very good, and while I may not like the way Verizon "corporate" is seemingly constantly mis-handling our bill, the customer service agents at the local Verizon store always fix it up right and we never have to pay more than we should.

So if this is true, there will be one less reason not to buy one. If the next version of the iPhone can take movies as well as pictures, and there's 32GB of storage, then it'll easily replace my iPod Touch, and I'll probably be looking to get one. The features are just getting too nice to pass up.

GraphicConverter 6.4.1 is Out

Monday, April 27th, 2009

GraphicConverter.jpg

This morning I saw that GraphicConverter 6.4.1 is out with quite a few updates and improvements. While I'm not using it a lot after I started using Acorn, I still like to have it around for those times when I need to convert a very odd graphics data file to something a little more standard. Like the name says, this is what it's really good at.

Nice to see they are still working on it.

Cyberduck 3.2 is Out

Monday, April 27th, 2009

Cyberduck.jpg

This morning I saw that Cyberduck 3.2 is out with quite a few fixes and additional features. While I'm not hip-deep in SFTP, it's something I use from time to time, and Cyberduck is certainly the easiest to use on the Mac that I've run into. It's small, fast, and works like you'd expect it to. Nice.

JavaScript Drop-Down Menus – Free and Commercial

Sunday, April 26th, 2009

WebDevel.jpg

Today I was spending a little time looking for a simple, yet easy-to-use JavaScript drop-down menu code for my web app at work. I have a feeling that I'm going to need it with the number of pages we'll be writing, it's going to make sense to have something like we had back at my previous job. Actually, I want something a lot nicer than we had back there, so I started digging now.

What I found was a lot of JavaScript menu systems for sale. Now I can see the value of commercial software - I just didn't expect it to be this menu. One of the nicer free solutions was this guy I found. It's simple, seems to work just fine, and I should be able to make it work for what I need.

However, there are limitations. First, there's no multiple level menus. Second, the menu structure has to include a bit of JavaScript in it - not horrible, but not as clean as simple UL and LI list items. That's where this commercial offering really makes a difference.

This one takes nothing more than UL and LI lists, embedded within each other, and a few class tags, and builds a very nice menu. Very nice indeed. Different themes as well as different animation techniques makes it a very nice menu.

But it's $200. Not exactly inexpensive when all I really need will be served by the free alternative. I'm going to have to run this by the purchasing folks and see if they'll swing for it. If they do, that would be great. But I can certainly see their point if they say no. After all... the free alternative is fine for what we need.

We'll see what they say on Monday.

External FireWire Drive Mysteriously Dismounting Itself

Friday, April 24th, 2009

MacBookPro17.jpg

I've had odd luck with the SimpleTech proDrive 1TB external drive on my new Unibody MacBook Pro 17" since I got it. I needed to get more space, and I made the mistake of not going with Western Digital MyBook because the drive in the SimpleTech was a WD 1TB drive. I thought they'd be the same.

Wrong. The I/O board is completely different. I'm sorry I got it.

But that's not the problem. The problem has been that when the MacBook Pro tries to tell the drive to go to sleep, it doesn't understand the message, times out, and then the Mac thinks the drive has dismounted itself on it's own. There's nothing I can do by unplug it and plug it back in to get it going. It's not the worst thing in the world, but it's a pain in the neck, and I wish I had a WD MyBook in it's place.

Well, today I noticed it doing this and when I plugged it back in is would not mount! OK, this is new and it's not fun. So I broke out a USB cable and hooked that up. Bingo! Worked fine. Try the FireWire cable - no good. Repeat two more to see that the USB was working and the FireWire wasn't.

No messages in the Console or logs. Nothing.

Then I thought Hey, let's put it to sleep and wake it up and see what happens. Good idea. After it went to sleep successfully, when I opened the case and it woke up, I was able to connect and mount the drive.

Whew!

I'm still not happy with the drive, and now I'm more motivated than ever to get a MyBook. They just don't have any problems. I've had at least four of them at home and they all run like a champ. So maybe that's a task for this weekend - get a >1TB MyBook drive. Anyway, if this happens again, that's the first thing to try.