Archive for January, 2010

IE Javascript not working

Friday, January 29th, 2010

I had some javascript that I couldn’t get to run in IE. It was driving me nuts. I spent a few hours slowly reading every line to make sure there were no stray commas or anything else IE doesn’t like.

After two wasted hours, I went to twitter.com, and it kindly informed me that javascript was disabled.

Except it wasn’t.

Another half an hour of google searching and I find out that I need to re-register the javascript dll.

Run this command from the start menu or command dialog if this happens to you:
regsvr32.exe jscript.dll

Windows is so dumb.

My First Domain name

Wednesday, January 13th, 2010

The very first domain name I ever bought was tacoland.com. I accidentally let it expire and it was registered within days by a link farm company and then later sold to BuyDomains. man I hated them so much. Five years later I did some work for BuyDomains. I probably could have gotten it back cheaply, but I realized it was a stupid site anyway.

A few weeks after tacoland, I registered GrilledCheese.com, a site I still like but haven’t updated in like 9 years. Ah well.

iPhone Hardware Accessories Roundup

Monday, January 11th, 2010

It’s been about half a year since Apple announced that they would be allowing 3rd parties to develop integrated hardware/software applications for the iPhone. Here is a roundup of what has come out so far.

wwdc keynote 2009 screenshot

In my opinion, the most exciting announcement made at the 2009 WWDC was that the 3.0 version of the iPhone operating system would support integration with 3rd party hardware. Considering the number of stupid docks out there, I fully expected there to be hundreds of new accessories for the iPhone by the end of the year.

Here we are, a little over six months out, and I decided to dig around and see just what 3rd party hardware is out there with iPhone integration goodness.

Multimedia

L5 RemoteL5 IR Dongle
Turns your iPhone into a universal remote.
link to site
WowWee Pico ProjectorWowWee Cinemin Pico Projector
Small projectors are being touted by tons of hardware manufacturers. I have yet to see anyone buy one but maybe since this one works with the iPhone it will be the first.
link to site

Lifestyle

WakeMateWakeMate
This is an armband that monitors your sleep to wake you up at exactly the right moment in your cycle. Even more compelling to me than the waking up is that it monitors your sleep and makes nice charts of it on their web site.
link to site
PedalBrainPedalBrain
This is appealing because rather than try to invent new proprietary hardware this good looking bicycle mount reads data from standard Ant+ sensors on your bike to track everything you would want to know about your riding. The mount is carbon fiber which pretty much ensures it will cost a ton but also that I will buy one.
link to site
Ant+

Commerce

iCarte RfID ReaderiCarte RfID Reader
This one doesn’t get much press, but a cheap reliable RfID reader could be just what the RfID industry needs to get their technology into smaller businesses and retail shops.
link to site
SquareSquare
Square is getting a ton of press despite their newness in the industry and the fact that their dongle looks like absolute crap and plugs into your microphone jack. Of course, their software looks tip top and the company was started by Jack Dorsey of Twitter fame. I won’t be impressed until I see one work in person or they beat out the wikipedia entry for the word “square” in google rankings.
link to site
Verifone Payware MobileVerifone Payware Mobile
A much better looking accessory from a proven player in the payment processing biz, the press is largely ignoring these guys because they are all in love with Square. What will probably kill these guys is the fact that they are a very 1.0 company and generally a pain in the ass to buy services from.
link to site

Other

Nasa Chemical SensorNasa Chemical Sensor
As far as I know, this one isn’t available for sale but it is very cool to see that those way smart folks at NASA are out hacking up their own accessories. I recently watched a documentary about the Apollo Space program and wondered if you could now replace the 1975 NASA Central Command Center with a good iPhone app.
link to site

What I’d like to see

This is a good start, but I really hope and expect to see some crazy and varied 3rd party hardware add-ons this year.

  • A real barcode scanner, you know with a lazer and not trying to make the camera do something it doesn’t want to.
  • A voltmeter
  • An oscilloscope
  • Still no Dj accessories? Despite the billion iPod mixers, you guys can’t make an auto-tune mixer or something?
  • Um, lazertag guns
  • Expensive home automation systems, so people on MTV cribs can replace all the light switches in their house with iPhones.
  • Something that plugs into my power tools. Don’t know how, but surprise me. Chainsaw hero?

Simple Image Cropping with Flex

Wednesday, January 6th, 2010

Here is a simple, pure as3, image cropper I wrote for Flex. I’ll try do a post later in the week describing how to use it in Flash cs3 and cs4.

screenshot for people without flash

Features:

  • Very Simple
  • Allows you to set min and max values for height and width
  • Holding shift key keeps aspect ratio

You currently have to do the cropping on your own, either in flash or server side. I will followup later with examples of how to do that.

To embed this into you application, all you have to do is:

import com.wirelust.imagecrop.ImageCrop;
import com.wirelust.imagecrop.CropBox;
 
private var imageCrop:ImageCrop = new ImageCrop();
private function onCreationComplete():void {
	imageCrop.loadImage("demo1.jpg");
	
	// imageBox is an mx:HBox in my mxml
	imageBox.addChild(imageCrop);
	
	var crop:CropBox = imageCrop.cropBox;
	
	// Set up the initial crop
	crop.cropX = 178;
	crop.cropY = 187;
	crop.cropWidth = 249;
	crop.cropHeight = 219;
}

You can then listen for CropBox.EVENT_CHANGED to get the dimensions of the box as it changes:

private function onCreationComplete():void {
	// snipped ...
	
	crop.addEventListener(CropBox.EVENT_CHANGED, onCropChanged);
}
private function onCropChanged(event:Event):void {
	if (imageCrop.cropBox != null) {
		xValue.text = imageCrop.cropBox.cropX.toString();
		yValue.text = imageCrop.cropBox.cropY.toString();
		widthValue.text = imageCrop.cropBox.cropWidth.toString();
		heightValue.text = imageCrop.cropBox.cropHeight.toString();
	}
}

Files

 Download source code

Monty Widenius is trying to regain control of MySQL and why this is bad for OSS

Saturday, January 2nd, 2010

One of the most widely discussed topics to go around the tech industry last year was the Oracle acquisition of Sun and what this meant for the MySQL database. This topic held up the merger with the US DOJ and currently has it stalled in the EU commission.

One of the primary forces behind these hold ups is a series of FUD articles written by Monty Widenius, the most recent just a few days ago. Monty has a huge following so whenever he writes up one of these articles it gets huge circulation and riles up the Slashdot and LAMP crowds.

I think that the open source community should be very skeptical about anything written by Monty on this topic, and should start looking at the big picture of what this merger means for themselves and the various players involved.

I don’t know why I haven’t been seeing many serious rebuttals to Michael’s posts. I can only guess that is because everyone working at Sun and Oracle are prohibited from speaking up on the matter.

Here is what I think everyone should consider:

1. Sun is the largest contributor to Open Source in the world

2. Java, which sun is responsible for, one of the largest ecosystem of open source software in the world.

IBM, RedHat, the Apache Foundation, Oracle, Google, and hundreds of other companies have based themselves on Java. Java is by far the most used platform out there today. Out of this wide adoption has sprung a massive open source ecosystem that can only be rivaled by Linux. I don’t have any studies but I wouldn’t be surprised if there was much more open source Java code out there than C.

The Java community in my experience, by and large, is very reluctant to touch anything that is not open source. In the past 10 years the community has moved from expensive application servers and IDEs to free alternatives. Projects like JBoss, Glassfish, Tomcat, Eclipse, and Netbeans are the dominant players in the space and have been driving the mindset that to be a player in this market you have to be free.

3. Sun is in trouble and risks going out of business if no-one buys it. Talks with IBM broke down, and there aren’t many other companies that can make a purchase.

Not much else to say here. Oracle has been having some rough years. Hardware sales are down and they’ve been spending too much on R&D. Sun needs someone to buy them and buy them quickly. They have been actively been doing layoffs that affect all of their open source efforts (including MySQL) while this drags out. Further delays, or the blocking of this merger will only further harm the OSS Community.

4. Oracle already owns Berkely DB and InnoDB, which current versions of MySQL rely on.

This same sort of noise and FUD was made years ago when Oracle bought these two products. Oracle has continued to maintain these and has been a more stable steward of the projects than when they were independent.

5. It doesn’t make business sense for Oracle to try to kill MySQL.

First off – MySQL does not compete with Oracle Database. Anyone who thinks it does does not understand what Oracle Database is. People that use Oracle tend to buy the whole oracle package (DB, App Server, IDE, Middleware, etc..). There are free alternatives to everything in this stack, including many products owned by Oracle but companies that want Oracle are companies that want the piece of mind that support for the stack brings.

There are no CTOs out there hemming and hawing about wether to use MySQL or Oracle. It would be like sitting around and trying to decide if you were going to buy a Ford Focus or an M1 Abrams Tank. I’m not using this analogy to point out that Oracle has many more features (it does) or that it is better than MySQL, only that it is different. You would never buy the tank to commute to work or for most of your driving needs. The same is true with MySQL, it is perfect for most projects and Oracle tends to be a little too heavyweight.

Furthermore, for companies that do insist on purchasing the Oracle stack but want to use MySQL would now be able to buy the support stack with MySQL in it. Oracle can now sell the complete support package and their customers can feel good about getting everything from one vendor. Companies that buy Oracle are most likely the companies that would be paying for MySQL support as well. If a customer comes to oracle, what do they care which database the customer wants to use when they own both.

The last thing Oracle would want to do is alienate a large developer community. Changing anything about MySQL would hugely upset not just the LAMP and Java communities but just about everyone on the planet. This is just bad business.

6. All Oracle will own is a trademark and some engineers.

The source code for MySQL is already free. Anyone can fork it off and start another project and attempt to gain community support around their new project. The only thing they can’t do is call it MySQL. Monty has already started one such fork called MariaDB.

Open source projects are about the community rallying around ideas, not around companies. Monty argues that a forked product could never compete with MySQL without the name recognition. This isn’t true. If the community feels that Oracle is doing a bad job as a maintainer, but someone else is releasing new features on some other project, people will switch very quickly. We see this all the time in the Linux world with the community switching from one fork to another of a large project.

Monty says that forks can never happen because they would need funding and resources. What this argument ignores is that large companies with a lot invested in MySQL could step up if the project is faltering. If Oracle were to stop releasing updates, do you think Google is going to sit around and do nothing? The community would jump ship to GoogSQL or whatever if it came to that and was seen as a better product.

6. Monty Widenius has the most to gain from Oracle divesting in MySQL.

Like everything else in the world, when there is an argument, you need to step back and ask yourself who has the most to gain. Widenius sold MySQL for a hefty personal gain and is now trying to wrestle back control by spreading fear throughout the MySQL community.

Monty has been making noise since September 2008 (before the announced Oracle-Sun merger) and complaining about the direction of the project. He didn’t feel Sun was doing a good job and started immediately calling for forks and and a change of direction. The community heard Widenius out but didn’t build up a ton of support for his ideas, because by and large, most people are satisfied with the job Sun is doing.

Right before the Sun ownership, MySQL was in the process of rolling out a non-free enterprise edition and telling people that they would have to pay for new features. The company I was working for at the time had MySQL sales reps and consultants flat out tell us that we would need to purchase a support agreement if we wanted to use the Falcon Engine or clustering past v5.5. Sun put a stop to this.

In Summary

I am not under any illusions that an Oracle-Sun merger would be all sunshine and roses. I think that Sun has developed a culture and business model around everything being open and free and Oracle has not. Oracle will need to make some big changes about how it does business in order for the merger to work.

I would prefer if Sun could remain an independent company but we have to face facts, Sun is in trouble and there aren’t many other companies that can bail them out. If Sun is allowed to continue it’s downward spiral then we are facing a great loss to the open source community.

I am not worried about the Oracle stewardship of any of Sun’s open source products precisely because of the community support. Oracle can’t afford to make huge changes and alienate hundreds of thousands of developers who have some say in how much money their companies give to Oracle. Doing something like killing or even changing GlassFish, VirtualBox, ZFS, or any other OSS project could lead to less sales in it’s existing stack of software.