Thursday, January 17, 2013

He Has a Dream. And It's AWESOME

Every time I try to explain a dream I had the previous night, it comes out sounding downright whacky. "So yeah, we were in the kitchen I grew up in, and I was with another family, but you were there, on a horse, and then my second grade teacher asked for my homework..." -- that sort of thing.

And so, with this in mind, I have a wee bit of sympathy for Glenn Beck as he describes his project: Indepence Park (that link points to a very left leaning blog, so excuse the snarky comments). Seriously, take a few minutes and watch him unfold his vision:

It's like he's taken every idea he's every had, and combined it into one set of architectural plans. Like my retelling of last night's dream, it just leaves one confounded. A few quotes that stood out to me:

Everyone who comes through the front gate comes through [a building designed to look like] Ellis Island. And the reason that we put Ellis Island there is because how that's how most of us or our families came through -- we came through Ellis Island.

A touching sentiment. But what if you didn't arrive in the good old US of A between say 1892 and 1925 -- well then, you must not be one of "us." How comforting.

His description of the education center is downright scary:

Before you send your kids to college...you spend a week with us… We will show them the truth. We will tell them what they’re gonna try to do and we will deprogram them every summer if you care.

And his description of his "archives of truth" -- well, wow. Just wow.

Heck, just watch the whole thing. It's a Kibbutz meets Fox News meets Disneyland meets an old school campground.

The irony, of course, is that he's trying to model a libertarian utopia, which by its centralized nature automatically makes it a poor fit for libertarians.

Still, I want very, very badly for him to produce this place. And I very much want to visit. I don't have the money or technology to put me on a horse in my kitchen talking to my 2nd grade teacher -- so this will have to do.

A Notepad That Goes Places You Really Need It To

I saw Aqua Notes on Amazon one day, and immediately added it to my wishlist: a note pad that would work in the shower? How awesome is that! Luckily, my brother gifted me Aqua Notes for Chanukah, so I was able to try them out.

When I added Aqua Notes to my wishlist I wasn't quite sure what it was all about. Was it a reusable slate or some fancy ink based product? It turns out, the pad is nothing more the a paper note pad, a couple of suction cups and a plain old pencil.

You wouldn't think that pencil and paper would make for an effective writing combination while water is pouring down. And you would be wrong. Aqua Notes totally work! The paper gets soaked, but remains strong, and there's absolutely no smudging from the pencil. I'm really amazed at how well the setup works.

Aqua Notes turns out to be as useful as I hoped it would be. I can jot down a TODO list, scribble out an idea with ease. More importantly, it let's me leave little notes for Shira to find and respond to. It's all terrifically fun and romantic.

I suppose $8.00 for 40 sheets of paper is steep, but given how well the product works I'm sold. And far better than a re-usable tablet, I can rip off the sheet of paper and bring it with me out of the shower. As you can see in the above photo, the notes when damp, naturally stick to the wall of our shower. This makes for an ad hoc pinboard of sorts. The paper peels off from the shower without leaving any a mark.

Forget buying some fancy bit of technology to help you kick start your next idea - you just need a notepad and a few really long showers.

Wednesday, January 16, 2013

So this is inappropriate?

Shira send me this link to read on CNN, as she's apt to do throughout the day. I click on it, and am greeted with this message:

Oooooh, what spicy content did she send me?

I go ahead and risk it, by clicking "Yes," I want to continue and am greeted with this?

The article, as you can see from the headline, outlines why one mom has opted to not teach her child about G-d. It's actually a fairly direct and terse article about the reasons why someone might embrace atheism.

Agree with the content of the article or not, I just can't get over the fact that the article is marked as Under Review.

The simple explanation is that the content was repulsive to enough people the inappropriate button was hit so many times, an automatic review was triggered. If this is indeed the case, this is amazingly sad. Surely people who clicked inappropriate realize that one of the most precious rights we have is that of free speech, and that this person is exercising just that? Sorry to get all preachy, but this is one of the features that makes America great: you can say things others don't agree with, and do it without fear. Squelching opinions, especially those related to religious matters you don't believe in, is supposed to be the agenda of totalitarian regimes, not the American populace.

I respect there may be other explanations. Perhaps an article that garners 135 pages of comments is automatically put in review. Heck, perhaps other atheists clicked on the inappropriate button to make those of faith commenting on the article look like a bunch of loonies.

Still, reading the comments doesn't exactly reinforce these other theories.

You know, there's this rule I remember hearing about, the one about treating others they way you want to be treated. Yeah, that could be handy right about now. You know, treating others with respect and honoring their right to publish, so that you'll have that same respect and right later on.

Tuesday, January 15, 2013

A Minimalist Sketching Kit

I can't resist packaging stuff up into kits. There's just something rewarding about the exercise of considering and optimizing the tools you'll need for a job (though, it can be taken too far, when all you do is prepare lists of stuff, and never actually *do anything*). Especially, because I have a fondness for clever hacks that usually do more with less.

Anyway, I figured I might as well taken my sketching fascination and formalize it into a "kit" (there, that just sounds so official.

So here it is, a minimalist sketching kit:

Along with this, I'll always have two pens and a scratchpad on me. I usually have a bit of grease pencil, too.

The various pencil hardnesses are really an experiment. 5b and 5h are pretty extreme options, which is why I chose them. The different hardnesses let me practice the notion of iteration and modularity in drawing -- something I do all the time in programming, yet struggle with in sketching.

For more inspiration, check out Flickr Sketchkits - a group with about 2,500 pictures of various sketch kits. After browsing through a hefty number of entries, all I've got to say is this: people are amazingly talented.

My New Favorite App That Almost Wasn't

This scenario seems to happen to me about three times a week: I go down stairs and put some frozen item in the toaster. I set the count down timer on the microwave to 15 minutes, take note of the time and return back to my office upstairs. About an hour and 20 minutes later it hits me that I'm hungry, and I've almost certainly filled the downstairs with the smoke of a newly generated bit of charcoal.

Of course, what I should be doing is setting the timer on my phone. But, for some reason, there's just enough cognitive friction into opening up the default clock app, switching to the timer, and setting my countdown time, that leaves me thinking Oh, *this time* I can just pay attention to the clock.

My first thought was to totally and gloriously over engineer a solution: post a variety of NFC tags that contain instructions for a count down timer next to the toaster. Have a 5 minute, 10 minute and 15 minute tag, for example.

Unfortunately, I couldn't find an app that would let me store just this data in an NFC tag. NFC Task Launcher comes close, and even contains various timer options. But none does what I want: touch tag, have countdown timer commence counting down.

I could rig up my own Tasker solution, but I didn't seen a trivial way of doing this. I'm confident that I could make some slick timer thing that announces the remaining time, but I don't have the time to code it now.

Next up, I figured surely someone has developed a trivial widget that allows me to preset a count down timer, and just click the icon to start it. I can imagine a whole screen on my android dedicated to various countdown timers. I'd flip to that page, and hit start on the 15 minute one, and Shira would never again have to return to a house that smells like scorched veggie burger. Like my mythical NFC timer, this application I couldn't find either.

Finally, I did find Countdown Widget Timer. This app puts a clean 2x1 widget on any screen, and acts as a self contained timer. No silly ads or other cruft. I've placed two timers on my home screen (who knows, maybe I'll have an especially complex lunch) and they can run independently. I do need to set them, but there's a history associated with the timers, so switching between common values (5 minute and 15 minutes, for example) is relatively painless.

I was sold. I had my slick little solution. I even bragged to Shira, one evening, that my troubles had been solved. I put something in the toaster and confidently proceeded upstairs. 45 minutes *after* my timer went off, I realized something wasn't right, and rushed downstairs to find yet another meal ruined.

What happened? How had Countdown Widget Timer failed me so completely? I ran a test and realized the problem: when the timer was finished, it let out a few bursts of vibration, and a modest "Beep!" As alarms go, it was essentially invisible.

Luckily, all is not lost. When you click on the widget you're taken to a screen where you set and start a new timer. If, on this screen, you click on the Menu soft key, you see a new "Settings" menu item. Clicking it took me to a nifty little settings menu. It was here where I was able to click the Insistent check box, and click Alarm Ringtone to select a more obnoxious alarm.

Now when the timer goes off, it makes just enough of a racket that I'll actually take action.

Mmmm....I'm hungry...

Monday, January 14, 2013

Dear NBC, Thanks.

Can't say that I've ever written to a TV show before. But, there's a first time for everything. That last episode of 30 Rock apparently touched a nerve.

A hand written (and barely legible) version of the note below has been sent to the folks at NBC.

Dear NBC,

In the most recent episode of 30 Rock (Season 7, Game Over), Liz Lemon was presented with three choices for starting a family: engage in fertility treatments, wait an extended period of time to adopt an infant or adopt an older child now. I was grateful to see that in the end, she was excited to choose option 3, adopt an older child.

As the Foster Dad of an 8 year old, I'm often astonished to see couples who are desperately yearning to have children, and older children desperately yearning to have parents, and all too often, no match is made between these groups.

It's true, Liz Lemon won't teach her hypothetical 6 year old to walk or hear his first word. She will, however, teach him to drive and help him put on his corsage for his first Prom. In short, parenting is a lifetime endeavor (just ask my Mom!), and doesn't stop when a child grows out of diapers.

I would never dare to imply that one method of starting a family was preferred over another. Only that if 30 Rock can help spark the notion of adopting an older child in a the mind of a single couple, then they have done a remarkable service. Not only for that child in need of a family, but for that couple whose dream of a family can now be fulfilled.

Graciously,
Ben Simon

Friday, January 11, 2013

Running Mantra

Do not give up. Do not give in. Do not stop.

-Me mumbled during the last 12 long, uphill, minutes of my run

In my head, I was as graceful and powerful as a marathon  runner in a Gatorade commercial. In reality I was a clumsy, slow moving weirdo talking to myself on the street.

That's OK, though. I finished the run on time and won the race in my head.

Tips for Cutting Your Hair At Home

For over a year now, Shira's been cutting my hair at home. She uses a pair of the classic Wahl hair clippers to give me a basic, short cut. For me, the main attraction for getting a home hair cut was convenience. Getting back that hour plus of time on a Sunday was such a treat. Now she can spend 15 minutes trimming my hair, I jump in the shower, and I'm good to go.

Here's what I've learned during that time about cutting your hair at home:

  • It's hard! Your barber makes it look easy because he's got tons of practice. But it most definitely is not. It took at least 5 haircuts before I felt comfortable going under the clippers. Sure, I told myself "it's just hair -- who cares how it looks." It turns out, I did. Whether you like it or not, your hair makes a statement about you, and having an awful haircut just isn't a statement you want to make. I'm glad I pushed through the learning stage, but it wasn't easy.
  • Make a plan. You can't wing it. You can't combine a couple of different methods. The only sane approach I've found is to pick one hair cutting procedure you're going to follow, and then methodically do so. In the early days, the moment we cut the first bit of hair, panic would inevitably set in. A plan gets rid of that sensation (mostly).
  • Make it longer than you expect. If you want a 2, start with a 6. Get comfortable with the tools, then go for that super tight haircut. I'm always amazed at the leap between the 1 and 2 guards - it's huge. Work up to that short length.
  • Cleanup can be quick. Here's our standard setup: I take two kitchen garbage bags and pull them apart so they are open lengthwise. I lay these down in the bathroom to make a small square area. I put a kitchen stool in the center. I wear a pair of shorts and a hair cutting cape (I know, that's an image you need in your head) and sit my butt down on the stool. Shira cuts my hair, I shake out the cape, and roll the garbage bags up and put them in the trash. I jump in the shower. It took us a number of attempts to figure out this arrangement (we started in the kitchen, which is classic, right?), and now cleanup is a breeze.
  • Use a trip to the barber's as a classroom. What does Shira know about cutting men's hair? When she started, nothing. She tagged along a few times to watch my hair get cut and that definitely pointed her in the right direction.
  • Be patient. Remember, this is hard. Be patient, you'll get it.

Thursday, January 10, 2013

When Music and History Collide

I'm really enjoying FlightFacilities's 1972-1982 Mix Tape. It's one hour of music, mixed in with famous news broadcasts from those 10 years. It's a surprisingly effective way to make a historical timeline and put events in context.

Here, give it a listen - and either learn a little history, or relive it:

For example, did you know there was event known as Disco Demolition Night? We didn't learn about that in history class.

Tuesday, January 08, 2013

The Index Card As Art Canvas

Index cards work great as a personal organizer (though I prefer a spiral notepad), software development tool, and about a million other things. Recently, I've been thinking they might also work well as sketchbook replacement, too.

Besides being compact, cheap, durable, and offering both lined and blank options, they also don't have the intimidation factor that a perfectly clean sketchpad has. Finally, I can toss them on the glass of our All-In-One Printer, hit the scan button, and they'll be saved as individual images. That makes for easy publishing.

I was curious if others had this idea before me, and of course, they did. Though, the best resource I found on the topic was from Daisy Yellow, who started her own little challenge: Index-Card-A-Day. The program works just like you would expect: every day you take out an index card and make some art. Paint, draw, sew, write, whatever. Just do something. You can see what folks have come up with here and here.

The results are brilliant! Simple and powerful, just the kind of idea I can't resist.

Even if you're not going to participate in the challenge, it's worth checking out her FAQ. If nothing else, the FAQ is a great checklist for how you might want to put together your own kind of challenge.

Back to the topic of index cards, two must read posts from the ICAD project are: What can you do with an index card and What will you do with your index cards?.

Finally, on a totally different website I found this wonderfully clever index card creativity hack:

  • Drop a tea bag randomly onto an index card and let it dry
  • Draw a grid of panels over the stain
  • Shop for images in the panels, and riff off those with some doodles and captions to make a mini-narrative

This doesn't sound like much, but check out the results, pretty amazing if you ask me.

Caption Me: Migration Edition

Saw a number of flock echelons* today, as birds were heading out of town. I only managed to capture a good shot of these guys:

Anyone want to take a crack at a caption?

Today was a gorgeous day, which seems fitting, as I learned that 2012 was the warmest on record. Here are a few more snapshots from the a jog we took this afternoon:

*I'm sorry, but I simply had to use that phrase in this blog post after learning about it after a little research. I'm sure I'm using it incorrectly, and I'm sure I don't care.

Gotcha of the Day: Apache refuses to serve up static files

I've got a web app running on a new hosting provider, and for the most part, everything is running smooth. The app is built around a custom dispatcher, so of course, there's a few lines in the .htaccess that look like so:

 RewriteRule ^index\.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]

Nothing exotic there. And the dispatcher is working great. However, I've got a few cron jobs that perform some maintenance by kicking off a curl command against a site's URL. Something like this:

 */15 * * * * curl -s http://theapp.com/maintenance/cleanup.php

In this case, I get an error about cleanup.php not being found.

My first thought is that cleanup.php didn't get relocated to the new server, but sure enough, it's there.

The I dig a little deeper and realize that the 404 is being issued by my dispatcher, not by Apache. This means that even though the file maintenance/cleanup.php exists on disk, the RewriteCond -f isn't finding it. If it was, it would have skipped my dispatcher.

But how could that be? I double check the permissions on the files and directory, everything looks good.

It must be some RewriteRule madness or something on my part, so I go as far as moving .htaccess out of the way. There's no dispatcher to be had. Now I get a new error:

  HTTP/1.1 406 Not Acceptable

Huh? Now I'm thinking that the web server I've installed on has some sort of serious misconfiguration. I write up a long winded ticket and send it off. But, just in case it's an easy fix, I jump on the live chat offered by the hosting provider.

I plead my case: the host isn't serving up a static file when I ask for it from the command line.

A moment later, the tech responds: it's because you're not sending a User-Agent.

The snarky version of me wants to type back something about how absurd that response is. Of course I'm sending a User-Agent, I just happen to be sending one mentioning curl in it instead of IE or Firefox. Silly rookie.

And then it hits me, and I forget about being snarky. I ask: is there a module installed in Apache that would be rejecting requests that look like bots?

His answer: yes, mod_sec. So that explains it. mod_sec, some sort of security module, is blocking requests that look sketchy, including curl requests. Seems a bit overboard to me, as I use curl all the time, but what the heck do I know.

I was tempted to have him turn off mod_sec, but seeing as I really don't know what I'm asking him to do, I decide better of it. Instead I just updated my cron to say:

 */15 * * * * curl  -A "Mozilla/5.0 (compatible; MSIE 7.01; Windows NT 5.0)" \
     -s http://theapp.com/maintenance/cleanup.php

Which of course, is exactly what any hacker would do, but that's besides the point.

Regardless, It's fixed, and I'm happy.

Monday, January 07, 2013

Our Entire Honeymoon Photo Album

We did some sorting of photos this last weekend and we came across a relatively old package of photos. Sandwiched between pictures of our wedding, and us in our new (and very first place!) were these 5 photos. As far as Shira and I can tell, they represent every photo we took on our Honeymoon:

I'm baffled by all this. Surely it occurred to me while on vacation that this was an import occasion, right? And yeah, I'd need to pay for processing and all, but still, 5 photos?

Luckily, things have improved quite a bit. On our last 1 week trip, I shot just about 2,000 photos.

I'm telling you, all these people tweeting and Facebooking their lives are actually going to be pretty psyched when they can look back and see their own personal history.

Oh well, live and learn.

Name That Tree: Yellow and Green Baseball Sized Fruit Edition

[This is another tree identification post, where I try to identify an unusual plant that I come across in my neighborhood.]

Yesterday, while running on the Capital Crescent Trail I noticed the following fruit along the side of the path:

It's hard to tell scale from that picture, so you'll have to trust me that it's a baseball sized object. Which was strange, because that's a really substantial fruit to not be able to identify. There didn't even look to be trees nearby that would be big enough to produce such a fruit. Still, there were enough fruit lying around that I was pretty sure it didn't just fall out of someone's backpack:

We continued to run along the trail, and just when I was starting think that perhaps someone just dumped of a box of fruit they bought at Whole Food's, we saw yet another bunch of the mystery fruit. So, what was it?

I turned to Google Images and initially had no luck finding it. Searching by the characteristics didn't turn anything up. Then, it occured to me: we don't have an awful lot of fruit trees here in DC, what with our winter and all. So search for Washington DC Fruit Trees, and sure enough, on the first page I saw:

There was the mystery fruit! According to the linked page, it's a Hedge Apple. Officially, the plant is named Osage Orange, it doesn't appear to be found heavily in the DC area.

As for uses, there are a number:

  • At least one page says the fruit is edible, though most pages say it's not. My guess is that few people want to go through the trouble of extracting the edible seeds from the fruit.
  • A common use of the fruit appears to be as a pesticide. However, the jury is out as to whether this actually works.
  • The tree does have a novel history, as it was apparently used in the Great Plains Shelterbelt, a massive project started in 1934 to deal with soil erosion.
  • Some claim the wood is ideal for making bows from.
  • The most common use of the fruit appears to be that of projectile among kids. Depending on where they are grown, and when they are thrown, they either make a most excellent Splat! or are frozen rock solid and are near deadly.

So there you have it, mystery solved.

Friday, January 04, 2013

A Better S3 Backup Solution

A while ago I setup duplicity to back up to Amazon's S3 and all was good. Every night, I'd get an e-mail from cron saying the backup completed and I'd note that there were no errors.

Everything was going great until I actually had a file I needed to restore from backup.

First, I ran into this error:

OSError: [Errno 24] Too many open files

This turned out to be easy to fix.

Then, I kicked off a restore and waited. And waited. And waited. After 20+ hours of trying to restore a single file, I knew my backup strategy needed to change. I think there are few issues that were causing this massive slowdown: (a) I've always been making incremental backups. This makes for a "long backup chain", which apparently is slow to recover. (b) I'm using GPG encryption. Encryption is a nifty feature, but I'm storing files on Amazon's S3 and I'm wiling to trust that they are secure over there. And finally, (c) duplicity has been holding onto every backup since the beginning of time. That's cool, but a bit excessive. I should probably be deleting backups once they get nice and old, like say, 6 months.

With these lessons learned, here's my updated backup script. It's very much inspired from this example:

#!/bin/bash

export PASSPHRASE=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

dirs="/home \
     /var  \
     /usr/local"


for d in $dirs; do
  prefix=$(basename $d)
  echo "Started: $d"
  duplicity --full-if-older-than 1M --no-encryption $d s3+http://backup.`hostname`/$prefix
  duplicity remove-older-than 6M --force s3+http://backup.`hostname`/$prefix
  echo "Ended: $d"
  echo ""
done

As for my 20+ hour plus restore time to get a single file. There's a few things I'm doing to tackle that: (1) I've kicked off the restore command with the --file-to-restore option set to the individual file I need. (2) I've kicked off the duplicity command with -v4 so I can see the progress that it's making. So far, it's telling me that it's processed volumen 89 of 15,961. Slow as molasses, but at least I know duplicity is working away.

Thursday, January 03, 2013

Journey To The Center Of My Laptop

My Dell Vostro 3300 died twice today. And by died, I mean randomly turned off in the middle of my work. My thinking is that the laptop is overheating. So, I get this brilliant idea: I'll open her up and clean out the dust that's gumming things up.

Dell is even kind enough to provide intricute instructions explaining how to get to the fan and heat sink, which is where I hope to find a whole bunch of dust.

18 screws later, I've got my laptop in pieces. As far as I can tell, each component connects to the motherboard by means of a paper thin ribbon cable. I'm 99% certain my Dell will never go back together again. I'm way over my head. I end up with this:

Worst of all, I finally do get to the fan, and find that it's not clogged with dust. Ugh.

I start the procedure of putting the laptop back together. As I'm just about done, I'm left with one extra part: a tiny ribbon cable used to connect the laptop's media keys to the motherboard. Whatever, I don't use those keys frequently anyway. I just want my laptop back.

I plug her in. Hit the power button.

Nothing. Hit it again. And again. And again. Nothing.

Of course, that tiny ribbon cable not only connects the media buttons, but also the main power switch. Ugh.

I take the laptop apart again. I ponder how I'm going to connect this wisp of a cable into the keyboard rest and motherboard. I'm still convinced this isn't going to work.

Yet it does! And the rest of the pieces go back together, too. I'm thoroughly amazed. I'm actually blogging this story from the laptop that was just in surgery.

Lesson learned: leave the hardware to others, and stick with my day job.

More "You Don't Need That Fancy Camera" Inspiration

Here's a few non-DSLR photography resources I've tripped over these last few days:

  • Samsung Galaxy S3 Flickr Group - I'm amazed that these photos were all taken with a Galaxy S3. But, that's what the groups for, right? Browse and get inspired.
  • Photo Walkbabout - a blog post with the usual theme: the author didn't have his real camera, but did have his cell phone, and produced great images. The catch: this is from 2007, and the camera was an Ericsson K790. That's 3.2 megapixels of awesomeness there.
  • Cheaper Camera, Pro Photographer Challenge - Who doesn't love these wacky challenges? In this case, the camera may have one, but it was still a fun fight to watch.
  • Jeffrey's Exif Viewer - More of a tool, and less inspiration, this little bookmarklet is handy for checking out the metadata embedded in an image. Useful for confirming that cell phone shot really did come from a cell phone.
  • Simple Tips That Will Make Your iPhone Photos 100 Times Better - articles like this one are everywhere on the web, and mostly filled with pretty basic information (don't use digital zoom, hold the camera steady, that sort of thing), but I actually found this one useful. Or, maybe I found the specific information and sample photos useful. Yeah, that's probably it.
  • Dirkon - you can afford this camera, trust me. All you need is some heavy duty paper and a whole lot of patience.

No go forth and take great photos using whatever camera you happen to have lying around.

Wednesday, January 02, 2013

One more Panama Post: Passing the Time on the Airplane

I'm a big fan of sketching, but never seem to have time to practice. And when I do have time, I tend not to have anything useful to sketch.

As we were leaving the hotel and heading home from Panama I had a flash of inspiration. I grabbed a scratchpad the hotel had next to the phone in our room and worked up a little activity for the plane.

I pitched it to our 8 year old like this: I was going to practice sketching some of the photos we had taken on our trip, would he mind using his colored pencils to fill in the color. We'd be a team.

He totally went for it. For the next hour I got sketching practice, had was occupied with coloring, and Shira was able to be engrossed in her book. Here are the results:

Good golly, drawing is hard! On many of sketches you've really got to use your imagination to see much of anything. Still, it was a fun and educational little game. And all it required was the barest of supplies.

Tuesday, January 01, 2013

Around Town

Happy 2013 y'all! It's been a quiet one around here as we are recover from our recent trip. Last night was especially low key, as Shira and I watched a chick flick and ordered in Thai food. Ahhh, the simple pleasures of being in your own house, eating familiar food while watching a predictable movie.

Here are some random'ish snapshots from the last couple of days.

The Navy Annex is finally being torn down. Not too shabby, considering the story I've been told is that they were built in 1941 as temporary buildings.

Not sure what this little monument is for. Perhaps a mini vigil to the folks in Newtown, CT?

Here I am, dropping of a travel bug in a local Geocache. This tag started its life in Japan, and I was glad to bring it back from Panama, so it could continue its journey.

Here's Nick and Aurora checking out the Echo sculpture on the Pike. The sculpture was inspired by the Arlington Radio Towers, which was the site of the first transatlantic voice communication (between Arlington and the Eiffel Tower!). As sculptures go, I'm a fan. It's a clever way to honor a history many of us Arlingtonians no nothing about.

Uh, correct me if I'm wrong, but it's 5:44pm and the House has yet to vote on an agreement to avoid the cliff. Looks like the Washington Post got a little ahead of themselves on this story.

Sunday, December 30, 2012

Panama Adventure - The Last Post

We're on our way home from Panama, as I tap this out. We're flying over white puffy clouds, without a care in the world.

We had our usual fabulous breakfast, which consisted of multiple trips to the buffet. Shira enjoyed all the fruit she could eat, and our little one was in heaven with the unlimited supply of lox and croissants.

Here are a few miscellaneous observations I made over the last week. Maybe they'll be helpful if you travel to Panama?

  • Bring a Spanish phrasebook. They use American currency, and the US had a presence here for the last 100 years. But that's all pretty much irrelevant, we found that almost nobody spoke English, and the majority of the menus and signs are in Spanish only. Sure, it was fun trying to figure things out, and the language barrier made for some good stories, but it would also have been fun to try out more Spanish.
  • Frommer's continues to be my guidebook of choice and an essential travel item. I was surprised that we weren't able to use any of the restaurant recommendations. Though I think that has more to do with the street layout and general business turn over of Panama, than the book itself.
  • The Radisson Decapolis really delivered as a family friendly hotel. The suite contained two large rooms, which meant that our little one could go to sleep and we could stay up without disturbing him. Breakfast, as I mentioned above, was also outstanding, with a large buffet, and waffles, pancakes and such included. The location was ideal, and being next to a Kosher Supermarket was a bonus I didn't even know I could ask for. The only part of the hotel that left me wanting was the concierge. A good concierge can steer you to just the right restaurant, or attraction. At the Decapolis, they were glad to run Google Map searches and print the results, but didn't really deliver any more specific information. Heck, at one point they routed us to the middle of the city to visit the marine museum instead of to an island at the Amador Causeway.
  • Bring the umbrella, leave the windbreaker at home. It down poured every day, and an umbrella would have been handy to deal with this. It would also have been handy to deal with the scorching sun at times. It was way too hot to even think about putting a rain jacket on. With all that said, there's usually shade or cover from the rain to be found. And folks are so used to the rain that nobody panics when it arrives during the day. You stand around for a few minutes and wait for it to pass, and enjoy the cooler weather that it brings.
  • While the weather was hot and humid (evidence by the sheen of sweat I have in every photo), neither the sun nor the bugs were a problem. Every day we covered ourselves in suntan lotion and bug spray, and in return we got neither sunburn or any bug bites. This was quite a pleasant surprise, as we expected the worst.
  • I used a Tide Travel pack to wash an extremely sweaty (and smelly!) dry-fit shirt and a pair of REI travel pants in the sink, and to my amazement they came out smelling great. They took the night to dry, but were ready to wear the next day.
  • I kept my phone in Airplane mode throughout the day with the screen turned all the way down, and it retained most of its charge. I found it handy for taking sound recordings in the jungle, for snapping panoramic photos on top of Ancon hill and for listening to an Overdrive audio book during the flight.

Overall, Panama was a most excellent travel destination. There was plenty to do in Panama City for the week, and had just the right mix of history, nature and activities that I was hoping for. With the language barrier, it definitely didn't feel overly familiar. And the whole Kosher scene was just more than I could have asked for.

Go visit, you'll be glad you did.

Update: After this post was written, and all electronics were turned off, we started our descent. As we approached Dulles, the plane was getting pushed around by the wind. I held my armrest and tried to look as calm and casual as possible for our 8 year old, and Shira just focused on not getting air sick. As we were just about to touch down, the plane was still getting pushed around pretty wildly, and at the last second, the pilot pulled up. As we circled around to try again, there was almost near silence in the cabin. While I was fighting back all sorts of fears, and Shira was trying to keep her stomach contents in place, our 8 year old was happily chattering away, without a care in the world. A few agonizing minutes later, the pilot got on the speaker and informed us that he had aborted the landing because of the wind. He lined up for another approach, and even though the wind was pushing us to and fro, he made the landing. After we came to a complete stop, the cabin erupted in applause. Again, our 8 year old look at us with curiosity - what was going on and did people always clap after every landing? Seriously, this boy should be an astronaut with his total lack of concern for gravity. It was a memorable ending to a memorable trip.

A few last photos from the day:

Saturday, December 29, 2012

Panama Adventure - Day 7

Oy, our vacation in Panama is just about over! As I type this, we're packing up and getting ready for one last night, an early breakfast, and then it's back to DC for us. Today we tried to tick a few more must-see items off of the Panama list.

We spent the morning in Casco Viejo, a quaint little neighborhood about a 15 minute drive away (technically, it's only 5 minutes away, but you need to leave 10 minutes for traffic and turn-arounds). We parked the car at what appeared to be legal parking, and gave an old fellow watching the corner a few bucks to keep an eye out for us. We then did a walking tour of the neighborhood. We took in the plazas, ogled the architecture, and visited the Panama Canal Museum in the area. We tried to get a glimpse of the Presidential Palace, but were turned away by a guard who spoke no English, but looked like he meant business.

From Casco Veijo, we made our way to the Metropolitan National Park, which gave us another chance to sweat profusely in a jungle. Again, this is exactly what I love to do. We didn't see any large animals (just ants, a frog and a bunch of turtles), but it was still a pleasure just to take the hike.

Shira's definitely on her way to mastering driving in Panama. It turns out, there's more to it than figuring out the woefully inadequate (yet, still relatively useful) GPS maps and dealing with the lack of street signage. No, there's a whole acceptance that lanes and traffic rules (right lane must turn right, for example) are more suggestions than anything else. One habit she most definitely has not embraced is the use of her horn. In Panama, a gentle tap on the horn is a sort of "pardon me, I'm going to change lanes - I hope that isn't a problem. Too bad if it is." It's not the angry horn honk of the U.S., it's more like an audio turn signal. Though one used after the turn is in progress, rather than to warn others you *might* make the turn. Seriously, the drivers are quite nice here, and often given right of way to pedestrians. They just do it all with a sort of flare you might expect from a person driving in a video game, rather than with real cars and real lives.

Friday, December 28, 2012

Panama Adventure - Day 6

Today we spent the day touring Panama Viejo, the original site of the capital of Panama. This got us into our first museum (finally!), and some quality time perusing cool ruins. It was exactly the kind of stuff I love, and that Shira's had enough of after about 8 minutes. We also had a fun time spotting iguanas among the rocks, which is often trickier than you'd image. For example, how many iguanas are in the photo below?

(Answer: 3)

In the afternoon we spent time at the pool and finally went across the street to try a new pizza place. I'm sure it was a chain restaurant, but it was quite tasty, regardless. It was either eat there or at Popeye's or Subway. Almost nobody speaks English here, and few of the signs are in English - but they've certainly got all our fast-food. I'm not sure if I should be proud, or ashamed.

Thursday, December 27, 2012

Panama Adventure - Day 5

What would a trip to Panama be without some sort of canal adventure? And that's what Shira arranged for today. We did a partial crossing of the Panama Canal, which translates to this: we were taken on a bus about half an hour of town, boarded a ferry like boat, and floated down the canal. It was awesome. The scenery and the massive container ships floating by were a sight to behold. The locks were just like those of the Erie Canal I grew up next to, only on a massive scale. Even watching the dredgers and other working boats do their thing was cool.

As great as the whole experience was, I just can't wrap my head around the feat that the Canal is. Consider this summary:

In the end, the engineers and workers minimized the mosquito threat; moved, rebuilt, and expanded the Panama Railroad; excavated over 200,000,000 cu yd (150,000,000 m3) of earth; built the world's largest (then) dam and a lake; poured about 2,000,000 cu yd (1,500,000 m3) of concrete creating a spillway at Gatun Lake to control its height; and formed three sets of double 110 feet (34 m) by 1,000 ft (300 m) ship's locks, then the largest concrete pour in the world. This was supported by an extensive buildup of U.S.-built, then-modern, heavy-duty excavation and construction equipment, and one of the world's earliest and most extensive electrical systems, used to power and control the flow of water into the locks and spillway. The United States spent almost $375,000,000 (roughly equivalent to $8,600,000,000 now[27]), including $12,000,000 to build facilities used to guard the canal, to finish the project. This was by far the largest American engineering project of that or any previous era.

Yet, as you float through the canal, it just looks like it belongs. And sure, they had to dig through the Continental Divide, but how tricky could that be? It turns out, very. The whole thing is just too much for my brain to take in. Still, it's an excellent mental exercise to think through.

I'm proud to report that the bus driver who dropped us off had to stop and ask for clarification as to how we could get to our hotel. That's how wacky the road system is here, even he needed a nudge to get us to the right spot.

After spending most of the day on the canal, we wanted to take care of a bit of nagging task. Whenever Shira and I visit a location, we usually find the nearest grocery store and stock up on snacks, water and just do the usual comparisons between home and abroad. Since we'd arrived, we heard there was a super market across the street, but hadn't found it yet. Supposedly it was in the massive mall, but after gathering much intelligence, we learned, only accessible via the parking garage. Strange, to say the least.

After the canal, we made our way into the parking area and continued to ask for the supermercado, or the Deli K as we had been told it was called. After one wrong turn, we finally found the entrance. Sure, enough, the Deli K exists. And more than that, it's a Kosher Supermarket! That's right, we randomly picked a hotel across the street from a (the?) Kosher Supermarket. While not quite as surprising as randomly walking into a Kosher restaurant, this was close. And as supermarkets go, this one was quite large.

For dinner, we made our way back to the supposed location of a few guide-book recommended eateries. We found none of them. What we did find, however, was another restaurant with a big O-U and folks in kippot eating on the terrace. For the second night in a row, I had Kosher meat out. I had a "multi-max" sandwich (or named something similar) that consisted of schnitzel, a hot dog and pastrami all together on a baguette. It was total overkill. And totally delicious.

It's official, we accidentally vacationed at the most Kosher friendly location possible.

Wednesday, December 26, 2012

Panama Adventure - Day 4

Day 4 started with a hike up Cerro Ancon (Read: Ancon Hill). While I was hoping for impressive views and maybe some additional wildlife settings, my real goal was to do a bit of Geocaching. Specifically, I wanted to drop off a travel bug in a new (and exciting) location. A travel bug is a small metal tag with a unique number that can be tracked as it hops from location to location. I didn't have high hopes about completing this mission: I wasn't sure we'd have time to do any geocaching, or that there would be any active caches around, or if my cellphone without a data connection would be of any use. However, all the stars lined up: the c:geo app works fine without a cell connection, there was an active cache on Ancon Hill and most importantly we had the time to go hunt for it. And today, this all came together as I poked around and found the cache. Whoo! I also picked up a new travel bug. This one has covered 15,934 miles, and has been in Canada, Colorado and Osaka Japan, and now it's on its way to Washington, DC.

Along with our Geocaching adventure, Cerro Ancon did provide some awesome views, and we even saw a Toucan in the trees. Man those birds are gorgeous. From Cerro Ancon we made our way to the Amador Causeway and found some lunch. First thing this morning I had picked up a map, and between that and the GPS, we are finally beginning to feel like we can get around this place. True, the map, physical street signs and GPS never seem to agree, but we can usually cobble together something to make some sense. When in doubt, ignore the GPS, seems to be a solid rule.

Lunch was Panamanian food, which turned out to be fish and fried plantains. My rule about deep frying still stands: anything deep fried is going to taste good and fried plantains were no exception.

After lunch we hit Punta Culebra, a marine exhibition park. Really this was another chance to take a stroll (this time through a dry forest, as apposed to a rain forest) and ogle some fish. They had a touch tank which our 8 year old enjoyed, though the real highlight was spotting a large iguana perched high up in a tree.

By the time we made it home (with no detours or mis-attempts, thank you very much!), it was time to start thinking about dinner. But what to do? We could do the hotel restaurant or the pizza place across the street, or we could take a chance and do some walking. I pushed for the walking, but as we got underway, it started to drizzle and then rain. Between the rain and a tired 8 year old, things were starting to look grim. We stepped into the first place we could find cover, which was some sort of diner looking affair. It would do, but was going to basically be a repeat of lunch. As a last ditch option, Shira went across the street to a Mediterranean looking option. After a bit, we walked out of the diner to see what Shira had to say, and I could see her beckoning us to come over.

I walked into the place and noticed that it was a typical Mediterranean setup, though as we were seated, I did notice a Mezuzah on the door. The name of the place was Karbones, and I noticed the circle K on the front of the menu. But surely that was a coincidence, right? Shira sits me down and gives me the surprising news: yes, this place is Kosher! I look around, and sure enough, most of the men in the restaurant were wearing Kippot, there were benschers in the corner, and some frum music group was playing on YouTube over the sound system. I ordered a schwarma and ate till I was going to explode, and then ate a little more. Seriously, in a place where we can't find our hotel using a GPS, how on Earth did we stumble into a Kosher restaurant? However it happened, I'm glad it did. As surprises go, this one is going to be hard to beat.

Tuesday, December 25, 2012

Panama Adventure - Day 3

Ever since we decided to visit Panama, I had this vision of hiking in a rich rain forest. And today, that dream came true. We did a little over 6 miles of hiking in Soberania National Park.

We saw frogs, lizards, butterflies, spiders a couple of snakes and even a Spider Monkey perched high up in a tree. We caught a really good glimpse of one exotic (to us, anyway) bird. Though, by far the most impressive creatures we saw today were the ants. Specifically the Leafcutter ants. Our photos just don't these guys justice: imagine a 10+ foot line of ants, each one schlepping a neatly cut piece of leaf. It was almost like something out of a cartoon.

As our hike finished up, I remarked to Shira that it hadn't rained yet. And sure enough, within 10 minutes, the skies opened up and we got drenched. This actually completed the jungle experience nicely. As the rain was pounding down, there was thunder crashing and not too far off in the distance some howler monkeys were making a racket. At least I think they were howler monkeys. Whatever animal it was, it was loud and not pleased by the rain.

The tricky part of the day wasn't the hike; it was driving to and from the hike. Slowly but surely we're learning to traverse the streets of Panama. Shira has no problem with the traffic or roads, it's just that the maps in our GPS are woefully inaccurate, so it just can't give us sane instructions. It's constantly trying to persuade us to go right when there's no obvious road to turn right into. Add to this the lack of tourist (read: English) friendly signage, and it's not pretty. For example, it took us 3 attempts to pull into the grocery store that had construction surrounding it. At this point, what I'm craving is a high quality set of street maps, yet I've not been able to find them.

We finished up our afternoon with a dip in the pool and then on to dinner. We definitely had a unique and fun time today. And again, I'm proud to report that our 8 year old was a real trooper. 6 miles isn't a whole lot for Shira and myself, but for him to do all that without complaining is nothing short of amazing.

And here's a few sound clips from the jungle:

Panama Adventure - Day 1 and 2

We're in Panama, and boy the is the weather awesome! Yesterday we arrived, and the trip was uneventful. Some highlights: drinking a L'Chaim of rum and some eggnog-like substance on the plane (handed out for free), stepping out into sunshine and warmth, having my wife demonstrate her international driving skills like a champ and arriving at one of largest and nicest hotel rooms we've ever stayed in (it's the Radisson Decapolis - and it's the ultimate family friendly room).

We spent 20 minutes driving from the airport to the vicinity of our hotel, and then another 20 minutes looping around the city trying to actually figure out what street sequence we needed to take to reach the hotel. Apparently in Panama, a city that's known for total lack of street signage and direction, that's par for the course.

Today Shira arranged for a trip to an Embera Indian Village. The Embera are an indigenous people that have transitioned from primarily farming the land to tourism. They couldn't have been more warm and welcoming. Lunch was fantastic: fresh tilapia, fried plantains and all the fresh fruit you could eat. The best part: it was served traditional style, meaning without silverware. Our 8 year old was in heaven with this.

Speaking of our 8 year old, he's having a blast. One of the highlights of the trip was that a fellow tourist brought along a soccer ball to donate to the village. They brought out the ball, and sure enough, within minutes, all the kids--Embera and Americans--were playing away. Soccer truly is an international language. As travel hacks go, the soccer ball is an awesome one.

We finished up this evening at a random Chinese Restaurant named Yee. It looked more like a generic diner than Chinese food place, but, whatever. They had pictures of the food and understood our feeble attempt to explain we wanted to eat vegetarian food, so that was good enough. Among the dishes we ordered was Mapo Tofu. And why is this significant? I'll tell you why. 18 years ago tonight, Shira and I had our *official* first date. And on that date I had Mapo Tofu. If you had told me then, that in 18 years I'd be sitting in Panama with her and an 8 year old, I would have probably smiled and said, "yeah, that sounds about right." So glad it worked out that way.

I should knock off now and spend some time with Shira. After all, this is an important anniversary, I hope to have many, many more Christmas Eve dates.

Sunday, December 23, 2012

The 32 Megabyte Mystery

Last Friday, I'm rummaging around for a spare Micro-SD card when I come across an old 32 megabyte card. 32 megs, I think, that's tiny! My Galaxy S3 has 256 times that. Heck, at 8,192 megs, that card is now considered small.

My next thought: oooh, I bet this card is filled with grainy photos that haven't seen the light of day in years. I got psyched -- what mysterious pictures could I possibly find on here.

I popped in the card and perused. Here's a smattering of what I found:

A happpy Dovid:

A tiny Chana:

Us:

More pictures of Us:

Some of Me, as this card was from Shira's Blackberry:

I have to admit, I was a bit disappointed. Nearly all these photos appear someone on the Blog already. And those that don't, just weren't taken that long ago. As an archaeological find, this was a bust. In fact, I've been mulling this over since Friday, and here's what I've figured out:

  • My gosh technology moves fast! 32 megabytes seems impossibly small, but just a few years ago, it was top of the line. We always say this, but to see this in action really does give one pause.
  • Blogging works. Because I publish stuff on a regular basis, it gets out there and enjoyed rather than languishing in a virtual shoe-box-on-the-shelf. The same people who kvetch about how annoying people are on Facebook for publishing so many photos, are going to be the same people, years from now, who wish they had done the same.
  • I'm old. You know that concept of age being relative? When you're 7, one year is huge, when you're 70, the years just zip by? Well, apparently I'm of an age where photos from 2009 feel like they were taken last month. That's not good.

I also found two other potential sources of surprise content - a mini SD card from one of my old Sidekick devices and a 8 meg PCIMCIA card. Of course, I don't have a way to read either of these cards. But, I'm just curious enough that I might hop onto Amazon and buy an adapter to see if I can get a glimpse into these guys.

Thursday, December 20, 2012

More Sketching Inspiration

Not that you needed more inspiration to keep a sketchbook, but here you go:

My problem isn't lack of inspiration, tools (any old sketchbook should do, heck a stack of a index cards seem like a cheap a portable solution) or even technique (my drawing is at a kindergarten level - but who cares?). No it's time. When I can find a consistent block of time for drawing, the other challenges should resolve themselves.

For now, though, I'm patient. I know that I'll get that block of time sooner or later.

Via: Richard's Notes.

Wednesday, December 19, 2012

Review: The Forager’s Harvest

I saw mention of the The Forager’s Harvest on Cool Tools, so I expected it to be good. Fortunately, my library had it, so it was easy enough to secure. Even with the Cool Tools recommendation, it still managed to exceeded my expectations.

The Forager's Harvest is a essentially a book that teaches you how to identify, collect and consume a number of wild plants (about 35 of them). However, the book goes far beyond just giving you the cold hard facts, as one might expect.

First, each plant explanation starts off with a story from the author's past encounters with the plant. These are truly gems, and inspire one to actually go out and put the knowledge to good use.

More than being a reference and story book, it's also a philosophy text. Opening chapters really do call out myths of wild food collection and leave one wondering why the practice isn't more widespread. After all, there's an almost reverence associated with the practice of hunting game. Why shouldn't the practice of "hunting" wild edibles be just as revered, discussed, and engaged in. After all, our ancestors certainly relied on both practices.

Eating wild plants these days is usually associated with wilderness survival. You can just picture Less Stroud or Bear Grylls choking down some awful tasting plant matter because they couldn't manage to secure some real food. But this book turns that whole image on its head. Wild plants should taste delicious, and should be a skill practiced to enhance meals you cook in your kitchen on a daily basis, not to save up for a doomsday scenario.

There aren't many books I take out from the library, read, and decide I need to get my own copy. But that's what I'm finding with this book. I can see bringing this book along on hikes, and keeping my eyes open for putting it to use. Forget hunting wild animals, I'm ready to hunt some wild plants.

Tuesday, December 18, 2012

One Big Delivery

Last Friday, Shira and I are out for a run when we notice a whole slew of tractor trailers lined up along the side of the road. This photo doesn't do them justice:

I wonder what could possibly be going on here? Was it some sort of protest or meetup?

Then Shira nailed it: they were delivering wreaths to Arlington Cemetery for their Wreaths Across America project.

See, here's one of the tractor trailers pulling into the cemetery:

Man, that's a lot of wreaths.

Name That Plant: Green Spikey Fruit Edition

Here's another attempt at identifying the plants and trees that I pass every day, but don't actually see.

I noticed this guy while on a run near the Pentagon. How sinister does he look?

Seriously, it looks like something I might see in a tropical rain forest, not along the sidewalk in Arlington.

I used my unscientific approach to identifying this guy: I typed in a bunch of attributes into Google Image search and perused the results. In this case, I searched for green spiky weed and on the first page of the results found this picture:

Apparently, I'd found some Jimson Weed.

As the spikes suggest, this sucker is poisonous. I mean, really poisonous. It's not often you see a warning like this on a plant you find on the side of the road:

Jimson weed is a dangerous plant in inexperienced hands, and an overdose is likely to be fatal.

Yikes.

While you can't eat it, and you probably shouldn't mess with it, the plant definitely has a lot of uses. Apparently, it can be used to treat asthma, Parkinson’s and the flu. It can also, apparently, be used as a hallucinogen and other recreational drug.

Yeah, so let's just leave this guy alone.

Still, it was a nice find in my local area.

A Little Script-Fu To Help With Image Organization

One of the easy things about iOS app development (and I haven't found many!) is creating a splash screen. You just create an image named something like Default.png and Adobe AIR or PhoneGap do the right thing.

Things get trickier when you realize that you need to maintain a whole bunch of images, and have to have them follow a specific naming convention.

Before you know it, you've got a whole slew of files named something like Default-PortraitUpsideDown@2~ipad that you have to keep track of.

I was wrestling with just such a set of images today, when I decided I could maintain them all a lot easier if they lived in a single Gimp xcf. My goal then, became as follows:

Write some Script-Fu that takes each layer of an image and saves it off to its own file, and names it per the layer name. With a single click, a whole batch of images can be created from one source.

And here's the code I came up with to accomplish this:

;; Code It
(define (bs-script-fu-save-individual-layers img)
  (let ((layers (vector->list (second (gimp-image-get-layers img))))
        (orig-file-name (car (gimp-image-get-filename img))))
    (for-each (lambda (layer)
                (let ((name (car (gimp-drawable-get-name layer)))
                       (h    (car (gimp-drawable-height layer)))
                       (w    (car (gimp-drawable-width layer))))
                  (let* ((target (car (gimp-image-new w h RGB)))
                         (layer  (car (gimp-layer-new-from-drawable layer target)))
                         (file-name (string-append (filename-dirname orig-file-name) "\\" name ".png")))
                    (gimp-image-insert-layer target layer 0 -1)
                    (gimp-layer-set-offsets layer 0 0)
                    (file-png-save-defaults RUN-NONINTERACTIVE target layer file-name file-name))))
              layers)))
    


;; Register It
(script-fu-register
 "bs-script-fu-save-individual-layers"
 "Save Layers"
 "Save out all the layers of this image as separate files."
 "Ben Simon"
 "copyright 2012, Ideas2Executables"
 "18-Dec-2012"
 "RGB* GRAY* INDEX*"
 SF-IMAGE      "Image to split into layers and save" 0
 )
(script-fu-menu-register "bs-script-fu-save-individual-layers" "<Image>/Filters/Util")


;; Utility Functions

(define (last-string-position haystack needle)
  (define (go haystack needle position)
    (if (< (string-length haystack) (string-length needle))
      #f
      (if (equal? (substring haystack
                             (- (string-length haystack) (string-length needle))
                             (string-length haystack))
                  needle)
        position
        (go (substring haystack 0 (- (string-length haystack) 1))
            needle 
            (- position 1)))))
  (go haystack needle (- (string-length haystack) (string-length needle))))
            
(define (filename-dirname f)
  (let ((pivot (last-string-position f "\\")))
    (if pivot
      (substring f 0 pivot)
      f)))

Most of my effort went into writing filename-dirname and last-string-position, two utility functions. Especially last-string-position - coding that in terms of equals? and substring felt more like an interview question than my usual daily hacking.

I continue to believe in the power of The Gimp and Script-Fu. There's just something invaluable about being able to script your way out of tedious jobs.

Monday, December 17, 2012

Newtown Related Stories Worth Reading

Just a handful of articles I found interesting and insightful:

For more goodies, check out kottke.org, as he's blogged about a number of interesting stories.

Update: more stories added.

Friday, December 14, 2012

If You Read Only One Article On Troubleshooting Linux I/O Wait Issues, Make It This One

A bunch of my customer's VPS's were having odd performance issues. After looking in the usual places, I found myself needing to dig deeper. Before I knew it, I was running vmstat and trying to make sense of the results.

Once I wrapped my head around how much time was being spent waiting for IO, I decided I needed to track down which processes which were the culprits for this. This seemed like an obvious thing to do, but I couldn't find the command to give me this information. Then I found this article: Troubleshooting High I/O Wait in Linux, and things really clicked.

To cut to the chase, the command I was looking for was simply:

 for x in `seq 1 1 10`; do ps -eo state,pid,cmd | grep "^D"; echo "----"; sleep 5; done

Obvious, right?

Seriously, if you're struggling to make sense of how your system may be interacting with disk io, then go study this article.

Update: Actually, here's another really handy article to read: Linux File System Read Write Performance Test. You can run:

  dd if=/dev/zero of=speedtest bs=64k count=3200 conv=fdatasync

To get a quick sense of how fast disk write speed is.

Thursday, December 13, 2012

Pretty Lights and Failed Experiments

Ahhh, it's that time of year again: time to celebrate Chanukah and blog pictures of the candles to try to capture their simple beauty. Never works, but that doesn't keep me from trying.

Here are some snapshots from last night:

(The filters are the ones built into the Galaxy S3)

And I know you want an animated version, right?

Along with the usual candle setup, I had a little experiment planned, too. I was going to go old-old school and try using Olive Oil instead of candles to power a chanukiah.

I had this whole thing rigged up using shot glasses for oil vessels, paper towel for wicks, and paper clips as wick holders. See:

Shira took one look at the setup and put the kibosh on the whole experiment. In her defense, some of those shot glasses had some serious sentimental value, and I suppose it would not be wise to damage them while playing the role of the pyro-loving-Boy-Scout.

I'm not completely done with my experiment yet, though. I'm planning to pick up a cheap shot glass at the store (or something approximating it) and try using a single candle.

By the way, my setup was almost certainly not a Kosher chanukiah. Though it was probably a solid attempt to get in touch with a more authentic Hanukkah.

Regardless - here's a season of miracles. May your wife let you get away with more than you deserve!