Yes, pilot suicide is rare. It’s even rarer in commercial airlines. Post-9/11 cockpit doors were supposed to prevent this type of event. They were supposed to keep suicidal maniacs out of the cockpit and away from the controls. Yet last Tuesday one of these locking doors helped facilitate another suicidal crash. You may certainly call that ironic but it’s the type of bitter humor we can do without.

[WaPo: German Crash Raises Questions About Airplane Security]


Posted in Technology | Leave a comment

The world would be a much better place if the correlation between certainty and stupidity wasn’t so high…



Posted in Community | Leave a comment

Tom Wolfe tells us that “you can’t go home again.” It was a adage he stole from Ella Winter, the British activist. It’s certainly difficult for people like George Webber, the chief protagonist in the novel that made Wolfe’s phrase so famous. Webber infuriated his hometown with a novelistic depiction of them.

Yet the same is true for developers. You can’t go home again. It’s hard to look at old code. It makes us cringe; it can make us blush. “Why the hell did I write it like that?” If you’re not embarrassed by old code, then you haven’t learned anything in years.  The same is true for old websites: Beware of the Dog (2001).


Posted in Programming | Leave a comment

(Or how to run a website on a shoestring budget)

Last fall, Your JoeDog moved this site into Amazon’s web cloud. He’s using a micro instance on the free tier. It’s free for a year then $0.017 an hour after that.

Note that “micro” part. We’re talking about a pretty lean server. When it first came online, this site screeched to a halt at semi-irregular intervals. It was running out of memory. To increase its capacity while remaining in the free tier, Your JoeDog added some swap. “How do you add swap space in AWS?” Glad you asked. Here’s how:

  $ sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
  $ sudo chown root:root /var/swap.1
  $ sudo chmod 600 /var/swap.1
  $ sudo /sbin/mkswap /var/swap.1
  $ sudo /sbin/swapon /var/swap.1

You can check your creation with the free command:

  $ free -m

By adding swap, Your JoeDog was better able to keep this site humming. Unfortunately, it still locked up. One day, it locked up for an extended period of time.

To monitor the site’s availability, we signed up for pingdom. There’s a free version which allows you to monitor a single URL and send text alerts. (Email won’t do us much good since that service is hosted here.)

Not long after the alerts were configured, one fired. The site was down(ish). Downish? What’s that mean. It was more like a series of brief outages. While this was going on, Your JoeDog’s inbox started filling with new-comment-needs-approval messages.

LINK SPAMMERS!! Some asshole was botting the site with unthrottled comment posts and they essentially DOS’d it.

To free up resources, Your JoeDog created an AWS database instance and moved his content from a local database with an export/import. There’s only one reason you shouldn’t do the same: cost. After the free period, you’ll be charged for that as well.

So what’s the moral of this story? If you can afford it, don’t waste your time on the free instance. These micro VMs are too light to handle traffic bursts. And if you’re a serious business, then you really shouldn’t bother. In the grand scheme of things, Amazon’s computing-for-lease is really inexpensive … except, of course, if you’re a lowly open source developer.


Posted in AWS, Security, Technology | Leave a comment

frustratedThe Windows team upgraded a server to W2K8 and now its schedules are failing. The jobs kick off but abend and have to be run manually. Your JoeDog has been sucked in because he manages enterprise scheduling. Exciting!

“You tested this before you went live, right?” Um, …

The team can run jobs manually but they fail in the scheduler. Your JoeDog thinks this is a classic case of ENV mismatch, a discrepancy between the logged-in environment and the sheduled runtime environment. He was implored to open a case with IBM. Their conclusion? An ENV mismatch.

Still, the Windows team can’t figure it out. The jobs kick off in the background and they can’t capture any error messages. Those who live by the GUI, die by the GUI. Thus far they’ve tied up more than 100 man hours trying to solve a problem that a subpar Linux admin could solve in a few minutes on his own.

Add this to the hidden cost of Microsoft Windows.

Posted in Environment, OS, System | Leave a comment

An INI file provides an old-timey way to configure applications. On MSDOS and early versions of Windows, it was the primary configuration mechanism. (Sadly, it’s been mostly replaced by the stupid registry.) Fortunately, INI files are still around because they remain very useful. On Linux, many developers have adapted the format.

Years ago Your JoeDog wrote an INI parser in sh. This enabled him to use one config file across multiple SAP landscapes. Each section of the file, is headed by the landscape name: [D] [Q] [P] etc. A script’s configuration varied depending on which landscape it was launched in. This enabled us to test on one landscape and promote the script without any changes to the next one.

Recently a colleague needed this type of one-with-many configuration. She needed to loop through a list of servers and reference their many attributes. Your JoeDog dusted off this parser for her and now he’s passing it along to you.

Consider this INI file:

# The parser supports comments
 srv =
 usr = jdfulmer
 file = haha.txt
 path = /usr/local/content/www
 srv =
 usr = jeff
 file = papa.txt
 path = /usr/local/content/ftp

Now here’s a script that contains our parser along with an example of how to use it:

## Parses an INI style file:
## [section]
## attr=thing
## key=val
## [header]
## thing=another
## foo=bar
## <p>
## @param file full path to the INI file
## @param section a header that matches the stuff in brackets [section]
## @return void (the variables are made available to your script)
ini_parser() {
 eval $(sed -e 's/[[:space:]]*\=[[:space:]]*/=/g' \
 -e 's/[;#].*$//' \
 -e 's/[[:space:]]*$//' \
 -e 's/^[[:space:]]*//' \
 -e "s/^\(.*\)=\([^\"']*\)$/\1=\"\2\"/" \
 < $FILE \
 | sed -n -e "/^\[$SECTION\]/I,/^\s*\[/{/^[^;].*\=.*/p;}")
# A sections array that we'll loop through
for SEC in $SECTIONS; do
 ini_parser "papa.conf" $SEC
 echo "scp $file $usr@$srv:$path/$file"

Now let’s run this script and see what happens:

Pom $ sh papa
scp haha.txt [email protected]:/usr/local/content/www/haha.txt
scp papa.txt [email protected]:/usr/local/content/ftp/papa.txt

Posted in Programming, sh | Leave a comment

Your JoeDog’s site was down for much of the afternoon. Why? Well, it appears some Amazon employees are having a bad day. This site is hosted with Amazon Web Services and throughout much of the day it was unavailable. When he could get in, Your JoeDog checked his logs for a root cause. As far as he could tell, there was nothing wrong at the server level. Something was wrong with the host.

Hoping the problem was regional, Your JoeDog decided to move his EC2 instance into another region. He did that by following these steps inside the EC2 console:

  1. Shut down the running instance
  2. Hilight the volume, then Actions => Create image
  3. Go to AMIs on the left nav; select your image, then Actions => Launch
  4. As you navigate the settings select a new region to place it in.

Your JoeDog’s server runs in the Western region and he didn’t have an option to move it east. He did, however, have subregions from which to choose. Whereas the old server was running in us-west-2a, he put the new one in us-west-2c.

When the server came up, it did so with new security settings. No problem. It’s easy to associate the new server with your old rules. Hilight it in the dashboard then select Actions => Networking => Change Security Group. You can select your old group and toss the new one that was created when you launched a new image.

NOTE: Your JoeDog now has two volumes and one running instance in his EC2 Dashboard. He’s 99% certain he can toss that old volume but that won’t happen until he grabs copies of all his 1s and 0s. (Just to be safe).


Posted in OS, System | Leave a comment

Have you ever wanted to initialize a java ArrayList to a certain size? You peruse the javadoc and you see what appear to be two different options, one is a constructor option and the other is a chained method.

Here’s the constructor:

ArrayList (int initialCapacity)

Constructs an empty list with the specified initial capacity.

And here’s the method:

void ensureCapacity(int minCapacity)

Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.

And here’s the thing: Neither one changes the logical size of the array. They each change its capacity. That is they change the size it can reach before it has to start copying its values to resize itself. If you do something like the following, you’ll get an IndexOutOfBounds Exception:

ArrayList<String> list = new ArrayList<String>();
list.add(190, "JoeDog");

Exception in thread "main" java.lang.IndexOutOfBoundsException

If you want to initialize an ArrayList to a particular size, you’ll have to roll your own method:

 private static void ensureSize(ArrayList<?> list, int size) {
   while (list.size() < size) {

You can call it like this:

ArrayList<Thing> list = new ArrayList<Thing>();
ensureSize(list, 64);


Posted in Java, Programming | Leave a comment

baseYour JoeDog followed the events in France pretty closely. After reading two days of reports from the US and Europe, he had no fscking clue what was going on. The killers were captured and one was dead! Um, the killers are in the woods with helicopters overhead! Um, no, they’re inside a Jewish deli back in Paris. In a rush to publish, the only thing they did was add to our confusion.

And so it goes with the CENTCOM hack. Your JoeDog heard ISIS was inside Pentagon computers!!1!1!!! After sifting through news reports, it appears that ISIS simply defaced their Twitter and YouTube accounts. Wait a second — CENTCOM has a twitter account? What do they post besides “blew up some shit today!”

Is this a Big Deal? It depends on your perspective. From a security standpoint, it’s not. Imagine if you shared your GMail password with a friend and he started sending dick pics to everyone in your address book. That’s pretty much what happened. ISIS gained access to the accounts and pranked the military.

From a public relations perspective, it’s embarrassing. Unless they’re absolute morans, no sensitive data was compromised.  You wouldn’t link your bank account to your twitter feed, there’s no reason to believe CENTCOM would do the same with its operational servers. But at the same time, it paints US military as a careless organization. It didn’t use two-factor authentication, its credentials were easy to crack and/or it fell for a phishing expedition.

It does make you wonder what else they’re “protecting” with ‘password123′ or to what extent the people inside Central Command are click-happy. Those are speculative musings which may have no basis in fact. Still, you can imagine a military ass-chewing that began with the Commander-in-Chief and worked its way down to the lowliest private. Your JoeDog is glad he doesn’t work in CENTCOM today.



Posted in On The Job, Security, Tech Media | Leave a comment

anonYour JoeDog blogged about politics for a solid five years. During that time, there was nobody he wouldn’t attack head-on. With his blogging posse, he helped drive several foes from the Internets, he defaced other blogs with titties and Goatse and waged a holy war with the state of Denmark. He even got into a bare-knuckle brawl with Daniel Pearl’s widow. (Hey – she started it.)

But it’s not true to say he’s without fear. Your JoeDog wouldn’t dream of sparring with the “hacker” collective known as Anonymous. They have a lot combined knowledge and a lot of time on their hands. You may consider yourself well guarded but Anonymous will tirelessly prod your defenses until they find an exploitable weakness. They are more relentless than you are thorough.

And so Your JoeDog was greatly amused when he learned that Anonymous declared war on Islamic Jihadis. Because fsck Jihadis. Their values are anathema to hacker values. They try to silence opposing views. They monopolize information and points of view. They destroy rather than build. They are sexist, intolerant douchebags.

Anonymous will start with their social media but they’ll soon tire of that and move onto other things. The fledgling Islamic State surely has some digital infrastructure that could use a good fscking with. And I have no doubt they’ll expose the identities of Western assholes who take up weapons in the name of a sixth century goat herder. Good luck, Jihadis. You’re gonna need it.


Posted in System | 1 Comment

Recent Comments

  • CC: Many thks for your reply.
  • Jeff Fulmer: You mean your operating environment can only sustain more than 1000 connections for a few minutes....
  • CC: HI BUDDY I met this when the number of concurrent connections > 1000,siege can only sustained for a few mins....
  • Patrick: Hello- Have a simple 3 tier system and wanting to have multiple Siege testers run against multiple...
  • Oleg: Hello. Are the response time is the same as TTFB?