Tuesday, February 28, 2006

Changed my mine, update email sig

I decided "Fighting" is the wrong word. It definitely invokes the passion I am trying to communicate, but it also implies not moving forward. I.e., you're stuck, so you have to hold your ground and fight.

Michael Sica
Founder, Ataraxis Software
"Never Stop Moving Forward"

Everything I've learned up to this point in my life tells me that you must constantly be moving forward. Once you stop, someone WILL pass you by. It IS only a matter of time.

(That was a nice little pep talk for myself. ;) )

New Email Signature, NSF

I've got a new email signature.

Michael Sica
"Never Stop Fighting"

Sunday, February 26, 2006

Blogger Widget, 3

I've removed the TM symbol. I like this widget enough too much to mar the experience. 

I'm looking forward to this little guy's future. Some HTML editing and spell checking would be really nice.

Blogger Widget, 2

The widget is a little buggy. The "Title" field didn't show up properly at first, and the trademark symbol in my blog's name seems to be breaking the display a little. (It's pushing everything after the TM symbol into the blogging area.)

I forgot to post a link to the widget. Here ya go:

http://www.apple.com/downloads/dashboard/blogs_forums/blogger.html

Blogger Widget

I'm loving Dashboard on OSX. This blog post is coming from the new Google widget for Blogger (the blogging service I use for this blog).

Sorry, nothing more to write. I wanted to test out this widget.

Friday, February 24, 2006

Another mydigitallife.com purchase inquiry

Every once and a while I receive a purchase inquiry for the domain, mydigitallife.com. I purchased it a long time ago with the intention of building a gigantic piece of software. ;)

I'm kind of torn. I was really attached to the domain, but now that I'm receiving almost regular offers I'll probably sell it eventually.

Do any of you have some domains you purchased with grand plans, but are just lying dormant?

Thursday, February 23, 2006

First Day with MacBook Pro

It's getting late, so this won't be a very long post.

The skinny? This thing is tight.

I'm making the switch from Windows to OSX, so the hardest part so far has been trying to figure out what all the keyboard shortcuts are. Google is great, but for us non-Mac people "Command - Shit [" doesn't look like a real combination. There isn't a key on my keyboard that says "Command" on it, and I thought the "[" was a misprint! ;)

Oh, and I hate Mail (I'm using IMAP). Thunderbird is way better, but I want the integrated Spotlight support Mail offers. So I'll stick with Mail.

Right now I'm enjoying the fact that my keyboard lights up in the dark. When I'd blog late at night with my dell, I had to go completely on muscle memory to type. This is one nice piece of hardware.

Sunday, February 19, 2006

MacBook Pro, It shipped!

I just got the email from Apple. My MacBook Pro has shipped!

It originally was supposed to ship on Feb. 15th, but then when I heard that Apple had released new MacBook Pro's I cancelled my order with the intention of re-ordering later that night. Then
I found out that everyone was automatically upgrade to the latest stuff at no extra charge. So I called Apple and un-canceled my order. My new ship date was set for Feb. 28th.

So imagine my surprise to have received my shipping email this morning, Feb. 19th. :)

Saturday, February 18, 2006

I will be back, I promise.

As I've said in previous posts I've been working a lot at my day job so work on Ataraxis Software has been paused. Things are looking better. I've had/have 2 more developers started/starting this month, and I've got 1 business analyst starting in about a week.

My personal goal is to resume work on my app/service the week of March 6th. The same week my MacBook Pro is scheduled to arrive. :)

I will be back, I promise.

Feel free to encourage me by posting your own personal success stories while I work 50 hour weeks for "the man". ;)

Thursday, February 09, 2006

Open Cursors Maximum Exceeded, Coldfusion

I fancy myself a pretty descent programmer. I'm good with Coldfusion, Java, and I'm not doing to bad with Ruby (haven't touched it in 2 months :( ). But every once and a while I come across something that I don't know, and feel like a complete idiot for not knowing it.

As you already know I've recently become the manager of the IT Web Team at my day job. We've got a hugely successful hotel-booking web site that my department built and it's experienced some slight growing pains recently. One of those growing pains was the occurance of the following error:

"Open Cursors Maximum Exceeded"

Let me back-up a little bit. The web site is running in Coldfusion MX 6.1 and Oracle.

Now, I'm sure we all know what a database connection is, right? Your application server (in our case CFMX and the underlying JRun J2EE server) needs to talk to the database so it uses this thing called a "connection". Connections take a while to .... connect .... to the database so pimp app servers put a bunch of connections in a pool and when your app server needs one it dishes up a connection. The app server does it's database work and gives the connection back to the pool.

What I learned is that there is whole other level of voodoo magic know as "cursors".

Ok, some of you have probably fallen over laughing at me.

Piss off.

;)

Here is a quick explaination of a "cursor". Each time the app server gets a connection and executes a SQL statement a "cursor" in the connection is created.

Simple right?

Here is the kicker.

Oracle (and I'm guessing other RDBMS') have a limited number of cursors per connection, and when they are used up the connection is totally hosed. If you send a SELECT statement and then an INSERT statement, that's two cursors. My brain told that the app server should just kill the connection and make a new one for the pool. Apparently that's not how it works, at least not with the technology we're using. The connection just fills up with open cursors and the app server starts reporting the "Open Cursors Maximum Exceeded" error when it tries to use the connection.

[UPDATE: See the comments at the bottom of this entry.]

Brilliant I thought. What kind of piece of crap is this?

Our first (naive) solution was to increase the cursor amount. That fixed it, for all of 1 day. :(

Then a couple of people with a frigg'n clue sat me down and explained "bind variables".

If you are a super smart person you use bind variables in your SQL. In Coldfusion this means using the CFQUERYPARAM tag, and in Java this means (I think) creating a PreparedStatement. (If someone could verify this for me I'd appreciate it. I haven't looked into it yet. I always use PreparedStatements, I just didn't know about this wonderful benefit.)

What am I talking about?

Here is some SQL to illustrate, and then I'll get back into why you need to use bind variables.

Bad SQL in CF
INSERT INTO some_table (column_1) VALUES (#somevalue#)

Good SQL in CF
INSERT INTO some_table (column_1) VALUES (<cfqueryparam value="#somevalue#" cfsqltype="CF_SQL_VARCHAR" />)

Why do you need to do this?

Every time the "Bad SQL" is executed in Coldfusion, a new cursor is created in the Oracle database connection.

The first time the "Good SQL" is executed in Coldfusion a new cursor is created. Then the next time the "Good SQL" is executed the cursor that was created the first time is reused. 1 SQL statement = 1 cursor that can be re-used for the life of the connection.

Like I said, every once and a while I come across something that I don't know, and feel like a complete idiot for not knowing it. :)

Oh, and if anyone out there is running CFMX 6.1 I HIGHLY recommend you upgrade to the latest updater, apply this hotfix for the DB drivers, and if you're running in J2EE mode get the latest JRun updater. I've seen huge stability improvements after applying the patches.