If you spend a lot of time dealing with languages that are loosely typed and have scalars running wild, then like me, you may be prone to doing something like this:

mysql> select NOW(); select GREATEST(NOW(), DATE_ADD(NOW(),INTERVAL 1 DAY)); +---------------------+ | NOW() | +---------------------+ | 2009-04-28 14:17:36 | +---------------------+ 1 row in set (0.00 sec)

+-------------------------------------------------+
| GREATEST(NOW(), DATE_ADD(NOW(),INTERVAL 1 DAY)) |
+-------------------------------------------------+
| 2009-04-29 14:17:36 |
+-------------------------------------------------+
1 row in set (0.00 sec)

mysql> select GREATEST(NULL, NOW());
+-----------------------+
| GREATEST(NULL, NOW()) |
+-----------------------+
| NULL |
+-----------------------+
1 row in set (0.00 sec)

I'm glad the bug this caused had a minor impact, and this will hopefully be sufficient to slap me out of my loosely typed comfort zone for a while.

Worth

| | Comments (0) | TrackBacks (0)

This may be worth following.

I was pleased and amused at news that Seinfeld will apparently pimp Vista, which has been ravaged by issues such as poor performance, the way UAC trains users to click yes without providing real security, to say nothing of how Vista has horrible DRM, which distrusts the user and hurts consumers.

Vista is so bad, Microsoft came up with this elaborate plan to trick people into saying nice things about Vista. It might be easy to trick a few novice users into thinking Vista looks neat when they're in a lab, but do they know about the performance issues it may have on their hardware, or the frustrating DRM? For that matter, can they navigate the small ocean of different Vista licenses to select the right one? Vista is not what you'd expect from a half-decade of development. When you spend billions upon billions of dollars on a new operating system, you'd expect more than a "Defective By Design" piece of junk.

All this leads me to conclude that Seinfeld is the perfect spokesperson for Vista. Because Vista is a joke. Windows is the Smelly Car of personal computing. It makes computers stink, and Vista is just the latest horrible manifestation.

Seriously Wired, what's wrong with you?

The E71 looks more like a Blackberry Killer, but don't be fooled: This great white hope gives the iPhone a run for its money in a lot of different areas (yes, really).

No, not really.

  • Big, nasty keyboard
  • Display not as large as ipod, let alone iphone
  • MicroSD, but only 8GB.
  • $500 unlocked. Ouch. You're not iPhone 3.0, you know.
  • No headphone jack.

So it's an iPhone killer because... uh... the battery lasts 3 days! Yeah... because you can't do anything cool with it.

Slacker

| | Comments (0) | TrackBacks (0)

I'm aware I haven't posted much. That said, I'm hoping to have an app I've been working on for the GAE (Google App Engine) done shortly, and will post some impressions about the GAE, and Python. (Wait, do I need a new category?)

After that, now that Apple has opened the developer floodgates, it's time to put in some time with my Cocoa for MacOSX book, iphone dev docs, etc, and do some iphone work. I enjoy my own iphone way too much to not develop something for it. Yay open platform! I did a small app for PalmOS ages ago, never even distributed it, but just had to to do it because I loved my palm and there was a decent gcc-based toolchain.

I am planning to upgrade to 3g, despite battery concerns. If necessary, I will disable the 3g except when I expect to be using lots of data. I never had an issue with call quality, and don't talk enough (<100m a month on average) to care. Maybe I can figure out a way to make that hotkeyed in some way. (I'd like to have a handful of settings toggles available when you double-click home when locked, like the ipod controls)

I grabbed a mybat external battery for the iphone. We'll see how that works, but tucked in my laptop bag, hopefully that will be serviceable in the clutch when battery is low and a recharge opportunity is not coming.

I have historically had several servers at Layered Tech. They recently raised their prices, and the prices for several friends who have hosted servers there. The majority of our use is low volume, experimental sorts of things, and so we decided to go in together on a larger box that we could virtualize.

Enter Voxel, who offer a $199/mo dedicated server that includes:

  • 4 GB RAM
  • Quad XEON 2Ghz
  • 320GB SATA disk (which are growing more standard among these providers, but a lot of options are still IDE
  • SSH-accessible serial console access included

That last one is a serious nod to their foresight and a judo chop to other providers. Layered Tech overs a KVM solution as a $30 or $35/day rental. Voxel automatically includes it.

Anyhow, with this beefy box, we set about setting up Xen. Voxel's support was admirable when my initial xen install broke the serial console access. It turned out my /etc/grub.conf needed a change:

title CentOS (2.6.18-53.1.21.el5xen) root (hd0,0) kernel /xen.gz-2.6.18-53.1.21.el5 com1=9600,8n1 module /vmlinuz-2.6.18-53.1.21.el5xen ro root=LABEL=/ console=tty0 console=ttyS0,9600 panic=100 module /initrd-2.6.18-53.1.21.el5xen.img

(Change in bold)

Without the com1= line, it defaulted to 38400.

Anyhow, with that done, I got to work actually setting up Xen virtual server instances. The host box (aka the Dom0) is CentOS, and so the "easy" install should be another instance of virtualized CentOS, although any variant should be usable. I tried to use virt-install, but it failed miserably.

First, I had issues with networking. Even when I resolved those, halfway through anaconda installing packages, the system crashed.

Ultimately, I settled on doing it manually using this guide to installing CentOS DomUs on a CentOS Dom0.

Caveats for me included the fact that my bridge was virbr0 instead of xenbr0. I have a xenbr0, it just wasn't the correct bridge for RFC1918 going out...

Anyhow, aside from the networking problems, that went fairly smoothly. (Although the top of the guide has you selecting from i386 or x86_64, and the kickstart config just says i386, so I had to restart to correct that, since I was doing the x86_64 install.

Still on the agenda: getting a real IP address. Voxel offered a reasonable extra 8 IPs for $4/mo, and we'd like to ensure each VPS has its own IP address, not 192.168 addresses that translate.

Still, this has been a pretty fun thing so far. I've heard that Xen is what Amazon is using to provide AWS, and I've been learning a lot of new linux tools (like brctl; I'd never had a reason to do linux bridging prior to now, even though I've done it plenty with networking devices).

jQuery 1.2.6

| | Comments (0) | TrackBacks (0)

A couple weeks ago, the jQuery team released jquery 1.2.6.

jQuery is the write-once, run-anywhere a new type of javascript library.

It's incredibly full of win. Favorite things in 1.2.6:

  • Still small (minified+gzipped, 15k)
  • Dimensions plugin - I can see why. Dimensions was a godsend, providing totally important calls like $.position() and $.innerHeight() and whatnot. Indispensible.
  • makeArray - jQuery's internal .makeArray() method now converts any array-like object into a new array. Additionally it wraps all other objects as an array and returns the resulting set. This one is so wild, it will require further digestion, but there are plenty of possibilities

I'm working on a brief introductions to jQuery I will post to go over a bunch of basic techniques; things that go a tiny bit beyond the jquery.com documentation usage.

April 2009

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Creative Commons License
This weblog is licensed under a Creative Commons License.