Wednesday, September 28, 2011

To a happy, healthy, sweet and round New Year!

L'Shanah Tovah!

Yummy challahs fresh from the oven, courtesy of my wife!


Some Questions To Get You In The Rosh Hashanah Mood!

From the always interesting Ohr Semayach, Ask The Rabbi:

Dear Rabbi,

I understand that Rosh Hashana is the day of judgment, and Yom Kippur is the day of repentance and forgivness. Shouldn't Yom Kippur be first? Wouldn't we be better off doing Teshuva (repentance) before Rosh Hashana, and go into Rosh Hashana to be judged, already having been forgiven?

And:

Dear Rabbi,

As I understand it, the reason for celebrating Rosh Hashana and other holidays for two days in the Diaspora was that, given the slow pace of communication in days gone by, it was necessary to be certain that the holiday was celebrated on the correct day. But given the instantaneous communications of the present, what is the reason for continuing this practice instead of conforming the celebration to that done in Israel?

And the answers are here and here.

I found the second question especially interesting. I had always assumed that we celebrated two days of Rosh Hashanah out of respect for the olden days when getting the word out about the sighting of the moon was time consuming. But, the Rabbi offers a novel suggestion: even in this day and age, it's possible to have trouble knowing the correct dates for the holidays. Having multiple days of Rosh Hashanah isn't just a nod to the ancients, but a practical maneuver to make Judaism as robust as possible. It's tweaks like that, that allow decentralized religion to thrive after thousands of years.

This should be politically upside down, but isn't

My brother pointed me to this interview Arne Duncan. It's amazing on a number of levels:

Visit msnbc.com for breaking news, world news, and news about the economy

(watch the video)

Here's Arne Duncan, very much a Democrat, using traditional Republican talking points to describe why he, Obama and others in the administration are putting in place mechanism to work around No Child Left Behind. "Get out of the way of the states" could come directly from Bachmann, Perry or Palin.

If that isn't odd enough, consider that No Child Left Behind was instituted by George Bush.

The Republican puts in place a massive government program and the Democrats come by and try wrestle control back for the states.

Like I said, it seems upside. Only, it's not.

These days, the battle cry from the Right is that government is the problem. You'd think, naturally, that the Left is shouting just as loudly, no it's not, it's the solution!. But, as the above clip shows, that's not really what Democrats are touting (or anyone else, for that matter). Government does some stuff well, other stuff poorly. It's our job to figure out what does well, and have it do it (like, say, providing a police force and insuring that your tap water is potable), and remove it from where it doesn't belong. This seems so amazingly common sense, yet, were not even remotely having this discussion.

Tuesday, September 27, 2011

Gotcha of the Day: Auto Notification When Your Site Is Added To The Safe Browsing Watchlist

A few days ago, one of my clients had quite the shock. She found that when customers searched for their site on Google and attempted to click through, they were taken to a page informing them that they were about to enter a malicious site. Essentially, they were getting this page:

Scary enough for ya?

After poking around, we discovered the cause of the problem, fixed it, and went through the process to get the site cleared. All turned out well in relatively short order.

My client had a good question though: how could her IT team have been notified of this problem *before* someone managed to trip over it by accident?

The first order of business was to understand what this warning was all about. Apparently Google offers a service known as Safe Browsing that browsers can plug in to. Essentially, Google will track a list of suspicious sites, and Chrome and Firefox can use this service to query this list. From what I can tell, one way Google adds your site to this list is via Googlebot. Essentially, if it discovers that it can download malware from your site, onto the list you go.

So, to answer my client's question, all I had to do was write a little script that used the Safe Browsing service. Of course, Google provides a slick little API to access this service, so it turns out to not be that tricky. After a few minutes of shell script programming, here's what I came up with:

#!/bin/bash

##
## Use the google API to check for our entry in their safebrowsing database.
##
## Theory being, we'd like to know ahead of time if the site is marked as problematic
##

if [ -z "$1" ] ; then
  echo "Usage: `basename $0` hostname [notify@email.com ...]"
  exit 2
fi

host="$1" ; shift 
client=sbcheck
apikey="PUT_YOUR_API_KEY_HERE"
appver=1.5.2
pver=3.0
url="http%3a%2f%2f${host}%2f"
api_url="https://sb-ssl.google.com/safebrowsing/api/lookup"

res=`curl -sk "$api_url?client=$client&apikey=$apikey&appver=$appver&pver=$pver&url=$url"`
if [ -n "$res" ] ; then
  mesg="$host marked as suspicious: $res"
  if [ -n "$1" ] ; then
    echo $mesg | mail -s "Safebrowsing Alert for $host" $@
  else
    echo $mesg
  fi
  exit 1
else
  exit 0
fi

I then added the following line to one of my server's crontabs:

 5 * * * * sbcheck.sh mysite.com it@mysite.com

Once an hour, this script runs, which checks to see if mysite.com has been added to the Safe Browsing watchlist. If it has, an e-mail alert is sent out.

Monday, September 26, 2011

Taking A Moment For Some Important Bragging

Pardon me while I take a moment and kvell: my brother and his girlfriend each came in First Place in the 8k they ran last weekend. Because they're both humble people, they'd probably give you some wishy washy answer about how it was only first place in their age group, or some other qualifier. Bully pucky. First place is first place. Whooo!

Even more important, though, is that they were supporting an important cause. The proceeds from the race go to support research to fight mesothelioma cancer. One of David's friends lost a parent to this horrible cancer, so I know he was glad to be able to take some sort of action.

They're #1! They're #1! Gooooooooooooo Team!

Sunday, September 25, 2011

Champions Shootout - Tennis Legends and Lots of Fun

Shira and I didn't quite know what to expect from the Champions Shootout - a tiny tennis tournament made up of 4 all-time-great players. We saw Jimmy Connors, Jim Courier, Andre Agassi and Pete Sampras duke it out. For Shira, who started watching tennis when Agassi and Sampras were at the top of their game, it was a special thrill.

The night broke down like this: 25% serious tennis, 75% fun. There's no pressure on these guys, and they are glad to interact with the crowd and ball boys and girls. All I can compare it to was like going to a Harlem Globetrotters game. You're seeing great technique, but mostly, it's just a good time.

We had excellent seats and it was especially nice watching tennis in a climate controlled environment.

All in all, it was a pleasure to see these legends play.

A Full Day In Philly

Shira and I spent the day traipsing around Philadelphia, and when I say traipsing I really mean it. All told, we did about 16.1 miles of shlepping. Philly is a city that is near and dear to our hearts, as Shira went to school there, and I came to visit an embarrassing number of times. The city is so accessible to walkers.

We didn't have any particular sites in mind, so we just saw what we stumbled upon. We started with a yummy breakfast at Reading Terminal Market. We then took a tour of the Masonic Temple, which looked impressive from the outside and was even more so on the inside. If you like design or architecture, this is a must see.

We then hit the Mutter Museum, which is a site to see. It's a famous medical museum started in 1858. Where else can you see a 9 foot long human colon containing 40 pounds of fecal matter? Hopefully, nowhere. I'm usually the one who takes his time and tries to read every plaque in the museum. The Mutter Museum cured me of that, and I found myself skipping nearly all the details.

We then made our way to University CIty, where we tried to blend in among the college kids. Good gosh I'm old.

We doubled back and hit Chinatown for lunch. We found 3 vegetarian restaurants without even looking, and had lunch at Singapore Vegetarian which was quite delicious. Though after 13 miles of walking, anything would have probably tasted good.

We had a most excellent time and Philadelphia remains one of my favorite cities to explore.

Friday, September 23, 2011

Gotcha of the Day: Detecting CPU Usage on Windows via PHP

I'm working on an app for a client that has a Windows based server component. The Windows server sits around and waits some items in a queue, and when present, kicks off a potentially very resource intensive process. I quickly learned that having multiple copies of this process running can end up overloading the machine. The fix seemed simple: before kicking off the process check the current CPU usage. If the CPU is at a safe percentage, then go ahead and kick off the process.

While PHP offers some information about memory usage, not surprisingly, it doesn't have any CPU info to give you. On Linux, this sort of problem is trivial to solve. Just install sysstat and kick off mpstat. An even easier approach is to no bother getting the CPU, but base the decision on the load average. If load average is all that's needed, just reading from /proc/loadavg should be all that's necessary. Heck, if you were on Linux you could probably avoid writing any custom code, and just use .

But I'm not on Linux, I'm on Windows.

I couldn't find a PHP solution, so I widened my search to look for how people in the Windows world use command line tools to figure out CPU usage. It didn't take long to figure out that I wanted to use the command typeperf, one I'd never heard of. Apparently, on Windows you can do this:

C:\>typeperf -sc 1 "processor(_Total)\% Processor Time"

"(PDH-CSV 4.0)","\\IP-0A4856C0\processor(_Total)\% Processor Time"
"09/23/2011 13:43:02.430","3.076302"

The command completed successfully.

The -sc 1 says to generate a single sample. Leaving it off will get you a continuous stream of updates on CPU usage. Pretty sweet, eh? The output is even CSV'd, how nice of them.

Another command I tripped over in my search was tasklist. Tasklist is effectively like /bin/ps in the Linux world. It gives you a snapshot of the current process list. It too can be convinced to generate CSV output:

C:>tasklist /FO CSV
"Image Name","PID","Session Name","Session#","Mem Usage"
"System Idle Process","0","Services","0","24 K"
"System","4","Services","0","836 K"
"smss.exe","396","Services","0","376 K"
...

Using this output, I could implement a slightly different strategy for checking server performance. Rather than looking at CPU usage, I could detect how many copies of my resource intensive process were spawned. I could set a limit, say 3, and if more than 3 processes are running, refuse to run more.

I've wrapped the above utilities up into functions below. Feel free to use an enjoy. Of course, I can't guarantee that they are the best solution, they're just what I was able to come up with in a pinch.


/*
 * Return the current CPU usage of a windows server.
 * Inspired by: http://www.sitaram-pamarthi.com/2009/09/how-to-get-cpu-utilization-of-remote.html
 */
function win_sys_current_cpu_usage() {
  $cmd = 'typeperf  -sc 1  "\Processor(_Total)\% Processor Time"';
  exec($cmd, $lines, $retval);
  if($retval == 0) {
    $values = str_getcsv($lines[2]);
    return floatval($values[1]);
  } else {
    return false;
  }
}

/*
 * Return the current list of running process.
 * Inspired by:  http://commandwindows.com/tasklist.htm
 */
function win_sys_current_process_list() {
  $cmd = 'tasklist /FO CSV';
  exec($cmd, $lines, $retval);
  if($retval == 0) {
    array_shift($lines);
    $procs = array();
    foreach($lines as $row) {
      $values = str_getcsv($row);
      $procs[] = $values[0];
    }
    return $procs;
  } else {
    return false;
  }
}

Thursday, September 22, 2011

DC United, The Quieter Version

Last night, I hit my second DC United game with my buddy Greg. This time we sat on the opposite side of the rowdy section, so we remained seated more or less the entire game. It wasn't quite the all out scream fest we had last time, but did actually give me a chance to kick back, relax, and enjoy some soccer with friends.

While there were more people there last night than my first time, RFK stadium was still mostly empty. It makes for an odd experience to look across the way at all those empty seats, and to remember there was a time when every seat in the house would be packed. The food was surprisingly good - I had an authentic cheese pupusa and dippin-dots (ice cream of the future!). Sure, I paid an arm and a leg for it ($4.00 for a bottle of water!!), but it was definitely worth it.

The score was 2-2 -- with the DC United giving up two goals near the end of the match. It looked like they were going to win out, but in the end, they had to settle for a tie (got to love soccer and their ties).

It was lots of fun, and a must do activity if you've never tried it.

What Data Would You Need to Answer This Question?

I stumbled on this article by Jason Calacanis - a personality I don't know anything about (other than a quick read through his Wikipedia page). The premise seems simple: kids today lack work ethic, and therefore don't deserve jobs. He then connects this to our current jobs crisis. He describes the last three generations of Americans as follows:

a) Baby boomers were willing to dress up professionally, shut up and work hard provided they got paid really, really well. And, oh yeah, they wanted to retire early and do something fulfilling after 60. They would stick with their jobs for 10 or 20 years, as opposed to their parents who did so for 30-50 years (in other words, baby boomers had three or four jobs in a life time).

b) We Gen-X members wanted to be compensated well, sure, but more importantly we want to be heard and respected. We wanted to be able to maintain our individuality with simple gestures like dressing how we wanted (we created casual Fridays and "Reality Bites"), and more importantly by defining how we accomplished the tasks we were given.

We wanted to work hard. But we didn't want to be micromanaged. It was really about empowerment, controlling our destiny and recognition. We would stay with a job for three or four years (in other words, 10 jobs in a lifetime).

c) Millennials are not all the same. In fact, 25% are indistinguishable from Gen-X: ...

The other 75% of millennials/Gen-Y are really interested in developing their friendships deeply and experiencing as much cool stuff as possible! They are willing to go to work to pay their bills, but they don't want their careers to get in the way of their friendships and experiences. They are looking to stay at a job as long as it's interesting to them and as long as they are getting a ton of praise. They are willing to work at a job for a year. Or less. They have no problem with a resume that has five jobs in two years. In fact, I've seen 25-year-olds with resumes with more jobs than I've had -- and I've been in the work force three times longer!

Ignoring the rest of the article for a second (which is predicated on the above being correct), I've got to ask - what data does this guy actually have to back up the above description? Seems to me like there are a number of traps that one can fall into whenever you make broad claims like the above:

Confusing a local population with a global one. Most of the people around me and that I come into contact with are Democrats. Heck, walking through my neighborhood, all I see are Obama bumber stickers. Just the other day, I saw my very first Ron Paul bumber sticker at Trader Joe's parking lot and smiled. Should I assume from this that most (say, 90%) people are Democrats? Of course not, that would be silly.

Isn't it possible that Calacanis is coming in contact with a select group of Millennials that exhibit this poor work ethic behavior? The young entrepeneurs I work with daily don't fit the description Calacanis is proffering. Maybe my local view is wrong, maybe his is. More likely, both of ours are wrong (that is, some are lazy, some are hard workers.).

Falling for the grass is greener on the other side fallacy. Take network television. Back when all there was were a handful of stations people railed against how homogenized everything was. TV was turning us all into clones. Now that in many ways TV has splintered, people lament how the days when all could bond of a single show are gone. Remember the good old days when each Mash episode was taken in by the whole country? Those were the days.

Calacanis berates Millennials for caring more about their relationships and experiences then they do about they jobs. How dare they? And yet, nearly every major religion warns you of the trap that you can fall into when all you pursue is money and fame. If Millennials have figured out that people are more important than money, and that time is our most precious resources, then they sure figured it out faster than I did.

Finally, as even Calacanis admits, you've got be careful you don't fall into the classic Kids today are so lazy trap, because every generation does it. Christoph Bauer captures this perfectly in his comment on the page:

"Our youth now love luxury. They have bad manners, contempt for authority; they show disrespect for their elders and love chatter in place of exercise; they no longer rise when elders enter the room; they contradict their parents, chatter before company; gobble up their food and tyrannize their teachers." purportedly Sokrates.

"The world is passing through troublous times. The young people of today think of nothing but themselves. They have no reverence for parents or old age. They are impatient of all restraint. They talk as ... if they knew everything, and what passes for wisdom with us is foolishness with them. As for the girls, they are forward, immodest and unladylike in speech, behavior and dress." purportedly preached by Peter the Hermit in A.D. 1274

"I see no hope for the future of our people if they are dependent on the frivolous youth of today, for certainly all youth are reckless beyond words. When I was a boy, we were taught to be discrete and respectful of elders, but the present youth are exceedingly wise and impatient of restraint."
--- Hesiod, Eighth Century B.C.

I think it's the same here. While aging, we all grow a form of neglect, that keeps us from reminding us of ourselves when we were younger.

And now my point...

But here's the thing -- I'm not necessarily arguing with Calacanis' point, or suggesting it's wrong. What I'm curious about is this: what data would you actually need to be able to make statements about generations? Surely the are differences between the generations, but how would you measure it? Given the traps above, and more, how do you actually end up with a reasoned argument, and not just end up the old geezer shouting at kids to get off his lawn?

The Mystery of UVB-76

The latest edition of Wired (not yet on the web), has an intriguing little article on the mystery of UVB-76. UVB-76 is apparently a transmitter in or around Russia that generates a smattering of buzzes and blurbs, and has been doing so for decades. The purpose of the transmitter< is unknown, with theories being suggested from the mundane (used for testing equipment) to the exotic (used by Russian spies). The whole thing is just one big fun mystery.

I'm not sure quite what I find so appealing about it - probably the mix of relatively low tech (short-wave radio) hardware and the big impact it's having (in terms of the imagination being captured). It's worth reading up about, and when the Wired article does appear online, it's definitely worth a read.

In the mean time, you can listen in on the feed here. Perhaps it's just the right blend of white noise you need to put your little one to bed?

Wednesday, September 21, 2011

The Lesson from The 440 sq. ft Garage House

I love stories like this: a guy takes a 440sq ft garage and turns it into a sweet little house.

Here's the before picture:

And here's the after:

The design is impressive to say the least.

What I love about these stories isn't just the massive make-over, it's the sense that cleverness can win out over conventional wisdom. More importantly, I think there's a natural pull to want more (a bigger house, bigger TV, more stuff, etc.) and stories like this remind me that maybe what I have, even if feels like less, can be perfect.

Another example: instead of pining after the latest Digital SLR camera for thousands of dollars, why not make your own camera that can do something remarkably, like capture a 6 month exposure. Resist the pull.

Here's more on the very cool garage house:

Tuesday, September 20, 2011

AIDE - Simple intrusion detection software

I'm a programming geek, not hardware, OS, network administrator or security geek. So, I like my security tools simple. Just trusting that the virus checker is working away is fine and all, but if I can actually know how something works, I'm all the happier for it. Which brings me to my latest security software find: AIDE.

I was setting up a new server and wanted to put Tripwire on it. Or, at least I thought I did, until I learned that Tripwire had apparently gotten a lot more complex than when I first learned about it years ago. The idea behind Tripwire was that you ran it once to capture the checksum of most files on your system. You could then run it anytime you wanted, and it alerted you to any changes found.

These changes are an excellent place to start searching for an attack. Like when I had a server compromised years ago by a rootkit, and /bin/ps and other binary files had been replaced with evil twins.

Tripwire apparently has split into a commercial and OpenSource version, and even then I wasn't sure if it still did what I thought it did. Luckily, I found AIDE, and it continues the tradition of simplicity. Even the "web site" explaining AIDE is old school text. I love it.

AIDE really only does two things: (1) it'll generate that snapshot of what the system currently looks like, (2) it'll check that snapshot against the current system.

So far, I've been using AIDE in two ways. First off, I manually generated the snapshot (using the --init option), and nightly, I run the check to see if anything has changed. It's taken a bit of tuning, but I've managed to get rid of most of the false positives. Now, I get a nightly report that alerts me to any unexpected system changes.

This is useful against basic attacks, but there's a doomsday scenario where a hacker breaks in a tampers with AIDE itself. Heck, they could just turn off cron and it would never run. To deal with that, I've copied the AIDE database to an offsite location. I guess if I was a true sysadmin, I might copy onto the thumbdrive on my keychain and rest a little easier knowing that it's always at hand. Personally, I'm fine with the offsite location. During either a regular security audit, or if I think something fishy is going on, I can always grab a fresh copy if AIDE and check the files against the pristine database stored elsewhere.

Like I said, I'm not a security guru, so take what I've written above with a grain of salt. Still, it just looks simple enough that it might actually work.

Monday, September 19, 2011

Scenes from the along the Potomac

I snapped these photos on my Android G2 last week, and decided over the weekend that I liked them enough to share.

Traveling with the Osprey Porter 46 Travel Pack

For this last trip to Boston, I used a Osprey Porter 46, instead of the usual rolling suitcase. The Osprey is one of those old school travel packs, which means that it's more backpack than traditional luggage.

The Pros:

  • The backpack arrangement forced me to bring a single bag. If I was bringing rolling luggage, I would almost certainly have brought along a backpack.
  • The pocket arrangement worked well for me. The outer pocket covering the main section's flap fit my netbook perfectly, and the top pocket stored items that I wanted quick access to. I envisioned a nightmare scenario where I was going to effectively have to dump the contents of the bag out to get to stuff, and that didn't happen.
  • The few inner pockets worked well to.
  • In general, the materials are quite solid and I get the sense that this bag will last. Even if it does have some unexpected failure, it's easy enough to take it back to REI for a replacement (or even return). Got to love REI's extremely generous return policy.
  • The pack is bigger than I imagined it would be. I figured that a travel pack would force me to take less, but that doesn't seem to be the case. It's definitely larger than the comparably sized rolling bag Shira brought along. I usually go to pretty great lengths pack light, but no matter what I do, I find myself cramming stuff in at the last minute (a jacket, a gift for the person we are staying with, whatever), and the size of the bag definitely helps. Some may almost look at the size as a detractor, but I just see it as a way to make the bag more functional.
  • The compression system worked well to keep stuff from moving around.
  • The hip belt and shoulder straps are top notch. I had approximately 20lbs worth of stuff and I never felt any discomfort. In fact, I was almost thinking you could get away with using the bag on an overnight hike and the like.
  • The bag easily fit in the overhead compartment on our flight, and was even able to utilize a spot too narrow for most rolling bags.
  • The bag was easy to identify, as nobody else had anything like it. Got to love the stand-out red color.
  • Wearing the bag meant that I had hands free to roll Shira's bag. I didn't do this often, but there was a couple times when it was handy.
  • The price, about $100, seems quite fair. Especially knowing what good luggage goes for, it's actually quite impressive.

The Cons:

  • I was carrying all my crap on my back, instead of rolling it next to me. What kind of idiot turns down wheels in favor of being his own pack mule?

As you can see, overall, I'm really impressed with the bag. Certainly, if I was in a context where a rolling bag wasn't an option, the Osprey would be no-brainer. A solid bag, guaranteed for life, how can you go wrong?

But, usually, the most difficult terrain my luggage needs to navigate is from the airport curb to the rental car bus. So, a backpack seems overkill. Still, I'm impressed with all the other features of the bag, I think I'm going to stick with it for another trip or two. Will see who wins - all these great features, or gravity.

Here's the Osprey next to Shira's rolling bag:

Sunday, September 18, 2011

Visiting The Twins and Tzipora

What a fantastic time we had visiting our nieces and nephew in Boston. The Twins are now 2 1/2 and Tzipora is a whopping 9 months. They are all absolutely brilliant. One example: the twins were looking out the window and exclaimed that there was a fish in the sky. A fish? Yes, a fish. Really, a fish? Yes, definitely a fish. We glanced out the window, and sure enough, there was a blimp circling above - looked like a fish to me.

And Tzipora is super interactive, with all the sounds and movements of a happy little baby. She should be crawling in no time, and then lord help my Sister and Brother in law, they are going to need it!

As you might imagine, I took just a few photos this weekend. I've edited them down to these below. Believe, me, it wasn't easy, these kids are super cute!

View all photos

Friday, September 16, 2011

Gotcha of the Day: Can't paste into a text field in Chrome

A client of mine noticed an oddity about the HTML5/CSS template we were using for his site. When browsing with Chrome, pasting into text fields didn't work. You could cut and copy text, but not paste.

Naturally, it worked fine in IE and Firefox. At first, I assumed the behavior was due to some funky JavaScript - perhaps something related to the uniform jQuery plugin. But, removing that code made no difference.

After much head scratching and somewhat random poking, I realized the problem was being caused by a CSS directive. On the body tag, there was an innocuous class='login' declaration. And within the one of the CSS files was the following:

  /**
   * Login
   */
  body.login {
      height:0;
      overflow: hidden;
  }

Removing this chunk of code allows the paste functionality to work.

I suppose I can kinda sorta see what Chrome was doing: the body had no height, so why should you be able to paste into it?

In the end, I removed the code and everything behaves as normal.

Thursday, September 15, 2011

The Show. A Must Watch.

Not quite sure when I discovered The Show by Ze Frank, but I've been hooked since. It's bit hard to explain The Show: it's about 3 minutes of Ze talking. Some episodes are pure goofball, others making brilliant insights. They ran for one year from March 17th 2006 to March 17th 2007. They are continuously re-run in sequence. Here's the one from yesterday:

And here are two shows that that display a little more depth. One on picking a major in college and one on information overload:

And here's a show that's near and dear to my heart because it's about ideas:

I love quite a number of things about the show. I love how one individual with relatively few resources can make such powerful media. I love how he engages his audience so easily with wikis and other tools. I love his insights. I love the Bush era coverage that brings back memories of when Democrats were the patriotic ones for being outraged at the government. I love he tries out various experiments (let's play a chess game over a weekly video show - whoo!) with ease.

One day I may dig deeper and find out who this Ze Frank character is. But for now, I like the mystery of just being entertained in 3 minute blocks by him.

You can watch some of the best examples of The Show here. But really, you should subscribe to the RSS feed and take it in day by day, like nature intended.

Wednesday, September 14, 2011

Gotcha of the Day: Opening a Windows Based EC2 to the World

So, I tried my hand at setting up a Windows based EC2 server. It's almost too easy. EC2 makes getting the instance setup trivial, and WampServer makes installing PHP + Apache + MySQL a breeze.

Problem was, the outside world couldn't see the server. To fix this I did the following:

  • Right click on the Wamp tray icon and selected Put Online. The online status doesn't indicate whether or not Apache is running, it indicates whether or not it's set to allow connections from other than localhost.
  • Insure the EC2 Security Group allows HTTP
  • Go to Control Panel » Windows Firewall and insure that it's set to off.

Bam! You're now open for business.

All of this assumes, of course, that you ready and willing to accept public traffic.

Obviously, this is a quick and dirty setup that worked well for my test purposes. This is probably not the configuration you want for a production environment.

Gotcha of the Day: Streamlining Subversion and Emacs

I've been pleased enough with Subversion + emacs integration that I really haven't yet felt the pull to investigate git and the like. Dealing with branching and merging has been relatively painless, and the whole single-version-number-for-all-files approach seems to work really well for me, too.

The only gotcha I've had is that it's somewhat inconvenient to run a diff (C-x v =) or grab the most recent version (C-x v ~) of a file from within emacs. Emacs trivially lets me know the current version of a file (say, 204), but because files aren't version individually, the previous version of a given file isn't simply the current-version - 1 (that is: version 203 of the file may not be the last time this file was changed, just the last change in the repository). The work around I usually used was to run a quick subversion log (C-x v l), and to note the previous version number.

I knew there had to be a better way, and after a few minutes of searching I discovered it: Subversion Revision Specifiers.

I'd naively assumed that subversion required a version *number* for diff and other operations to work. Turns out, this is just mostly true, there are a few magic version specifiers you can use instead of numbers. The one that fixed my gotcha is PREV. PREV represents exactly what you'd want it to represent:

The revision immediately before the last revision in which an item changed.

From within emacs, I now know I can answer PREV anytime a version number of being asked for. Want to compare a file and the previous version in the repository? No problem, enter PREV for the older version and the HEAD for the current version.

HEAD is also a handy specifier, as I can use it to trivially get a clean copy of a source file out of the repository. I just run: C-x v ~ and enter HEAD.

Tuesday, September 13, 2011

Review: Geeks: How Two Lost Boys Rode the Internet Out of Idaho

I picked up Geeks: How Two Lost Boys Rode the Internet Out of Idaho on a whim as I was just about to walk out the library. Within a few pages I realized that Geeks was in fact written during my Good Old Days - back when Altavista was the search engine of choice, Linux was brand spank'n new, Doom and Quake were the ultimate in gaming technology and broadband access was an unusual luxury. Ahhh, the mid to late 90's. Good times.

It was actually a bit hard to remember back to a time when the Web so young that it wasn't the goto source for all information on the planet. What a risk the heros of the story took in picking an Apartment complex based only on online data. Nowadays, you'd be taking a far larger risk not using the web.

So yes, the book is a bit of nostalgic reading for me. None the less, the storyline pulled me in and I found that I couldn't put it down. By the end of the book, I realized I had just read The Blind Side, only for a pair of geeks instead of gootball player (of course, Geeks was written 9 years before The Blind Side). In the end, this story isn't so much about geeks or new beginnings, but about the power of mentoring.

Read it. And then check out your local foster care resources. It sounds crazy, but you can actually be the one that makes a difference in a child's life. Not promising you'll get a book or moving written about you, but hey, it could happen.

Monday, September 12, 2011

The Flying Circus

Yesterday, our friend Allie and her 2 year old hit up The Flying Circus Airshow, out in Bealeton, VA. Bealeton is about an hour and 20 minutes from DC, so a bit of a schlep but totally doable.

The Flying Circus is essentially an air show using WW II prop planes. It was an absolutely wonderful time. I liked nearly everything about it: there's a skydiver who starts the whole affair off, plenty of acrobatics, a bit of history for us adults (including tales of an Airborn Aircraft carrier built in 1932!) and a wing walking demonstration. It's just good wholesome fun, and at $8.00 for adults (there's a $2.00 off coupon on the website), the price was definitely right. Our friend's 2 year old enjoyed the show, and there was plenty of space for him to run around. After the show, we were able to inspect the airplanes and chit-chat with the pilots and wing walker.

I suppose for a generation used to piloting a realistic F16 on their home video game console, the show may seem a bit slow at times. But, I think it's a great opportunity for kids to see some impressive planes in action.

My only niggle with the show, and I know I'm being way too sensitive here, is that part of the show includes German-accented character (The Black Baron) that is the butt of a number of jokes and pranks. I get that he's playing the role of foil and idiot - but in a show geared for kids, I just didn't think it was necessary. Kids don't need to see someone who looks and sound different being made fun of. Like I said, I know I'm being way too sensitive here, and it surely wouldn't keep me from attending the show, but I really don't see any value in it.

All in all, it was a fantastic time. Should be fun for the whole family.