Thursday, January 24, 2013

Winter Finally Arrives

Two things:

  1. Apparently a 1/2 inch of snow counts as major weather event - major enough that schools were delayed two hours. At least they didn't shut down the government over this.
  2. There's was something magical about kids playing at the bus stop during this first snow of the year. The running and skidding around, awkward snowball throwing and even attempted snowman building. The whole scene was out of a Hallmark commercial.

It's snowball make'n time:

Hurry up, let's build a snowman before the bus comes:

Wheeeeeee!

Struggle on grass, struggle on. You can persevere through this winter storm.

Review: 30 Things Every Woman Should Have and Should Know By The Time She's 30

On a number of occasions I've come across books suggesting what every guy should know. It's usually a list of wide ranging skills like: use jumper cables, cook the perfect soufflé, win a fencing match, tie a clove hitch -- that sort of thing. One of these days I'll actually pick up and read (and perhaps try to master) one of these books. In the mean time, though, I couldn't resist checking out a book on the same topic for women when I saw it at the library. Think of it as a little intelligence gathering effort (knowing is half the battle - right?).

It turns out, a woman needs remarkably few specific skills by the time she's 30 (compared to men). As far as I can tell, she only needs to master one: "how to kiss in a way that communicates perfectly what you would and wouldn't like to happen next." It's not exactly how to use jumper cables, but still quite handy, I suppose.

Women also need just a few essential physical items by the time they are 30: "a purse, suitcase and umbrella you're not ashamed to be seen carrying;" "something perfect to wear if the employer or man of your dreams wants to see you in an hour" and "a set of screwdrivers, a cordless drill and a black lace bra." Again, pretty handy stuff. I'd probably add to that a Swiss Army knife, and a quality flashlight, but that's just me.

The bulk of the book is dedicated to the emotional housekeeping that a 30 year old woman needs to do. It boils down to, and I'm paraphrasing here: It's time to grow up. This is how. And it's not so bad.

Apparently, the 20 somethings of a women can be pretty sweet, what with all the fun that can be had. But at 30, it's time to face reality: your 20 something days of flitting around are now behind you. Get used to it. Better yet, embrace it.

Alright, enough of me being snarky. The fact of the matter is, the lessons espoused in this book (having privacy, being willing to live alone even if you don't want to, outgrowing childish habits, etc.) are not exclusive to women. Nor are they exclusive to 30 year olds. They are lessons we all need to learn some time or another. And while I didn't learn to use jumper cables or cook the perfect soufflé (I already know how to tie a clove hitch), I was reminded about many an important life lesson.

My biggest take away: women spend an awful lot of time thinking about stuff that guys don't give a second thought to.

Wednesday, January 23, 2013

Business Lessons from Tom and Gary

When I talk to folks about their ideas, I often suggest they try the following mental exercise:

Think through how you would implement your idea if you had no money to work with. Now imagine you've got some money (say, $10-20k). Now imagine you've got millions of dollars. What can you learn from each solution?

The goal behind this exercise is to help individuals let go of the some of the "musts" that they think their software needs, and help them realize that they can do amazing things with less.

I don't expect folks to choose the zero dollar solution, but I often want people realize that it *is* possible. You can have huge impact with a free Blogger account, clever use of Twitter and a handful of marketing books from the library. Over and over I learn that what's important isn't how sophisticated the software is, but how meaningfully it solves real people's problems. Deliver value, and almost everything else will take care of itself.

As you can imagine, I love finding examples of this in the wild. Which brings you to my new favorite discovery: 150 Boom Boxes and the Best Dance Party You’ve Never Been To. That link points to a recent Wired article which features Tom and Gary's Decentralized Dance Party.

Tom and Gary wanted to make an impact in the entertainment world. They could have gone the standard route, and opened up their own dance club, or put together some sort of dance party service. Instead, they came up with their own notion of decentralized dance parties.

The technology is wonderfully simple: an iPod connected to a radio transmitter, and whole lot of cheap boom boxes tuned into that frequency (and locked in with Duct Tape, of course). To top it off, the setup is "controlled" by a Nintendo Power Glove. And by controlled, I mean that it's warn for dramatic effect.

Sure, this isn't truly a Zero Dollar implementation. But for all intents and purposes, it really is. They deliver true value, and in return, folks don't care that the setup is rough around the edges. In fact, that roughness only adds to the effect.

You want to change the world with your idea. Let Tom and Gary show you the way. Solve a real problem, deliver real value, and do it with less. Or, do it with more. Whatever. Just do it!

An Excellent Way To Misuse Poll Data

I was reading this article from CNN and was struck by the following paragraph:

It's the culture, stupid

Conservatives are losing the culture war when, according to a 2011 Pew Research poll, 49% of Americans ages 18-29 have a positive view of socialism while just 46% have a positive view of capitalism. Such views are the products of our education system and the movies, music and entertainment young Americans consume. We must change those cultural institutions before we can truly change our political institutions in the long term.

This seems to expand on the Republican Narrative: not only is our President a Socialist, but now most of the population is too!. It's a powerful message, and will certainly reinforce the notion that half the country is living a flawed ideology.

My first instinct is to think - huh, really? I can't imagine most of the population even understands the nuances of what socialism really is (I know I certainly don't), and while capitalism without controls is unreliable, nobody I know is advocating that.

While I was skeptical, the article linked to this poll as proof.

A quick glance at the graphic at the top of the poll shows this:

Without reading any further, it seems that socialism has the most negative view, while capitalism is in the middle. Not exactly what the article on CNN suggested. Still, this poll suggests that capitalism may not be as universally accepted as I thought. Then I read:

Of these terms, socialism is the more politically polarizing – the reaction is almost universally negative among conservatives, while generally positive among liberals.

Whoa. You're telling me that all this poll measured was how much people like the term socialism. That's it? In other words, when I say the word "capitalist" do you imagine a young, female business owner or the character from Monopoly. That tells you something, but not all that much. Just who's winning the war on terminology.

I'll give Bennett, the author of the CNN article, some credit. He found a poll that could support the narrative he wants to provide. Unfortunately, it still doesn't prove that his narrative has any resemblance to reality.

Tuesday, January 22, 2013

Woody Allen's Tech: Exactly What You Expect It To Be

From the folks over at ImprovisedLife: woody allen’s writing tools (what do you really need to work?):

Of course he copies and pastes by, well, copying and pasting (technically, stapling).

One day there are going to do a video of me, and I'm going to be droning on about the power of emacs, and people will think the same thing they think of Allen: awwww, how both simultaneously cute and dreadful. But I don't care, emacs is clearly a tank, and that's what counts.

Gotcha of the Day: Setting up an Adobe AIR App to run as a Launcher on Android

One of my customer's wants to turn a collection of Android tablets into devices that just run their Adobe AIR Android App. Effectively, they want them to run in a kiosk mode.

My thought was that I'd have to either leverage an existing app launcher, or code my own, to support this. Turns out, it's much easier than this. I found the answer clearly spelled out here:

Making an application that can be installed as a Home Screen is simple; you just have to add the HOME intent category to the main Activity's intent filter.

Hard to believe, but all one needs to do is to hack the AndroidManifest.xml and you're all set.

This is slightly tricky in the Adobe AIR world because: (a) you don't have direct access to the AndroidManifest.xml and (b) you don't directly create or name the specific activity that gets run in the app. It took fiddling, but I solved both these issues by putting the following in my Air App's application descriptor:

<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/3.1">

  <!-- standard descriptor stuff goes here -->

  <android>
    <manifestAdditions><![CDATA[
      <manifest>
        <!-- other android manifest stuff, like permissions, go here -->
        
        <application>
          <activity android:name=".AppEntry"> 
            <intent-filter> 
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.HOME"/> 
              <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>     
          </activity>
        </application>
      </manifest>
    ]]></manifestAdditions>
  </android>
</application>

Setting android:name=".AppEntry" is especially key, otherwise the device won't be able to start your application up properly.

Once you've updated your deployment descriptor and rebuilt and installed the apk file, you must do the following:

  1. Click on the home button on your device
  2. You should get a system dialog asking you which application should complete the action
  3. Choose your application and click 'Always'
  4. Reboot your device
  5. Confirm, when it starts up, that the only application available is yours

If all went well, you'll have turned your general purpose tablet or phone into a one-app-wonder.

To get things back to normal, remove your app using a tool like adb.exe or MobileGo from Wondershare. I don't know much about the later option, other than it's quite a bit more user friendly than adb.exe, so it may be more appropriate to an audience who just wants to experiment with the kiosk app you've built.

Monday, January 21, 2013

Inauguration 2013: I Came, I Saw, I Went Home For Hot Chocolate

Four years ago, I froze my butt off as I attended the 2009 Inauguration. This year, I couldn't justify the frostbite. Still, I couldn't resist hopping on my bike and zipping down to the mall to check out the action.

The scene was pretty much as you'd expect it - lots of people waiting around and big rows of porta-potties. Security, like 2009, wasn't especially high or extensive. There was a military presence with lots of soldiers in camo, though I didn't see any guns. In fact, the mood was generally relaxed, with not a single police office or soldier barking orders, or yelling at me for taking my bike somewhere it shouldn't have been.

The highlight of my little visit was riding on all the closed streets. There's just something unreal about riding on Washington Blvd in front of the Pentagon that feels especially naughty.

I only spent about two hours in the city, and made it back as the inauguration proper was beginning. There's something to be said for watching an Obama speech (not known for his brevity) from within a warm house, sipping hot chocolate.

Some of the 250 or so photos I took.

Saturday, January 19, 2013

Windy Run Trail and Park - A Perfect Slice of Next Door Nature

Yesterday, I used my running time to explore the trail at Windy Run Park in North Arlington. What starts off as a well defined path turns into a real trail, with a number of stream crossings to spice things up. It is a relatively short trail, but given the secluded woods and the fact that I didn't see anyone else during my visit, it absolutely had a Real Hiking feeling to it.

I also found a geocache in the area. It's one of the largest and easiest finds I've had, which makes it an especially family friendly one. Given the lack of camouflage of the cache, I've really got to think this stretch of park doesn't get a lot of visitors.

The trail ends at the Potomac Heritage Trail, which also provides for some terrific hiking.

About the only thing I didn't get out of this little trail exploration was any wildlife sightings. Though, if I had sat my butt down and been quite for a few minutes, that may have changed.

If you're craving an outdoor adventure, and don't want to travel far, you definitely need to check out this park. It's Next Door Nature at its finest.

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.