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
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.


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 ( 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.


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 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")
                        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) 
    (send the-clipboard set-clipboard-string scrubbed 0)

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

 [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.