Snake Road is Awesome. Soon it Won't Be.

&& [ Art, Cycling ] && 2 comments

Snake Road follows the Carquinez Strait connecting Port Costa and Martinez, CA. During the Loma Prieta in 1989 a large portion of the road fell in to the strait and it was never repaired. As a result the road is closed to vehicles and is in a state of glorious disrepair.

What better to do with a large swath of pavement unreachable by law enforcement? Paint it! And that’s exactly what people do. There is hardly a square foot to be found that is not covered in some sort of painting or splash of color.

I’ve had some pretty cool commute routes in the last few years but this section of rutted, eroding, road-as-art-gallery has been by far the best. Alas, not all is well on the windy, winding road. The Easy Bay Regional Park district has in all their wisdom, deemed this road “unsafe.” Snake’s fate? To be paved over as a pedestrian/bike path. It is absolutely heartbreaking.

I’m not sure when construction will begin in earnest and I will no longer be able to ride this route. I decided that I better take some pictures while I have the chance. I also uploaded a video (sorry for the shakiness) that sort of illustrates how awesome it is to ride on this road. Contact me if you’d like the full size images. They were taken with a cell phone, so not that great.

{% flickr_set 72157635968611896 %}

Coding Restore The Fourth

&& [ code, featured ] && 0 comments

Recently we have learned that a certain branch of the government may be overstepping the consitutional right to privacy. While this may be old news for many the recent leaks by Edward Snowden have brought the issue to national attention and have caused quite a stir.

And rightly so, the argument can be made that the NSA is violating the forth amendment. Restore the Fourth, a grassroots organization that sprung up nearly overnight, is making that argument and taking it to the public.

From the website:

Restore the Fourth is a grassroots, non-partisan movement; we believe the government of the United States must respect the right to privacy of all its citizens as the Fourth Amendment clearly states. We seek to bring awareness to the abuses against our civil liberties and the erosion of this cornerstone of our democracy.

I’m sympathetic with this cause. And despite most likely being placed on a government watch list for the rest of my life, I decided to take a crack at building these folks a website. The decision was made to use Django, a neat framework written in Python.

One of the most interesting features of the website is the map on the front page. The locations are set by pulling objects from the database that represent protests. These objects are editable in the back end by regular admins using Django’s awesome gui admin interface so developers do not need to be involved.

When creating a protest via the admin interface you don’t need to supply a latitude/longitude pair (which are needed for google maps) but instead the backend utilizes the Google Maps Geolocation Api so all that’s needed is a city and/or state. To make that process easy, we’re using geopy, a geolocation library for Python. In the Protest model, we can simply call this:

{{< highlight python >}} def generateLatLong(self): g = geocoders.GoogleV3() place, (lat, lng) = g.geocode(“{0} {1}”.format(self.state, self.city),exactly_one=True) self.latitude = lat self.longitude = lng {{< / highlight >}} to generate a proper latitude/longitude pair for the object, using it’s city and state.

Then in our views, we make a method to serialize these objects as json: {{< highlight python >}} def protestsjson(request): protest_list = Protest.objects.all() data = serializers.serialize(‘json’, protest_list) return HttpResponse(data, mimetype=”application/json”) {{< / highlight >}}

From there, its just a matter of telling the google map to use those objects to create markers:

{{< highlight javascript >}} var map = new EventsMap(); $.getJSON(‘/protests.json’, function(data){ map.plotStaticMarkers(data); });

// plot new markers on the map, make them interactive this.plotStaticMarkers = function(data){ $.each(data, function (i, location) { var latlng = new google.maps.LatLng(location.fields.latitude, location.fields.longitude); var marker = new google.maps.Marker({ map: map, position: latlng, title: location.fields.city });

     google.maps.event.addListener(marker, 'click', function () {
     var content = infoWindowTemplate
          .replace('{location}', location.fields.city)
          .replace('{info}', location.pk);

     infoWindow.setContent(content);
     infoWindow.open(map, marker);
     });
})

} {{< / highlight >}}

And there we have it, a neat interactive map that doesn’t require a developer’s involvement to edit.

Check it out in action: restorethefourth.net

As usual, the source is available on Github

How Gnar? Cycling App for Android

&& [ Cycling, Code ] && 0 comments

I recently began to foray into programming for Android. Being already experienced with Java and the general ecosystem of Java enterprise development, I feel right at home.

My first creation is called How Gnar? and the premise is simple: start the app at the beginning of your ride and receive a “gnarness” rating at the end of your ride with accompanying images and audio.

It’s kinda like Strava, but really useless and dumb.

Anyways, if you want to check it out, download it here: http://toxiccode.com/misc/HowGnar-debug-unaligned.apk

All the source is available on Github: https://github.com/AustinRiba/howgnar

Enjoy.

screenshot

 

The Fountainhead

&& [ Books ] && 0 comments

fountainhead

I just finished reading Ayn Rand’s beast of a novel, The Fountainhead. I enjoyed every one of this book’s ~800 pages and myriad of characters. Though I found some of the ideas  put forward in the novel hard to agree with, and others downright baffling, Rand’s talent as a writer makes this book intoxicating.

Taken at face value, The Fountainhead is an impressive novel about a revolutionary (this word is never used in the book, can anyone guess why?) architect named Howard Roark who refuses to compromise his ideals under any circumstances. He is a champion for modern architecture in a society that is stuck on classicism. Architecture serves as the background of the novel however I felt that Rand’s descriptions of buildings and the architectural process alone made the book worth reading. Since I started the novel (a while ago, this is a long book), every time I walk down a street in San Francisco, my head eyes are always turned up. I don’t know why I never appreciated buildings as works of art with their own soul and grace given to them by an architect, but I do see them in a completely different light now.

The architecture makes this book good but it is the characters that make it great . The names Roark, Francon, Toohey and Wynand will likely never be forgotten by me. The amount of depth given to each character made them feel more real than in any other book I can remember reading. I felt heroic when reading Roark, pain and beauty when reading Dominique, powerful when reading Wynand and evil when reading Toohey. The monologues are great and the dialogue is even better. Although the characters are mostly unrealistic, it is enjoyable to fantasize about a world where such elegant and intelligent people could exist. I miss them already.

Now for the meat of the book - Ayn Ran’s Objectivist philosophy. Roark, the hero of the novel, is supposed to be the perfect man that fits in to the ideals of Objectivism. He is an extreme egoist in the sense that the world and it’s people do not concern him, only his sense of self and the integrity of his work matter.  He is a man who takes what is available to him and creates things, but it is the act of creation that is important, not any kind of worldly rewards. He doesn’t borrow from anyone else and he doesn’t give to anyone either. Roark feels enlightened because no matter what happens to him he will always have the integrity of his soul which nobody can ever take away. This is the heart of the meaning to me: our sense of self and our own objective reality are the only things we truly own, and as long as we are content with them, we are content with life.

Rand also says that it is the people like Roark that create all the great things in the world, and the “second handers” are people who never create anything of their own, that live for other people, and that are parasites of creators like Roark.

It is hard not to admire this view of integrity. I honestly think I’m a better person for having read it. The philosophy breeds self confidence and self respect. I think it will be easier for me to stand up for myself in arguments when I know that I am right, and to do what is in my best interest instead of worrying about what other people think. There is a powerful dialogue at the end of one of the chapters in which Toohey, the villain who is trying to destroy Roark’s career and legacy, confronts him:

“Mr. Roark, we’re alone here. Why don’t you tell me what you think of me? In any words you wish. No one will hear us.” “But I don’t think of you.”

I think that pretty much sums up the egoist.

… and then things start to get weird.

One of the strangest parts of the book is the rape of Dominique Francon by Roark. There is definitely a sexual undertone to the entire novel and it seems to climax in a scene where Roark forces himself on Dominique, yet you can tell Ayn is enjoying writing it. So does the character Dominique. Afterwards she is described as not wanting to bathe as to “keep him on her skin” and as walking the streets wanting to tell everyone that she had been raped, but somehow glad about it. What the hell? The whole thing is just another metaphor for Roark the creator taking what is available to him and acting in his own self interest.  But another person as the material for the creation? It’s absurd. Objectivism prides personal freedom and the rights of the self. But what good is it to take away someone else’s freedom? Now it is saying that it is not simply individualism that matters most but some form of survival of the fittest.

Another part of the philosophy that is downright vile is the view on nature. To Rand, nature is simply a resource to be consumed by man without regard to anything else. The scene directly preceeding Dominique’s rape is that of Roark as a drill man in a quarry (raping nature) and this theme repeats several times in the novel. What seems like a big disconnect to me is the idea that the “creators” creations are not bound by any limitations. It is true that it is the genius of a person that brings the creation from the mind to life but it is hard to create something out of nothing. If all the granite in all the quarries was to be used up, what would Roark build out of? Many would say he could find something else, but the earth is a finite resource. There is a limit.

Besides the handful of problems I have with Objectivism, I’ll probably continue to wonder “how can I be more like Roark” when thinking of my work. Speaking of my work, Roark would have made an excellent software engineer. In fact, he probably would have preferred it to architecture, considering you don’t need clients to build something cool.

With that said, I’m off to write some code.

And I’m very happy to write it.

What do You Think About in the Shower?

&& [ Bizzare, Science ] && 0 comments

6-sad-cat-takes-a-shower

I was sprawled on the floor today, feeling good about my sore legs from the race yesterday, about the fact that I get to stay in Fairfax for a week,  and about the interesting show that was available via Hulu on the Xbox - Nova Science Now. In this program they featured a scientist who discovered the protein called PKMzeta that facilitates electrical communication between the neurons in the brain responsible for long term memory. He also developed an inhibitor, ZIP, which could block those communications and erase memory. Fascinating stuff.

In one scene the professor describes his experience going to a sensory deprivation tank, which are small, light-less enclosures that cut off all sound and feeling and are supposed to let your mind run free. He claimed that the tank helped him come up with some profound ideas. Later in the show, he explained how he takes long showers because in they also help him think.

Thinking man comes up with his best ideas in the shower! How cliche, right?

Ironically, I was thinking about this tonight, in the shower. And then I started to wonder, why is it some common that people come up with grand ideas while in the shower? And then I thought back to Mr. Fenton’s experience with the isolation tank. Showers are like isolation chambers - but without the fancy name. The noise of the water is constant and overpowers most other noise, the water is warm and hypnotizing and you are usually in a small space with nothing much to look at. So it’s no wonder that people come up with the best ideas in the shower. There is nothing else for your  mind to do.

Happy bathing.

Putting my Dreams Down on Paper

&& [ Bizzare ] && 0 comments

Dali-sleep

About a month ago, I started keeping a dream diary. Every morning I wake up and attempt to write down that night’s dream. So far it’s been both extremely difficult and eye opening (no pun intended). I’ll tell you what kind of dreams I have, but first lets explore some of my experiences with the actual act of recording dreams.

The first thing I noticed was how quickly you forget the details of your dream. I think it’s common knowledge that most dreams vanish quickly after waking, but I’ve found that details of a dream that I feel I have locked in my head can disappear literally faster than I can write them down immediately after waking up.  I think I’m getting better at remember details though, as my entries have slowly been getting longer and longer.

Weird stuff happens when you record your dreams. One of the strangest phenomena are the dreams about writing down my dreams. Several times I have had dreams that I am recording a previous dream and then wake up in the morning confused as to why my journal did not yet have that night’s entry. Sometimes I just wake up to write down a dream because I am consciously thinking that I have to record it.

Those phenomena are actually quite encouraging because they feel like the first steps toward lucid dreaming. One of the reasons I decided to start writing a dream journal was because I read that they can help a person have lucid dreams, which I have experienced before. About 6 years ago, there was a time period of 4-5 days where I had full lucid dreams every night. Then as suddenly as the ability appeared I stopped being able to have them. I’ve been wanting to experience them again ever since.

I’m not going to claim to have any deeper understanding of my subconsciousness than when I started recording dreams, but it’s a possibility I can see having if I keep it up. When I  read back on the last month I am able to discern a few repeating patterns, but nothing earth shattering yet. Most of what I see (or understand) is pure madness. This could be attributed to the fact that some dreams that make perfect sense are absolutely impossible to put into words. I think this is because dreams are just as much about feelings and, dare I say, it, even deeper subconscious thought (queue the Inception soundtrack) then they are just experiences playing out in front of your eyes. Also, my hand writing is damn bad first thing in the morning.

Some of my nightmares are so terrible that they are hard to write down. When I started recording there were some dreams in which I intentionally skipped details simply because they were so disturbing putting them down in to words was frightening. I think it was the idea of making the dream real - putting them into words and immortalizing something I could easily (and like to) forget. I’ve since gotten over that, it felt like cheating. I want the whole picture even if some of it is ugly.

Other dreams are a joy to write down because they feel like memories I would like to keep. I go through adventures, achievements and a lot of times, just hanging out with buddies.

Nobody can ever read my dream diary. There is some deeply personal stuff in there I don’t feel anyone else should read, or could even understand. So I won’t be publishing any of the actual text from the journal, for now at least.

Although I just started, it’s been an interesting experience. I’m looking forward to more insights and possibly some of that lucid dreaming in the future.

Stop Looking for the Time - Force it Upon Yourself.

&& [ Programming, Technology ] && 0 comments

It seems like one of the biggest complaints people have when considering what they would like to do as opposed to what they actually do on a daily basis, is time. “If only I had the time to go the gym” or “If only I could find the time to read” it seems as if people like to believe that there simply aren’t enough ticks of the clock to cram a fulfilling life into one day. Whereas I’m sure there are people that really are just that busy, I’m going to take an educated guess here and say that it’s probably simply not true. Allow me to digress for a moment.

I spend a good amount of time in transit. I’m not just talking about daily commutes or vacations. Ever since I graduated high school I’ve been in a perpetual state of (locational) transition. In the Bay Area I’ve lived on the Peninsula, In Marin, and the East Bay. I went to school and lived in Oregon for several years.  I’ve even lived in other countries: I spent 6+ months in New Zealand riding my bike around the country. Not bad for the last 6 years. For me, one of the greatest joys in life is experiencing a new place.

My latest pick-up-and-go has landed me in the charming small town of Port Costa. When I mean small, I mean small. Most people say a town is tiny when you can only find 1 Starbucks and people still walk to the post office . Port Costa has a population of 190 people, as of the 2010 census and has no Starbucks. No coffee at all, actually. Its a 1 street, one bar kind of town.

Whats so unique about Port Costa is how remarkably close to everywhere it is while at the same time feeling genuinely remote. The 2 roads that service the town are windy and narrow. It is surrounded by farmland. The train rolls through town a few times an hour - an abrupt reminder of the passing of time, you really can lose your sense of reality here. Yet, the town in less than 5 miles from I-80, a few more to I-680. Berkeley and Walnut creek are within a 30 minute drive away. You could throw a rock across the delta and hit Vallejo/Benicia. Still, for someone that works in San Francisco, like myself, Port Costa would probably feel like a far away place thats kinda close to other far away places. That’s fair, its true. Does it take a long time to get to downtown? You bet. But that’s the beauty of it - I feel that it gives me time rather than take away from it.

A lot of people ask me how I can stand such a long commute. It’s simple. I make the commute enjoyable, healthy and stimulating. Lets cut to the chase - I ride my bike to Lafayette, and take the BART into SF. What does this provide me? Round trip,

2 Hours on the bike and 80 minutes on BART, which translates to:

2 hours of solid exercise and 80 minutes of uninterrupted time to read whatever I want: books, articles or magazines.

As a bonus:

$0 in gas.

2 runner’s highs.

There aren’t any self-help books out there that would not recommend finding the time to do what I do just getting to work every day in order to be healthier and happier. Instead of struggling to find the time, I make sure I have no choice. Let’s face it, we’re all lazy. If I didn’t have to, I probably would get a lot less exorcise  and read fewer books.

Try moving out to the boonies. You might actually find it gives you more time than you think.

Farewell Chris and Aliyah!

&& [ ] && 0 comments

[gallery]

We all hope you have a great trip in New Zealand! Chris, try not to extinct entire fish populations and Aliyah, CHILL OUT!

Sempervirens

&& [ ] && 0 comments

image

And the crowd goes wild

&& [ ] && 0 comments

It’s amazing how little I could care about baseball. I don’t know the rules, or the players names. What the hell does RBI stand for, anyway? I definitely never made it past t ball as a kid (you mean the other team pitches at you? F that! ) but now that the Giants are in the world series its hard not to get caught in the action. Bars are fun during these games. I guess I’m more of a fan of the fans than the game itself.

Speaking of non fans:

image

He’s a rep. Can you tell?

image

Who’s down for some celebratory champagne? We know Jillian is. Sleep well sf and keep rolling!