my face
About Me

Published Posts

All Posts

New Post


View by Tag:

interviewing, code, testing, philosophy, blog, wantmyjob, virtualization, railsmud, heroku, ruby, published, neoarchaeology, railsgame, rails, juggernaut, astrino, cheaptoad, shannaspizza, mongodb, refactorit, devise, rvm, passenger


FeedBurner picture


Online Portfolio

Resume

Profile on LinkedIn

Recommend Me

Viewing only published posts

DB2 CREATE DISTINCT TYPE WITH COMPARISONS

Posted: 11 days ago (2010-08-23 16:55:29 UTC )

At my workplace, we use DB2 primarily. We're attempting to solve a weird ActiveRecord incompatibility problem by defining a type. So far, so good.

However, "CREATE DISTINCT TYPE onsite.mytype AS INTEGER WITH COMPARISONS" isn't doing anything useful. By that, I mean you can't compare such an object to itself, even with the cute typecast functions they give you.

I don't have a solution to this problem. So far the user-defined types we can make are simply useless. Statements like "select 1 from dual where onsite.mytype(0) = onsite.mytype(0)" fail completely because you can't compare a mytype to a mytype, even if you specify WITH COMPARISONS.

And yet nobody seems to have blogged about this. Anywhere. Is that because DB2 is only used in corporate settings, and people like that are desperately afraid of giving away corporate secrets if they blog about it?

Your secret's out already, guys. We know you're too cheap to pay for Oracle. Blog already.

Incidentally, the DISTINCT and WITH COMPARISONS parts seem to be mandatory. It won't even parse without them (as you'd expect with DB2, there's a five-digit error code with a cryptic description). You'd think they would, like, document that. So the documentation is terrible, people are required to use the product for their jobs, and there are no blog posts anywhere as guerilla documentation. Seriously, how is that possible?

RVM and Passenger

Posted: 3 weeks ago (2010-08-07 19:34:45 UTC )

If you're using RVM with Passenger,you've probably already seen the official documentation on using passenger wrappers with rvm. If not, go have a look, it's basically good.

However, you may not realize that you shouldn't create a gemset, install the gems into it, and then wrap it. For reasons that I have yet to figure out, you need to wrap the ruby and gemset, then install the gems. Just so you know.

For those following along, the steps look like this:

* rvm gemset create deployment
* rvm wrapper ree@deployment --passenger
* passenger_gem install rails --pre --no-ri --no-rdoc

On the plus side, you can then just change your passenger_ruby declaration in Apache or NGinX and it seems to work. I did a lot of installing and reinstalling to get this to work :-)

SeaGate FreeAgent Pro

Posted: 4 weeks ago (2010-08-01 23:44:35 UTC )

Like most people who bought these, I've had problems. Doesn't format properly for Mac. Fails after a few months. Loses files (or has them go inaccessible) randomly.

On the plus side, the box *does* say that it's only compatible with Windows. I just didn't realize they meant "even with a reformat, sucker!"

Ubuntu dist-upgrade: Karmic

Posted: 4 weeks ago (2010-08-01 22:25:14 UTC )

Ubuntu has maintained its perfect zero-and-eight record with dist-upgrade. I have still never had a dist-upgrade of Ubuntu work with all major facilities intact.

This time, networking completely failed to work, on both adapters, after the upgrade. I'm sure there's some way to fix that, though I haven't found it yet.

One of my external backup drives has also decided that this is a good time to fail. So I can't move the data off the machine by network or USB drive.

On the plus side, none of this is on my server box, so the blog should be working just fine.

Create and Maintain

Posted: 5 weeks ago (2010-07-24 17:22:19 UTC )

There's a natural ebb and flow in most human undertakings. Advance and retrench, write and rewrite, code something and maintain it.

If you create, create, create and never maintain, you get a huge mess. If you write and never rewrite, you never live up to your full potential. Not a big surprise.

Creation is more glamorous than maintenance, of course. None of the programmers in the greatest demand would take a pure maintenance coding job. You think of great writers writing, but few think about how often the revise and rewrite. Taking territory is the stuff war films are made of, but solidifying and fortifying is a footnote on the way to the important stuff.

Less obviously, there's a personal balance between creation and maintenance. Everybody's different, but you've got some personal best level of creation versus maintenance in what you do. You're probably biased a bit in favor of creation from your natural balance since it's considered more glamorous, but there is some actual natural level for you.

When you get out of whack, it's easy to get burned out. "Too much creation" is a bit like happy burnout, or it may just feel like too much work. Too much maintenance, though, probably just feels like you're dragging and uninspired. I know that's how it feels to me.

When in doubt, consider doing a bit of work on your own. I know, more work as a solution to burnout sounds stupid, but the trick is in the kind of work. Put away your vital, important, possibly lucrative maintenance work for a bit, and do a bit of creation on the side, just for the love of it. You can probably use it.

Tutorial ready

Posted: 7 weeks ago (2010-07-10 16:55:22 UTC ) / Updated: 7 weeks ago (2010-07-10 16:56:23 UTC )

Part One of the Refactor It Rails 3 tutorial and part two of the same are ready for reading. Have a look!