Wednesday, March 19, 2008

Taking a Hike - Bukit Timah Nature Preserve

Today I wanted to get a little bit out of the city and commune with nature. I decided to head to Bikut Timah Nature Preserve. It's got the tallest point in Singapore, and a reputation for housing wild monkeys.

Alas, I saw no wild monkeys (just a couple of random critters, see below). But I did get to traipse through the jungle. Man it's loud in there. For the first half of the trip I was alone, and I have to say, it was spooky. If I ever need to shoot a horror film, I'd shoot it in the jungle.

Half way through my hike, I encountered a barrier that had been put up by the park service. Victor, who became my guide for the rest of the trip suggested that we scoot around the barrier and take the cut off path. As he explained, it's a much better path, and besides, it's the one all the locals take.

Victor turned out to be an excellent guide. He told me that he is 71, but man, did he set a killer pace. We should all be so able bodied when we're 71. His secret: lots of exercise, and lots of variety of exercise. Like I mentioned before, the people he are just so dang nice - and Victor was another good example.

The cave photo below is a cave that was used by the Japanese during world war II. There's not much to see inside, but it fit in perfectly with the spookiness I just mentioned.

Tuesday, March 18, 2008

Dinner as Entertainment

Last night we went out to dinner with a group of folks to a Szechuan style restaurant. The food was fantastic (most of the veggie stuff wasn't too spicy, but we still got a flavor for it - the chicken on the other hand, had one of our guests in tears).

One of the highlights of the restaurant is the tea they offer (I think it was called 8 Treasures Tea). It's basically a cup filled with various goodies - flowers, herbs, a chunk of sugar, etc. - and this kid comes around and dramatically fills up your glass with hot water.

The picture below just doesn't do it justice. It's a good time. And apparently, if you were visit China, you'd actually see this being done.

What a fun time.

Sorry if the photo of the duck (which we didn't actually eat) is a bit much. As my brothers can appreciate, we love a good duck head photo. And to me, this shows we were in an authentic restaurant.

Even serving the duck was impressive - first, the meat is carved at the table for you by your waitress. She takes the meat off the duck, wraps it in a little pancake. Then, she disappears with the remains of the duck and comes back a while later, with duck soup. Like I said, this was authentic stuff.

A Walk Through The Orchid Garden

Shira and I had some time last night to make it back to the Botanical Gardens, but this time go into the special orchid garden section. This is actually a paid part of the gardens, I have to admit, I was just a tad bit skeptical about paying to see more flowers.

I was, of course, totally wrong. The garden was more than worth it. Orchids are beautiful flowers, but perhaps more impressively, you can hack them. That is, invent new breeds that have interesting characteristics. So we saw orchids of all different colors, and sizes and even ones with different smells. Most impressive.

Here's a shot of one of our favorites - I'm not even sure how I'd describe this color scheme.

Singapore Vacation - Day 3

Some scenes from day 3 in Singapore. I spent a good portiion of the morning doing a walking tour of the Arab quarter of town.

Within a few square blocks, most of the world's major religions had sites. Seen below: a Hindu temple, Chinese temple and Mosque. Not shown, churches, and yes, a few blocks from where I was, a shul.

It was actually a big treat to stand outside the Chinese and Hindu temples and watch people scurry in and out, these are definitely actively working buildings. The air was thick with incense, which added to the effect.

A spooky, mostly abandoned, Malay cemetery located in the middle of town. The grave markers lack names, but not character.

I came to Singapore pretty much assuming that its reputation for law and order would be the overriding sensation. I was thinking police state. And of course, I was wrong. Yes, it's illegal to jay walk, litter, spit and spray paint graffiti - but I've seen people doing all those activities (well, I saw evidence of the graffiti, not the person doing it). And the police presence is actually pretty light (thanks, most likely to the power of CCTV).

If I had to choose one trait to describe Singapore, it wouldn't be the laws, it would be the people - everyone I've met here has been incredibly nice. I mean, stop and ask me if I need help finding anything nice. Or chat with me about American politics nice. Just really, really nice.

Speaking of religious institutions... I stumbled into this mall type structure with dozens of electronics, computers and cell phone stores. I mean, that's all it had - no Gap or Shoe stores to get in the way. Just geek stuff. And as I walked around, I realized that there wasn't just one floor of this - but 4 more floors. Try as I might, I wasn't able to capture the size of this collection of geek related stores. I settled on a photo showing the escalators on the way up to the stores.

I didn't actually end up buying anything, but I felt I had a responsibility to check out all the levels, just so I could retain my geek status.

Monday, March 17, 2008

More Shots Of The Botanical Gardens

Like I said yesterday, the botanical gardens of Singapore are just beautiful. The phrase that comes to mind the most when walking through the grounds is teeming with life. Here are some photos that try to capture just how beautiful the plants there are.

Of course, they just can't do them justice.

Singapore Vacation - Day 2

Today we made it to both the Botanical Gardens and Fort Canning Park, among other attractions. These two sites aren't particularly close together, but we shleped our way between them none the less.

The gardens were really remarkable, with plenty of exotic plants to gape at. Fort Canning provided a variety of historical subjects, and as well all know, Ben loves to see history when traveling (that trait is courtesy of his Mom).

D'oh, running out of time to write this post - I need to get ready to head out to dinner. I'll finish this up later, or more likely tomorrow.

Sunday, March 16, 2008

Singapore Vacation - Day 1 - Getting An Overview

It's actually Day 2 over here in Singapore - I was so wiped out yesterday that I didn't have a chance to get anything posted. If you're an American, you should be proud to know that I'm blogging not from some cute little authentic cafe, but from good o' McDonalds. According to a Singaporean couple I met on the flight over, McDonalds over here provides free WiFi, and is apparently the standard place to camp out with your computer

We got a real treat for our first day here, and met up with a friend from the states who was here on business. He, along with a friend of his who knows the area exceeding well, took us around. Yes, it was really cool getting the low down on the city from someone who really knows it.

Our first impression of Singapore is that it's a wonderful little city. As promised, it's clean and easily accessible (thanks to English being an official language). It has an impressive skyline and neat neighborhoods (we've only been to China Town, and haven't been to India town or the Muslim area). So far, we are impressed.

Here's a bit of what we did yesterday...

A glimpse of that impressive skyline I mentioned:

Us - just one our classic self portraits from the trip.

Me in front of a gigantic bird sculpture thing. Shira wants to know, does this count as us seeing cultural stuff? Do we really need to go to a museum now?

Us on the river boat cruise:

Ahhh, yes - America has contributed more to Singapore than McDonalds and Starbucks. We've also given them Hooters. I'm sure they're thankful. Actually, in a country where pornography is illegal (but officer, I was just reading the articles!) - this is probably pretty risque. Notice how you can't see my hands in the photo below - I wasn't sure if I should touch the waitresses or not. Yeah, I'm that afraid of girls.

Us outside a Buddhist temple in China town. The inside was magnificent. We also stepped into a Hindu temple as well. Impressive stuff.

I don't usually use the phrase "Bad Ass" to describe Buddhists, but there's just no other way to describe the sculpture at the front of the temple. Forget ADT, put one of these in your lawn and you'll have all the protection you need.

Shira and I noshing on mochi balls (yummy rice balls). They were filled with some expected foods (like peanuts and green tea) and some less expected foods (yam, black sesame). It was all quite tasty. But let's face it, putting powdered sugar on anything makes it taste good.

We had the quintessential Singapore experience - a Singapore Sling at the Raffles Hotel. The best part? You can throw the shells from your peanuts on the ground. In a city where littering is a serious offense, this is exciting stuff.

I know what you're thinking - oh cool, you made it to an aquarium. Not exactly. This was taken at the restaurant we ate at. And this guy isn't for decoration, he's for eat'in. The Chinese food was delicious and authentic. For example, I learned that in a formal Chinese dinner the rice is served at the end. That way, your guests don't fill up on rice and not get to enjoy the meat and fish. So the good stuff is served first, then the rice.

Not yet sure what's on tap for day #2. But I'm sure it's going to be a good time.

Saturday, March 15, 2008

Landed - The Singapore Adventure Begins

Just landed about an hour ago. My flights over here were, for all intents and purposes, were great. All the flights were on time, the meals totally edible (except for one questionable mid morning snack) and my seat mates were really nice. The woman next to me on the 15 1/2 hour trek studies moss for a living and she clued me in to just how cool moss is (surprise). Mom, Dad, thanks again for the sound canceling headphones - man, they are most awesome.

Perhaps most impressively, my new Dell laptop lasted about 6 hours before it finally gave out. That meant 6 hours of work time and I managed to get about 6 hours of sorta-sleep. Like I said, about as good as could be.

I got to the Airport, and as a first task, attempted to take money out of the ATM. That didn't work, which did get me a bit nervous (in strange country, have no money, gulp) - but I found an American Express money exchange place that allowed me to get money out of my account (in theory, for no additional fees). So the first disaster has been averted.

The folks here, at least in the airport, are remarkably nice. The woman apologized sincerely that the ATM wasn't working for me. Could you imagine the woman at the info booth in O'Hare apologizing for pretty much anything?

Photos to come starting tomorrow...

Friday, March 14, 2008

In-Flight Internet Radio Hack

Just finished the short DC to Chicago leg of my adventure. On the plane, I wanted to do a bit of programming. As I started to unpack my computer I realized how disappointed I was that I didn't have some music to go along with my hacking session. I've gotten so used to Pandora, and Internet radio stations that I don't have a collection of music on my laptop that works offline.

But then I remembered a feature I had noticed with the latest version of the free Real Player. Right next to the Play button is a record button. One day I happened to hit it, and it did just what it claimed - it recorded the music stream and saved it my library. Now I have no idea what format it's in or if I could post it on my blog for ya'll to hear - but I figured, that had to be a useful feature. And then promptly forgot about it.

That is, until I was on the flight today, and remembered that test stream I head created. I gave it a listen, and it worked flawelessly.

So here's what I should have done last night, or the nights before - before going to bed, hit the record button on the Real Player and stop it in the morning. After a couple days, I'd have plenty of music that I could then replay, and of course, skip the commercials on.

As soon as I landed in Chicago and got WiFi access I started recording a station, so I'll at least get a few hours of content that I can listen to on the plane. Here's the player in action:

The record feature in Real Player really changed my opinion of their software - it went from another media player that's constantly trying to cram offers, extras and junk in front of me, to a program that was way more useful than I could have imagined.

What do you know, actually useful features are more preferred by users than loud messages? Who knew?

This Trip Is Getting Real

That's the view to my right from my first flight of the day. We're
boarding now, and in a few minutes, we'll be underway.

This trip just became real.

--Ben

The Journey Begins

It's 5:50am and I'm officially on my to Singapore. Of course, my 22
hour journey begins with a 35 minute cab ride, which isn't exactly
exciting. But if I have problems with 35 minutes sitting in a cab, I
don't want to think about 19 hours on a plane.

I double checked, before I got in the cab, I have: passport, wallet,
cell phone, charger, laptop, AC adapater and a handful of mini-sized
candy bars. I figure with those essentials, I'm totally good for any
emergency. Anything else I forgot, I can buy or live without.

I also brought along a Singapore guidebook, so I can plan my trip during
the flight over.

I'll see ya'll on the other side of the globe.

[It should be noted that since I've gotten in the cab, and written this,
in the last 9 minutes, I've realized I left at least 3 items at home
that I neither wish to buy nor live without. Oh well, must soldier on!
And make a better packing list next time, too]

--Ben

Storytelling At Its Best

As I prepare for a 22 hour (not exaggerating, that's what my itinerary says) flight coming up in a few hours, I thought I would grab the latest free podcast from This American Life.

If you've never heard TAL - you're really missing out. It's absolutely fantastic story telling - it really shows how powerful radio can be.

Tonight I was delighted to find their Best Of page, which lists their most popular shows. It's got show descriptions like:

Somewhere in the Arabian Sea. Arguably the funniest hour ever produced about the War on Terror. This show's about life onboard an aircraft carrier fighting the U.S. war in Afghanistan. One woman is risking her life, living in a war zone, to stock vending machines with candy for twelve hours a day.

There's a convenient play button next to each of the descriptions, which provides instant playback of the show - so definitely give it a try.

Unfortunately, I don't have a way to grab them for long journey tomorrow - but still, I'm glad I found them.

I'm a big fan of This American Life, as I find it to be among the best story telling in any medium available. I was delighted to find:

Thursday, March 13, 2008

Ben's Quick Guide To International Plug Adapter Thingies

In almost a matter of hours, I'll be heading to Singapore for a mini vacation adventure. And, whenever I travel internationally, I'm also stuck with the same question - what shape are the outlet receptacles in this foreign landing I'm heading to? After all, I need to plug in my phone, laptop and camera to name just a few items.

With Google at my fingertips you'd think this would be a trivial question to answer. It never is. I can never find quite the right terms to to search for (are these adapters? plugs? converters? Who the heck knows), and I inevitably find a page that looks far from trustworthy.

On our most recent trip to Target I picked up yet another collection of these plug-adapter-converter dealies and noticed that they stated right on them which country they belong to. I figured I should note this information down before I either lose it, or manage to have the labels come off.

So here it is, my guide to international plugs:

  • Big Chunky Tongs, Kid Sized Adapter - Great Brittian, Ireland, Africa, Hong Kong, Singapore
  • Tongs At An Angle - Australia, New Zealand, Fiji, China
  • Round, Tube Shaped Tongs - Europe, Middle East, Africa, Asia, Caribbean
  • Correct, Flat, Straight Tongs - Northern & Central America, Japan, Taiwan, Parts of Caribbean and South America

Don't ask me what to take if you are visiting a country not on the above list. Maybe you should take this as a hint and change your travel plans.

Wednesday, March 12, 2008

Word Of The Day and Advice For Working With Print Designers

Today's word of the day is: Horsey. I was working with some print design folks today, and the word kept coming up. Horsey is used as an adjective to describe a font or another element which is too large or clunky for the page.

Here's a sample usage:

If I am designing a layout to a book or magazine I would use 8 pt if editors/clients would let me. Leaving more room for photos, captions, to breath. I’ve recently been forced to use 12 point type and it looks so horsey to me.

Two other tips for working with print designers:

  1. Depth is what we in the web world refer to as height. So an image that has the depth of 320px has a height of 320px.
  2. A PMS color isn't one that's irritable, it's one that's specified in the Panitone Matching System. Do your best to not giggle when they mention a PMS color, take it from me, it doesn't look all that professional.

Tuesday, March 11, 2008

Review: XS Energy Drink, Electric Lemon Blast

During the tail end of my run tonight, I jogged (at this point it may have been more liked hobbling) by two guys in suits. As I passed, one of them started to chat to me about running.

As I continued to mosy along, he explained he was a distributor of XS Energy drink and they were out drumming up business. He explained that the drinks are of course great for you, have few calories, and no sugar.

After his little pitch, he explained that they were out selling samples for $2.00/each, but because I was out jogging he'd let me try one for free.

Always the trusting type, ready to take candy from strangers, I accepted.

At the end of my run, I checked the bottle and it looked like sane stuff. It was even marked Kosher, so I took that as my sign, and drank up.

The lemon flavor kind of tasted like a sort of unusual ginger ale. It was different tasking, and I have to say, pretty tasty. Though that may have been the endorphins talking.

Seriously, the drink tasted good, and if your into these things, you should give them a try.

The guy gave me his card, so if you want info contact Jamie at optimalchoice@ltdkate.com. Just tell him the runner he was kind enough to offer a free sample to, sent you.

--Ben

A Skype Believer

OK, it's official - I'm a Skype believer. If you offer phone service, you should be terrified of this technology. And by terrified, I mean extremely motivated to do something about it, and not ignore it.

Shira's in a far away land as I type this and I just got done talking with her. Not instant messaging, but actually talking. In the past, I would have busted out the AT&T dialing card, dialed 45 digits, talked to an operator, and if I was lucky, actually get connected to her.

Instead, this time I started up Skype, "dialed her," she answered, and we started talking. As a bonus, we even got to see each other because of the video capability Skype offers.

The service is totally free, and the only equipment it took was a pair of $30 webcams.

I'm not ready to ditch my home service for Skype, but I have to say, for unusual circumstances like this, it can't be beat.

If you're making international calls, trust me, you need to give this a shot.

A Little Light Reading

I've got a big international trip coming up, where I'll be traveling for something like 24 hours straight (lots more to come on this, I'm sure). So, I figured it would be a great time to catch up on a little geek Research And Development reading. I browsed through Lambda-the-Ultimate looking for papers that seemed both interesting and pertinent. Here's what I'm bringing along:

Did I miss any must-read papers?

Embedding an .mp3 file - A Quick Approach

The other day I needed to embed an .flv file on a web page, and luckily stumbled across some easy instructions for doing so. Tonight I had to do the same thing with a .mp3 file.

Unfortunately, my luck didn't hold out. I had to dig around for quite some time before I found a passable solution. What I eventually realized I wanted was a Flash mp3 player, instead of trying to leverage native browser plugins (even though I found this promising article.).

The solution I settled on is outlined in this tutorial. The good news is that it uses the same approach as the .flv player, and just uses a different URL parameter (soundFile).

You can grab the original package here, and while it's a WordPress plugin, all you really need is player.swf from the zip file.

Anyone have any better player suggestions?

Monday, March 10, 2008

Deep Thought Of The Day

From a sign in TR park: "Rocks turn to soil very slowly."

Not some rocks - all rocks.

A friendly reminder that change is non-negotiable.

--Ben

Designing With Theo

I had some application design to do today, and while I don't have access to a room filled with furry orange furniture, or floor to ceiling whiteboards, or even foosball - I do have access to the outdoors. So I took the show on the road.

I went for a jog/talk-through-my-design session on Theodore Roosevelt island. It's only about 1.3 miles around the perimeter, so I did a couple iterations. (Pun intended)

I happen to love TR island, as a DC site. On one hand, it's fairly nature like - with a marsh, and root filled trails. On the other hand, you can always see the city peeking through the vegetation.

You'll be happy to know that the design session was a success and I now have a solid plan what I'm going implement when I get back home. Course, I may need to find a new location to do more design work tomorrow. I know, my job is a tough one.

--Ben

Sunday, March 09, 2008

Putting My Bachelorhood To Use

A couple of hours ago, I dropped Shira off at the airport for a week long business trip. In a very small (thankfully) sense, I'm a bachelor - free!

So, what do in times like these? Fairly frequently, I cook.

I'm not a big fan of cooking, and I'm certainly not good at it. But, there are simply foods Shira won't be talked into cooking/eating with me, and with her on a plane - she's not here to stop me. So, while she is in town I keep an eye out for stuff she finds nothing special, and when she leaves, I leap at the chance to produce it.

Plus, I figure the more times I practice cooking, the better I get. In say another 20 or 30 years, at this rate, I'll be a pro.

I also like making something fair substancial when she goes so I have leftovers to munch on for days.

Tonights creation had all the ideal traits of a "Shira's out of town meal," including: requires lots of chedder cheese, can substitute Morning Star Farms fake meat, involves the oven and the stove , and makes use of a pie plate.

The dish caught my eye when we were making pancakes a while back - it's Superbly Easy Cheeseburger Pie - and was handily printed on the back of the Bisquick box.

The actual cooking experience was non-eventful. More often than not, the house fills with smoke and I'm forced to open every door and window in the house. But tonight, it was almost too easy.

As for how Cheeseburger Pie tastes? Great of course. Add enough cheese to anything, mix in Bisquick, and it's going to taste good. Better yet, you can make it tell me what you think - the recipe is here.

But now I have to figure out what to make next. Any suggestions? Remember, heavy on the cheese...

--Ben

The Trip We Won't Take

I last night I talked to a friend about a trip he just finished - and chances are, it's one we won't ever take. For $389 he bought a USA Rail Pass ticket which gave him unlimited train access across the country for 15 days.

The result? He's made it from NY to LA, stopping in New Orleans and making his way through Texas, all for the price of that single train ticket.

He's seen way more of this country than I have. The trip hasn't been flawless - our train system sucks in a variety of ways. The biggest complaints: the trains run late and infrequently. You'd think there'd be half a dozen trains a day from DC to Charlotte, NC - there's one. Miss it, and your stuck for a day.

But still, he said he got to meet people with incredible stories and got to see landscape he would never had imagined.

The entrepreneur in me even thinks you could make a little business out of selling trips built around this ticket. Imagine developing custom itineraries, where the entire transportation cost is around $400. If you knew the right places to stop, and had the timing right so that you didn't miss trains, it could be a really affordable way to see the country. Hmmm, wonder if bummingaroundamerica.com is free? It would be a sort of micro-travel agency.

Oh, and the reason we won't take this trip is that this specially priced ticket is only available to Non-US residents. D'oh.

At least I got to live vicariously through someone who did get to enjoy this adventure.

--Ben

Chutzpah Of The Day Award

And the winner is: The University Of Pennsylvania.

Not only do they have the chutzpah to charge $30,000/year (that was almost 10 years ago, who knows what it is now) in tuition, but they also ask you for more money as an alumni. Fair enough, I suppose.

But then to send out a "Draft" version of the donation list - with the message "don't see your name on your list, among all your classmates? It's not too late to give!" - well, that's real chutzpah. It's almost bordering on extortion.

Don't get me wrong, I think it's effective. It just takes guts to ask someone for more money when they haven't even finished paying off their school loans.

--Ben (who went to a state school, and is apparently a bit bitter)

Thursday, March 06, 2008

Beta Preview - Interactive Speedtraps and Red Light Camera Database

One of my clients has his site ready to be shared with Family and Friends to get feedback. The way I figure it, if you're reading this blog, you're a friend - so if you're interested you can take a peek.

The site is an interactive Red Light and Speedtrap database. It's set up so that you can not only browse a Google Map to see cameras and traps in your area, but so that you can also contribute. For now, you can even download the database for free and load it onto your GPS.

The philosophy is simple - if we all contribute a few of our most recognized waypoints, we'll build up an especially useful database. It's the Give a few, get thousands approach.

I for one was glad to contribute the intersection at the end of our street as a common speedtrap. It's a genuinely dangerous traffic pattern in the morning, and if more drivers knew about it, it would be a Good Thing.

So go ahead and kick the tires on the site. Please, drop me a line at bugs@ideas2executables.com if you notice anything about the site that doesn't quite work for you.

Thanks!

Embedding an .flv file - A Quick Approach

I needed to embed a .flv file on a site and wasn't quite sure the most straightforward way to do it. Luckily, I found this thread:

I know this has been here for a while but if you are still interested I did this.

At http://www.arronsfootball.co.uk I play flv files using a free flvplayer I found somewhere online, you can get it off me at
http://www.arronsfootball.co.uk/flvplayer.swf,

simply put the following html in your page changing the size and replacing **videlocation** with the location of your flv file.

And sure enough, it was that easy. I grabbed the flvplayer.swf, passed a URL parameter file=...path-to-flv... and autoStart=false and I was done.

Remind me again how we would function without Google?

Google Maps - Getting content to overlay the map

Update: I think there's a better way to do this. See this blog entry.

I wanted to add a "Loading..." message to a Google map app I was working (and will hopefully get to share with you soon). But I found that my attempts to get content to appear over the map didn't work. Assume for a second I had like:

 <script type='text/javascript'>
   function displayMessage(m) {
     // use Prototype style access
     $('message').innerHTML = 'Loading...';
     $('message').style.display = 'block';
   }
   function hideMessage(m) {
     $('message').style.display = 'none'; 
   }
   // JavaScript to setup events so that dislayMessage(...) is called when
   // we are loading
 </script>

When I tried to put the element message over the map, it didn't quite work. I tried:

  • Putting content in the message element as a child of the main map tag. That is:
      <div id='map'>
       <div id='message'></div>
      </div>
    
  • Using the method getContainer on a Google Map object to get a hold of the div tag:
  •   map.getContainer().appendChild(
          ...code to build up message dynamically...);
    
    

What finally did work was nice and simple - absolute positioning of an element, and setting its z-index. So I did:

  <!-- on the page -->
  <div id='map-container'>
   <div id='message'></div>
   <div id='map'></div>
  </div>

  /* in CSS */
  #map-container { position: relative; }
  #map { width: 300px; height: 300px; }
  #message {
    position: absolute;
    top: 0px; left: 0px;
    width: 300px; height: 300px;
    display: none; /* start off hidden */
    z-index: 10; /* make sure message is on top of the map */ 
  }

My First "Real" Executable

A First

Yesterday I sent a customer of mine the very first Windows executable I've produced. I mean honest to goodness .exe - it wasn't a web app, script or Java App. It's what Shira likes to call real software.

I was really impressed how easily PLT Scheme made it to build a completely stand alone executable. I whipped up a quick Makefile with these rules:

MZC = "c:/Program Files/PLT/mzc.exe"
DESKTOP = ~/dt

foo.exe : ui.ss
 $(MZC) --gui-exe foo ui.ss

dist : foo.exe
 $(MZC)  --exe-dir app foo.exe
 rm -f app.zip
 zip -r app.zip app
 rm -rf app deploy
 cp app.zip $(DESKTOP)
 mkdir deploy
 cp app.zip deploy
 rm app.zip

This script not only builds the .exe but packages it up in a zip file so I can send it off easily. I told my client to unzip the file and run the .exe - it worked painlessly.

In the past I've built stand alone Java apps and it was always a pain - for starters, you need to make sure the user has the JVM on their machine. And then you have to deal with the fact that Swing used to be (maybe still is?) soooo slow. And don't even get me started on packing up all the right Jar files and dependencies. (Certainly over the years things have gotten much better, right?)

All I know is that I didn't have to worry about dependencies, and the entire zip file with run time environment was about 4meg.

The Catch

One gotcha that bit me, was that my first attempt to build an application succeeded, but when I ran the app, nothing would happen. Turns out, when you say:

 $(MZC) --gui-exe foo ui.ss

your asking to build foo.exe that will invoke the module in ui.ss. I was thinking Java/C and was expecting to call the foo function on the ui module. But that's not what it does (as clearly stated in the docs) -- it simply runs the module. So instead of:

 (module foo mzscheme
   ...code...
   (define (foo)
     ...code to execute...
    )
  )

I needed to have:

 (module foo mzscheme
   ...code...
   (define (foo)
     ...code to execute...
    )
    ;; Make sure to call our initial function at run time.
    (foo)
  )

I guess now I really can comfortably call myself Ideas2Executables. Whew, that was a close one.

Clinton's Laws Of Politics - Hope vs. Fear

This is just too perfect not to share. Check out this 26 second video - it's Bill Clinton talking about "1 of his laws of politics." Mainly:

If one candidate is trying to scare you, and the other is trying to get you to think; if one candidate is appealing to your fears and the other one is appealing to your hopes - you better vote for the person who wants you to think and hope.

Now watch Hillary's 3am ad:

I think Bill's message makes it pretty clear what you should think of these sort of ads. Talk about Chutzpah on the part of his wife.

Wednesday, March 05, 2008

Advice To Barack

Dear Mr. Barack

Earlier today I read this CNN article, check out this snippet:

"He has to go on the offense," Gergen said. "He's foresworn going after her with negative ads, but he can't be hit around the head and shoulders and not fight back."

Here's my two cents on the matter: don't do it, don't give up fighting the clean, positive fight that you've been fighting (or at least you've been giving me the impression that you're fighting). Starting to hurl muck would just prove that your one of them - you know, a typical Washington politician.

Whatever benefit you gain by sinking to her level won't be worth it. I think the country is paying attention, and at the end of the day, won't be fooled by scummy ads.

Your friend,

Ben

Tuesday, March 04, 2008

Bad News: Global Warming, Good News: You can do something about it

My friend Christian has just relaunched TipBin - it now has green focus. Instead of tips about everything, the tips are focused on things you can do to help the environment.

It's informative stuff, something that couldn't be more important in our day and age. And if you think climate change isn't a problem, Christian also has a blog for you to read. It's not the most uplifting stuff - but then again, it's not mean to be. It's meant to make you appreciate just how serious this issue is.

I also have to chime in here about what Christian has managed to do - in just a few days, he's taken existing tools and re-purposed them to help run his own little environmental movement. Back in the day this would have taken big time and money. One point we should all take away is - the technology is there for us to get our message out (whatever it is), we just need to do it.

Also on the Green front, I've been meaning to mention this article by Teresa. In it, she talks about Thinking Green while cleaning.

Monday, March 03, 2008

More Gimp Goodness

I had some more CSS/HTML layout work to do the other day, which gave me the perfect excuse to write a couple more Gimp / Script-Fu scripts. These are all about being useful for me for specific tasks, rather than being general purpose scripts. Still, if you find them useful (probably more so as examples), by all means, use the code. Here's what I did:

  • utils.scm -Not actually a module, but a bunch of reusable functions I wish I had. For example, (selection-width img) returns back the width of the current selection. The trickiest one I created was (color->string c) which converts the color to an CSS/HTML style hex color. I love that I'm able to write these reusable functions, drop the file in my Gimp scripts, and bam, I have a reusable library.
  • css-info.scm - Creates a CSS Info plug-in. When invoked, it pops up a dialog box with the current selection and color choice in various CSS clauses (such as: background-color: #xxxxxx). I found this useful while working on a layout that called for absolute positioning. I would use the mouse to make a selection, hit a keystroke, and up would pop a dialog box with the info I needed to copy and paste into my CSS file.
  • export-selection.scm - Creates an Export Selection plug-in. You make a selection, invoke this filter, and it will create a new image, that's cropped, flattened and ready to save. This was useful for cutting out chunks of an image for layout purposes.

In general, I'll be publishing my Gimp scripts here.

The Secret To Selling On The Radio

Over the last week, I've heard these same commercials on this radio station, and I'm starting to see a trend. Here's each target market:

  • Acne Medication - they only want sceptics
  • Selling Real Estate Foreclosures - they only want to reach people who's last name start with A through N. They should call today, everyone else should call tomorrow.
  • Selling Involvement In An Internet Business - they want people who have done one thing that's holding them back from being a millionare, decide they really want it
  • Weight Loss - they want people who have failed a diet because, and I'm not making this up, they were hungry. (I shoudl pass on this useful tidbit: it's nearly impossible to diet if your hungry, so it's not your fault that you didn't stick to the diet.)

All of these ads follow the same strategy: they take the entire population of the world (or, a very large part of it), and name it in such a way that its members feel as though they are part of a highly selective group.

I have to wonder, does this really work? Are people that easily fooled -- hmmm, they only want sceptics...wait a second, I'm a sceptic! They're talking to me!? My guess is, it probably does.

Well, at least I've cracked the code and could always fall back on being in radio marketing if this programming thing doesn't work out.

Tool Of The Day: Fiddler

Today I started an i2x project that required me to do a bit of web scraping. I had to make my way through an SSL login and then navigate through a few pages worth, picking up cookies and stuff along the way. I knew this was going to be tricky to script as it wasn't quite obvious what needed to passed around where.

To put it mildly, boy am I lucky I found Fiddler. Fiddler is debugging proxy that sits between your browser and the web and records all the traffic that passes through it. It then allows you to review it and see every last bit of information that's exchanged, so scripting the interaction becomes easier. Or in my case, possible.

While I've used debugging proxies before, Fiddler is by the far the easiest to install, use and seems quite stable. Amazingly, it appears to be a Microsoft product. This has to be among the most useful tools Microsoft has put out since, well, since forever.

Here's how tricky it is to use: download it. Kick off IE. Kick off Fiddler (under your All Programs, among other places). Poof, your done. Your traffic will start getting tracked. You can hit F-12 in Fiddler to toggle whether or not it should pick up traffic.

And Fiddler does more than just allow you track traffic - you can set debug break points, mangle requests/responses and do a whole bunch of other tricks.

How I went this long without having Fiddler in my toolkit is beyond me. It's good stuff.

I should also mention, I'm doing the web scraping in Scheme and found: this article, this recipe and this package all handy in getting me started.

Sunday, March 02, 2008

Gearing Up For The Newest Team Member

Today I attended my first baby shower (well, perhaps my second if my Mom had a shower for me) for one of Shira's cousins. It was the perfect chance to check in and see how the parents-to-be are doing, and get all geared up for the baby.

Mom and Dad To Be seem totally calm, cool and collected. Very impressive. They took the flurry of advice from the parents who were present in good stride. You just know they are going to make great parents.

What can I say, lots of good food, lots of cute stuff, and we can't wait to meet the baby. Also, I just have to ask, why don't adults get wear fleece pajamas with feet? They looks so dang comfy.

Just 10 more weeks, hang in there Julia!

Vista + PHP + MySQL + Apache - Getting All To Play Nice

I had pretty good luck getting Windows Vista more or less setup as a dev server. But I ran into the system crashing when I attempted to use MySQL. This meant that while my dev environment was close to setup, it was still pretty useless.

Tonight I finally got the system tamed. Here's what I had to do:

  • Install just the right versions of PHP and MySQL. I found this bug report immensely helpful. The winning combination turned out to be: PHP = 5.2.4, MySQL = 5.0.45, libmysql.dll = 5.0.45.
  • I had to explicitly grant permission for Everyone on my system to have full access to my PHP ext directory and the libmysql.dll file that I had installed in C:\Windows\System32. This is almost certainly a bad thing. However, just giving everyone on the system Read permissions didn't do the trick - I was still getting the message:
    PHP Warning:  PHP Startup: Unable to load dynamic library
     'c:/tools/php-5.2.5-Win32/ext\\php_mysqli.dll' - Access is denied.\r\n
      in Unknown on line 0
    

With this two items out of the way, life is good again.