IE Javascript not working

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

A4 probably won’t thwart porters after all

January 28th, 2010

Apple A4 Chip

So In yesterday’s post, I posited that a custom chip from Apple might make it impossible for people to port other operating systems to the iPad hardware.

It turns out, according to this artice over at Bright Side of News, the A4 is simply a system on a chip. It is an ARM Cortex-A9 MPCore CPU mashed together with memory and other functions.

Porting something like linux to the iPad won’t be easy but it should be possible. As far as I know, no alternative operating systems have been successfully run on the iPhone and the iPad will probably have a very similar story. Theoretically, iBoot from the iPhone Dev Team is close to getting an Linux to load on the iPhone. Let’s hope they can bring some of the same know-how to the iPad.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

The iPad

January 27th, 2010

wow. months of the blog world jerking off to today’s fantasy finally ended with everyone feeling a little disappointed. The iPad is here, and we are all once again, wondering what we will use it for. I wasn’t going to post about it but there are a few things I think people are overlooking.

A4 Processor. whaaa?

We knew apple bought a processor manufacturer so this isn’t a total surprise but it is a big move that I think will impact things more than people realize.

First, apple is now in the business of once again using proprietary technology instead of off the shelf components. While it may be totally awesome now, Apple runs the risk of chips from other companies getting way faster quicker than their own and users waiting years for upgrades like in the PowerPC days. Luckily Apple has gone through processor switches before and knows how to package binaries that work on multiple architectures.

Second, and I think perhaps more significant, using a custom processor could stop the porting of other operating systems dead in their tracks. If apple doesn’t provide the right specs or compilers, it could be forever before we can see Chrome OS or any other Linux running on their hardware, which is too bad.

Missing Features

All the tech blogs are hard and fast complaining that there is no SD Card. personally I don’t think people will give a shit. Most people who have SD slots in their phones or Netbooks never use them.

No Camera – sucks. video conferencing and even (choke) A.R. would be cool on it.

No GPS – As far as I can tell there is no GPS receiver. This is too bad. It would make a great co-pilot tool on road trips. I guess with gsm you can get psuedo gps but it’s not quite the same.

Awesome Features

USB Charging – You can charge the iPad with USB. This means car charging. The thing I miss most about my tiBook was being able to use it in my car without killing the battery.

GSM unlocked. Yeah, AT&T sucks. everyone knows that. With an unlocked device, it opens up the possibility not just of other carriers supporting it, but perhaps real price competition. If this thing sells as many as they hope it would be a prime opportunity for T-Mobile to offer the same data plans for $10 cheaper.

Hopes for Accessories

I think the right accessories could save the iPad for me, here is what I would like to see:

DSLR Tether – If I could plug it directly into my camera and get shots full screen as I take them, it would be amazing for studio shots. Even better if I could use it as a remote while the camera is on a tripod. This should be possible with the SDK: so Nikon, Canon, get to it! I would switch to Canon if they pull this off first.

A really good, accurate, stylus – yeah, finger touch is great and all. but as @thisIsStar said on twitter earlier, it isn’t a Wacom killer. There would be a certain awesomeness to be able to sit on the couch and work in illustrator or photoshop with precision. I don’t know if the touchscreen is sensitive enough for good fine control, but maybe it is, and maybe they could do it with some sort of add on.

We’ll see

Anyways. I have no doubt apple will sell a ton of these things. At $500 bucks I’ll probably get drunk and buy one eventually.

oh. and yeah. did I read that correctly on the tech specs page? The OS still can’t read iCal .ics files sent as attachments in email? WTFx1000? My windows mobile phone from 8 years ago can do that.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

My First Domain name

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

iPhone Hardware Accessories Roundup

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?
Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

Microsoft says Nexus One will hurt Android

January 8th, 2010

Ars Technica has an article talking about how Microsoft Entertainment and Devices President Robbie Bach came out and said that the Nexus One will hurt Android. Basically, he said that Microsoft thinks releasing your own device will scare off 3rd parties from using your Operating System.

I think comments like this that continually come out of Redmond highlight why Microsoft struggles so much connecting with customers. Microsoft has taken the strategy that focusing on OEM partners is more important than focusing on user experience. Windows mobile was the dominant smart phone OS on the market for years because they did a great job signing up hardware makers. Unfortunately they didn’t pay any attention to end users and as soon as something better came along their demand disappeared.

Google has taken the right strategy, focus on the customer experience first, worry about the hardware vendors later. If the public is excited to use your software, the hardware companies will follow, especially if you don’t charge any Licensing fees.

I wonder if Robbie Bach thinks that hardware manufacturers wouldn’t wet their pants at a chance to run OSX on their own devices. With his logic they wouldn’t want to because Apple already makes a good phone.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

Simple Image Cropping with Flex

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

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

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

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

[snippit] – generating a faux waveform in AS3

December 8th, 2009

Working on a Flash project. I had to use the microphone to record some audio and generate a simple waveform so the user has some feedback that they are being heard. While not a true waveform, you can use the microphone activity level to generate something that works pretty well.

Get Adobe Flash player

Here is the code to generate the above sample:

import com.wirelust.waveform.Waveform;
import flash.media.Microphone;
 
private var wave:Waveform = new Waveform();
private var mic:Microphone;
 
private function init():void {
	wave.height = 50;
	wave.width = 450;
	wave.y = this.height/2 - wave.height/2;
	wave.x = this.width/2 - wave.width/2;
	this.addChild(wave);
	
	mic = Microphone.getMicrophone();
	mic.setUseEchoSuppression(false);
	
	// loopback is required so we can get the activity level and create the waveform. - so stupid
	mic.setLoopBack(true);
	
	// turn off the volume for the loopback
	var mySoundTransform:SoundTransform = new SoundTransform();
	mySoundTransform.volume = 0;
	mic.soundTransform = mySoundTransform;
	
	this.addEventListener(Event.ENTER_FRAME, onFrameEnter);
}
 
private function onFrameEnter(event:Event):void {
	if (mic != null && !mic.muted) {
		wave.add(mic.activityLevel);
		wave.invalidateDisplayList();
	}
}

And for the Waform class:

import flash.display.*;
import flash.events.*;
import flash.geom.Matrix;
 
import mx.core.*;
import mx.graphics.IFill;
import mx.graphics.IStroke;
import mx.graphics.SolidColor;
import mx.graphics.Stroke;
 
public class Waveform extends UIComponent {
	private var levels:Array = new Array();
	public var color:uint = 0x000000;
	public var borderColor:uint = 0xCCCCCC;
	public var borderWidth:uint = 1;
	public var autoScale:Boolean = true;
	
	public function Waveform() {
	}
	
	public function add(level:Number):void {
		// trim the levels so we don't keep eating up memory
		while(levels.length > this.width) {
			levels.shift();
		}
		levels.push(level);
	}
	
	override protected function updateDisplayList(param1:Number, param2:Number) : void {
		var scaleFactor:Number = 1;
		// autoscale will find the highest volume and scale all lines in the display accordingly.
		if (autoScale) {
			var highestLevel:Number = 0;
			for (var i:uint=0; i<levels.length; i++) {
				if (levels[i] > highestLevel) {
					highestLevel = levels[i];
				}
			}
			scaleFactor = height/2/highestLevel;
		}
 
		super.updateDisplayList(param1, param2);
		graphics.clear();
		graphics.lineStyle(1, color, 1, true, LineScaleMode.NORMAL);
		var lineX:uint = 0;
		for (var j:uint=0; j<levels.length; j++) {
			graphics.moveTo(lineX, this.height/2 - (levels[j] * scaleFactor));
			graphics.lineTo(lineX, this.height/2 + (levels[j] * scaleFactor));
			lineX++;
		}
		
		if (borderWidth > 0) {
			graphics.lineStyle(borderWidth, borderColor, 1, true, LineScaleMode.NORMAL);
			graphics.drawRect(0, 0, this.width, this.height);
		}
	}
}
}

Files

 Download source code

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter

MBTA Bus Tracker Widget for OSX

November 24th, 2009

mbta bus tracker icon This is a widget for showing you real-time data about bus arrival times for a chosen stop. Using Next-bus satellite data you can have a very accurate prediction of when your bus is coming.

Currently, the following 5 bus routes are supported

  • 39
  • 111
  • 114
  • 116
  • 117

screenshot of MBTA Bus Tracker Widget

download icon Download Version 1.0

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Tumblr
  • Twitter