War Bikes

&& [ cycling ] && 0 comments

[![Mark 1]({{site.image_url}}/{{page.id | replace: '/','-' | remove_first: '-'}}/mark1.jpg "Mark1")]({{site.image_url}}/{{page.id | replace: '/','-' | remove_first: '-'}}/mark1.jpg)

I can’t think of anything more align with progressive values than the bike. The weapon of choice for the modern day bohemian - with it’s obvious practical use as a means of transportation augmented by the enormous health, environmental and economical benefits endowed to the rider. Not to mention biker’s butt. Nay, it appears there is nothing but butterflies and sunshine surrounding the subject of the cycle.

Except that a bicycle is a machine and a machine’s utility is defined by it’s use.

Cycling saw a huge surge of popularity in the late 19th century. In particular the invention of the safety bicycle and the pneumatic tire suddenly made the machines a practical and accessible means of transportation for everyone.

Military thinkers were attracted to these machines for their obvious benefits: they were easy to manufacture, cheaper than horses, relatively silent and portable. Though it may seem silly now, by World Word I nearly all major militaries had incorporated bicycles into their ranks in some way.

Austrian Army Ass Slide

In the 1890’s the Austrian army experimented with folding bikes for their infantry. Looking at these illustrations it is hard not to feel sorry for these men. The bikes were made of steel and heavy rubber, supposedly weighing up to 50 pounds each. They snagged on branches and other obstacles while strapped to the back, and could only be removed with help from a comrade. Unfolding a refolding was a time consuming process, and they bikes were flexy and janky to ride. It quickly became apparent that what seemed practical in theory, was anything but.

Folding bikes (which to this day are still pretty lame) may have been scrapped, but military use of the bicycle continued. During WWI They proved to be an effective means to move troops to front lines quickly and were especially useful as couriers. During the invasion of Belgium German officers made use of bicycle messengers sent in advance of the main invasion to warn the populace of the coming occupation and to urge them not to do silly things like blow up bridges, refuse soldiers in their homes, or any other general showing of resistance.

25th Bicycle Corps in Yellowstone

Another noteworthy deployment of the military bicycle was the 25th Bicycle Corps of the U.S Army, a unit of buffalo soldiers led by the sorta-off Lt. James A. Moss. The corps rode from Fort Missoula, Montana to St Louis, Missouri supposedly as an experiment to see see if the bicycle served a purpose in the US army. However I think that Lt. Moss was simply more comfortable with a bike pump in hand than a rifle:

Again and again would we stop along the road to look at paint pots, pools, springs, geysers, etc. Riding through the Gibbon Meadows we then turned off into Gibbon Canyon, deep, sinuous and picturesque. For miles we fared along the windings of the road, with the ever beautiful waters of Gibbon River at our side, now admiring this, then admiring that. Indeed, this was the very poetry of cycling.

and that the whole expedition was more likely an elegant excuse thought up by a guy who just wanted to ride his bike - but also happened to be in command of a small unit of soldiers in the American frontier.

World War I saw not only small units but entire companies and regiments made up of cyclists on all sides of the conflict. This trend continued into WWII.

Japanese invade Malay

Probably the most famous example of the effective use of bicycles in a military conflict came from the Malayan Campaign , fought between British Commonwealth army units and the Imperial Japanese Army. Due to their cycles the Japanese units were able to move quickly through the jungle terrain while evading, outmaneuvering, and cutting off British troops. The battle was a complete disaster for allied forces, who suffered 12 times as many casualties despite having twice as many men.

In a bit of personal history, my Grandmother’s friend Robert Littlefild recalled his experience as a downed fighter pilot in France during WWII in his book Double Nickel Double Trouble. After being found by members of the French Resistance, Lt. Littlefield had the opportunity to go for a ride:

A short time later three men, one with an arm in a sling, called me out of the hay and told me they were taking me to an English speaking lady. Two bicycles were provided for Marcel and myself and we set off down a dirt road until we arrived at a main cement highway. In about 20 minutes we arrived at Chateu le Matre, a large 150 year old, three story building.

Better than walking, eh Bob?

WW1 Germany Bicycles

In modern times, military use of the bicycle has been all but phased out. It seems that in the age of stealth bombers, long range missiles and remote control drones, there is simply not much military use for the bike. That is in battle, anyways. The legendary war monger George W. Bush claims to be an avid mountain biker(get off the brakes, George), a fact which still lends him no credibility.

In any case, the bicycle is still the Most Noble Invention, and it’s use in warfare only proves this incredible machine’s versatility.

Scanning with the Digital Anarchists

&& [ code, books ] && 0 comments

Scanning with the Digital Archivists

Noisebridge. I’ve only been there twice now and it’s already become one of my favorite places to hang out in San Francisco. Noisebridge is a unique place where the anarchistic ideals of my youth and my current love of technology exist in tandem. Not only is there amazing hacking going down but I’ve also found myself once again doing things like trash talking Crimethinc and comparing dumpster diving stories. Ah, it feels good (and smells bad!).

Depending on the kind of “hacker” you are you will either love or hate this place. Are you (A) the kind of hacker that loves technology and learning as an end in of itself? Or (B) the kind of hacker that would do questionable things in the back room of a VC’s office to secure funding for your snapchat for cats app? In this case B stands for don’t Bother.

One of the cooler projects to emerge from the chaos is the work being done on a DIY book scanner. The Digital Archivists meet every Thursday in the space and hack away at it. I got to join them this week and had a stab at getting some OCR (Optical Character Recognition) software working so that we can break some copyright law convert images of pages into actual text.

Tesseract is some amazing software that takes images as input and spits out text files. In fact the software is so simple (at least by default) and effective that converting an actual .tiff of a page to a text file is as simple as:

$tesseract page0001.tiff page0001.txt

Considering Tesseract is doing all the hard work, all I had to do was write a simple shell script to wrap it and convert entire directories of images to text.

As dorky as it may seem I find it something very satisfying about seeing a physical book go from ink on paper to bytes in memory. Pretty dorky actually. Goodnight.

Best Songs of 2013 With Three.js

&& [ code, featured ] && 0 comments

Best of 2013 with Three.js

I have to admit my favorite thing about the new year has to be all the awesome “Best Of” remixes and lists that come out just in time for the NYE parties.

I decided this year I was going to make my own. But instead of a boring list, why not make it interactive? So, I present to you:

Best Songs of 2013 with Three.js

You can fly around and listen to each of the 6 songs that I chose while fighting both the controls and epilepsy! Be warned, you should have a modern browser and a decent tolerance for cheesy indie music or you will not enjoy this site.

Obviously, I used Three.js to set the scene (pun intended) but I also used Buzz.js for handling the music because the native <audio> element was not holding up well with so much music playing at once. It was my first time with both libraries. Three.js has a steep learning curve, but nothing impossible.

One of the coolest things about 3D programming is how much math you have to use. I can’t even remember that last time I got to write code that used Math.sin and Math.cos, and it made me happy:

{{< highlight javascript >}} frequency = .3 h = ( 360 * ( 1.0 + time ) % 360 ) / 360; i = time % 1080 red = Math.sin(frequencyi + 0) * 127 + 128; green = Math.sin(frequencyi + 2) * 127 + 128; blue = Math.sin(frequency*i + 4) * 127 + 128;

partical_material.color.setRGB(red,green, blue ); ball1.position.y =+ time; ball_material.color.setHSL( 0.1, 0.3 + 0.7 * ( 1 + Math.cos( time ) ) / 2, 0.5 ); {{< / highlight >}}

Just for completeness sake, here is the track list in no particular order:

  1. Alabama Shakes - Always Alright
  2. London Grammar - Wasting my Young Years
  3. Trails and Ways - Border Crosser
  4. Cage the Elephant - Come a Little Closer
  5. MØ - Waste of Time
  6. Lady Lamb the Bee Keeper - Bird Balloons

Source code (minus the songs, sorry) is available on github.

Happy New Year!

Who Redirects to HTTPS?

&& [ code ] && 0 comments

I was browsing Twitter yesterday, following some people I met at the Aaron Swartz memorial hackathon over the weekend when I came across this tweet:

Nobody seemed to be able to verify that number, so I fired out Geany and wrote some python to attempt at a verification myself.

I downloaded the Alexa top 1,000,000 .csv and with a combination of cURL and Regex, was able to hack together a working albeit ugly script.

To my surprise, the number I came up with was even lower than the estimate. When the script finally stopped running (it took about 2 hours to cover 1000 urls) the result was that only 44 of the top 1000 sites that I tested redirected http requests to their domain to https. You can view a table with the specifics here.

To be fair, this script only tested the initial landing page. Many of the sites tested will switch to https once the user starts doing something that involves user input, or dealing with data that may be considered sensitive.

Still, the SSL turnout is less than stellar. Let’s hope for an increase to the 0.44 percent figure soon.

Nomads and Racers on Two-Lane Blacktop

&& [ Movies ] && 0 comments

Two-Lane Blacktop

I remember sliding into the passenger side of my good friend Michael Smelser’s 1973 Chevy Nova in Albany, Oregon. The first thing I noticed was there wasn’t much car - at least not much in the way of cupholders or GPS units. Instead I was sitting on a lightly padded bucket seat surrounded by a bare metal frame and unsafe looking glass. To my left was a shift nob, an extremely minimal steering column and what I hoped to be a competent driver.

The Nova roared to life and I suddenly found myself in a world of deafening, explosive sound and a vibration so violent I thought my organs were going to shift places.

The smell of exhaust all of a sudden became overpowering and immediately I understood that I loved the car.

Two-Lane Blacktop is a film that hails from the time of the Nova - the long past days when gas was $0.10 a gallon and cars were made of actual metal. Days before three letter acronyms like EPA and MPG entered the lexicon of the automotive industry or of their star spangled consumers.

But what I mourn the loss of the most is the pre-interstate American landscape. When we traded in our highways for freeways we gained speed and efficiency, but we lost any meaningful interaction with our surroundings while we travel.

Two-Lane Blacktop is good simply as a time capsule of when long distance car travel in America meant driving through towns instead of over them. Many of the locations shot during the film are in towns that nowadays are nothing more than the end of some forgotten freeway exit, dying or gone completely.

The film has more to offer than muscle cars with it’s unusual narrative and interesting cast. The nomadic “Driver”, “Mechanic” and “Other Driver” were all musicians in their time (including Dennis Wilson from the Beach Boys) and “The Girl” is played by the beautiful Laurie Bird, who tragically passed away just a few years later at the age of 25.

The plot starts out simply as a race across the country between two vehicles (Brock Yates, organizer of the Cannonball, cited the film as an inspiration for the race) but quickly morphs into something completely different, with the race itself becoming nothing more than an afterthought by the end. The movie is extremely heavy with metaphor and contains minimal dialogue and a nearly non-existent soundtrack.

Not for everyone, but personally I give this film a 5/5.

Cryptonomicon

&& [ books ] && 0 comments

When I first pulled Neal Stephenson’s Cryptonomicon out of the Amazon box, I was a little intimidated. The book is heavy - physically. I was a little skeptical about the idea of finishing a 1100 page novel, but I’m glad I decided to go for it. This book is well worth the time.

Speaking of time, I could go on a lengthy review but there are better written ones out there, so I won’t waste your’s. I would like to note some neat stuff that I either learned from Cryptonomicon or subjects that I became interested in as a direct result of reading it.

Van Eck phreaking actually exists

Van Eck phreaking is the process of gathering information on the contents of a screen by detecting it’s electromagnetic emissions. It doesn’t sound easy, but there have been several proof of concepts - one of which was performed in a vehicle parked across the street from a house containing an LCD monitor. Beware of creepy vans.

WWII era submarines were pretty cool

I suppose my mental image of submarines was always that of the cold war stealthy black nuclear cucumbers that rarely surfaced. Far from the truth. The first submarines actually looked more like boats and spent most of their time on the surface - diving when necessary in order to evade enemies or attack them. 1,155 German U-Boats were put into combat and 725 were sunk equaling a death rate of 82% - the highest death rate of any armed forces in modern war. Yet they were also extremely effective, at least initially. Over the course of the war, German U-Boats sunk over 2,900 allied ships.

Remember the Pacific theater?

History class and pop culture about World War II seems very Euro-centric. My knowledge of what went down in the Asia-Pacific was pretty pathetic. Douglas MacArthur was a total badass, as were many Filipinos. The Japanese did atrocious things during the war and in many ways they were worse than the Nazis. I finally understand the argument for using The Bomb against Japan. With the way the Japanese fought relentlessly to the death in every way (surrender really wasn’t an option) a mainland invasion of Japan really would have been horrendous. Whether it would have been worse than the appalling use of nuclear weapons is still unclear to me.

Codebreakers won the war

If you haven’t read about Bletchy Park and the Enigma machine you owe it to yourself. I became familiar with both during my previous read but I enjoyed some of the fanfare that Stephenson concocted for Cryptonomicon regarding the amazing contribution of the cryptanalysts at Bletchy Park to the Allies’ eventual victory.

All in all a great read about Nerds in World War II and their nerdy offspring in the 90s. I would recommend this book to anyone who is interested in math, cryptography and history.

Goodbye Wordpress

&& [ code ] && 0 comments

For the past 6 years this blog has been running off the same Wordpress install on a 1&1 shared hosting account without interruption. It was a good run, and speaks to how well Wordpress upgrades work.

But a Wordpress install is just so uncool. I decided to hop on the Jeykll train. This blog is now 100% static, which is pretty refreshing after years of dealing a massive PHP application. It doesn’t even require a database and it allows me to tweak to my heart’s content. Wordpress always seemed like a bit of a black box. Sure, the code was there, but it was daunting to even think about touching it.

Certain things become more complicated with Jekyll, since by default pretty much everything is done manaully. The most trivial being just creatig a post. Manually you will have to create the file, name it correctly, and then upload images, and link to them. Not a great workflow if you just want to write a quick post. So I created a rakefile that takes care of some of these tasks for me. The real timesaver is creating a folder in _images/ for each post, and then syncing them with s3 with the s3sync task:

{{< highlight ruby >}}

desc ‘create new post. args: title, category’

rake new title=”New post title goes here” category=”category”

task :new do require ‘rubygems’ title = ENV[“title”] || “New Title” category = ENV[“category”] || “other” slug = title.gsub(’ ‘,’-‘).downcase

TARGET_DIR = “_posts”

filename = “#{Time.new.strftime(‘%Y-%m-%d’)}-#{slug}.markdown” image_dir =”_images/#{Time.new.strftime(‘%Y-%m’)}-#{slug}” path = File.join(TARGET_DIR, filename) post = <<-HTML


layout: post title: TITLE date: DATE categories: CATEGORY


HTML post.gsub!(‘TITLE’, title).gsub!(‘DATE’, Time.new.to_s).gsub!(‘CATEGORY’, category) File.open(path, ‘w’) do |file| file.puts post end puts “new post generated in #{path}” system “mkdir #{image_dir}” system “geany #{path}” end

task :s3sync do system “s3cmd sync _images/ s3://pedaldp/images/ -P” end

{{< / highlight >}}

This post was written in a text editor. It will be published to my vps with a git push deploy master. Cool.

Sort Table of Contents Style Strings In Java

&& [ code ] && 0 comments

This is for when you have String likes “1.1”, “1.2”…”1.10” such that you want “1.10” > “1.1”. Just another example of terrible code programmers have to write when people insist on presenting data in illogical ways.

{{< highlight java >}} private static class TocComparator implements Comparator<String>{ public int compare(String s1, String s2){ Integer s1front = Integer.parseInt(s1.substring(0, s1.indexOf(‘.’))); Integer s2front = Integer.parseInt(s2.substring(0, s2.indexOf(‘.’))); if(s1front.equals(s2front)){ Integer f1ass = Integer.parseInt(s1.substring(s1.indexOf(‘.’)+1)); Integer f2ass = Integer.parseInt(s2.substring(s2.indexOf(‘.’)+1)); return f1ass.compareTo(f2ass); } else{ return s1front.compareTo(s2front); } } } {{< / highlight >}} This class is a comparator which can be used with Collections.sort()

Playing Around With Codepen

&& [ code ] && 0 comments

See the Pen Dripping WD-42 by Austin Riba (@WD-42) on CodePen

 

Bikes Planes and Automobiles - Riding the Chilcotins

&& [ cycling ] && 1 comments

header

The B.C. province of Canada should really be short for Best Cycling.

Recently I had the opportunity to get out of Whistler and go for a 3 day trip into the Chilcotins. The journey involved driving north on the Sea To Sky, hooking a left in Pemberton and hurtling over a mountain pass on a notorious forest service road. Just as you think the land can’t become any more sparse of society, the Tyax Wilderness Resort pops into view from around a bend in a scene eerily reminiscent of the one in the opening credits of The Shining.

Camp at the Tyax resort was comfortable with plenty of company during the weekend. The sites are located next to the lake, with water and electric hookups. The lodge is right next door with a full bar and restaurant. They even sell day passes for the spa for $20 if you’d like to camp in luxury.

The first day’s ride was an enormous XC route which took us from the lake and wound us all the way up to Camel Pass. The route is easy doubletrack most of the way, until you turn off the main road on to singletrack and begin to gain altitude rapidly. By now you are above the tree line, and breathing becomes noticeably more difficult. The trail is perfect singletrack, barely wide enough in places to fit a tire. After an amazing and somewhat steep decent directly after summiting Camel Pass, you climb again. Then you begin to doubt you are not lost when you descend again. And then climb again. And then descend again. All in all this route had over 5500 ft of elevation gain with plenty of hike a bikes and tough terrain. Not for the feign of heart or beginners to the sport.

After passing out at 8pm, it was time to wake up again and get on the Floatplane! This was the day we had all been waiting for. We were booked for one of the last flights, and our anticipation grew with every takeoff and landing of the plane before us. Once we all weighed in and stuffed ourselves and our gear in the plane, it was off to Warner Lake. Pretty amazing experience, being shuttled by aircraft. But the the real cream filling was the ride. Again, perfect singletrack all the way down. You pass many pristine lakes, wilderness camps, and grizzly tracks. All in all ~5000 feet of descending with ~3000 feet of climbing thrown in to keep you earning it. Nothing too technical, but plenty of extremely high speed singletrack that seems endless. It’s hard to stop on this ride with the weight of your own dusty grin seeming to pull you down the trail - fast.

Of course our van broke down and we had to get  a tow out of Tyax, but that just added to the adventure. All in all, amazing trip. Would repeat!

{% flickr_set 72157635929089523 %}