Twitter Weekly Updates for 2010-02-07

February 7th, 2010
  • I hooked my Google Reader shared items up to Twitter. Let's see how that goes. #
  • You know Mafia Wars (a Facebook) game is big when the 2nd Google hit for "delivery truck" is a Mafia Wars related link. #
  • Build Failed makes me sad. Build Fixed makes me happy. #
  • On Removing Features: Lukas Mathis: “Eventually, you will find yourself in a position where your application conta… http://bit.ly/ax2RF5 #
  • abc.com is streaming video to Canada now .. is that new? #
  • Added recent tweets to my blog sidebar (http://blog.stevex.net). #
  • Diving into the Flash runtime environment these days. Great doc on loading modules and sub-applications: http://tinyurl.com/c8dsn6 #
  • Added mx.utils.ObjectUtil.toString() output to a list and wondered why no scroll bar. It's one line. String.split('\r') and it's an Array. #
  • Very impressed with WordPress's ability to update itself, and install plugins without having to do it from the command line. #
  • The code coloring on my blog looks terrible in Google Reader. Good thing I subscribe to myself or I'd never have known. #
  • I want a pocket size digital camera with built in GPS for geotagging, HD video, and ISO 6400 or higher. Does such a thing exist? #

Flex Component Showing in Flex Builder

February 4th, 2010

I ran into a problem a few days ago with a Flex component that I was building not showing up in Flash Builder when built using our command-line build, but showing up fine when built by the IDE (Flex Builder).

It took me a bit of searching to figure out what the problem was, which means it’s worth posting the solution here.

Flex Builder’s design view is extensible. New components that you build can show up in the Components panel, and users can drag them onto the design surface. You need to do a few things for this to work.

First, you need a design.xml file in your SWC. This file tells Flex Builder about your component. Here’s an example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<design>
    <namespaces>
        <namespace prefix="myproject" uri="http://www.adobe.com/2009/myproject" />
    </namespaces>
    <categories>
        <category id="myproject" label="myproject" defaultExpand="true" />
    </categories>
    <components>
        <component name="MyImage" namespace="myproject" category="myproject" insertStyle="control" displayName="MyImage">
            <defaultAttribute name="cellName" value=""/>
            <mxmlProperties use="mx:Image">
                <textfield id="cellName" name="Cell Name:"/>
                <combo id="autoInvokeTargetURL" name="Auto Invoke Target URL:"/>
            </mxmlProperties>
        </component>
    </components>
</design>

I had that right in my SWC, but I was missing two things. The ant script that I was using for my command-line build wasn’t including the design.xml file. After adding that, here’s what the ant target for the SWC compile looks like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<target name="build">
    <java jar="${flex.sdk.home}/lib/compc.jar" dir="." fork="true" failonerror="true">
        <jvmarg value="-Xmx512m"/>
        <arg value="-load-config=${flex.sdk.home}/frameworks/flex-config.xml"/>
        <arg value="-compiler.fonts.local-fonts-snapshot=${flex.sdk.home}/frameworks/localFonts.ser"/>
        <arg value="-headless-server=true"/>
        <arg value="-include-file=design.xml,src/design.xml"/>
        <arg value="-source-path=src"/>
        <arg value="-compiler.namespaces.namespace=http://www.adobe.com/2009/myproject,src/manifest.xml"/>
        <arg value="-include-namespaces=http://www.adobe.com/2009/myproject"/>
        <arg value="-compiler.debug=${flex.debug}"/>
        <arg value="-compiler.external-library-path+=${flex.sdk.home}/frameworks/libs/framework.swc"/>
        <arg value="-o=bin/${swc}"/>
    </java>
</target>

Note the include-file line, which gives the name of the file and then the source path to it.

And the other thing that was missing was the namespace mapping. The compiler.namespaces.namespace argument identifies the namespace for the component (which has to match the namespace from the design.xml) and the manifest to use for the classes in that namespace.

The last piece is the manifest file. Here’s what that looks like:

1
2
3
4
<?xml version="1.0"?>
<componentPackage>
    <component id="MyImage" class="org.stevex.myproject.MyImage"/>
</componentPackage>

With all this set up, dropping the SWC into a Flex project’s libs folder will immediately show the MyImage component in the Components panel ready to drag onto the design surface.

Soft Water Soap

February 2nd, 2010

I blogged a while back about soft water, and the slimy feeling that you get from apparently not being able to rinse off soap with soft water.

Let me step back a bit and give you the whole story (and a solution).

A few months ago, we moved into a house just outside the city, which was on well water. We’ve always lived in the city, and I didn’t know anything about hard or soft water. I grew up in Ottawa, where (as I’ve learned) the water is just a little bit hard.

What’s the difference between hard and soft water? Mostly, calcium. Well especially comes right out of the ground without any filtration other than what you’ve got in your house, but even in the city, depending on the water treatment plant you’ve got, you may have more calcium in your water than you want.

There are fancy ways of measuring this but I think the best one is, does stuff build up on your dishes in the dishwasher? Do your nice clear dishes, over time, become cloudy? That’s what happens to other folks around here that don’t have a water softener.

The calcium in the water has some negative effects on the stuff in your house. Soap in general is less effective at cleaning in hard water than soft water, and the calcium builds up on shower heads, in your hot water heater, and anywhere else that water runs through. For these reasons, a water softener is a good idea.

This was all explained to me by a Culligan rep who showed up at my door shortly after we moved in, looking to renew the contract on our water softener. My first response was “Water softener? We don’t need that.. you can come take it out” but she launched into this long explanation of the benefits of soft water, and came back with a testing kit to demonstrate how hard our water was (11 grains hard, which is apparently a lot). So we renewed.

A water softener uses some salt and some chemical trickery to remove the calcium from your water. Lots has been written on this process elsewhere so I won’t go into it here.

But if you’re new to soft water, your first experience with it may be like ours: Hey, why can’t I rinse soap off my hands? You get some Ivory soap on your hands to wash them, you rinse under the tap, and your hands just feel slippery. It’s like the soap isn’t coming off.

The Culligan explanation for this is that it’s because your hands are so clean, it’s actually your skin rubbing against itself. You’ve never been so clean!

A quote from a Culligan dealer’s website:

In soft water the curd never forms so your true skin feels soft and slick like you can’t get the soap off, but the reality is that it HAS been rinsed off and you are just feeling your true skin for the first time perhaps.

And I bought it for a little while, but I was always suspicious. For example, if you get some other sort of greasy substance on your skin, like, well, grease, you can’t rinse that off either. Is the grease also making my skin so clean? And toothpaste?

And, when my skin was slippery this way, I could wipe it off with a towel and it would go back to a normal feeling of clean. Maybe the towel was putting enough dirt back onto my skin that it was undoing the super-clean state that washing in soft water had given it? That didn’t sound right either.

I spent some time googling, and found a chemical explanation of the process of softening water and from there, an explanation of the effect that has on soap that makes a lot more sense.

The sodium or potassium in soft water makes it much more unfavorable for the sodium stearate to give up its sodium ion so that it can form an insoluble compound and get rinsed away. Instead, the stearate clings to the slightly charged surface of your skin. Essentially, soap would rather stick to you than get rinsed away in soft water.

So what can do you do about it?

Use a synthetic soap! The chemistry that gives you this soapy feeling only applies to “soap”.

Soap consists of sodium or potassium salts of fatty acids and is obtained by reacting common oils or fats with a strong alkaline solution (the base, popularly referred to as lye) in a process known as saponification. The fats are hydrolyzed by the base, yielding alkali salts of fatty acids (crude soap) and glycerol.

Synthetic soaps don’t have the same chemical makeup.

Synthetic soaps aren’t labelled “soap” since they aren’t actually soap. If you’re looking for a good soft water soap, look for something labelled something like “beauty bar”.

I use Ivory soap because my skin is sensitive to something in scented soaps, so after making this discovery, I went looking for a synthetic soap that is also free of additives. And I found the Dove Sensitive Skin Beauty Bar.

A side by side test showed a pretty significant difference between showering with Ivory and showering with Dove.

So, if you’re looking for a solution to why your water softener makes your skin seem slippery when you wash it, switch to Dove.

Tablet Thoughts

January 7th, 2010

It seems we’re on the verge of a tablet revolution. CES starts today, and there’s been a lot of buzz about tablet form factor computers.

Apple and Microsoft have dabbled with tablets before. Microsoft with their Pen Computing and Pen Windows, and Apple with the Newton, and really to a lesser extent, the iPhone.

The big question about a tablet is, does anyone really want one? A few years ago, the answer was pretty clearly “no”. But a few things have changed in the last few years that have opened up an opportunity for a tablet form factor computer.

Think about how you use computers at home. If you’re reading my blog then you’ve probably got a laptop. Maybe it’s not your main computer, but you’ve probably got one. And where do you use your laptop? I’m guessing, on the couch.

A lot of computing these days happens on the couch. And what are you doing on the couch? Surfing the web.

Laptop devices are pretty good for this. The keyboard part serves as a base for the screen so you can read without having to hold something. But then again, people have been reading books on the couch for years without much complaint so having to hold something doesn’t seem like a problem as long as the thing you’re holding is light enough.

Tablet PCs to date have been too heavy, and too hot (with whirring fans) to be comfortable to hold for a long time. That’s changed – we can now build tablet PCs that will be light enough and cool enough to treat like a book.

A tablet would be a data consumption device, not a data creation device. It’s an e-reader, maybe a TV guide browser for an updated Apple TV, a recipe finder for the kitchen (where a laptop on the counter is just awkward but a tablet on a stand would be perfect), and a web surfing device for the couch.

Surrounded by Bad UI

December 18th, 2009

I went to the doctor’s office a few days ago to sign up with a new doctor. I was surprised to see the clinic was all Mac based – the nurse was entering our information into a 15″ MacBook Pro and there were iMac’s scattered through the clinic.

But then I saw the software they were using. I don’t know what it was called, but it was some custom-built application that looked like it was designed for clinics. It was Mac software but it was ugly. It looked like the Mac version had been built using one of those cross-platform GUI toolkits that uses native widgets (you can tell I’m writing more Java code these days because I said Widget and not Control) but never really gives you a great experience on any platform.

Today I was in again for some other tests and this time the test equipment was hooked up to a PC running an old version of Windows which was clearly struggling to run the software, and the software was, again, ugly.

Take a look at the software you see the next time you’re making a purchase at a store, arranging finances at a bank, or at your doctor’s office. Chances are not much attention was paid to the user experience of the application.

Last time I was at my bank, the rep I was working with to arrange the mortgage for our house turned his monitor so I could see what he was entering and verify the data, and look at options available. Again, of course, ugly software, but this collaborative data entry experience was actually pretty effective.

This is what companies should be designing for. These days, the old model of the person behind the desk with the computer typing while you read information out loud seems a little silly doesn’t it? It’s error-prone, inefficient, and not very enjoyable, not to mention, open to eavesdroppers.

Why should the clinic care about user experience if the plain UI gets the job done? Because it’s part of the patient’s overall experience interacting with the clinic. There’s just so much room for improvement.

Chrome for Mac

December 14th, 2009

I like Safari. I like the funky home screen, I like its integration with the rest of the Mac experience. I wasn’t planning on using Chrome.

But Safari for me has been unstable. Not hugely unstable – it can go days without crashing or locking up – but it does lock up from time to time.

Meanwhile, I’ve been playing World of Warcraft on and off, and there’s a website with a great guide that I like to keep open. The page is very long, and I have it scrolled to the place I’m currently at in the guide. Every time Safari crashes, I lose my place in the guide.

So, just to keep this guide open, I installed Chrome.

Here are my tweets on the subject:

I have one page open in Safari and it’s using 277mb RAM. I’m going to try Chrome just to see if it uses less RAM.

Launch browser, no pages open: Safari using 183mb, Chrome using 66mb (44mb + 22mb).

Page with some Flash ads on it using 2% CPU in Safari, averaging about 30% CPU in Chrome. Score that one for Safari.

Safari seems to load cnn.com faster than Chrome.

Page scrolling feels much snapper in Safari than Chrome. BTW, I’m using a MacBook Pro 15″ 2.4ghz.

Chrome launches in about 1 second, Safari in about 3.

I’m still planning to use Safari for most of my Mac browsing, but Chrome is a pretty strong contender. And it hasn’t crashed on me yet.

Combating Child Porn Online

November 25th, 2009

The government has tabled a new law aimed at fighting child porn online in Canada. It’s apparently a big problem in Canada, but the new laws don’t really seem to accomplish anything that the existing laws didn’t already accomplish. I mean, if it’s already illegal to rob people, then do you need a new law that says it’s illegal to rob seniors? This seems to be another case like that.

If they want to really fight the problem, here’s how they should do it.

Giant cash rewards.

Offer $10,000 for any tip that leads to an arrest and that specifically leads to a source of the stuff being taken offline.

I’ll bet this would work better than the current laws, and probably end up being cheaper as well.

(All that said, this law doesn’t seem to be all that bad – it’s much better than what the NDP is suggesting, which is making ISPs responsible for all the content that they host. That would be like making Bell Canada responsible for anything illegal you say on the telephone – there’s no way Bell, or the ISPs, could possibly monitor all the data that goes through their systems).

PeakSaver Thermostat

November 16th, 2009

The house we moved into is a bit of an oddball in some ways, and one of them is in the HVAC system. The original house is about 30 years old, and there was an addition built on about 10 years ago.

The utility room in the original house is in a location that makes it impossible to run ducts from there to the addition, so when they built the addition, they added a second furnace and air conditioner.

The thermostat in the main house is a nice programmable unit, but in the addition, it was one of those old style round manual types.

200911162200

I’d been looking at a programmable thermostat for the addition, since it’s mostly my office over there and the potential benefits from having the temperature adjust on a regular schedule would be significant.

There are a few features I like to have on a thermostat. Automatic switching from heating to cooling, for example, and adaptive recovery. Adaptive recovery is where the thermostat learns how long it takes the temperature in the house to adjust, so that when you say you want the temperature to be 72 degrees at 7am, it learns how many minutes before 7am it needs to turn the furnace on to get the temperature to 72 degrees by 7am.

Newer thermostats have touchscreen control; not something I was really looking for, but nice to have.

Ontario has this program going on called PeakSaver, where, in exchange for granting them the ability to raise the temperature by 2 degrees on hot days when the power grid is stressed, they will give you a free thermostat and install it for you. And they’ll throw in a $25 credit.

A thermostat that has these features, like this Honeywell model, is around $149. PeakSaver provides a Honeywell UtilityPRO thermostat, including installation, free.

200911162204

I signed up today and went into Brant County Power’s office to pick up the thermostat. It’ll be installed tomorrow morning.

Curious about how the thermostat communicates with the utility I did a bit of digging. On the case are some patent numbers, and one leads to US Patent Application # 11770615. Of course, being a patent application, the wording is as non-specific as possible. For example:

In some instances, thermostat may receive signals from utility via a communication network. Communication network may include wireless communication between utility and thermostat, using radio frequencies and the like. In some cases, communication network may represent a hard-wired communication network between utility and thermostat, such as copper wiring, coaxial cable, CAT 5 cable, fiber optics, and the like.

Looking at the back inside of the unit, a small wire antenna is visible. This rules out communications over the power line.

A bit more digging and I found this press release from Honeywell noting that they had added ZigBee support to the UtilityPRO thermostats (via a module – the thermostat looks like the communications system may be modular). Another page notes that “this allows utilities to further leverage their investment in the smart grid versus having to establish third-party paging networks, which are traditionally used for demand response programs”.

ZigBee might make sense if I had a smart meter, but I don’t. Brant County Power isn’t rolling out smart meters until May 2010.
So here’s my take: The UtilityPRO thermostat has a modular communications system, and the communications system they’re using in Ontario is based on the pager network. The device can’t transmit; it can only receive signals, so THE MAN isn’t watching what you set your termperature to.

200911162203 A lot of people I’ve talked to are very leery of, or dead against, having this thermostat installed, because they don’t want the government controlling their air conditioning. This just doesn’t bother me. Yes, it’s true the power company could ask the thermostat to raise the temperature in my house by 2 degrees on very hot days. They’re not going to do this until they’re on the verge of rolling blackouts, because it costs them money to reduce power consumption. And even if they do it, two degrees is not that big a deal.

In exchange for what you’re giving up, you get not just the cool thermostat, but a service that I’m sure in any other circumstance you’d be paying for: Internet access to programming the thermostat.

You can bring up a web browser, log in to the site the power company gives you, and set up your thermostat. The settings get sent to the thermostat through the pager network. And you can do this from anywhere. Out of town and forgot to set the thermostat to save energy? You can do it from wherever you are.

This thermostat also allows them to send short messages (like SMS) to your thermostat with information like how much power you’ve used this month, upcoming weather events, or more likely in the future, ads.

200911162222

The PeakSaver program launched with some much less interesting hardware: A box that attaches directly to the power line to the air conditioner, originally, then a basic ExpressStat thermometer, and now this one. Seems to me the utilities are trying to overcome public resistance to the program by sweetening the deal. And it worked on me.

Codename Proliferation

November 15th, 2009

Llano, Bobcat, Bulldozer, Clarkdale, Arrandale, Sandy Bridge, Phenom II, Fusion, Leo, Dorado, Thuban, Dragon, Pisces, Kodiak, Scorpius, Zambezi, Lynx, Velocity, Conroe, Tigris, Caspian, Danube, Champlain, Sabine, Concensus, Huron, Nile, Ontario, Brazos, Geneva, Maranello, Magny-Cours, San Marino, Lisbon, Adelaide, Interlagos, Valencia.

That’s a pretty good crop, for just one article.

Windows 7 Taskbar Notifications

November 13th, 2009

With Windows XP and Vista, when an application wanted to attract your attention, it would flash its window in the task bar. When it stopped flashing, it would stay a fairly obvious orange colour.

200911130946
Windows 7 uses a different mechanism, and one I find far too subtle.

200911130954
Looking at this, you’re probably thinking “hey it’s obvious, the orange one wants your attention”. And it does seem that way, but for some reason I find myself, with Windows 7, missing IM notifications and not responding to messages until hours later, because I just didn’t notice that I had a new message.

Maybe it’s because of all the additional noise in the taskbar – it’s harder to tell at a glance that an app wants your attention, so I don’t pick it up “out of the corner of my eye” the way I would with the XP style.

The Mac continues to animate icons that want your attention until you give in and click on it. Windows animates the icon for a few seconds and then settles on the orange look. One solution would be to change Windows 7 so that the animation continues until you respond.