Thursday, December 31, 2009

2009 Comes To A Close

Holy Smokes, 2009 is coming to a close! I feel like I should craft some comprehensive recap of the year - or maybe set forth my goals for the 2010. Alas, I can't bring myself to do this.

All I can do is sit back and marvel. What a wonderful year I had - and I've got my wife, family, friends, customers and many others to thank for this. My has it been educational.

And as for 2010, I'll say this: Bring It! It's gonna be awesome!!!!

For the record: I made one New Years resolution in '09 - don't work on Sunday. And while I didn't stick to it 100% of the time (or 75%...), I can say I gave it all my effort.

I'm not sure yet what my '10s resolution will be - any suggestions?

Wednesday, December 30, 2009

Gotcha and Lesson of the day: Google Analytics not counting search engine traffic

The Gotcha

Today I got an odd comment from a client: according to Google Analytics, he was getting zero search engine traffic. None. It was all direct traffic.

Now the site's not expected to get bombarded with traffic, but really, zero traffic?

My first thought was that the site wasn't in Google's and other's indexes - but a quick search for site:sitename.com showed me that it was.

Looking closer, I realized the only hits being counted were those where I have overridden the value to _trackPageView. Sure enough, I had gotten clever with the Google Analytics code and said:

<script type="text/javascript">
  try {
    var pageTracker = _gat._getTracker("UA-XXX-1");
    if(pageName) {
      pageTracker._trackPageview(pageName);
    } else {
      pageTracker._trackPageview();
    }
  } catch(err) {alert(err)}
</script>

That is, if the value of pageName is defined, then report that as the page viewed. Otherwise use the default name. This allows me to say:

<script type="text/javascript">
var pageName = '/player';
</script>

at the top of the page, and rather than having the default URL (say: index.php?action=player&value=foo.mp3) show up in Analytics the pretty /player shows up.

The problem, though, is that if pageName was left undefined, the entire block of code exited, and no page view was counted.

The problem was easy to fix - just change it to:

<script type="text/javascript">
  try {
    var pageTracker = _gat._getTracker("UA-XXX-1");
    if(typeof(pageName) != 'undefined') {
      pageTracker._trackPageview(pageName);
    } else {
      pageTracker._trackPageview();
    }
  } catch(err) {}
</script>

But still, I had managed to hose the up the Anaytics for the last week or so - and that was a bad thing.

The Lesson

The good news though, is that I wasn't the one who configured Analytics on the site (nope, I just broke it) - it was the folks at Silver Beacon Marketing who did that. And when I touched base with George at Silver Beacon, he let me in on a really valuable lesson:

When setting up the analytics for a site, always take the time to install a backup provider. That way, if either you or the provider mess things up, the client won't lose all their stats for the time period in question.

What a simple idea. But, oh so brilliant. George even had a few recommendations as to free/low cost Analytics providers you might want to use as a backup. They include:

Oh, and because Silver Beacon did the setup, they had multiple stat providers on there - and my goof was absolutely minimized. Whew.

uloops.net: Making sweet, sweet music on the G1

Ever since I got my G1, I've been on the lookout for Android apps that could allow me to create music. Having no musical skills (well, maybe some skills), I thought the G1 would be a perfect way to experiment on the go with music composition. Most of what I found though, were cheesy apps that would allow me to play a few canned wav files. This is fun for the kiddies, but gets old fast.

I do believe, though, I've found a solution: uloops.net. Uloops is described as:

Uloops Music Composer it's a complete composition environment for the android platform. Make hi-quality tracks using three concepts: Song, Loop and Devices (including Synthesizers, Drum Machines and Modulators). Publish your songs in our community and adapt the work from others to your compositions.

And the thing works remarkably well. Here are few points I like about it:

  • You can publish your completed music. That's huge, the thought of creating something and having it stuck on my G1 seems really depressing.
  • The musical capabilities are really impressive. Knowing very little about how to actually use the app, that's probably not much of a claim. But seriously, the whole ability to compose music in small chunks really works on the tiny Android footprint.
  • The ability to slurp in work created by others is a great. This means you don't have to start creating music from scratch and can build on what others have done.

Here's a screenshot:

While the app is remarkable (especially considering it's free), I do have a couple of enhancements I'd love to see. First, a few tutorials would be awesome. The trial-and-error approach to composing music isn't as much fun as you'd expect it to be. Secondly, the ability to publish my work outside of uloops.net would be really powerful. If I could save the clip as an .mp3 or .midi file, even better.

But all in all, it's a solid app.

So, I've got to ask -- any ulooper's out there have any suggestions for getting started?

Download uloops.net from the Market app, or point your Bar Code reading software here:

Tuesday, December 29, 2009

Android app of the day: Not Call Log

It boggles my mind, that with all the advancements over the years in cell phone technology I'm still suffering from the same age old problem: accidental phone calls (or, using the term my brother introduced me to: Butt Dialing. My that term sounds dirty.) The G1 is running one of the most advanced operating systems out there, and yet, I seem to be calling folks accidentally more now than ever.

I've got the phone set to lock automatically, and have the nifty Screen Lock feature in place. Doesn't make a bit of difference. I've called my mom, clients - heck, I call my brother on a near daily basis.

I think I've traced the issue to the fact that when you hang up a call, it takes you to the Call Log. That's a reasonable move. But, from the call log, you're a single button press away from calling someone back.

Searching through the market, I may have found a solution. The Not Call Log app has the description:

Do you hate being able to "accidentally" redial someone from your call log after your phone call is over? (I do, I do!!)

No more embarrassing phone calls that you dont' know you are making! (Whooo!)

(Emphasis above was added by me)

The app is drop dead simple. You install it, run it, and choose where you want your calls to go to after you hang up. I've got mine setup to go home.

I should have it setup to go to an application which needs me to enter a code to have me leave it.

Hopefully, this will at least cut down on the number of accidental calls.

The app is free, and you can download it from the Market. Or, you can use the scan the QR code below with your phone:

Amazon Free Shipping Tip

You've got love Amazon's Free Shipping for orders over $25.00 But what happens when your order comes to say, $22 - what do you? Do you pay the shipping, or end up buying another item which costs more than the shipping itself? Of course, Amazon knows they are putting you in this little quandary - and more power to them, it's clever marketing.

The other day, I stumbled upon a fairly novel solution. The answer, of course, is to find an item which is low cost and also eligible for free shipping. But finding those items can be a pain. Unless of course, someone has made just a list for you.

And this being the web, someone already has. If you search Amazon's Listmania for free shipping, you'll find plenty of lists that give low cost ideas for getting over the shipping minimum.

From Dora the Explorer playing cards to the Holy French Toast stamper, there are lots of ways to spend that extra couple bucks to get over the $25.00 minimum.

Update: Over in Facebook land, my buddy Davin suggested slickfillers - a site dedicated to solving the problem I describe above. And in the comments, Mark has suggested not only this site, but also filleritem.com. These sites are amazing because they are a source for cheap items (say $0.32) that allow you to nudge your order over the $25.00 mark if you need to. Thanks Davin and Mark!

Monday, December 28, 2009

The Behind The Scenes World Of Drones in Afghanistan

I really enjoyed this report by David Axe on the mechanics of how Drones work in Afghanistan. For example, I knew that they were flown by folks back in the US, but I never really gave much thought to how they are escorted from their hangars and are taken up into the sky in the first place.

Give it a watch to see what I mean. Cool, no?

3 Lightweight Image Tools

I was looking for ways to explain to a novice how to resize images and capture screenshots. These are two relatively simplistic activities that still don't have a particularly easy solutions in Windows XP.

Here's some interesting items I'm found while digging:

  • shrinkpictures.com - This is a drop dead, easy way, to shrink an image. These days, photo snapped on a typical digital camera may be 2000+ pixels wide, and this site will scale it down to a more manageable size. No login needed, it just works.
  • PicPick - is a free collection of tools for designers. What attracted me to it was its super easy screenshot ability. It also has other designer tool, like a pixel measuring tool and color grabber. I like that it's free and appears to have no strings attached.
  • Aviary.com - Aviary.com is a free suite of image tools. I didn't get beyond looking at the marketing material for the software, so I can't say much about it. But it does look impressive. If I needed a free image suite, and didn't want to go with the complexity of the The Gimp, this may be an excellent place to start.

Even with all my research, I still couldn't find a foolproof way for a complete novice to take screenshots on Windows XP. Sure, they can install some software - but even doing that is kind of beyond what a complete novice can be expected to do. Where's the web or AIR app that does this?

Sunday, December 27, 2009

The Atlantic Awakes

It's finally stopped raining here in Atlantic City. We awoke a pretty sunrise. Of course, AC is one of those few places where a rainy couple of days doesn't impact you a whole lot, as there's not a big need to step outside...

Discovering Craps

This is the trip to Atlantic City where I truly discovered the game of craps. Up until now, I've pretty much written off the game as overly complex and not worth my time. However, a kind base dealer, took me under his wing and showed me the ropes.

While you should really read up on a craps strategy before attempting to play, here are some insights I've learned. Trust none of this.

  • Craps really is nothing more than making predictions about the total of the two dice thrown. Are they going to add up to 6? Will the next roll add to up 7?
  • Because of this, there are bets to be made for every conceivable combination - hence Craps' reputation for complexity. If there's a way for the dice to appear, they'll let you bet on it.
  • In Black Jack, you improve your odds by making the more complex moves (splitting and doubling down at the right times). The good news with Craps is that the complex sounding bets aren't actually the better odds. So, just because you are playing in a simple way, doesn't mean you're ruining your odds.
  • Important Rule #1: Once the puck is marked as On (the point being set, I believe it's called), the person rolling the dice will lose when rolls a 7. You don't even want to say say the number 7 out loud. Yeah, Craps players are that superstitious.
  • Important Rule #2: As soon you see the dice heading towards a player to be thrown, get your hands away from the table. It's bad, bad news if the dice are thrown and they hit you.
  • Craps has to be the most laid back game I've ever seen played at a casino. The dealers have all been consistently nice, walking me through the nuances of the game. They've been kind when I put down a nonsensical bet, and have reminded me when I should have placed a bet.

So, if you're in a casino, find a quiet Craps table and give it a try. I can't promise you'll make any money, but if you do play at it long enough you'll get a whole new vocabulary - plus, you'll get good at throwing dice.

Friday, December 25, 2009

Eli on My Scribble-For-HTML Solution

Eli was kind enough to write up some comments on the Scribble hack I put together for generating HTML. Because of Blogger's limited comment form, he sent them to me via e-mail. I think they more than deserve their own post, so they are posted below.

Thanks Eli!


Eli says:

That's all very nice, but you could easily take this *much* further... One thing that I noticed is that you're using just plain scheme code that "expands" into some string but is not using any body argument. You could use it, for example, to make a self-link thing:

   (define (url . body)
     @list{<a href="@body">@|body|</a>})

And now you can do:

   Want to visit @url[project-url].

Note that I'm using square brackets to use a Scheme expression as an argument, it could also be done with

   Want to visit @url{@project-url}.

This is semi-cute, but it's even better if you use this instead of spans, which would be even nicer with your class->style thing:

   (define (span style . body)
     @list{<span @|style|>@|body|</span>})

and now:

   We @span[loud]{rock}!

(This will require a minor change -- looks like you made your `define-style' thing use strings, and the above is easier to use if you make it just a plain definition. My guess is that this change will simplify things.)

Obviously, this can be taken further...:

   (define (p . body) @list{<p>@|body|</p>})

   ... @p{Some text here} ...

and this can end up doing the whole thing with Scheme code. And there's yet more: you can go further than just a Scheme function for each HTML tag -- you can have functions that generate the complete template. For example:

   (define (letter name . body)
     @list{<html><body><p>Hello @|name|,</p>@|body|</body></html>})

   @letter["John Doe"]{
     @p{Blah blah blah}
     ...}

This kind of a smooth transition from a pure text to a simple template to something that looks like a DSL for HTML generation is something that I talked about in the scribble syntax paper (from the Scheme workshop in the summer). Going the whole way might not be appropriate -- for example, if your clients are using this, they might feel more comfortable with sticking with writing the HTML code.

Thursday, December 24, 2009

It's not exactly Chinese food...

We hit Atlantic City this year on Christmas Eve. It's not exactly the traditonal Jewish Christmas Eve of Chinese Food and a Movie - but it's pretty close.

As Shira said in a text message to me about her Black Jack table: "Could have minyan at my table"

I was also reminded by Shira that tonight is the 15th anniversary of our first date (which took place at Ho-Ho Chinese restaurant). Amazing. I'm sure glad that date went as well as it did.

The Rennovations, and Improvisations, Continue

The rennovations going on at my temple are in full swing. So much so, that we've been displaced from the sanctuary altogether.

Well, if there's one thing Jews know about, it's displacement.

Today's morning Minyan took place in a school room, and as you can see from the photo, was a kind of jury-rigged together. Regardless, it got the job done. And it'll make it all the more sweater when we do services in the shiny, new, completed sanctuary.

Seriously, if you want to design a religion for the long haul, make it one that can function in pretty much any space with a minimal amount of equipment.

I'll include my usual plug here:

if you're in the DC area, Etz Hayim (get directions) has a small minyan that meets every Thursday at 7:00am (and 9:30am on federal holidays). We're just minutes from the Pentagon and Crystal City, so it shouldn't be much of a schlep. We don't always hit 10 people, so if you're in the area, you'd make a real impact by joining us. All are welcome!

Shabbat Shalom, y'all!

Another Day, Another Tire

My gosh, what is with me and tire problems? Just 3 1/2 months ago, I hopped into the car and sped off to shul. I made it about 100 yards before I realized my tire was flat.

Well, the same thing happened today, only this time I made it all the way to shul before I realized something was very, very wrong.

I think the big guy upstairs is just toying with me at this point.

Luckily, all it took was a phone call to Acura Care to send out the reinforcements. While I was inside praying, my tire got changed. And while the incident will trigger yet another trip to the tire store, it was actually quite painless.

Pretty soon, Acura Care will have me on caller ID, and I'll call up to hear: "Oh, hi Mr. Simon, the tire changing crew is on the way."

OK - here's the big test. If it's the same tire that the tire center put on last time, they'll replace it for free. What are the odds that this is the case? Yeah, pretty much zero.

Baby Proofing - One Project - A Few Purchases

With our upcoming adventures in parenting, Shira and I figured we should at least do some sort of baby proofing of the house. While there's no doubt tons to do, we quickly identified two places to start: (1) cover outlets which naturally attract little fingers to stick metal objects in and (2) put cupboard locks on the doors that hold our brightly colored, yummy smelling cleaning products.

I can't say I was surprised at the dizzying number of options you have for securing potential hazards in the home. Thanks to the reviews on Amazon, we were able to settle on Mommy's Helper Safe-Lok cabinet locks and Mommy's Helper Outlet Plugs. The plugs are trivial to install, but the Safe-Lok's were going to require a bit of effort.

Looks like we've got a project here

This brings us to the fun part of the story - installing the cabinet locks should have been as easy as grabbing my rechargeable drill, and screwing stuff into place. Even if I allowed time for installing backwards (which I always seem to do), it should have been a 10 minute job.

But, alas, the batteries for my Black & Decker rechargeable drill wouldn't take a charge. This really ticks me off - the drill works just fine, but I have to either go out and buy a replacement, or spend just as much on a new battery.

And even when I do buy a replacement (which happened a year or so ago), I can either leave the drill plugged in - in which case I probably end up hosing the battery. Or, I can leave it unplugged, and the drill loses its charge. Which means, to do a 10 minute job, I need to first charge the drill for an hour.

And it's the best kind of project

Lately, my solution has just been to use an actual screw driver and just tough it out. But this little project was the perfect excuse to try a better solution.

Remembering that I saw a review on CoolTools of a small rechargeable screwdriver, I went back and re-investigated it. The claim to fame of the Skil 2336-02 iXO is that it has a lithium battery that will stay charged for up to 18 months, and won't have any of the battery woes that my Black & Decker drills had. Combine that with the fact that it's tiny and not particularly expensive ($56.00), and you had a winner.

So, in order to complete a 5 minute job, I first needed to order a $56.00 drill, and wait to have it shipped to me. Aren't home improvement projects fun?!

Actually doing the project

Well, the iXO came yesterday and I was able to complete the project. How would I rate the driver? On the pro side, I have to give the driver credit for being able to complete the task with a minimal amount of fuss. Plus, it really is lightweight and tiny - I can see leaving this in a conspicuous place like the kitchen and getting lots of use from it. On the cons side, it's a far cry from a real drill replacement - power wise, it's really unimpressive (but it never claimed to be that). Plus, you look like kind of a wuss using it.

Do I recommend the iXO? Not sure yet. Let me get some use of out if, and see if it can outlast the life of my old B&D drill. What the iXO lacks in power, it may very well make up in utility. Or maybe not.

OK parent readers, what other child proofing should we be making a priority? And how I can use it as an excuse to buy more tools?

Here a some action shots....

Wednesday, December 23, 2009

HTML Generation - A Little Scribble Goes A Long Way

The Challenge

I have a client who needed a designed page turned into an HTML message suitable for e-mailing. HTML e-mail is especially painful because there's nothing resembling a modern standard for it. The basic rule of thumb is this: stick with ancient HTML 3.0 layout techniques, and ignore all the time-saving-clarity-providing CSS code you use daily. Sure, you can make occasional use of inline styles, where if they are ignored, no real damage is done - but external style sheets, tabeless layouts, and other goodies are out.

I suppose I could have just opened up a .html file in emacs and started typing away. But, it quickly becomes apparent that text - be it things like standard URLs, or style information, would be repeated. And repeating code is evil. I knew I needed something more sophisticated than a plain HTML document.

After mulling it over, I decided I would use scribble to generate the HTML document. And while it was tempting to create an entire language to express the document in (like say LAML), I decided that I would avoid this. My plan was to use as much HTML as possible, and just leverage Scribble where it would really help.

Getting Started

Generating HTML from a Scribble document is trivial. I put the following in message.scrbl:

#lang scribble/text
<html>
  <body>
    <h1>Hello World</h1>
  </body>
</html>

While this is technically a Scheme program, the first line puts Scribble in a friendly preprocessor mode.

To generate the HTML document, I whipped up a Makefile, which essentially did:

 mzscheme -t message.scrbl > message.html

At this point, I've got the warm and fuzzy feeling knowing I'm using a preprocessor, but I haven't actually done anything with it.

Adding Standard Variables

Throughout the HTML e-mail, a standard URL to link folks to is mentioned. Knowing that this URL can change, I figured it would be smart to it avariable. I did this by creating a file named vars.ss, which contained:

(define project-url "http://someurl.com/some/path")
(provide (all-defined-out))

In this case, I define a single variable. The second line says that any variable I define in this file should be exported. This is me being somewhat lazy, though, the purpose of this file is provide variables - so exporting all defined values seems reasonable. I can now use this variable in my document:

#lang scribble/text
@(require "vars.ss")
<html>
  <body>
    <h1>Hello World</h1>
    <p>
      Want to visit <a href='@|project-url|'>@|project-url|</a>
    </p>
  </body>
</html>

Notice that the vars.ss file is being included in here, and that project-url is being referenced. As you can see, @... is magic - the rules are defined here, and they aren't too painful to figure out.

Picking up images remotely

The HTML e-mail calls for images to be included. This is a relatively simple thing to do: one needs to put the image on a remote server, and then reference using an absolute path. Like the URL from the example above, it's quite possible that the location of these images could change. To make the system a bit more flexible, I added the following (trivial) function in utils.ss:

(define (asset name)
  (format "http://someurl/some/path/~a" name))
(provide/contract
 [asset (-> string? string?)])

I can now use this function in my document:

#lang scribble/text
@(require "vars.ss" "utils.ss")
<html>
  <body>
    <img src='@asset{header.gif}' alt='Header Graphic'/>
    <p>
      Want to visit <a href='@|project-url|'>@|project-url|</a>
    </p>
  </body>
</html>

Now I feel like I'm getting somewhere! The asset function is called in such a way that it naturally fits with the rest of the HTML doc.

Taming Styles

One of the features I miss most while working with straight HTML is the ability to do external stylesheets. It's just so nice to sprinkle a class='foo' throughout a document, and then later define what foo actually means.

Recognizing that any external style, can be turned into an inline one, I decided I would simulate this functionality. I did so by creating a quick library that would allow users to register and access styles. The code is a bit long for this article, so you can download here. Once this library has been included, I was able to define styles in styles.ss using the following notation::

(define-style loud 
  (color "#DD0000") 
  (font-size "18px") 
  (font-weight "bold"))

I can now use this style as follows:

#lang scribble/text
@(require "../lib/style.ss" "vars.ss" "utils.ss" "styles.ss")
<html>
  <body>
    <img src='@asset{header.gif}' alt='Header Graphic'/>
    <p>
      Want to visit <a href='@|project-url|'>@|project-url|</a>.
      We <span @class{loud}>rock</a>!
    </p>
  </body>
</html>

Again, notice how the @ notation kind of blends with the HTML. In fact, emacs' HTML mode isn't thrown off by the whacky @class{...} notation, and indents the document properly.

The Sky's The Limit

For my purposes, the above was really all I needed to make authoring the HTML document a much saner process. Though, as you can see, you're really only limited by your imagination.

Color Tool Of The Day: ColorMixers.com

First off, ColorMixers.com is not exactly the best name for the site - as there's only one color mixer there. But, the one that is there is drop-dead simple to use. Just drag a few sliders around, and the color you've created instantly shows:

Much like ColorCombos.com, I think the real value in this site is the ability it gives you to collaboratively work with colors.

For example, a client of mine wanted to highlight some text on their site. I took a guess, and picked a shade of yellow. I was able to send her a link to the color, and in return, she sent me back the exact color she would like to use.

What I like about ColorMixers, along with its simplicity, is that it makes it especially easy to link to a color, import a color, and download a text version of color pallet.

There are better tools out there for discovering color schemes, and creating them from scratch - but for the simple business of talking and tweaking an existing color, this site is hard to beat.

Tuesday, December 22, 2009

I just finished talking to QuickBook support, and boy am I exhausted

I just got off a 141 minute phone call with Intuit, regarding a tech support issue with their QuickBooks web Time Tracker software. The issue was an apparent inconsistency between the local QuickBooks file and the remote Time Tracker system.

To be honest, I'm not really sure what to take away from the call - but after 141 minutes, I feel like I should get something out of it. I suppose I could take this from any number of angles:

  • Optimistic: wow, look at the perseverance of QuickBooks tech support. It took them 3 techs and remote access, but they resolved the issue. Also, they never once blamed the issue on me or my setup.
  • Pessimistic: wow, 141 minutes to fix an obvious data inconsistency which shouldn't have been able to happen in the first place.
  • Philosophical: see, this is what happens when a desktop app (QuickBooks) decides that it should really be in the cloud. You end up with a cloud presence (Time Tracker) that needs to stay in sync with the desktop system. This, as my issue shows, can be fragile to say the least.

Regardless, I think I've had my quota of talking to tech support for foreseeable future. I just hope stuff stays in sync, like its supposed to.

Oh - anybody have any experience with QuickBooks time tracker? Is it a good solution to use for a small business?

Signs You've Married The One

I know I'm not supposed to dispense romantic advice here and all...but I can't resist.

If she uses time on her snow day off from work to bake you your favorite desert, and does this while you've spent the entire day ignoring her and just working away, business as usual. Well, you've found The One.

Thanks babe! The chocolate cake was mmmm, mmmm, good!!

Oy, To Be An Entrepreneurial Mensch

Here's the kind of business man/woman every Jewish (and non-Jewish) Mother can be proud of: an Entrepreneurial Mensch. This article is a relatively short interview with Noah Alper - who's book provides a Jewish take on being a entrepreneur. It's a bit cheesy (to use a bad bagel pun), but hey, it's got some valid points.

Among topics he covers, is the importance of having some sort of Sabbath in your life:

Q: One piece of advice you give in the book is to remember the Sabbath. What does that mean for non-Jewish businesspeople?

A: What I'm saying is that you need to take time away from the business. It's Sabbath in the most broadly construed perspective. Especially in today's day and age, with our electronic leashes, it means unleashing ourselves for periods of time. It's not only vital for health but extremely important for business success, because without reflection time, you won't do as good a job. It can be anything from a power walk to frequent vacations.

Amen, to that.

Thanks to Guy Kawasaki for mentioning the story.

Monday, December 21, 2009

Some Pain Relief from the Health Care Debate

Oy, I'm tired of watching both sides beat the snot out of each other over healthcare. If I watched one more round of press conferences with the same back and forth, I think I was going to just tune out completely.

Luckily, I stumbled upon this little announcement about the SAVE Award winner - and I actually managed to get a bit of a warm and fuzzy feeling about our Government. The Save Award went to a government employee who submitted the best idea for reducing waste in the government. This year's winner is Nancy Fitchner.

I love too, that Nancy is an avid Elk hunter - it kind of gives the award a little bipartisan feel to it.

To think, we were promised that we'd reduce waste, and concrete steps are being taken to do so. Is it enough? Of course not, but every little bit counts.

Sunday, December 20, 2009

A Chanukah miracle - the new Ideas2Executables website

Just a few hours after we launched our business, I'm quite certain that I promised Shira we'd replace the simplistic Blogger site (i2x.blogspot.com) with a Real Website soon.

That was a mere 1,587 days ago - or more poetically: 4 years, 4 months and 4 days ago.

I guess that my definition of "soon" may not be quite what Shira had in mind.

Regardless, the site is now up! Here's a preview of what it looks like:

The site was designed by a local designer, Heather Bianchi, of Heather Bianchi Design. We told her we wanted to toy around with the concept of a whiteboard - and she did the rest.

Also, we chose to build the site on top of WordPress, as I wanted to take advantage of the CMS capability there.

A website should be given a face-lift every year or so, to keep the design fresh. This means that I've got to somehow go back in time to start the next version of this site. D'oh!

On a more serious note - please go check the site out, we'd love to hear your feedback. Thanks!

The Day After Great Snow Dump of '09

This morning we woke up to about 20 inches of snow outside our house. The storm was long gone, and all that was left to do was dig ourselves out on this nice and sunny day.

Usually we mock Northern Virginia's definition of a winter storm - it might be a couple inches, or better yet, just the threat of a storm with no snow at all. But last night's 20 inches of snow was a sight to see. Impressive, even by Rochester and Buffalo standards.

Here's the chunk of driveway before I started on it:

And here's my completed job. Luckily the snow was nice and dry, so it wasn't too hard to move.

And here's Shira working on one of our cars. Note how the snow on the hood is actually at her height:

And here's my crude attempt to measure the snowfall in our front yard - trust me, it was at least 16 inches of snow.

About the only annoying part of the storm was that it happened on a weekend, so nobody got any snow days (not that Ideas2Executables needs to close on account of bad roads...). Though, some schools have already called off classes for Monday, and one farther out count has called them off for Tuesday, too.

Yeah, canceling school on Tuesday for a snow storm that happened on Saturday - that's so DC.

Saturday, December 19, 2009

The Winter Whammy of 2009

DC is getting pounded with snow. We didn't believe the forecasts, as they've been wrong so many times before, but this time, the snow really came. We had a foot by 9 am, and it is supposed to keep coming down until tonight.

We took a walk and had a bit of fun and helped a few stranded motorists along the way.

Friday, December 18, 2009

Hanukkah and Some Thoughts On Giving

As we start the last night of Hanukkah tonight, the holiday is definitely winding down. Here's a few thoughts on the topic of giving.

8 Days, 8 Levels

I found this article about Hanukkah and Tzedakah (charity) to be really enlightening (pun intended). It takes on the topic of the 8 levels of giving charity, and relates it to Hanukkah's 8 nights. It's easy to get cynical about giving charity, but articles like this one help you avoid that trap.

The Gift Of Content Aggregation

The article, Eight nights of apps: iPhone apps put Chanukah in the palm of your hand, inspired an idea. What about setting up a sort of digital gift exchange next year? It would work like a regular gift exchange in that you'd pair up folks, but rather than going out and buying more stuff, you'd compile a list of online resources for that person.

You could follow the mobile app inspired theme and do 8 Android apps for Hanukkah, or you could hit up YouTube and find the 8 funniest videos involving lighting something on fire. Or you could find the 8 best holiday related snopes. The sky's the limit. The rules could be simple: it must be 8 items, it must have something to do with the holiday season and it must be made up of URLs.

.

The idea could work because: (a) it's recession friendly, (b) it's got a personal touch to it, (c) you can share lists with the whole world, bringing joy to all. Best of all, there's no need to buy more stuff.

Who's with me next year?

Review: A Survival Guide for Child Care Providers

While picking up some travel books at the library, it occurred to me that they probably also had some books on parenting that might be helpful for our upcoming foster adventure. So, I made my way over to those stacks of books. As I was flipping through titles, Karen Levine's A Survival Guide for Child Care Providers caught my eye. It was slim, and bright yellow - I was sold enough to rent it from the library.

I have to say, I am really impressed with this little volume. The book is made up of bite-size chunks of advice for folks who run child care centers. While some of the advice was specific to running a daycare (something I'm not planning on doing anytime soon), most of it seems to apply to caring for children in general. There were actually a number of things I liked about the book:

  • It's a super fast read
  • It talks about my favorite psychological state - Flow, which automatically gives the author points in my book
  • It's mostly practical advice, but there's also a smattering of child development theory too. This theory helps explain why some practices make as much sense as they do
  • An impressive range of topics is covered, especially given the size of the book
  • The language and strategies discussed in the book seem to dovetail well with the training we received
  • It's interesting to get a day-care provider's view of children, and if nothing else, gives you a sense as to how a well run child care should function

From a foster parenting perspective the book is nice for two reasons. First, it covers a whole range of ages from infant through toddler. So regardless of the age of our first placement, I'll feel like I'm just a little bit more prepared. Secondly, because the book is written from a child-care provider's perspective, it assumes that there are other interested parties in the picture (such as parents!) who you'll need to work with. This is also the case with foster parenting, where there are birth parents, social workers, and others who play key roles in the child's life.

Is this the only book on parenting you'll ever need? Definitely not. And of course, I have no idea if the advice will actually be useful or effective. But, given its size, how well it's written, and the range of advice it covers - I think it's a winner. I give it a 9.5/10.0.

What books on parenting do you recommend?

Thursday, December 17, 2009

Zahava, Still a bundle of Joy

Tonight we got to babysit for our friend Zahava. The last time we saw her was when she was just a few days old. My how she's grown! You wouldn't think it would be a compliment to congratulate someone on doubling their weight - but when you go from 5lbs to 10lbs, it's excellent news.

As you can see, she's absolutely adorable - even with her what are you looking at face?.

I suppose we can kind of count tonight as a little practice.

YouTube is the new Napster

Back during the days when Napster ruled, an amazing thing happened to the world of music: suddenly, anyone with a net connection could get any song they wanted, anytime. You ran into a sort of strange dilemma: how do you recall or discover music that you have liked or would like? Once you could answer that question, the tunes were yours.

Then, reality (or the law? or the music industry?) set in, and Napster and its brethren were more or less retired.

I do believe, (a version of) those days are back. I consistently find that I can search for just about any song on YouTube and up pops what I was looking for. Even to the point where I can find a particular re-mix, from particular DJ. Sometimes it's a professional music video, or sometimes it's a amature one or sometime it's just audio playing behind a static image. Regardless, it's the song I was looking for.

Again, I'm getting that same odd sensation: all the music in the world is out there at my finger tips, I just need to recall what music I actually like.

Why pay $14.00 for a CD, or even a dollar a song, when I can it for free instantly? One obvious reasons is that harnessing all this music isn't as easy as it was with Napster. Still, there are some interesting possibilities. Consider:

  • You can create a Play List in YouTube and hit Play All
  • A quick Google search turned up Muziic.com, a site which turns YouTube into a music player. I'm not 100% sure about their service, but the web version does appear legit
  • There's the YouTube API, which could be useful for developing a custom solution
  • TuneWiki is another site that appears to mine the heck out of YouTube to offer a free music library

My plan is to go the Play List route. Though, I've just started experimenting and haven't really tried to amass a collection.

So, have any playlists you'd like to share?

Wednesday, December 16, 2009

Kicking the tires on child care

This is no standard door. Behind this door lies the very first daycare Shira and I have visited in preparation for our upcoming adventure. Now, maybe you have all sorts of experience around child care centers - me, not so much.

The experience that comes closest to this visit was the first dealership we walked into to purchase a car. Regardless of the research we did, we were completely outgunned. And so it was here.

As we walked around, and I nodded my head in agreement to what the director said, I could remember back to that moment in the show-room where the sales person popped the hood and we both "take a look." Oh yeah, she's a beauty alright I would say, no doubt staring at the windshield wiper reservoir.

On a more serious note, I really was impressed. We caught kids in a variety of states - from sitting down to snack time, to just having play time (a group of boys with fireman's hats informed us they just saved a cat - kudos to them), and everyone seemed to be in a good mood.

Wow, it's hard to believe that one day, a center like that one could play a key role in our lives. Amazing.

Is the tech start-up market aiming too low?

Clive Thompson's latest piece in Wired attempts to tackle the criticism that today's tech start-ups just aren't as ambitious as those from years past. Where are all those start-ups that are dreaming big like Google, eBay and Microsoft did?

As he explains:

You could argue that huge companies like Google and Microsoft and Facebook are working so ardently on big problems like cloud computing and social networking that less room is left for the little guys. But I don’t think that explains today’s smallness of vision. It’s always possible for tiny Davids to best tech Goliaths; indeed, that’s precisely what Google and Microsoft did back in their youth.


A more persuasive argument — which Lacy herself proposed — is that startups are hobbled by today’s quick-and-cheap startup culture. These days, Valley entrepreneurs tend to pick a cool (but niche) idea; bootstrap it with minimal staff, open source code, and rented server space; and then build a user base until some lumbering technosaur buys them up. That’s how Mint, which makes the nifty tool for analyzing personal finance, did it: Born in an apartment three years ago; sold to Intuit this summer for $170 million. This system is more fiscally responsible than the con-job IPOs of the dotcom boom — but it favors entrepreneurs with modest ambitions.

In typical Clivonian style, he elegantly refutes this argument by explaining how true innovation is invisible - that is until it pops into your field of view (think: my Mom lived her whole life without text messaging, and then poof, it becomes essential technology).

I think this argument is flawed for simpler reasons:

First, my sense is that there's a fair amount of revisionist history at play when you describe established companies like Google and eBay as having a grand vision from day 1. Check out eBay's story for a great example:

Originally called AuctionWeb and hosted on the same server as Pierre's page about the ebola virus, the site began with the listing of a single broken laser pointer. Though Pierre had intended the listing to be a test more than a serious offer to sell at auction, he was shocked when the item sold for $14.83. Pierre knew that he'd created something big as soon as he contacted the winning bidder to ask if he understood that the pointer was broken.


"I'm a collector of broken laser pointers," came the reply.


AuctionWeb soon took over Pierre's entire domain, www.ebay.com, short for Echo Bay, which was the name of his consulting firm at the time.

Do you really think AuctionWeb was created to change how commerce was conducted on planet Earth? Yeah, don't think so.

Secondly, if you look at Google, eBay, Microsoft and others, I think what you'll find as a common thread isn't vision, so much as Execution. Any group of guys can sit around in a bar and talk about making the world's information searchable, it's infinitely harder to do anything even close to that.

To imply that to "bootstrap [a business] with minimal staff" and develop a product is somehow the easy way out of developing a business is crazy. If anything, it shows that you have the dedication and passion to turn your idea into the next Google or Microsoft.

Vision is good, execution is everything. I just don't see the tech start-up world as suffering as long as there are businesses who are making solid and interesting products. Have patience, they'll be able to re-write their history and add a clever mission statement when they get just a little bit bigger.

Tuesday, December 15, 2009

Chanukah Hot Dogs - The Making Of A New Tradition

Chanukah celebrates a miracle that involves oil - so naturally the foods you eat on the holiday take advantage of this fact. There's everyone's favorite latkes (potato pancakes) and the always delicious sufganiot (jelly donuts - yum!). In the Simon tradition of using hot dogs on all special occasions, I'd like to submit the following recipe as a new Chanukah treat.

It's taken from the essential HOt Dog Cookbook - and is Kosher for Chanukah as well as the rest of the year.

Hot Dog Corn Fritters

Ingredients:

  • 6 eggs, separated
  • 1 12-oz can of corn, drained
  • 6 hot dogs (Kosher, of course), diced into 1/4-inch pieces
  • 1/2 cup all-purpose flour
  • 1/2 teaspoon salt
  • 1 tablespoon sherry

To prepare:

  • Beat egg yolks until they light and fluffy and add in the corn, hot dogs, flour, salt and sherry. Mix well.
  • Beat the egg whites until they stand in peaks. Gently fold the egg whites into the hot dog mixture
  • Pour about 1/4 of the mixture per fritter onto a hot, lightly oiled griddle and fry just like pancakes

Makes 6 servings. And as noted by the cookbook, Best served with: Beer*

Here's David working his fry-magic:


*NOTE: all recipes in the cookbook, including the breakfast ideas, have this same recommendation

The Braces Come Off, And 3 Life Lessons

Today is a big day - my ordeal with braces as an adult is ended. Whooo! Just in time for my Bar Mitzvah! Oy, maybe not.

Thinking about it, this experience is actually a great microcosm for some life lessons. Here's what I mean:

Delayed gratification is a good thing. The basic trade I made was 6 months with braces and (in theory) many years of straight teeth. It's seem obvious now, this was an the right trad, but, even 6 months ago, I wasn't so sure. The lesson: in our world of instant gratification it's easy to write off choices that have pain now, and gain later (such as finishing that degree or sticking with that exercise program). But those choices can be among the best you can make.

People are amazingly adaptable. My mouth is among the last places I'd like to install sharp metal brackets and wires. And yes, the first few days with braces those metal objects tore things up. But, in a remarkably short amount of time my mouth adapted to the foreign objects there, and treated them like they belonged. The lesson: sometimes you can't wait for the perfect time to take on a challenge (say, start a business, get married or have kids) - you have to do it, and just adapt.

Change can happen so slowly you don't even know it's happening. I never actually saw my teeth move. Yet, I know they are straight now, and started off crooked. They had to have moved sometime along the way. The lesson: sometimes change just needs to happen slowly. As this experience shows though, there are two keys to making sure change is actually happening: (1) measure your progress and (2) work with someone who knows the path and has actually seen the change happen.

Here's the completed picture - I think I'll stick to my day job, instead of pursuing my teeth modeling career.

Monday, December 14, 2009

Giving The G1 a Boost - Seidio Innocell Extended Life Battery

A couple weeks ago I noticed my G1's battery was essentially shot - I'd charge it all night, take it off the charger at 8am, and by noon it was basically dead.

Luckily, some time ago my buddy Nick had mention he was seeing a real improvement using the Seidio Innocell Extended Life Battery. Now seemed like the perfect time to invest in one.

So far, I'm definitely liking it. While I have yet to do a thorough test, the anecdotal evidence is good. I'm now able to go two days without a charge (with WiFi, GPS and Bluetooth turned off) - versus the one day I was able to go back when my G1's battery was working well.

Sadly, I can't even get close to the battery life Shira gets on her BlackBerry Bold 9700. Man, that thing just sips battery juice.

So, if you're G1 is just not up to the challenge of making it through the day - I'd definitely suggest the Seidio battery - at $36.80, it's a steal compared to buying a new phone.

Hmmm...I wonder if I could get an external charger and keep an extra, charged one, on hand?

Clever Picture Of The Day

It's still relatively early in the day, but I think this one is going to take the cake:

The true geek could probably say where each of the letters came from. Or better yet, would stop all work and research it by collaborating with people on Twitter, posting the results to Facebook, and starting a new blog www.sayitwithlogoletters.com.

And we wonder where our productivity goes?

Thanks StumbleUpon.

Sunday, December 13, 2009

Lessons From A Controversial Post

The other day, Steve Hall of AdRants really stepped in it with his post about a controversial TV spot named Shiny Suds. The ad is definitely creepy, and Steve's snarky post was definitely over the top ("feminist blogging should be outlawed" - and that was once of his kinder points). But I think the 100+ comments clearly took him by surprise.

After all, writing snarky copy is what Steve hall does on a daily basis, and it's what makes his site such a fun read (that, and he has a great track record of finding interesting advertising oddities on the web).

But clearly, this post got away from him. Here's of couple of lessons I took away from it:

  • Having a trusted third party play editor on your blog is a good thing. Shira has veto power over every thing I write, and every picture I post on the blog. If she says it has to go, it has to go. She doesn't use that veto power often, and when she does I whine about it - but it's no doubt saved me huge problems, and I'm forever thankful for that. I'd definitely recommend having someone play this editor role in a blogging scenario - especially where you're whipping out copy fast and furious. The of course isn't to create content that doesn't offend anyone - that's a lost cause, and no doubt not very interesting copy. But, having someone tell you when you've crossed the line and need to dial it back some, is huge. Not to mention, it's helpful if you can have someone spot your grammar and spelling mistakes ("its" errors especially!).
  • Part way through the comments an interesting discussion arises as to whether or not the snark content on adrants represents Steve's personality (i.e., is he a snark jerk because his content is written that way). That seems absolutely absurd to me. Clearly, you can take on a persona on when you write - that's one of the fun parts of blogging. Just like an actor who plays a jerk on TV isn't a jerk in real life, the guy who writes content that's snarky doesn't have to be snarky all the time. Steve could probably drive this point home a bit more by using a different name than his own when he writes for AdRants, though I don't think this is required.
  • I like how Steve withdrew the post, and didn't try to hide from commotion he caused. By not erasing content, Steve is following one of the finest traditions of blogging, which is to remain open about corrections or mistakes you've made.
  • Finally, I found this to be an excellent reminder that you never know what single post is going to set folks off - for good, or bad. I've found this to be the case too - one of my most popular posts ever is one that I hammered out in just a few minutes. On the other hand, impassioned mini-novelle's I've written on some important topic have often been ignored. You just can't tell what's going to resonate with people - so you always have to be careful about what you write. As Steve showed, a single blog post you write can color how many folks see your blog, even if you've been doing this forever (yeah, I'd consider 2004 "forever" in internet time).

Sure was nice of Steve to have this little incident, so I could learn from it. Man, he's always teaching me things!

Happy Chanukah, Day #3!

Happy Chanukah! Tonight started day #3 - we're just getting warmed up.

Notice the laptop in the photo? It's open to the Hebrew text of Wikipedia's version of Ma'Oz Tzur - one of the traditional songs we sing after lighting candles.

Exactly how did we live without the internet?

To David's credit, the words he remembered from all those Chanukah's past were in fact correct - so in theory, we didn't even need the Wikipedia's guidance. Though it didn't hurt..

Hope you're having a season full of light and warm.

Friday, December 11, 2009

We're having a baby - or a toddler - or a teenager!

Have I got your attention yet?

Allow me to explain. Earlier today, Shira and I were certified to be Foster Parents in Arlington County. Yes, you read that right - any day now, Arlington County could send a kid or two our way and we would be in charge of, well, parenting them.

Sweeet, eh?

I think it's worth answering a few Frequently Asked Questions at this point...

Q: What's foster care?

When Arlington county has a child in their care (say, they need to take a child out of an abusive home) they need to put them with a trained and vetted individual or family. In this case, that's us.

Q: Really, trained and vetted?

Yes, sir. Arlington has a 9 week training course, which was interesting and comprehensive. Think about it, how would you prepare people who have potentially never raised a child (like, us), to become insta-parents? Well, the Arlington program (which I believe is national one), did a remarkably good job.

Plus we've had background checks, CPS checks, finger print checks, and other ways to confirm we're not going to harm the kids.

Q: How old will the child be who is placed in your home be?

We don't know. Technically, they could be from 0 to 18 years old. But in our case, they'll probably be on the younger side. Though, foster care is about helping children and parents in need, not about finding the "perfect" kid.

Q: When will a child be placed in your home?

We don't know. At this point there are few T's that need to be crossed and I's that need to be dotted. But once that's done, it's a waiting game. Could be next Monday, could be in two months.

Q: How long will the child be in your home?

We don't know. Could be a couple days, could be a year. Foster care by its nature is temporary and in general the shorter the duration the better for the child. In fact, everyone involved works hard to make the stay as brief as possible, as children need to get back to a permanent family as quickly as possible.

Q: Where will the child go after your home?

The vast majority of the time, the child goes home to their birth parents. Though they may also be adopted or potentially may age out of the system.

Like the answers before this, it boils down to we don't know - see a theme here?

Q: Will we get to follow your foster child on your blog?

Alas, you will not. Foster kids have a right to privacy, which includes not announcing to the world about their situation.

This extends to other areas of life, such as not introducing or describing the child as being in foster care.

With that said, I'll probably be blogging about the foster care process in general and will no doubt share parenting experiences and tips (yeah, I'm a long way from giving any sort of tips to anyone).

Q: I've seen enough episodes of (insert favorite cop show here) - foster care is evil, isn't it?

You should be reading more books. Seriously, foster care has had its share of horror stories - but as we learned in our training, these horror stories are extremely rare in the Arlington County.

Besides, now Shira and I are part of the foster care process - and are we evil?

Q: How can I help?

Oh how nice of you to ask! As you can tell, at this point we don't know much. Heck, we don't even know what we don't know.

But we'll always appreciate advice and support. And if we do end up with a child whose age or temperament you've got experience with, or hand-me downs from, we're open to assistance!


Now, if you'll pardon me, I've got to Google this whole parenting thing and see if I can find some sort of comprehensive manual.

Getting Lost In Snopes

You know those crazy claims that come in to your e-mail, like the one about Obama not being eligible for security clearance or how some food companies pay a secret tax to the Jews, the first thing you have to do is head to snopes.com to check it out. Really, go to snopes - resist hitting the forward button and sending the nonsense on to your friends. In general, you can depend on Snopes to tease apart fact from fiction.

If you take this link and drag it to your bookmarks, you'll end up with a bookmark you can click to get a random snopes article. I find that the articles are thorough enough you'll almost certain to learn something new.

Like too many Cokes didn't kill a student and apparently Dr. Seuss and Kurt Vonnegut, Jr. weren't college classmates, despite claims to the contrary.

Seriously, who makes this stuff up? At least you can enjoy it and know the truth before you start repeating the same legends over and over again.

Thursday, December 10, 2009

Oh No He Didn't!

Oh yes he did:

Golf Magazine's latest issue features Tiger Woods on cover as Barack Obama's caddy and the headline: "10 Tips Obama Can Take From Tiger." We're betting that Golf Digest wishes they could unpublish the issue.

That's awesome! I do believe Golf Digest just out-Onion'ed the The Onion.

Wednesday, December 09, 2009

I Just Finished Running 1000 Miles, and Boy Are My Legs Tired...

It's true - I've officially run 1,000 miles. Well, actually, 1,003 miles to be exact. Sure, it took me a few months (OK, years - I started keeping track on 11/11/2007 and finished on 12/8/2009) - but I did in fact run all that way:

The lesson here is pretty obvious: by keeping focused on a goal, and making measured incremental progress, the impossible can become possible.

A Rabbi's Run-In With The Police

Shira pointed me to this wonderful story about a Rabbi who walks into a courthouse in Helena, Montana and is approached by a police officer with this bomb sniffing dog. The conversation went like so:

“I’m Officer John Fosket of the Helena Police,” he said. “This is Miky, our security dog. Do you mind if I ask you a few questions?”

Miky, pronounced Mikey, is in a Diaspora of his own. He was born in an animal shelter in Holland and shipped as a puppy to Israel, where he was trained by the Israeli Defense Forces to sniff out explosives. Then one day, Miky got a plane ticket to America. Rather than spend the standard $20,000 on a bomb dog, the Helena Police Department had shopped around and discovered that it could import a surplus bomb dog from the Israeli forces for the price of the flight. So Miky came to his new home in Helena, to join the police force.

The problem, the officer explained, was that Miky had been trained entirely in Hebrew.

Turns out, the officer was having a heck of a time trying to pronounce the Hebrew commands he had to use to get his dog to function. With the Rabbi's help, though, they were able to get back on track.

Like I said, it's a wonderful story, so give it a full read. I guess you just never know when those foreign language skills will come in handy.

Tuesday, December 08, 2009

PHP Howto: Adding TrueType Fonts to FPDF Documents

I'm loving the FPDF PDF library for PHP. It's simple enough that I can hack it when needed, yet powerful enough that I don't usually need to do so.

Today I wanted to render some text in a non-standard font. And while there are instructions around for adding fonts to the system, I did find myself confused at times. Here then, is a general description of what I did to support using any TrueType font in a PDF.

Step 1: find some fonts. I grabbed a bunch of .ttf files from from C:/Windows/Fonts.

Step 2: Generate .afm files.. Cygwin (X-Windows, I believe) comes with a handy utility, ttf2afm.exe. I ran it on all the .ttf files I a grabbed like so:

 for f in *.ttf; do echo $f ; ttf2afm -o `basename $f ttf`afm $f ; done

Step 3: Prepare a PHP script to generate font metrics. FPDF comes with a file: font/makefont/makefont.php that accounts for all the dirty work of generating the required font metric files. However, I didn't see an easy way to run this from the command line. So, I whipped up this quick php script:

<?php
/*
 * mkfont.php - A PHP file for providing a command line access to makefont.php
 */
require_once(dirname(__FILE__) . '/makefont.php');
$afm_files = glob($argv[1]);
function ttf_file($f) {
  $ttf_name = basename($f, '.afm') . '.ttf';
  return file_exists($ttf_name) ? $ttf_name : '';
}
foreach($afm_files as $f) {
  MakeFont(ttf_file($f), $f);
}
?>

I ran this like so:

  php -f mkfont.php *.afm

Step 4: Move the generated files to the right location. For now I didn't get too fancy, I just copied the generated .z and .php files into the font subdirectory of FPDF.

Step 5: Prepare your code to know about the new font. You need to call AddFont on the FPDF object before you can use your new font.

As a lazy solution, I through together the following code. It loads all the fonts in your font directory. I don't suggest using this on production code, as it's no doubt slower than just hand loading the fonts you need. But still, if you just to load up all your fonts in one shot, here you go:


function fpdf_font_info($metric_file) {
  $name = false;
  require($metric_file);
  if($name) {
    return strpos($name, "-") === false ? array($name, 'Regular') : explode("-", $name);
  } else {
    return array(false, false);
  }
}

function register_fonts($fpdf) {
  $path = $fpdf->_getfontpath();
  $metric_files = glob("{$path}*.php");

  foreach($metric_files as $f) {
    list($base_name, $style_name) = fpdf_font_info($f);
    if($base_name) {
      switch($style_name) {
        case 'Bold':
          $style = 'B';
          break;
        case 'Italic':
          $style = 'I';
          break;
        case 'BoldItalic':
          $style = 'BI';
          break;
        default:
          $style = '';
      }
      $fpdf->AddFont($base_name, $style, basename($f));
    }
  }
}

You can use the above code by saying:

  $fpdf = new FPDF(...);
   register_fonts($fpdf);

Step 6: Use your newly installed fonts. Once you've done all the above, you can say:

  $fpdf = new FPDF(...);
  register_fonts($fpdf);
  // Assumes you've installed: bob_b.ttf
  $fpdf->SetFont('BodoniMT', 'B', 12);

Bonus: Listing all your installed font names. Step 6 assumes you know the correct name of the fonts you've installed. To get a full list, you can invoke the following function:

// Use fpdf_font_info from above

function available_fonts($fpdf) {
  $names = array();
  $path = $fpdf->_getfontpath();
  $metric_files = glob("{$path}*.php");

  foreach($metric_files as $f) {
    list($name, $style) = fpdf_font_info($f);
    if($name) {
      $names[] = "$name ($style)";
    }
  }

  return $names;
}

This function will return an array of string names of all fonts you've got installed.

Happy PDF'ing!

4 Android Apps Worth Your Attention

Google Maps Navigation

I feel like the last person on the planet to install this one - but in case I'm not, you must, this very second, go upgrade Google Maps on your Android to get navigation support. Holy Smokes, is navigation slick.

Not only do you get the turn by turn directions and maps you'd usually pay a nice price for from Garmin or TomTom (which I'm glad to do, frankly) - but you also have a data connection so you can do things like check out StreetView along the way. I love how when you arrive at a destination Google shows you an actual photo of the location.

If I were Garmin or TomTom I'd take this as a big warning shot across the bow - not only can a cell phone provide just as high quality service as your devices, but it can go one even further thanks to a data link.

On a recent post, Jordan commented that he could imagine life using a Cell Phone GPS only. I wasn't quite there - now that I see what Google Nav is all about, I totally see it.

Astrid Todo/Task Manager

This app was recommended to me by my buddy Greg. He says it's a winner when it comes to TODO list management. I haven't had a chance to use it, though all the marketing material sounds good. I'll probably wait until I get tired of my current system before I delve too deeply into using it.

Google Goggles

This one is hot off web: Google Googles allows you to search the web using a photo. Essentially, you pull out your cell phone, snap a photo, the system then analyzes the photo and gets back to you with search results.

What really strikes me as interesting here isn't so much the search capability, but the fact that the Android phone is going to be able to take input from the camera and make meaningful sense of it. Currently, when I see a book or item I want to add to the todo list, I take a snapshot of it and manually add it. I assume, eventually, I'll be able to skip the manual part of the equation.

Aldiko

I came across Alidko while I was hanging around a T-mobile store waiting for them to finish ringing up my Web Stick thingy. I notice that the MyTouch in the store was running this app and it immediately won me over.

Aldiko is an eBook reader that actually makes reading books on the G1 quite feasible. I find the text clear and the gestures to switch pages natural.

So far, I've been using Aldiko just to catch a few pages here and there (say, while I'm pumping gas). The auto-bookmark feature is just what I needed to allow me to close the app and get back to where I left off with zero effort.

Perhaps what's most impressive is how many books are available to download for free. Check it out - it's one of those apps that you'll be glad you did.

Monday, December 07, 2009

2 Click Buying - Innovation In An Unexpected Place

While shopping for Shira's birthday, I noticed Amazon now had this strange PayPhrase thing near the checkout button. And what's PayPhrase?

PayPhrase is an easy-to-remember shortcut to shipping and payment information in your Amazon.com account. Use it for Express Checkout at Amazon.com and across the web.
Why Should I Use a PayPhrase?
* Privacy: Shop securely across the web without sharing your credit card.
* Express Checkout: Speed through checkout without having to sign in.
* Parental controls: Let teens shop online within limits you set.

Apparently buying something with PayPhrase is as easy as entering the phrase and typing in your pin. And that's it. It's not quite 1 click, but allows you to route the package to a series of different addresses.

Like 1-Click buying, in hindsight the concept is obvious. But it's powerful stuff, and a technique that folks clearly overlooked.

To me, this is an excellent reminder about innovation. It's precisely the boring, easily ignored, must-do-it-the-way-we've-always-done-it tasks like checking-out, that appear to have no room for innovation. Yet, as Amazon shows here, it's these exact processes that can make for the best innovations.

Or, to put it more bluntly, which sacred cows should you turn into hamburger today?.

Sunday, December 06, 2009

50 Best Inventions of 2009 - There's Hope For Humankind Afterall

I really enjoyed reading The 50 Best Inventions of 2009. I appreciate a clever gadget and idea as much as the next guy. But, reading through my list, I was surprised at what a sense of hope for the future it gave me.

Humans are good at building our way of problems - and this list shows this fact well. From lightbulbs to prosthetics, it's good to know folks are hard at work solving big problems with simple, affordable, solutions.

Impressive stuff.

Ben vs. The Blackout Shade

I never really gave much thought to the shades in our house. 5+ years ago we had them installed, and ever since they've Just Worked. That is, until a few weeks ago, when I noticed the shade in our bedroom wasn't really raising properly any more.

Thanks to the dangly thing on the cord, I realized that the shade was made by Hunter Douglas. I gave them a call asking them what I should do. Apparently, their shades have a lifetime warantee - I just needed to deal with a few details: (1) describe the part that was broken and (2) install the replacement part they sent me.

Using the most primitive of terms I was able to describe to the woman on the other end what was broken. And for no charge, she shipped me on out the parts.

The replacement part came with, I kid you not, a 17 step installation procedure (for one little broken thingy!).

As I carefully followed each step I was struck by: (a) the clever design of the shade and (b) how there was in fact a precise name for each part of the shade. Like the bale, equalizer and equalizer-wedge. I suppose each field gets its own jargon, why not the shade and blind field?

As is true to most projects I take on, it took repeating the steps 3 times before I finally got it all right. Who knew you could run the cord through the cord-lock and bale incorrectly not once, but twice, before realizing your mistake?

All in all, our shade is back to functional and I can now carry on a conversation with a shade replacement-part supplier. All in all, not a bad accomplishment.

Friday, December 04, 2009

Is there a better feeling?

I mean really, is there a better feeling than getting home from a vacation and getting your inbox completely emptied?

Sure, in another few hours it'll fill back up again (and in business, that's usually a good thing!) - but for just a few moments, there's e-mail peace.

It's a special kind of joy, no?

OK, the jetlag apparently has gotten the best of me and it's time to sleep.

Some Stumble Upon Wisdom

Everything I never knew I needed to know I learned from StumbleUpon.com:

Such as...

What have you learned from StumbleUpon today?

LinkWithin

Related Posts with Thumbnails