Thursday, April 29, 2010

Review: Playing The Enemy

Playing The Enemy, tracks South Africa's history from Mandela going to prison, through his release, election and finally the pivotal 1995 Rugby World Cup game. The thesis of the book is simple: the world cup experience helped to unite South Africa, which was more or less on the brink of civil war.

I found myself being blown away by pretty much every aspect of the story. I suppose I could grasp the concept of Apartheid - nations have a nasty way of discriminating against their native populations . But, to think this could be going on just a few years ago? More amazing than the existence of Apartheid, was the way it unraveled. It seems like it should have gone down in blood and flames. Instead, the top players in the government worked with their political prisoners to find a peaceful solution. Wow.

And then there's Mandela - he comes off as the master strategist that manages to pull it all off. His primary weapon: respect for the other side. At every opportunity, he demonstrates respect to blacks and whites -- forgiving those by all measure who don't deserve it.

I can imagine people calling him weak for working with the "enemy" -- but he kept his eye on the big picture, and the strategy worked.

How could I have been so ignorant of all these events? They effectively happened in my adult lifetime.

All in all, the book is excellent and the broad interviews involved give it a comprehensive feel. My only criticism is that it comes off too much as a fairy tale -- but perhaps it really was that sweet?

In the introduction of the book, the author makes mention that one small of the text is to serve as a kind of self-help book. And in a very real way, I think he manages to do this. He shows that what appears to be an impossible conflict can, in fact, be resolved. It takes respect, forgiveness and a willingness to look towards the future.

Even if the book isn't perfect, it's a must read -- the history and lessons are too valuable to be lost. I give it a 9/10 for being comprehensive and eye-opening.

Wednesday, April 28, 2010

34 Reasons To Be Happy

34 reasons to be happy today...

  • 1. I'm married to the most amazing woman
  • 2. I've got the most amazing child in my life
  • 3. I've got supportive and loving family and friends
  • 4. The roof doesn't leak.
  • 5. The washing machine may be broken, but the repair guy is coming tomorrow
  • 6. I love the work I do
  • 7. My business lets me interact with terrific clients
  • 8. I get to learn new things every day
  • 9. We've got both ice cream and whipped cream in the house, and their only a short walk away throughout the day
  • 10. I've got two functioning cars which are fun to drive
  • 11. All 5 of my senses are in tip top shape
  • 12. I'm able walk, run and hike
  • 13. I've got the beat
  • 14. I belong to the warmest and friendliest shul on the planet
  • 15. I live in the best country in the world, and enjoy the most amazing freedoms
  • 16. I get to work in my PJs
  • 17. My brother just saved the day and picked up our (read: Shira's) dry cleaning on my behalf.
  • 18. I get to live in the age where information on any topic is only a few seconds away
  • 19. I get to create
  • 20. I'm still married to the most amazing woman
  • 21. I've got stuff to smile about
  • 22. I woke up this morning, and am on track to go to bed tonight
  • 23. I'm pain free
  • 24. I've got people pulling for me
  • 25. I'm well fed
  • 26. I just figured out how Joomla 1.5 URLs work
  • 27. I've got a Mom and Mom-in-Law who can Skype
  • 28. I don't have money worries (Money? That's the stuff I ask Shira for...)
  • 29. I've got all the stuff I need, and then some
  • 30. I get to go on adventures, both big and small
  • 31. I get to blog
  • 32. I have both Real and Facebook Friends
  • 33. I've got a Mom who endured schleping me around for 9 months, and then labor, and then survived my growing up (Dad helped with that last one).
  • 34. I'm alive, and successfully made it through another year on this Earth

Blogger Widget of The Day: LinkWithin

As you can see from this posts, and the others on my blog, I'm giving LinkWithin a try. This free widget automatically generates related posts, and helps drive people further into your blog.

So far, I think I like it.

What I'm really impressed with, though, is how seamlessly they've integrated the install process with Blogger. I didn't have to copy and paste any code -- I just followed the clear cut instructions they provided.

If you're interested in developing a widget for Blogger, these guys are an excellent one to study.

Tuesday, April 27, 2010

Speeding Up Windows Login Time - Delayed Startup

These days, my Windows laptops boot relatively fast. The problem I run into more so is that once I enter in my username/password (or scan my finger print), the user login time is painfully slow. Not only does Windows need to do its magic to log me in, but what appears to be dozens of programs fight to start up: Skype, Trillian, Google Talk, etc.

The result is that for the first few minutes after logging in, the laptop is totally swamped and unusable. This would be find if I wanted to startup my laptop and go get a cup of tea. But, if I actually want to start working -- well, that's another story altogether. It's a painful problem that Windows has had for years, and I don't see any sort of fix in place in Windows 7.

In the past, I've used msconfig to disable programs at startup. And this can help. But, the reality is, it's nice to have all these applications startup without me having to explicitly do so.

Thinking this through (I certainly had enough time on my last reboot/login), it occurred to me: why the heck is Windows trying to start up all these applications at the same time when I log in? I mean, do I really need Skype started at login time? What if it kicked off 3 minutes after login. Or what if Google Talk started up 30 minutes after I was logged in.

If I had this delayed ability, I wouldn't be forced to choose between a fast login time, and having to remember to start up apps.

Alas, Windows doesn't offer this functionality (as far as I can tell). But of course, others have already thought about this concept and there are a number of solutions out there.

The one I'm currently experimenting with is: Startup Delayer. It does just what the name suggests, and allows you to schedule the start up of apps.

Startup Delayer is nice and simple, which I like. Beyond that, I don't have an opinion yet about whether it's the ideal solution.

I'm baffled as to why Windows hasn't built in this functionality yet. It seems to me like it would be relatively easy to do, and could make their login process significantly more manageable. Who knows, not being a Windows person, perhaps there's a good reason they've avoided offering this capability.

Update: This morning I had my first reboot since I installed Startup Delayer. Wow, am I impressed. I was able to get right in and start working, and Startup Delayer gave me a little status window to let me know what was scheduled to start next. Slick stuff.

Subversion Quickies

After using Subversion for a couple years now, I still don't feel like I leverage all its capabilities. I'm basically using it as a glorified version of CVS, which was a glorified version of RCS...

Here are some commands I keep coming back to over and over again now and make me feel like I'm actually getting some benefit from Subversion:

svn revert foo.php
svn revert throws out local changes, in this case to foo.php. Useful if you accidentally add foo.php and then want to not commit it.

svn merge -c -r REVISION
svn merge provides an easy way to rollback your changes a single version. Useful if you committed a file incorrectly.

svn copy http://svn.server.com/src/trunk http://svn.server.com/src/branches/foo-pre-bar-feature
Using svn copy it's trivial to take a snapshot of the current source code tree and store it in a subdirectory (in this case, branches). Because no files are actually copied, making these snapshots costs nothing.

Friday, April 23, 2010

Some Friday Entertainment: Picking On Java

JRM kicked off a good old fashion Java bashing session on his blog and the comments are a hoot.

If you're a fan of Java, you could always stop by and try to stick up for it. Or, you can head on over and heap your favorite criticism on it. I think my favorite complaint was captured there:

I think the problem with Java is not it's verbosity, but as someone else said "infrastructure framework". I have to go through so many classes, through so much leaps and bounds, to do anything.

I need a factory, to create a manager. Then I factor anther factory, to create a stream, then assign that stream to the manager. Afterwords, I give the manager to a dispatcher.

I think the answers to this is to embrace the IDE more, and let it hide all the cruft. Though I do like contributor who suggested maybe JRM just needs to learn to "type faster."

Seriously, it's a fun post.

More Questions About Women I Can't Answer

The other day Shira told me about this article she saw on CNN: Top 10 Paying Jobs For Women. Included was both Software Engineer and Programmer (please don't ask me to explain the difference, because I'm at a loss).

We marveled that say, unlike physicians, female programmers are actually paid pretty much what male programmers earn.

And then I had a thought - in my last 10+ years of programming, I have never, not once that I can think of, worked with a female senior level programmer. I've worked with plenty of talented women, but I can't think of a single case where she was a programming peer.

This got me wondering...

How come I've never had this thought before?

When I was a hiring manager, should I have diversified my team by trying to hire a woman?

Would a female programmer work / problem solve differently than male ones?

Seriously, this is blowing my mind. Here I thought I was working in a wonderfully progressive field, and I've essentially been in an all-boys club.

Huh.

Artist Of The Day: ATB

Today I've been getting lost in the music of ATB (or as his parents probably call him, André). If you listen to Electronic music, you definitely know about this guy (and I'm coming across as being very late to the party). But if you don't usually listen to trance/electronica, you should give it a try. It won't bite.

Here's a few of his hits that initially caught my attention.

And when you're ready to hear even more of his stuff, check out this playlist of his official videos.

What do you think? Cool, right?

Android App: Crows Flight - Almost the GPS I'm Looking For

To this day, I'm amazed at all the functionality my G1 offers - it's a phone, camera, video recorder, sound recorder, GPS, Internet Portal, flashlight and probably half a dozen other things. And it does many of these things quite well.

One device that I keep feeling it should be able to replace is my Garmin Geko - the low cost, lower power GPS I like to carry while traveling. The Geko is drop dead simple. Two common features I use is toleave waypoints (or manually enter them), and then "navigate back to them" - which is little more than a pointer in the direction of the waypoint and a distance measurement. This simple functionality works great for when I'm exploring a new city. I can drop a waypoint at the hotel or bus stop, and know that no matter what, I can make my way back there.

The G1's mapping is top notch, the turn-by-turn navigation is nothing short of amazing. But, take away the data connection, and work in terms of arbitrary waypoints - not addresses - and the built in mapping software is pretty much useless.

I've tried looking around for other simple GPS apps and haven't had much luck. Until now, I think I've found my Geko replacement. crowsFlight is a simple app to record and navigate you back to waypoints. While it uses a data connection for geocoding addresses, it doesn't seem to require it. And most importantly, there's a Save Current Location option.

I like that it saves past waypoints, and allows you to easily switch between them. Functionality wise, it's dead on.

Alas, the software isn't perfect. The UI doesn't switch automatically into landscape mode when I slide out the keyboard, which means that text input has to be done onscreen. And the choice of fonts make it hard to read the list of destinations. I've also gotten funky readings from the GPS and compass - though I think that has more to do the with G1 itself and not crowsFlight.

All in all, I've been on the lookout for a really simple GPS app for some time and it looks like I finally found one that has just the right number of features. Check it out, and next time you leave your car in the Wal-Mart parking lot, drop a waypoint, and see just how useful this little app can be.

Wednesday, April 21, 2010

3 New Google App Surprises

I just how I log into Google Apps and new goodies show up on a regular basis. Here are my latest three favorites:

  • Google Drawings - Bam! And just like that, Google now offers a simple drawing program from within Docs. Like Google Docs and Spreadsheets, it's mostly basic functionality. But, of course it's collaborative. Which means you can use it as an interactive whiteboard. There are other online whiteboard apps out there, but if you're already using Google Apps, this one is going to be easier to access.
  • Google Apps Script - Bam! And just like that, Google now offers a powerful way to add functionality that doesn't currently exist in the apps. A while back I saw this Google Apps Mail Merge setup and didn't know what to make of it. Now I get that they've given developers a way to create plugins. I haven't had a chance to look at this from a programmer's perspective, but this seems like it could be incredibly useful.
  • Enhanced Spreadsheet UI - Google Spreadsheets has gotten a usability face lift. Items like auto-complete of cell text and dragging and dropping have been added. My favorite feature, though, is that you can directly link to a sheet within a spreadsheet by taking the URL that Google provides you with, and adding &gid=XX where XX the sheet number. Mix this with short links, and you can now have URLs that take users right to the sheet you wanted them to see.

I've always thought it was clever how Google just let features more or less leak out. It's quite possible that the above features have been around for weeks or months. By doing so, there's just a sense of continual innovation going on.

A Corollary To My Wish List Philosophy

I love wish lists. When it comes to gift giving, I think they are essential. Everybody wins - the giver knows what you're interested in and you can give them something they want, the receiver doesn't have to go out and by everything they want, they can just queue it up for others.

But, as my Mother-in-Law found out last time she bought me some items off my wish list, they aren't perfect. I had accidentally forgotten to remove a book from the list which she bought for me. It was an excellent book - just one I didn't need.

Also, over time wishlist had grown to be about 500 items. This was good because it meant that folks could buy something off it and still surprise me. But, it also meant that there was stuff on there I was no longer that eager to have as a gift.

The solution, was as my Mother-in-Law put it, to do a purge.

And so that's what I did and will now include in my Wish List Importance soapbox speech. Specifically, I:

  • Create a new private wishlist named Scratchpad
  • Went to my overflowing wishlist, and selected Compact view which shows 100 items per page
  • I then went Shopping on my list, and tried to find about 10 items per page that I really wanted and would be super excited to get
  • I checked these items off and then moved them to my Scratchpad list
  • When the Scratchpad was perfect, I renamed the current Wishlist to be Wishlist Retired - 4/21/2010 and marked it as private. And then moved the scratched to my new public Wishlist

The shopping step was of course tricky to do, because I genuinely liked what was on my wishlist. But having it be so large wasn't doing anyone any good.

I thought about making up sub-wishlists. A books one, a tools one, etc. But in the end, I like the idea that folks can browse through my wishlist and see all kinds of things. Also, I like to be able to add items to the wishlist in a hurry, and having one accomplishes this.

I figure, if I do a purge once a year, I should have a lean and mean list.

To finish off the whole process, I updated the Wishlist link in the sidebar of the blog, so folks can actually find it.

Tuesday, April 20, 2010

Baby Gear That Works

For some time, I've been meaning to blog about different baby products we've used and been especially impressed with. See, I have to admit, I was a bit skeptical about why on Earth you'd need all these toys and do-dads. The answer, I would get, over and over, is that they make life happier for parent and child alike*.

Rather than trying to keep a list updated here, I figured I'd just create one on Amazon. That way, they can manage the photos and prices for the products.

So here it is: Baby Gear That Works.

What would you add to it?

*That's not to say that every item Babies R Us wants to sell you is worth of being bought. And, more importantly, between friends, Craiglist, and other creative ways you can probably get a good chunk of your baby gear either really cheap or free.

Sunday, April 18, 2010

The Beach All To Ourselves

We took a mini-vacation this weekend to AC, and surprisingly, the weather was good. So good, in fact, I was able to take our little one to the beach without fear of getting frostbite.

His first impression of the Atlantic Ocean was complete awe. He was just mezmorized by the waves rolling in. The sand had a similar effect - he sat there motionless, not quite sure what to make of this unfamiliar surface.

When he finally warmed to the idea of sand, he immediately did what you'd expect he would: attempted to consume a handful. Yum.

It really was a lot of fun, and an amazing treat getting to watch our little guy try some new experiences.

Saturday, April 17, 2010

Moby Scheme - The Funnest Way To Develop Android Apps

Grant mentioned that there was a new release of Moby - the platform that allows you to develop Android apps in a Scheme - available. When I last played with Moby, I was impressed - and now I'm even more so.

Trying It Out

Writing Android apps in Moby couldn't be easier. Despite what the docs imply, you don't need to use GIT, or run the compile from the command line. You just write your source code in DrScheme and hit Run, and all the work is done magically for you.

Here's a trivial Hello World app:

#lang planet dyoo/moby:2:34
;; The above line will automatically setup the moby environment
;; downloading everything you need.

;; Moby uses the World (http://world.cs.brown.edu/) style programming
;; model. This will define our state.
(define-struct world (font-size color-index))

(define colors '("#FF0000" "#FFFF00" "#FFFFFF" "#00FFFF" "#0000FF"))

(define (pick-color index)
  (list-ref colors (modulo index (length colors))))

;; This function will be invoked to draw our UI,
;; which is just an HTML document.
(define (draw w)
  (list (js-div '(("id" "main")))
        (list (js-text "Hello World"))))

;; This will be invoked to style the HTML document above.
;; Notice how we use the state of the world to decide
;; what our style should be.
(define (draw-css w)
  `(("main" ("background-color" ,(pick-color (world-color-index w)))
            ("font-size" ,(format "~apx" (world-font-size w))))))

;; This functions is invoked as the application proceeds in time.
;; we use it to increase our font size.
(define (tick w)
  (make-world (modulo (add1 (world-font-size w)) 36)
              (world-color-index w)))
  
;; This function will update our world to use the next color index.
;; This data is used during the styling of the document.
(define (next-color w)
  (make-world (world-font-size w)
              (add1 (world-color-index w))))

;; Kick the program off, telling the system to use the callbacks above.
;; Our basic behavior:
;;  (1) every half-second, increase the font-size by 1 pixel
;;  (2) when the device is shaken, change the background color in use
(js-big-bang (make-world 0 0)
             (on-draw draw draw-css)
             (on-tick .5 tick)
             (on-shake next-color))

The first time you run this program, there's a significant delay, as the Moby framework is downloaded from Planet Repository. You're then taken to a screen where you can run your app in a web browser, download a JavaScript version of the app, or an Android version (.apk).

After getting the functionality right in the browser, I downloaded the .apk. I also downloaded the latest SDK from Android, and then ran the following commands:

  adb get-serialno     -- confirm that the android phone is detected
  adb install moby-play-debug.apk -- install the app

And that's it! The app was found on my main menu, and I ran it. There was a long delay between starting up the app, and having it run, but it does work. Even the shake functionality works as expected.

Impressions

I'll start with the cons: you're programming in the Advanced Student Language, which can feel limiting; and there's no sane error messages when testing your apps; and the workflow between writing code and deploying it to the your phone seems clumsy and slow. But with all that said, on the plus side, this is tremendously fun!

I mean seriously, I hammered out this little app in just a few minutes - and creating other apps that more functional should be just as easy. I love the World style of programming, as it gives you both modularity and simplicity. Even programming in Advanced Student Language is kind of fun, as you're forced to break down your apps in a more modular way.

The bottom line: Moby isn't ready yet for production apps, but it is ready for those who want an easy way to program their Android phone. As a tool for eduction, and getting folks excited about programming, it seems like a home run. I sure hope it continues to evolve, I think it has huge potential.

Thursday, April 15, 2010

Political Views Tests -- For Good or Evil?

I came across this somewhat spooky resume guide for getting hired as a Republican Staffer. (I assume the Democrats have a similar one out.)

The part that struck me the most was the small boxes where you need to summarize your positions on the following:

  • Abortion:
  • Gun control:
  • The federal budget deficit:
  • The federal role in education:
  • The best stimulus for the economy:
  • President Bush’s best domestic policy initiative:
  • President Bush’s worst domestic policy initiative:

<joke> - I assume there's no mention of Obama's worst polices, as there wouldn't be enough space on the page to fill them in. - <joke>

I'm proud to say that I do believe I know the Correct Answers to all these questions.

The cynic in me looks at this list and thinks - Aha! They're obviously using it to weed out folks who don't 100% agree with them. This of course, means you're only hiring people you agree with and end up creating an echo chamber where new ideas don't stand a chance.

But the optimist in me looks at this and thinks - Cool, they can quickly find folks who share some, but not all opinions. This means that they'll fit in with the staff, but also provide a fresh perspective where possible.

Which do you think?

Me, I like being an optimist.

Team Building Through RSS

The other day, I was browsing through an old Linux Journal and learned about Planet - an RSS aggregator. Planet works by slurping in RSS feeds, and spitting out what appears to be a single blog.

I've actually been using their software for quite some time - as it's what one of the main Scheme Blogs runs to provide a community weblog.

As I was thinking about uses for this software, it occurred to me that it would actually make for an interesting team building tool. If I had an organization larger than myself and my wife, I'd probably be taking the following concept to my supervisor:

Why don't we have everyone in the organization, from CEO to unpaid-intern, submit a single RSS feed that they find valuable. We can then host a single internal corporate blog using Planet.

Benefits of this little project?

  1. You get insight into folks personalities by what they choose
  2. You help to create a cross-pollination environment where people learn about other's jobs in the organization. This could foster respect and spark new ideas.
  3. It would force everyone in the organization to finally learn about RSS and get into this blog thing

This last point may not be such a big deal these days, but even a couple years ago, I was running across executives who didn't grasp the RSS/Blog world.

Come to think of it, there are probably lots of uses for an aggregator like this. Hmm....

Update: You should also check out Twittertim.es. It not only does aggregation on the fly, but attempts to determine your best feeds by looking at who you follow on twitter. It's slick stuff.

Tuesday, April 13, 2010

Instant Favicons - FavIcon Generator

Adding a Favicons are an excellent way to make your site look more polished. But, I've found making them to be a pain.

You can create them using The Gimp, or another image editing tool, but I always forget the rules behind the required format.

Favicons are small enough that you'd think just creating them by hand would be a reasonable solution. However, whenever I do this, I end up with a jagged mess of pixels.

The best solution I've found? Take a mostly square image (it can be any size, any format) and feed it into the FavIcon Generator.

More often then not, a clean, yet miniaturized version of the image is produced and you've got your Favicon. No format worries. Just drop it in place, and you're good to go.

Monday, April 12, 2010

Passover Notes - 2010 Edition

Continuing in the fine tradition, here are the notes I accumulated during Passover, 2010.

Hardware To Buy

  • Mugs -- it's time to graduate from only having a few in the house
  • A Sugar Bowl -- it's also time to get civilized and offer folks sugar from a proper container, rather than out of the 5lb bag
  • Wine Glasses -- we did perfectly with these!
  • A pitcher -- the pitcher we picked up at Homegoods worked great. So great, in fact, we kept it for all year. So, it's time to buy a new one.
  • Cookie sheets - make sure we have 4 new ones, we don't want to miss out on Shira's super Passover Cookies!
  • A Wooden Spoon - David says every kitchen needs one. I don't have any good reason to argue.
  • Potato Masher - it may be time to invest in a potato masher. Maybe. Let's not go too crazy.

Food Thoughts

  • The ice-cream bars were awesome - both the vanilla and chocolate yogurt. Pretty much, anything cold and dipped in chocolate is going to taste good.
  • Plain yogurt was a winner, you can skip the previous year's comment about getting vanilla
  • Buy 3 pkgs of hots dogs, not 2. Let Ben try using 1 package to make his soon-to-be-patented Passover Style Corn Dogs (which is going to be hotdogs, dipped in eggs or honey, and then rolled in matzo meal. It won't work, but it'll be fun to try.)
  • Syrup - how on Earth could we forget the syrup? It almost wasn't Passover without properly made mazto meal pancakes.
  • Hard to believe, but 4 large bottles of Manischewitz concord grape were correct.
  • I think we bought 7 dozen eggs per our last year's instructions. Again, amazingly, this number was correct.
  • 5 Boxes of Matzo was perfect.
  • Big jar of herring was perfect.
  • Green olives were a big hit.

Seder Chatter

When I get a few minutes, I'll write up my notes about questions/comments we had at the seder

A Scheme Copy-and-Paste Hack

The other day I was hacking away, using DrScheme as a scratchpad and a Google Spreadsheet to visualize data.

After way too many rows of data entry, it hit me - I can trivially automate copying values from DrScheme to a Google Spreadsheet. PLT-Scheme gives you access to a clipboard object that you can simply call set-clipboard-string. Using this method, I was able to write a Scheme function that injected data into the system clipboard, which I could then paste into my spreadsheet.

To smooth things out a bit, I wrote a function which takes in lists of lists, and converts them to tab-and-newline-delimited strings, that Google knows how to parse into cells.

The result is that I can now type:

;; ctc is an alias for copy-to-clipboard
(ctc '((Name Rank Serial-Number)
       (Ben Private 123) (Shira General 456)))

and then hit Control-V to get:

Of course, if Ireally wanted to push data to a Google Spreadsheet, there are much cleaner ways to do it. But, this copy and paste hack gave me just the solution I needed.

It's also worth mentioning that I do this sort of thing all the time from the command line. There's a standard Windows command, C:\Windows\System32\clip.exe that allows you to send content to the clipboard via the shell. (In cygwin, I can do: cat /etc/passwd | tr a-z A-Z | clip).

Though, in this case, I was already poking around DrScheme so a it made more scheme to develop a PLT specific solution.

Here's the code:

#lang scheme
(require scheme/gui ; used to get the-clipboard variable
         srfi/26    ; for cut
         )
;;
;; The clipboard functions choke on null strings. So I replace
;; them with this character. Most of the time, you won't need
;; to worry about this
;;
(define null-character-replacement (make-parameter "$"))


(define as-string (cut format "~a" <>))

;;
;; gridify: take in a list of lists and turn it into a tab/newline
;; delimited string, ready to be copied and pasted into a spreadsheet.
;; Also handles the case where the data isn't a lists of lists.
;;
(define (gridify any)
  (if (list? any)
      (string-join (map (compose as-string
                                 (lambda (row)
                                   (if (list? row)
                                       (string-join (map as-string row) "\t")
                                       row)))                                 
                        any) "\n")
      (as-string any)))

;;
;; Copy any content to the clipboard as a string. Note: we call (gridify any)
;; to make the data more clipboard friendly
;;
;; As a convenience, return the data sent in. Useful to allow calling
;; this function in a debugging context.
;;
(define (copy-to-clipboard any)
  (let ([scrubbed (regexp-replace* "[\0]" 
                                   (gridify any) 
                                   (null-character-replacement))])
    (send the-clipboard set-clipboard-string scrubbed 0)
    any))

;;
;; provide a compact alias for (copy-to-clipboard ...)
;;
(define ctc copy-to-clipboard)

(provide/contract
 [copy-to-clipboard (any/c . -> . any/c)]
 [ctc (any/c . -> . any/c)])

Friday, April 09, 2010

Mind Hack: Walking Meditation

One of my clients has a really novel tip on her Coaching Blog:

You’ve probably heard that meditation is a very effective way to invite peace and relaxation into your world. It’s a method of quieting the mind and calming the “vibe” you unconsciously send to others. Some people think that meditation is something that can only be achieved by the Spiritually Enlightened, or that you must be alone, in the dark, repeating the sound “Ommm…” to meditate.

In fact, you can enjoy the benefits of this ancient practice by doing what is known as “active” or “walking” meditation. This can be accomplished at any time of day, no matter where you are.

The post outlines a technique you can use to mix walking and meditation.

It's a clever idea, and one I've got to try.

Actually, if you've got stress (and who doesn't?), you should definitely check her blog out. I find her content so uplifting and educational.

Thursday, April 08, 2010

WD 40 as Sleep Aid

Here's use 2001 for WD 40:

  1. Spray WD 40 on squeeky door hinges
  2. Watch as your sleeping child no longer wakes up when you transfer them from one room to another

Even I was impressed how a couple of squirts of WD 40 took care of the racket -- of course, that's exactly what it's for. But still, I was impressed and I couldn't feel more like a man if I tried.

Now, I've got this role of duct tape...what I can put that to use for...

Gotcha Of The Day: Running IE8, IE7 and IE6 At the Same Time

Running IE8 is trivial - just go to Microsoft and download it.

Running IE6 turns out to be fairly straightforward too. Windows 7 comes ready to run a virtual Windows XP box, and preinstalled is IE6 (how generous of them to give you an ancient browser when you install their ancient OS).

Running IE7 eluded me, but I figured I had my bases covered between IE8 and IE6. Of course, I was wrong. I just recently did a client install, and you guessed it, the site wasn't working properly in IE 7.

A Super Quick Fix - Simulating IE7 from IE8

IE8 has a remarkably sophisticated debugging mode. It's available by pressing F12. One feature it offers is the ability to switch browser modes. You can choose from IE7, IE8 and IE8 Compatibility mode. While these aren't exactly extensive options, they appeared to be just what I needed.


Alas, as you can imagine, the issue I was trying to debug didn't show up using this mode.

A Slow Fix - Creating an IE7 Windows XP Instance


A much better solution was to go ahead and create a news Windows XP instance, and in that virtual machine, upgrade to IE7. The result would be the native operating system runs IE8, the original Windows XP virtual machine running IE6, and a new instance running IE7.

This solution is a little bit tricky, as it's not trivial as to how to create a clone of the Windows XP instance on Windows 7. Luckily, Duncan Smart's Weblog perfectly explains the process. Just follow along, and you'll end up with exactly the setup you're looking for.

I mentioned that this is a slow fix, because, well, it is. What's slow about it is that now only do you need to create a new Windows XP machine instance, and wait for it to boot the first time. But then you've got to go through the whole IE 7 upgrade process.

It may be slow, but it was wonderfully effective.

With the bug now visible, I was able to fix the issue in just a few minutes.

I was just wondering about the value of virtualization yesterday, and here I go ahead and provide an excellent use case.

Wednesday, April 07, 2010

Project to try: QEMU

I came across QEMU in an old Linux Journal. And what is QEMU?

QEMU is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performances.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.

This is all a fancy way of saying, that apparently you can run a Linux box under Windows in a free and efficient way. The setup looks simple too.

I keep threatening to kick Windows off my laptop and turn it into a Linux only show. But then, I start think about what happens every time a client sends me a PowerPoint doc, or I need to do IE testing.

I'm thinking QEMU coulkd give me a linux sandbox to play in. And if I like it so much, I can flip things around and run Windows in the virtual environment.

Regardless, this virtualization stuff is amazingly powerful - I should be playing with it.

Anyone have any feedback on QEMU or other easy-to-setup Linux virtual setups?

An Ideal All Hands Meeting Location

If you're going to go through the trouble of convening the entire company - at least pick a nice location, right?

That's what Shira did when she put together this impromptu picnic.

I can't believe that in just a few days we've gone from perfect weather to complain-about-how-hot-and-humid-DC-is weather. Who am I kidding? Of course I can believe it.

Luckily, with the shade and a light breeze, it was actually perfect picnicking weather.

Sunday, April 04, 2010

Getting The Wrong Idea About DC

Today we had the wonderful treat of getting to see my cousin and her husband in from Las Vegas. And what a wonderful day we had to take a walk! I mean, really, I think it may have been too perfect.
What happens when they come back and find that it's 97 degrees with 97% humidity? Or they find 21 inches of snow?
Oh well, I won't tell them what they're in for if you won't.
Below are some more photos of my favorite DC monument:


Friday, April 02, 2010

The Diary of a Teenage Girl -- A Blatant Plug

For the last 3 years or so my cousin Rachel has been telling me she's been working on a play. Well, what do you know, she wasn't making it up! Her play, The Diary of a Teenage Girl just opened in NY and has been getting excellent reviews (from the New York Times no less!).

That's big time -- I'm so proud of her!

If you're in NY, you should definitely check it out. I'm told tickets for the second half of the month go on sale on April 10th.

If you want more info, drop me a line and I'll definitely get it for you.

node.js - Evidence CPS is ideal for high performance?

I stumbled on the Node.js project today. For those, like myself who had never heard of it, it's a project that attempts to support high performance applications. It does so by making all IO calls non-blocking. From their docs, you see that:

  var result = query("SELECT * FROM ...");
  // do stuff

turns into:

 query("SELECT * FROM ...", 
   function(result) { 
    // do stuff 
   });

As JavaScript and ActionScript have shown, with calls written in this style, concurrency can be pretty much hidden from the user.

Whenever I see code in the above shape, I can't help but think of Continuation Passing Style (CPS), as that's essentially what's going on. What I like about CPS is that you can provide a level of explicitness not often found in code. For example, you might rewrite the query function above to have the signature:

 function query(sql, onSuccess, onNoRows, onFailure) { ... }

In order to use this function, you require the user to think through how they are going to handle the different scenarios.

Though, my take away from reviewing the node.js project is that along with a style boost, CPS may also be a path to a performance boost.

A Viral Advertising Campaign 76 Years In The Making

While doing research for our Passover Seders, I came across this excellent chronology of the Haggadah - the handbook we use to run this Passover ceremony. And while the facts were all quiet interesting (the 7th century marks the creation of the first Haggadah, 1590 Chad Gadya is added to the text, etc.) I found the story of the Maxwell House Haggadah to be just remarkable.

As explained, the Maxwell House story begins with a business challenge:

The story begins with Jewish people of Ashkenazi descent (Ashkenazi Jews are Jews whose ancestors came from either Central, Northwestern, and/or Eastern Europe) following a traditional custom not to drink coffee during the Passover festival on the mistaken belief that the coffee bean was an actual bean that therefore fell into the category of legumes, and any food which fell into this category was religiously forbidden to be consumed during Passover

So there you have it, Jews from Eastern Europe didn't drink coffee on Passover. What does Maxwell house do? Well, to make a long story short, they coordinate with an Orthodox Rabbi to no only get Coffee recategorized as Kosher, but to publicize the new status, they publishing their very own Haggadah. That was back in 1934.

And talk about a successful move:

Since the Maxwell House Haggadah, noted for its simplicity, was given away at no cost, it became one of the most popular Haggadahs not only among American Jewry, but also among Canadian-Jewry. In fact, the Joseph Jacobs Advertising Agency still produces the Maxwell House Haggadah as of this writing in 2008 and as such, it is now the longest running sales promotion in advertising history, with over 50 million Maxwell House Haggadahs having been printed, making it the most widely used Haggadah in the world, and the most widely circulated Judaica item in the world. The result of this advertising campaign was that Maxwell House coffee became the preferred coffee in Jewish households.

Heck, it was used at the Presidential seder last year.

In the age of instant results, and people always looking for shortcuts to the next big thing, I find this example to be a refreshing one. Maxwell didn't try to fool anyone into buying their product - instead they offered a genuinely useful service, and in return, earned a place in Jewish history.

Thursday, April 01, 2010

It works for a minute. Not so sure about an hour plus.

In the, you've got to be kidding me news, apparently there's plans for a E-Trade Babies movie. You know, cause commercials to TV work out so well.

With that said, I do still find the commercials quite funny. See what I mean?

Of course, the fact that watching commercials is a novelty to me (TiVo, and watching shows on the web took care of them), I'm probably the last person you want to listen to on this topic.

Thanks AdRants for putting a smile on my face.

Monday, March 29, 2010

Rain and Rubberbands - A couple hacks worth your time

As we come up on Passover, I should really be helping to prep for the Seder and not be blogging. But, I can't resist posting these two links.

Besides, Passover is very much the holiday of the hack. On the holiday, you take your entire kitchen and store it away, and then bring in just dishes, pots, etc. that are saved for the holiday. As you make your way through the week, you learn to make do with the odd collection of kitchen instruments you've accumulated, rather than depending on the ones you have daily access too.

Here are those links...

OK, I'm off to go do some Seder prep. See ya'll on the flip side. Hope everyone has a wonderful first couple of days of Passover!

Sunday, March 28, 2010

Passover 2010 - Ready or not, here we go!

The TODO list is basically done. The last pizza pie has been eaten. The cooking for tomorrow night's seder has begun.

I do believe it's Pesach time.

Here's to happy, meaningful and tasty Passover! Chag Semeach all!

Saturday, March 27, 2010

911 Writers Block - A Fun, If Shallow, Resource

911 Writers Block is such a simple and clever idea for helping to bust writer's block. Just pick a topic, like say Endings and up pops one to work with. Like:

It took you over four hundred cream pies to get here, but at last you've made it onto Oprah. Your sense of satisfaction is enormous.

I even like the phone menu metaphor they use (like Dial 6 for verbs).

The only catch? There's only a few ideas per section. Maybe I'm missing a way to see a batch of new ideas. Or maybe the site is still in early development.

Regardless, I think it was a nice find on StumbleUpon.

Thursday, March 25, 2010

Blogger Bloggers Rejoice - Blogger Gets Pages

I've always been a fan of Blogger as a personal publishing platform. But one feature WordPress got right from early on was the ability to have both Posts and Pages. While the choice between when to use a Post or Page could get confusing, the notion that sometimes you want to publish static information as a Page was quite sensible.

Well, Blogger has finally caught up in this respect: you can now create pages.

For example, my welcome page, should be just that - a Page and not a post.

I guess I'm pleased to see that Blogger is still continuing to evolve. I guess I'll continue to like it.

Wednesday, March 24, 2010

Dabbling With PLT Serializable Continuations

The other day, I was rambling on about Amazon Web Services and PLT Scheme, and how they might mix well together. One of the concepts that fascinated me was that of Stateless Servlets and how they leverage serializable continuations.

Specifically, I was wondering if you could have a servlet create a bunch of continuations that represented worked to be completed. These continuations could then be serialized, stuffed in a in a queue, and then processed by a collection of entirely separate servers.

Trying It Out

To simulate this, I through to together a toy example. In this case, I created a function to grab stock exchange info, and considered that the work that I wanted to distribute. I then wrote a handful of helper functions to serialize and deserialize the work. The result is the following:

#lang scheme
;; Standard includes here, nothing fancy
(require web-server/lang/serial-lambda
         web-server/lang/abort-resume
         scheme/serialize
         net/url
         (planet neil/csv:1:5))

;; Helper syntax to 'package up' some work to be completed. The packaging process
;; creates a serializable function, and then goes ahead and serializes it. The result
;; is effectively a string which can be stored and re-executed later.
(define-syntax package
  (syntax-rules ()
    [(_ expr ...) (serialize (serial-lambda () expr ...))]))
;; More helper code. In this case, the run function is handed the serialized code
;; which is deserialized and then run.
(define (run serialized-thunk)
  ((deserialize serialized-thunk)))

;; A simple structure for holding stock data.
(define-struct stock (symbol price low high) #:transparent)

;; A simple function for grabbing stock data. Notice how there's
;; nothing special about how this function is written.
(define (get-stock-info symbol)
  (apply make-stock
         (first
          (csv->list  (get-pure-port 
                       (string->url (format "http://download.finance.yahoo.com/d/quotes.csv?s=~a&f=sl1jk" symbol)))))))


;; This function takes in a collection of stock symbols (MSFT, RHT, etc.)
;; and returns back a list of serialized expressions. If I went with 
;; my queue example, it's the results of this function that I would publish
;; to the queue.
(define (make-stock-getters symbols)
  (map (lambda (symbol)
         (package
          (get-stock-info symbol)))
       symbols))

The above code can be used as follows:

(make-stock-getters '("MSFT" "RHT"))
;; =>
;;(((2) 1 ((#"\\stuff\\serialized-continuations.ss" . "lifted.10")) 0 () () (0 "MSFT"))
;; ((2) 1 ((#"\\stuff\\serialized-continuations.ss" . "lifted.10")) 0 () () (0 "RHT")))

On another server, or in my case, a fresh instance of DrScheme, I can then run the code:

 (run '((2) 1 ((#"c:\\users\\ben\\desktop\\i2x\\src\\trunk\\ss\\play\\serialized-continuations.ss" . "lifted.10")) 0 () () (0 "RHT")))
;; =>
;; #(struct:stock "RHT" "30.70" "14.43" "31.76")

How Did The Solution Do?

I've got to say, my little experiment appears to have worked. If I had a AWS SQS implementation, I could have gone through hundreds of stock symbols, serialized their continuations, and published them to a queue. I could have them had a collection of Linux servers sitting around, processing the queue.

I guess a legitimate question is, is it worth? Why bother with serialized continuations. Why not simply publish a statement like:

 stock:lookup:RHT

to the queue, and then write a program to parse that data and run the lookup?

In this case, that may very well be a workable solution. But, the continuations really shine in that you don't need to write specialized queue processors. Effectively, rather than having to invent a new language for exchanging data among processes, you can use the Scheme implementation itself. Less code to write means faster implementation time, fewer bugs, and the removal of another layer of transformation code. That sounds like a big win to me.

Tuesday, March 23, 2010

More Twins Cuteness Overload

As promised, we had tons of photos from our trip to Boston, and of the twins. Well, here's a whole batch of them. Enjoy!

Let Them Eat Cake - A Short Video Comparison

Here's the Twins enjoying their very first taste of cake on their Birthday. I'm disappointed that I couldn't get better footage -- but I think you get the idea.

Are they cute, or are they cute?

Monday, March 22, 2010

Witnessing Democracy By Proxy

Yesterday, with the big Health Care Vote going on, David and I thought it would be cool to swing by the DC Mall and see what was going on. Unfortunately, I had way to much to do, so I had to skip out. But, David, did in fact, get into the the thick of it.

As you can see from his photos, he got to witness America at its best: people peacefully assembling, protesting, and generally trying to change public opinion through clever signage. Ahh, it makes me proud to be an American.

Friday, March 19, 2010

The Twins Turn 1!

It's hard to believe that just about a year ago The Twins were welcomed into the world. My first thought upon meeting - my gosh, they are so very tiny (as I tried to capture). They were downright magical.

And now when I see them, I continue to be amazed. They walk, talk, eat, have teeth - they are little people. And their still magical. It's amazing how much can happen in year.

We celebrated the big day by, among other things, giving the twins their first taste of real cake. It was their first bite of junk food. Chana jumped in and ate her piece like a champ. Though, I think she was confused as to what all the excitement was about. Poor Dovid had missed his nap earlier and was wiped from opening presents. He just fell asleep at the table, never getting to eat his cake. It was so very precious.

All in all, it was a great birthday.

We've got tons of photos - here's just a couple to show you how cute they are. Lots more to come.

Thursday, March 18, 2010

Shira's latest laptop

A snapshot from our trip to Boston - at over fifteen pounds, this laptop is more a luggable than anything else.

So far, our flying experience has been great. Security was a breeze. Have I mentioned lately how much I love the lightweight Maclaren Triumph stroller? It folded up and went through the scanner without a hitch.

Let's hope our luck holds.

Wednesday, March 17, 2010

I Know It's St. Patty's Day and All...

But what the heck are they giving away at Sine, the Irish Pub at Pentagon Row? The line was way, way out the door.

They are certainly doing something right this holiday.

The Power of Amazon Web Services, and a Scalable PLT Scheme Architecture

I'm currently on a web app scalability kick (or to be buzzword friendly: I'm looking into leveraging Cloud Computing). I've now made it through a book on Google App Engine, and have started to delve into the other major player in the cloud space: Amazon.

While Google App Engine gives you a single contained environment that turns your programs into a scalability monster, Amazon appears to be more interested in delivering individual services so you can roll your own. At first, I was pretty turned off by this because the App Engine solution seemed to account for a great many nuances that an Amazon based solution would still need to handle. But, as I get to know the Amazon services better I'm seeing just how powerful they are.

Why couldn't you create the following with relative ease:

  1. Implement the standard HTTP REST protocol behind Amazon's web services. This is little more than porting PHP code to PLT-Scheme. There are plenty of examples of handling XML returned from services, too.
  2. Create a simple wrapper API around SDB, SQS and S3. This would give you instant access to a massively scalable and distributed database, queue and file system.
  3. Run the Stateless PLT-Web Server, a server optimized to not store state on the local machine, on a EC2 Linux box.
  4. Use Auto Scaling to spin up new stateless web servers as needed.

Of course, you could create the above solution with nearly any programming language. Though using PLT-Scheme's stateless web server has some interesting advantages because of its continuation support. Not only could you stash continuations in a store for the web user to execute later on, but I wonder if you could add them to queue, and have another application execute them altogether. The continuation pattern may be an excellent way to fork off tasks to be handled by other services.

The bottom line is this: thanks to Amazon, nearly any language can be used to develop a massively scalable architecture. Man, am I impressed.

Tuesday, March 16, 2010

Slowly Coming Out Of Passover Denial

David made our first big Passover shopping trip of 2010. We've now got the essentials like Matzo, Matzo Farfel, 4.5. Liters of Manisschewitz wine and marshamallow fluff.

We are still a long, long way from being ready. But perhaps I'm at least ready to acknowledge Passover is coming.

Maybe.

Gotcha Of The Day: Getting A Joomla 1.5 Plugin To Function

I'm upgrading a client's Joomla from 1.0 to 1.5, and in the process porting over some existing Mambots to 1.5 Plugins.

The OO interface of Joomla 1.5 is definitely a vast improvement over 1.0. Yet, even with the provided tutorial, I couldn't seem to get my Plugin to work. Here's a few of the big hurdles I had to clear before I could get my first plugin working.

For the sake of a comparable example, suppose I wanted create a plugin that replaced all instances of the word and with or. I started off with the following to files in and.zip and installed them (oh, and don't forget to activate the plugin after install!):

and.xml:

<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="system">
  <name>And to Or</name>
  <author>Ben Simon</author>
  <authorEmail>questions@ideas2executables.com</authorEmail>
  <authorUrl>http://www.ideas2executables.com/</authorUrl>
  <version>1.0</version>
  <description>Map all instances of And to Or</description>
  <files>
    <filename plugin="and">and.php</filename>
  </files>
</install>

and.php:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );

class AndPlugin extends JPlugin {

  function onPrepareContent( &$row, &$params, $page=0 ) {
    $row->text = preg_replace("/and/i", "or", $row->text);
  }
}
?>

The first issue I ran into was a misconfiguration in and.xml -- I had copied the tutorial's XML file, which had the group set to system. As a result, it was never going to invoke the plugin for content. I fixed this by tweaking the XML to say:

<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="content">
  <name>And to Or</name>
  <author>Ben Simon</author>
  <authorEmail>questions@ideas2executables.com</authorEmail>
  <authorUrl>http://www.ideas2executables.com/</authorUrl>
  <version>1.0</version>
  <description>Map all instances of And to Or</description>
  <files>
    <filename plugin="and">and.php</filename>
  </files>
</install>

I uninstalled, and re-installed the plugin - still, no dice.

After poking around the code, and re-reading the tutorial, I realized I had named my file incorrectly. It needs to be named exactly: plg«Section»«Name». I fixed this by changing the code to say:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );

class plgContentAnd extends JPlugin {

  function onPrepareContent( &$row, &$params, $page=0 ) {
    $row->text = preg_replace("/and/i", "or", $row->text);
  }
}
?>

For this change, I was able to just FTP the new source file in place and didn't have to bother with the uninstall/install dance. But still, no luck.

After even more poking around, I realized that the constructor that I thought superfluous, was in fact critical. Without adding the following line of code, the plugin never gets registered with the event system, and the onPrepareContent is never invoked. I fixed this like so:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );

class plgContentAnd extends JPlugin {


  function plgContentAnd($subject, $config) {
    parent::__construct($subject, $config);
  }

  function onPrepareContent( &$row, &$params, $page=0 ) {
    $row->text = preg_replace("/and/i", "or", $row->text);
  }
}
?>

Whew. With all these conventions noted - I'm officially on good terms with Joomla 1.5. Turns out, we're going to be friends after all.

Monday, March 15, 2010

Data Just Waiting To Be Processed

Take a look at this census data and tell me it's not crying out to be included in some mashup?

Of course, there's plenty more where that came from.

A Blog Worth Checking Out

I stumbled on Peter Van Dijck’s Guide to Ease, and have managed to get pretty lost in it. If you're interested in design, information architecture or just good blogging - check it out.

Inventing Your Own Reality In Advertising - Yeah, not so impressive

Adrants highlights this spot from Microsoft about Bing:

And they make an excellent point:

But the most ridiculous thing about this campaign is the real world version of the scenario painted in the commercial. Do a search for Euston tube station on Google and it's the first result. Do the same search on Bing and its also the first result. Not exactly a product differentiation there.

Finding some actual examples where Bing beat Google might actually garner it some points. Instead, they just come off as out of touch.

Compare that to Google's super bowl ad, which I find incredibly sincere.

Friday, March 12, 2010

Brooks on Obama and Information Cocoons

David Brooks writes:

If you ask a conservative Republican, you are likely to hear that Obama is a skilled politician who campaigned as a centrist but is governing as a big-government liberal. He plays by ruthless, Chicago politics rules. He is arrogant toward foes, condescending toward allies and runs a partisan political machine.

If you ask a liberal Democrat, you are likely to hear that Obama is an inspiring but overly intellectual leader who has trouble making up his mind and fighting for his positions. He has not defined a clear mission. He has allowed the Republicans to dominate debate. He is too quick to compromise and too cerebral to push things through.

You’ll notice first that these two viewpoints are diametrically opposed.

Indeed, they are. Brooks goes on to explains why this is, and what to make of the Real Obama. It's one of the sanest things I've read about Obama in a long time.

A Big 'Ol List Of Google Docs Tips

While searching for help on the VLOOKUP function in Google docs I noticed the note:

We'd love to learn how you're using the VLOOKUP function. You can now show off your finished spreadsheet by editing our knol (a knol is an authoritative article about a specific topic).

Sure enough, the link points to a helpful examples of VLOOKUP. Poking around further, I saw that the link was to just one article of a big list.

This list of docs definitely seems handy. Some are broad like Google Spreadsheets FAQ, and some are quite specific like how to share PDFs . They all seem worthy of review.

Test driving a and buying a brand new set of wheels

Wheels for our little one, that is. A friend was generous enough to let us borrow a stroller for the short term (and man are we so thankful - what a huge help that was!), but it was time to buy one for real. Of course, I've been doing research and was forming a plan - though, I was still weeks away from making a decision (weeks, we didn't really have). Shira, on the other hand, wouldn't put up with my dithering - she dragged me to Babies-R-Us to go shopping last night.

As you can see from the snapshot, we did a good bit of stroller test driving:

I had wanted something lightweight, and simple - I was thinking the Chicco Capri. In the end though, we went with the Maclaren Triumph. It just had a better overall driving feel to it, and it seemed to offer a few more features while remaining lightweight.

Surprisingly, Amazon has no reviews on it - though Buzzillions does, and it gets a 4.3 out of 5 with 255 reviews. Not too shabby.

Of course, the real question is, how does the boy like it. Well, we hope to do a thorough field test this afternoon after day care.

I have to say, I am again impressed with Babies-R-Us. The clerk who helped us in the store was knowledgeable, and was patient as I insisted on reviewing each model over and over, long after Shira had made up her mind. And price wise, they had the same price as Amazon - though we were able to use a 20% off coupon.

Now, if we could just have some sunny weather to let us get out of the house and use the stroller - that would be perfect!

While we're testing the stroller out, and deciding if it's the one I'd love to hear from you. Do you have any stroller advice or insight into the Maclaren's in general? Add it to the comments, we'd all appreciate it.

Thursday, March 11, 2010

Google App Engine - Pondering The Trade-offs

I'm making my way through the O'Reilly book on Google App Engine and I can't help but compare the trade-offs of it versus my usual PHP setup.

Now, I'm just scratching the surface of Google App Engine, so some of these points are probably wrong. First, let's consider what you give up by going with the App Engine:

  • Ability to use common 3rd party tools like PHP, MySQL, WordPress, etc.
  • The requirement that your app be specially programmed in a stateless manner
  • Your data and files are no longer stored or accessible via standard methods (gone are the relational tables, and FTP access)
  • Your programs lose access to features such sessions, the ability to open up arbitrary ports, run operating system processes, etc.
  • The number of programmers who can pick up an App Engine project is minuscule when compared to the universe of programmers who can jump on a typical PHP project

And on the gain side:

  • Infinite scalability

And the thing, as risky as all the losses are, the infinite scalability is awfully powerful.

A Functional Programmer's Dream?

Another thought I keep having is that this setup is a Functional Programmer's dream, right? The whole system is built on the notation that when you suck state out of the problem, you can get amazing benefits - in this case, the ability to run as many copies of the application, on as many servers, as you need. All without fear that they'll step on each other.

There are lots of different approaches to making scalable applications. This approach that you program them from the ground up, using only resources that scale, seems quite sensible to me. Sure, it means that you give up the comfortable environment you're used to - but perhaps in the long run, you come out ahead.

Wednesday, March 10, 2010

Use #471 for a thumb drive: Portal Document Repository

We just bought a Canon MX860 all-in-one printer, and so far we're really happy with it. It's got all the bells and whistles you could ask for, including document feeding and flatbed scanning.

For some odd reason, looking at the flatbed scanner triggered an old traveling tip from long ago - when you travel overseas, the State Department suggests traveling with at least one copy of your passport. While the copy won't work in an official capacity, it's certainly better than nothing if you lose your passport.

With the flat bed scanner, it occurred to me I could copy any and all important documents and just throw them on my thumb drive.

Of course, there's a security concern here - as a lost thumb drive could now mean important documents are in the wild. I suppose I could have dealt with this risk by encrypting the files, but I took a simpler route. First off, I stored the files not in the root directory, second of all I named the files something misdirecting, and finally, I changed the file extension from .jpg to something completely different.

I think this covers the case of the casual user picking up the thumb drive and inspecting it. It also keeps things nice and simple, as you can open up the files by just changing the extension back to .jpg.

Now, I just need to convince Shira to tell me: (a) what our important documents are, and (b) where she keeps them, and I can actually follow through with this hack. Yeah, that's not going to happen.