Robots Will Drive Your Drunk Ass Home

audiAn Audi just drove itself across the country:

Nine days after leaving San Francisco, a blue car packed with tech from a company you’ve probably never heard of rolled into New York City after crossing 15 states and 3,400 miles to make history. The car did 99 percent of the driving on its own, yielding to the carbon-based life form behind the wheel only when it was time to leave the highway and hit city streets.

With any new technology there will be winners and losers, those who benefit and those who suffer. In this case, beer drinkers might be the biggest beneficiaries. “Why yes, I can have one more.” While truckers seem the likeliest of losers.

Long haulers have already been squeezed out of the middle class. It will take a some time, but this is probably the tip of the final dagger. Older operators should be able to ride current technologies into sunset but younger truckers better have a Plan B. Their days are likely numbered.

Still – THIS THING CAN DRIVE US HOME FROM THE BREWPUB!!!

[Wired: An Audi Drove Itself Across The Country]

[WAPO: Trucking Has Become Just Another Low-wage Job]



Standardize Testing

testingBureaucrats love standardized testing. And why not? To judge the effectiveness of a system, you need an universal means of testing and measuring progress. Your JoeDog understands why these tests are important; he tests systems all the time. Unfortunately, few people like this particular method:   “Another standardized test? Yeah!!!!!”, exclaimed nobody ever.

They suck and they’re expensive. According to a Brookings study, it costs $1.7 billion dollars to administer them annually. That’s about four percent of the total Federal budget. Your JoeDog has a more cost effective means of measuring the value of public education. Take the total number of annual email scam victims and multiply it by the number of what-were-you-thinking?

If teachers produce just one student who wires money to collect winnings for an Irish lottery he’s never entered, then there’s room for improvement. If this becomes the means by which we evaluate educators, then you can bet your boots there will be a class in That Nigerian Prince Who Wants To Wire You Ten Million Dollars Doesn’t Exist.  And what good is a Home Economics class that doesn’t impart this lesson: Your banking details don’t need to be immediately updated.

One more thing: It’s recently come to our attention that schools in the great state of Kansas are ending the school year early because the people voted themselves massive tax cuts. Tests or no tests, at the end of the day you get the education system you paid for.

 



A New Day Dawing

Your JoeDog updated this site today. What does that mean?

For the most part the site has the same look and feel it’s had since 2012. But underneath those changes, there are some technical improvements that will make our lives easier. We’re using a three-column layout from a template by Dynamic Drive. And we’re programming things in a more WordPressy fashion.

But here’s the biggest change: The comments are now managed by Disqus. Even though we changed the policy so that only pre-approved commenters could post, comment spammers were still hammering the site on a daily basis. These dicks are why we can’t have nice things.



Indiana Right to Life Website Is “Hacked”

Indiana Right To Life took time out of its busy schedule to weigh-in on Gov. Mike Pence’s don’t-serve-wedding-pizza-to-gays law. It may surprise you to learn they’re for it!

It may also surprise you to learn the law is not universally accepted. And like all aspects of contemporary society, the conflict spilled into cyberspace. Hacktivists have taken down the IRTL’s website. IRTL labeled it “hacked” but it certainly looks like a DDOS. It was down at the time of this writing: http://www.irtl.org/

Now whatever your politics, this is a shitty thing to do. We can’t have a public debate if people use tools and weapons to silence speech. The First Amendment was first for a reason. If someone has stupid ideas — and there are many in this debate — then it’s up to you to expose them as such. But while its website is down, we can’t evaluate of IRTL’s policy position.

Plus DDOS is lame. It takes no creativity to execute and web users just think the site is down. If the victim didn’t run to the press, nobody would notice.

If you want to make a political statement with elite hacking skills, then make a stinkin’ statement. Don’t put your hand over someone else’s mouth. Replace the Board of Directors with pictures of Elton John and George Takei. Yeah, sure, IRTL gets a little worked up but nobody’s message was stifled and we had a few larfs along the way….

NOTE: Your JoeDog doesn’t condone cyber attacks but if you’re gonna attack cybers, then he implores you to show some creativity. 

[WSBT: Indiana Right To Life website is “hacked”]



Technology Without Good Policy Is Worthless

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]

 



Beware of the (Joe)Dog

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).

 



Amazon Web Services Free Edition

(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.

 



The Hidden Cost of Microsoft Windows

The 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.

[Image lifted from Nerdy Perv]



A sh script INI parser

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
[WEB]
 srv = www.joedog.org
 usr = jdfulmer
 file = haha.txt
 path = /usr/local/content/www
[FTP]
 srv = ftp.joedog.org
 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:

#!/bin/sh
##++
## 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() {
 FILE=$1
 SECTION=$2
 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
SECTIONS="WEB FTP"
for SEC in $SECTIONS; do
 ini_parser "papa.conf" $SEC
 echo "scp $file $usr@$srv:$path/$file"
done
exit

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