Saturday, February 7, 2009

A startup isn't a business

At a startup you are not really "In Business", you are trying to build a business.

When you work at a startup, all you see is the vision. The customers, the business model, the cash-o-la, your expanding team of minions. WE CANNOT FAIL. When you look at your competition, you see their current business - and it looks like crap.

Trust me, their vision is just as grand as yours.

And your reality is just as crappy as theirs.

Have a vision, but don't lose site of the current state.

Monday, June 30, 2008

Cisco VPN on Vista

If you use the Cisco VPN client on Vista this, bookmark this: http://www.verier.co.uk/subtext/archive/2008/01/09/reason-442-failed-to-enable-virtual-adapter-with-cisco-vpn.aspx


And, to avoid such problems, disconnect the VPN before you let you computer go to sleep.

Wednesday, April 9, 2008

Installing DB2 on Vista

In case anyone else runs into this, you have to log in as an administrator to install DB2 on Vista. Logging in as administrator is different than logging in with an account that has administrator access. And, because they said so, the administrator account is disabled by default. Follow life hacker's instructions to enable vista's administrator account.

Wednesday, January 16, 2008

My actions GET POSTs

Quick note on a pattern I've picked up from tinkering with Rails and have happily used in other web platforms - using the same controller action for both GETs and POSTs. Basic pattern looks like this (pseudo code):


someAction()
{
if( request.isPost() ){
handle the posted data...
}
else{
handle setting up the form...
}
}


In your HTML, you don't have to specify an action, it will just POST to whatever GET was used to fetch the form in the first place. I'm implementing some file-import functionality today, and this came in handy as I can reuse the file form view for all of my various import actions.

In Rails, you can accomplish this with routing - same rout pattern sent to different actions based on the request method. There isn't an equivalent in my Struts 1.x app, so far that hasn't bothered me, though.

I would love to hear what other people think about this pattern. My initial thought was that coupling generating the form and handling the response was a negative, but in my day to day work I've yet to run into an example where coupling them together was a bad thing.

Wednesday, November 14, 2007

Safari won't set cookies from javascript on localhost

Ran into this today - if you're testing your work with Safari, it won't set cookies from javascript on localhost. Hit you local box using 127.0.0.1 and it will work. Grrrrr :(

Monday, October 8, 2007

Metaprogramming in the wild - script.aculo.us effect's afterUpdate only the first time

So, I want to fade in some content and I need to adjust a scroll on the content.

I can't adjust the scroll while it's hidden because none of the scroll info will be set.

I can't update it after the animation, because there will be a nasty jump.

What I really want is to adjust the scroll after the first frame of animation - after the content has been shown but while it's still mostly transparent.

The only script.aculo.us hook that will fire at this point is afterUpdate, but it's also going to fire on every animation.

Enter some metaprogramming. Define a afterUpdate that cleans up after itself:


new Effect.Appear( this.details_div, {duration:.5,
afterUpdate : function(){
FooManager.adjustScroll();
this.afterUpdate = undefined;
}
});


This works like a champ.

Tuesday, September 25, 2007

All Code is Business Logic

Worse than Failure really hit it out of the park with The Mythical Business Layer. It's a great article that makes the point that developers don't like solving the boring old business problems, so they transform them into big "enterprise" problems that are fun and challenging to solve ... with disastrous results.

If you want to be successful, stop thinking about yourself and start thinking about your customers. This is not a new concept - Dale Carnegie figured this is out 1937.