Category Archives: Uncategorized

Is there a case for functional programming?

This is a bit of “stream of consciousness”, so… maybe it’ll make sense, maybe you’ll tell me to lay off the caffeine. 😉

A while back I watched a Clojure discussion in an interview with Stu Halloway. Stu obviously loves Clojure and it might be his hammer with which every problem is looking like a nail, but I’m gonna give him more credit than that.

In the presentation, he said something about “maybe we got it wrong” with how we manage state in applications that resonated and got me thinking… did we? Maybe there’s something to the functional programming idea.

In most web applications today, the idea is to remain as stateless as possible. In most of my applications, we grab a bunch of data from the database, munge it into a object model, then turn around a munge it back into text for display on a web page (or into XML). The biggest benefit I get from the object model is ease of relationship navigation and potentially calculated values via derived properties.

Its a similar story when trying to save data. In this case I’m taking a bunch of text values mapping them into an object (or possibly a graph of objects), doing some calculations, workflow, validations and the mapping it back to the database. There is potentially more value on the “save” side of things, but still in most applications, I’m not sure I get a lot from this. The graph “lives” for only a very brief moment and much of the CPU time is just doing the mapping. In Rails when posting data, if you follow the conventions your parameters map through objects directly into the database by virtue of using the same name. In the basic case, the object is serving as a map of values for an update statement.

There just isn’t much interesting real object behavior going on.

If you think about the interface between the browser and the application server, it is essentially a complex, functional interface. Furthermore, the interaction with the database or downstream services are, again, functional.

Maybe we’re pretending in most cases to have state in 3 places – browser, application, and database, when in fact its actually only relevant in 2 – browser & database. Perhaps we’d be better off using a functional language for solving those problems? Is this where the value lies? Maybe the domain model is really only relevant where state is needed, where the objects (data) comes to rest – I’m thinking the browser in particular. Personally, I got the most benefit from a object model back in the old days of “fat client” programming where the application managed it’s state and I bound my objects directly to the UI elements.

I’m not saying that decomposing data into “objects” is a problem. I’m just beginning to wonder if Object-Oriented languages are the proper tool for the job of “stateless application development”. Is it possible that I’ve been seeing OOP as the hammer by which every problem is a nail?

It might be time to explore Clojure…

Job Hunting Advice

Though I’m fortunate enough to still have work it could change anytime. I spotted this article today and thought I’d pass it on. I think its great advice even if you’re not looking, but want to expand your network.

Didn\’t work

I\’m leaving my last post (and this one) the way TextMate is publishing it (or perhaps its WordPress… but I didn\’t change anything there) so you can see how my posts are getting messed up. :-(

TextMate Woes

I\’m back… well… sort of. I\’ve been having trouble with the posts I\’ve been making by TextMate. I like it so much for blogging that the annoyance of it messing up my posts has eroded any energy I\’ve had for blogging lately. Pretty lame I know…


So I\’ve reinstalled TextMate in the hopes that this will fix my problems with TextMate munging all my HTML. If it works I\’ll probably try to upgrade my WordPress installation too. Its getting pretty rusty


Here goes nothin\’…

Take the Money and Run

Given how many consultants/contractors this has effected, I’m surprised it hasn’t received more attention: One of the largest “vendor management” companies Ensemble Chimes Global (ECG) has declared bankruptcy. If you don’t see anything on ECG, you may see news on their parent company Axium (a large Hollywood payroll firm among other things).

I’ve been an independent consultant for about 4 years now and overall its gone very well. One of the things about being an independent is that you make more money. That’s a good thing! :-) However, as with everything, you’re taking on more risk with that higher reward.

On any gig, I’m always evaluating the risk at any point in time. Is my client stable? Do they have money? Do they pay on time? Is the project going to be canned? How cut-throat is management with their consultants? etc. By constantly checking the pulse of my environment I usually feel pretty comfortable with the risk – its manageable.

My current gig is with a large, successful health insurance company. They have deep pockets and a large force of consultants/contractors helping them. I’ve never had any concern with them paying me as long as I was producing for them and keeping them happy. As far as getting paid – I saw little risk.

As with many large firms these days, my client uses a vendor management firm, yes – ECG. They are the middle-man between me and my client. They hold all the contracts (my contract is was with ECG). My client pays ECG who in turn takes a cut off the top for “handling” and pays me.

I have two outstanding months of invoices with them. And… the money is gone! Its seriously messed up. I should’ve been paid last week. The best part is that my client paid ECG, but ECG declared bankruptcy before they paid me! They took the money and ran (or more likely it was seized by a creditor).

So, where does this leave me? Well… for one I’m without a contract. But, my client is working quickly to get a new contract to me. I have no doubts that they’ll take over any new hours that I bill for and pay me promptly.

However, that leaves my invoices for November and December in doubt. December is a little easier because my client hadn’t paid ECG yet. Presumably after a little wrangling they’ll pay us all. I’m not sure how “contractually” that works out – we’ll see. November’s invoice is a different matter. My client would effectively pay twice for my invoice if they tried to make it right. Then, they’d have to sue and hope to get the money from ECG. And, they’d want to make sure if I did get paid from ECG (not likely, but..) that I reimburse them (so I don’t get paid twice).

My client is really trying to do the right thing. The people I work for really are great people. But I the more I think about it, the less likely I think I’ll be seeing any money soon.

The thing is, I’d never worried about the middleman before. I (naively) thought that if the client was paying, the middleman wouldn’t have any troubles getting the money to me – I was wrong – big time.

The only bright side of this is that perhaps companies will back away from the so-called “vendor management” concept. These companies have been a pain-in-the-ass for us independents.

I should note: its not just independents that are screwed. Any company working though ECG lost money. A large chunk of the consulting/contracting force in the US just got a nasty “Happy New Year” from ECG/Axium.

On the whole risk/reward gamble with being independent – for November/December – I lost. Cost of doing business they say…

Dual Core, Quad Core, ack – real tests please!!

As an avid computer geek I’ve always been interested in multi-core systems. Just because…er…well.. it a cool idea! At one point, several years ago, I looked into building my own dual processor workstation. One of the questions I wanted answered (before my wife vetoed the whole expenditure) was: Would it run any faster?

All I could ever find were tests that showed that various programs (MS Word, Quake, benchmarks, etc) wouldn’t run any faster on a dual processor system. Only programs “written for multi-processor systems” would show any benefit (with Photoshop being almost the lone example).

OK… so running Photoshop “blur” filters faster didn’t do much for me. The thing is, all of these tests always focused on bench marking ONE program at a time. Unless a program divides some of its meaningful work up into separate threads of execution, it doesn’t really matter how many CPUs you have.

Come on!!!I don’t run one program on my machine at a time! I’m usually running a dozen or so. What I really want to know is how much better does my machine run in “real life?” Does having 4 CPUs running my web server, database server, iTunes, TextMate, compiler, etc make things better than having just 2CPUs?

Here’s’ another example of those worthless tests demonstrating that MS Word doesn’t run faster on a 4 CPU system than it does on a 2 CPU system. Big deal.

Perhaps its hard to give hard numbers on the performance of multi-core systems for “everyday” work. Perhaps the best we can do is give our own impressions. I’d like to say its been great for me now that I have a dual-core laptop, but that wasn’t the only variable I changed when I upgraded. I doubled the RAM, each CPU is faster than the solo CPU I had before and I changed operating systems. *sigh*

Synchronizing Code between computers

I like to do most of my work on my Mac if at all possible. However, some of my clients don’t allow “foreign computers” on their network (in today’s world, who can blame them?). In situations like this I’ve had to resort to moving code back and forth using a USB thumb drive.

With a large project or one where others are making changes as well synchronizing code between my Mac and my work PC can be a real pain. After searching all over the place I ran across a tool called SmartSynchronize. SmartSynchronize is by the same people who are behind SmartCVS and SmartSVN.

SmartSynchronize is fantastic (and is very similar to the Windows only WinMerge). It gives me the same sort of merging capability that you find with SCM tools with nice visual differencing of source files and a good directory comparison with the ability to exclude folders and files that match certain patterns (for example *.class files or CVS folders).

The best thing for me is that its Java based and works great on both my Mac and my Windows PC.

Everybody out of the Pool!

My last couple of clients have been fairly large corporations with hundreds of people involved in corporate IT. Both of them (and others according to my colleagues) seem to have adopted the notion of a “pool of developers”.

“The Pool” as I have seen it is the concept of taking all of the developers (I’ve also seen it applied to Business Analysts, QA, and Project Managers) and have them operate as internal contractors. They don’t belong to any business unit nor any application. Instead they just float around to whatever project needs their services. “This project needs 1 PM, 2 BAs, 4 Developers, and 3 Testers” – BOOM Its simple, plug-n-play software development.

Although I can see how this can make resource allocation easy for managers and possible give greater project/application variety to developers in the pool, I think it is a foolish undertaking.

Fundamentally this “pool” concept destroys any sense of ownership in the applications that are being developed. The quality of the application deteriorates over time, the code turns into a mash-up of different ideas and development standards. Nobody really cares what the end product is – “I’m just there to do my job.”

It is much better to develop teams that have a longer term ownership in the applications they develop. Teams should have a sense of passion and pride about what they’ve developed.

Furthermore, if the teams that build the software are kept together as much as possible they get to know each other’s strengths/weaknesses. They communicate much better and can use their previous experience to convey things much more quickly. This team can become a well tuned machine and much more productive than the random group who just happened to be available when the project kicked off.

Lastly, with everyone having worked on different projects previously, they are frequently pulled off to support those older projects. All of which may have differing priorities and probably different business owners.

One of the huge problems in IT is that every manager two levels up from developers tends to look at all of them as the same – developers are all interchangeable. Those in the trenches know differently.

Continue reading Everybody out of the Pool!

Oh the Irony!!!

Figures… late last year I spent an absurd amount of time debating whether to get a Mac (as you know if you’ve read my other posts). One of my primary concerns was that I’d end up working for a client and absolutely need Windows. Finally, I decided I was highly unlikely to be doing any Microsoft development. Java and Ruby were my areas of focus and both work very well on the Mac (well, ok… Java 6 is there yet, but most of my clients are still on Java 1.4!! Ugh…)

As fate would have it, one of my good friends ended up on a .NET project and within a few months was recruiting me to join his team. Next thing I know I’m doing .NET development on my Mac. It just figures!

I’m trying to get by without dual booting via BootCamp and so far… Parallels is doing the trick.

I hope to post regularly about what its like moving from Java to C#/.NET. I intend it to be an ongoing thing.

Blogging from TextMate

I managed to get TextMate configured to post to my blog. Its pretty slick. I’m using WordPress and it seems that it only works with the HTML formatting (that’s the template you need to select when you create a new post). I like using TextMate as it lets me easily save my entries locally when I’m not online and post them later. As with anything… there are a thousand other ways to create posts for your blog, but if you’ve got TextMate its worth checking out. There is a nice video demonstrating how to use it.