Category Archives: Web

It Is Our Time

I’m American. I’m not afraid. I’m more likely to die by furniture than terrorism. I can’t say that the news of the extensive NSA snooping is shocking, and frankly not totally surprising. What I can say, is that it’s time for a change. We must consider how America has changed, and if it is what we want it to be.

America can be great. In fact, America is great. What America needs now is to be better — to be a true leader. I am compelled to take to writing because I am positive that we can be better. I know we live in trying times, I know there are no easy decisions. I also know that now is the time to take the right path. It is time to take the high road, and lead the world into a new era. It is our time. We’ve spent more than a decade being afraid. We’ve written a blank check for the War on Terror, and it’s due time that we reassess whether all of those decisions are in our best longterm interest. I realize this is a sensitive subject — I know that there are many smart and hardworking people doing the best they can to protect us. Do not confuse me with being “soft on terror”, I’ve come to these realizations exactly because I am strong on America.

In 1933 Franklin D. Roosevelt famously said —

So, first of all, let me assert my firm belief that the only thing we have to fear is…fear itself — nameless, unreasoning, unjustified terror which paralyzes needed efforts to convert retreat into advance.

America has faced massive adversity in the past dozen years. However, it is becoming painful apparent that our inability to accurately judge the cost of the War on Terror is slowly draining us of what it is to be American. You could take a look at how Associated Press reporters call records are being targeted. Or how every day that Guantanamo Bay is open and we have fathers, brothers, and family members locked away — is a day that we tarnish our reputation, alienate the world and endanger all Americans. Collateral damage of military conflicts is burning an image of violence and American aggression into the witnesses and survivors. We measure our costs in American dollars and American lives, and this view is limiting us. The 9/11 attacks cost roughly $500,000. If our response is an arms race where we outspend 1,000:1, our only destination is bankruptcy.

The world is not us vs them, it’s not good guys and bad guys. This view can be extremely toxic and risks de-humanizing other nations and people. We’re all human — we share the same needs and the same planet. The world is shades of grey and overzealous reactions risk alienating huge swaths of the world, not just for today but for decades.

I’ve grown up surrounded by this “new reality” and it’s admittedly difficult to come to understand that the intention of terrorism is to terrorize, to get within ones mind and fears. Viewed with this understanding, our reactions have largely played directly into the hands of the September 11 attackers. We haven’t destroyed them, we’ve created tributes in the form of the Patriot Act and security checkpoints, secret court orders, disallowing photography, and barring liquids on planes. There is little more core to the American belief than “Checks and Balances”. It seems blindingly obvious that intentionally shielding programs like PRISM from the American public, and decisions made in secret validated through secret approvals and courts run diametrically opposed to this foundation in what America is.

This doesn’t affect me

You might be thinking “if you have nothing to hide, don’t worry”. I can’t blame you for thinking this, it certainly would be easier, but sadly it’s not true. I’d like to point out that Hoover and the FBI tapped Martin Luther King Jr, and told him to kill himself. The ability to systemically profile on a large scale is not good for anyone. I like this description of why “metadata” matters.

The glacial turn — Call to Action

I do not believe that these changes will happen overnight. Nor do I believe that we have a perfect solution. I know that we need a course-adjustment, that we need to return to what makes us great. I believe that programs like PRISM need to be made transparent to and evaluated by the American taxpayers who fund it. I believe that transparency has to be the default, and that as long as large scale secrecy exists, it will be exploited. Let’s change, starting today.

Today

  • Seriously reflect on what you think and why. Write about it.
  • Talk about it, this is a mainstream problem, it impacts everyone whether we like it or not.
  • Donate to the EFF (I have)
  • sign this petition asking for pardon of Edward Snowden
  • Adopt encryption

    Tomorrow

    Put whatever your skills are to use. The privacy problems we face are not insurmountable and virtually everyone can do something about it.

    • Become an advocate, volunteer time to help
    • If you make web applications think about architectures that are engrained with user privacy
    • Contribute to Open Source projects however you can (self plug: OpenPGP.js)
    • Don’t give up

Restaurant Week DC!

I found out today that it is Restaurant week in DC. I quickly found the official website, and equally quickly found out that it was hard for me to figure out things I wanted to know, like where these restaurants are, and what Yelp thinks of them. The only logical conclusion was to make a website do exactly that. I ended up using my site to find a place to eat for dinner, and it was delicious 🙂

Currently, I’ve overrun my Yelp requests for the day, I’m going to work on getting the Yelp functionality integrated again, ASAP.

Check out the site at r.prometheusx.net, what do you think?

Basic screenshot of the DC Restaurant Week 2012 application

Technical Details

Gathering the information

In order to gather information about all of the restaurants from the official site at first I was a little unsure. Then I realized I could just use jQuery to gather all of the elements and create a json object that I could use directly in this page.

Below is the bulk of my parsing code, I was then able to JSON.stringify an array of these restaurant objects to easily copy the data.

  $('.formfont_black b').each(function (){
    var parentColumn = $(this).closest('td');
    var restaurant = {};
    restaurant.name = $(this).html();
    restaurant.url = $(this).closest('a').attr('href');
    var lineSplit = parentColumn.html().split('<br>');
    restaurant.addr = lineSplit[1];
    restaurant.phone = lineSplit[2];
}

What database?

I thought about setting up a quick Rails application for the backend of this, but then realized that there was really limited value in a database since this information is all static, and there’s not that much of it. Therefore, I’ve dumped most of the content directly into the javascript files. If this were a more serious application this could easily be adjusted.

Third Party Integration

Google – I quickly realized that the geocoding API for Google Maps was severely going to throttle my ability to look up restaurants. It limits you to, I believe, ~11 queries per second. Therefore, in order to map all 250 restaurants, I mapped them once and just saved that data into a JSON map, the same way as the restaurant information.

I’ve pasted my hacked together method to get all of the geocoded information. I was then able to JSON.stringify() the result

      function geocode_address(map, geocoder, restaurant){
        geocoder.geocode( {address:restaurant.address}, function(results, status){
          if (status == google.maps.GeocoderStatus.OK) {
          var marker = new google.maps.Marker({map:map, position:results[0].geometry.location});
          google.maps.event.addListener(marker, 'click', function(){
            yelpRequest(restaurant, marker);
            });
          good++;
          goodAddresses[restaurant.address] = results[0].geometry.location;
          }
          else {
            bad++;
            setTimeout(function(){
              geocode_address(map,geocoder,restaurant);
            }, 100);
          }
        });

Yelp – this integration initially went pretty smoothly other than the fact the Yelp API does not like to let you have users directly authenticate which is a serious problem when I’m running the application without a backend. Now, I’ve run into the problem of hitting the ridiculously small number of daily queries (100). I’m working on getting this upgraded.