Never underestimate the power of the dark side

September 12, 2008 – 8:58 am

SQL optimization is the red lightsaber of the application development world. It’s what separates the posers from the developers. :)

On an application I was working on, one web page was taking over 2 minutes (120 seconds) to load. Ack.

After a few tweaks to a table function (FWIW: SQL2005’s table functions are the bomb), that is down to 4 seconds.

In my opinion, table functions could be used to functionally replace the traditional SQL view in many cases - especially those where the view returns a lot of data.

They are treated in queries just like tables:

select * from dbo.myTableFunction()

In addition, you can pass in parameters to limit the results, like this:

select * from dbo.myTableFunction(@someParam)

But in my case, what makes them absolutely rock is that you can do this:

declare @filteredRows TABLE (id int, type varchar(10))
insert into @filteredRows (landTransactionID) select ScalarId from dbo.stringSplit(@transIds)

Now, you can join to that variable just like it was a table - so if you need the results multiple times, you get them, but only have to pay for them once.

Long live SQL!

Chat with the Funky!

April 15, 2008 – 11:15 am

Those of us here at FunkyCodeMonkey decided to open ourselves up a bit to the public. If anyone would be interested in chatting about some of the posts here, or possibly anything else code related - you now have an opportunity to do so. Most of the time, we can be found on irc @ irc.darkmyst.org. We have our own little channel titled #FunkyCodeMonkey - and yes, we will give you hell. Please join us! Once again:

irc.darkmyst.org - #FunkyCodeMonkey

Funky Twitter Widget

April 13, 2008 – 11:28 am

It’s funny how a lot of the funkeycodemonkey crew got pulled into twitter. None of us had twitter accounts until about 2 weeks ago. It basically began with people asking “anyone using twitter?” followed by “why the heck should I use twitter?” After a lot of back and forth, some signed up to see what all the fuss was about. Being programers, it no surprise that one among our number decided that many OSX twitter clients sucked and of course he could do better. I have to agree that Be A Twit does indeed suck a little less than what’s out there currently.

No last minute comeback for the Applet

April 8, 2008 – 4:04 pm

200804081812

I’ve been playing around with the Flex 3 builder lately and I’ve come to the sad conclusion that JSP’s future role in the java webapp will be severely limited and the venerable Java Applet is already a dead man walking. Flex has a interface that seems, so far, seems to be much easier to use than even the most modern Swing tools. It’s easier I think because there is only one GUI toolkit. No SWT vs Swing battles happening here. The Flex tool chain seems to have been made by a team made of both engineers and designers. A nice change of pace from what comes from Sun, IBM, Oracle and the rest of the Java sausage party.