BurningPockets is back!

October 12, 2009 11:51.24 PM

So I wanted to play with some Amazon Web Services (see earlier post) and I liked this URL too much to let it just waste $10 a year.

BurningPockets.com round II

6 Comments

Amazon vs. Apache - my Base64 is better than your Base64

October 12, 2009 10:00.57 PM

I had my fair share of writing Amazon Web Services applications and recently decided to try again. Amazon decided to make some changes and require all developers to sign every application before making the request with a mix of algorithms including Base64'ing the entire signature before sending. This sounds easy and in fact, is easy, EXCEPT when you use the incorrect libraries.

I'm a big fan of reuse so I tried using the Apache Commons Codec library. This failed. I tried downloading the Amazon examples. This failed again. I finally noticed after five attempts and three nights of misery that the examples used the commons-codec-1.3 while I was using the newest release, commons-codec-1.4.

After a quick swap of the libraries on the classpath, my code worked like a charm. Whatever happened here, it is not in sync with Amazon's Base64(I'm guessing) algorithm.

0 Comments

My first conference session - Agile 2009

August 23, 2009 11:47.55 PM

I can only thank the FBI, HPTi, and my team for giving me the story to get me in as a speaker at Agile 2009.

Agile speaker badge

0 Comments

DC TonightSpots in the wild

February 17, 2009 11:51.37 PM

So rather than pay a college kid to enter in all the bars in DC, I went with the half ass approach and left out many areas in DC. I plan to slowly add Happy Hours as I find them since I plan to really use the site for personal reference. I was more excited to get the site up in Nginx so quickly. The memcached is rocking so theoretically, the site will handle a good amount of hits but I can only hit F5 so many times to make my Google Analytics numbers go up.

DC TonightSpots

2 Comments

running on nginx

February 11, 2009 12:44.40 AM

Alphawit is now running on nginx. After slaving away at configuration issues, I finally tried this tutorial. I'm in the process of moving all my sites over to this since Apache running a 250MB Slice just hogs too much memory. I'll be writing some more updates later after I streamline this process.

0 Comments

Thanks For Not Stabbing Me

December 25, 2008 10:47.35 PM

I'm pretty sure I'm the only person in the world who liked the Andy Milonakis show. Tonight, I was mocking someone and remembered a skit from his show three years ago. Googling away, I came across the MTV site for all three seasons of the show: MTV Video Vault. I don't know if it's the hilarity of a 32 year old man looking 15 or if it's the sarcasm he brings to the table. Either way, I laugh every time I see it.

To close out my thoughts, Thanks For Not Stabbing Me.

0 Comments

IE7 error: "Object does not support this property or method"

September 13, 2008 04:26.40 PM

Cross browser development, hooray... When I'm developing a site, whether big idea or small, I want it to work everywhere. I'm not so much the graceful degradation guy due to laziness and I feel that supporting those stuck in the non-JavaScript ages holds back the advancement of technology. I will usually give minimal features so my sites aren't crippled but there's time when I don't go much out of my way. Anyways, that's a completely different rant. What I'm talking about here is the look and feel of the site in the big browsers, IE, Firefox, Safari, and now Chrome. This includes the JavaScript as well. I'm working on this site that displays a Google Map. The initial XHTML rendered uses a CSS style that hides the DIV in case the user has JavaScript turned off. When the body loads, the element is manipulated through JavaScript to change the display of the element to 'block' so it's no longer hidden. This allows users with scripting turned on to enjoy the map feature. Everything was working well in Firefox(my primary browser) and I switched over to Safari(I own a Mac so I get to test these two first) and everything was working very nicely. I then fired up my Dell laptop to test out IE7 and Chrome.

Chrome...works...very, very, very fast. I'm pretty sure Chrome's V8 JavaScript engine is going to work faster with Google stuff so they can monopolize the mashup market once people start downloading their browser more. Anyways, it worked awesome so I moved on.

IE7...no luck. The map was nowhere to be found. Since I program to IE6(don't ask) at work, I've become accustomed to noticing the little annoying yellow triangle noting a scripting error on the page load. I immediately open it up and got a horrible error message from the folks at Microsoft; "Object does not support this property or method." I did some research and found a few people who had the same issue as me. I checked out my JavaScript code and everything looked fine. The line it was crashing on was here:

        mapWrap = document.getElementById("mapWrap");

Solution: variable names cannot be the same as the DOM element name. I changed the JS variable to mapWrapDiv and it worked...lame Since IE7 treated the DOM element as the variable, my next line of code to change the style caused the exception seen above. Lesson of the day, use the standard of DOM element ID + type of XHTML element name for your JavaScript variables.

1 Comment

Pay attention to details

September 10, 2008 08:55.57 PM

So I'm making a new site that moves between days in a week and the display looks like this:

◄ Wednesday ►

So I at first had it working in Google Chrome, Firefox, and Safari with no problems. For some reason, IE7 would not work! I figured maybe I set my character encoding incorrectly and it wasn't on UTF-8. I checked the encoding of the browser, researched all over the damn place, and found this site, tried all the different encodings but continued to fail.

....annoyed and Mother F'ing Microsoft

I finally paid closer attention to the code and I left out the damn semicolon. I give credit to Microsoft for once. If the encoding is supposed to have a semicolon, please enforce that. What the hell? Just think, all those young up and coming HTML nerds will be hacking away on Firefox or Chrome because they're more popular to that crowd. Meanwhile, more than half their audience will miss out on the little wingding in the corner.

0 Comments

Mad Scientist Ideas?

September 03, 2008 12:11.53 AM

Netflix Prize, Illegal Gambling, or Stock Market?

0 Comments

extra_context caching data?

August 12, 2008 08:30.38 PM

If you're using Django out there and you happen to use the extra_context variable for your generic templates, you might have noticed that the querysets are being cached and not updated unless you restart your server. The problem is that querysets will be cached by definition of the extra_context dictionary unless they are callable functions. See the example below as it applies to my sidebar.

def get_books():
    return Book.objects.filter(status='S').order_by('-post_date')[:3]

def get_albums():
    return Album.objects.filter(status='S').order_by('-post_date')[:3]

def get_dvds():
    return DVD.objects.filter(status='S').order_by('-post_date')[:3]

def get_blogrolls():
    return BlogRoll.objects.order_by('-last_name')

info_dict = {
    'queryset': Post.objects.filter(status='P').order_by("-pub_date"),
    'date_field': 'pub_date',
    'extra_context':{ 'books' : get_books,
                      'albums' : get_albums,
                      'dvds' : get_dvds,
                      'blogrolls' : get_blogrolls,
                      'form':form,
                     },
}

1 Comment

JPG > PNG in blogs

August 08, 2008 08:00.57 AM

I made the picture of that homeless guy using Apple's little bulls eye feature because I was lazy when editing the original. Because it made it a PNG, it was way too large. Of course, I didn't notice and the page loaded pretty slowly in Google Reader. I opened up GIMP and made it a lower quality JPG. It looks the same but most importantly, is 1/6 the size.

0 Comments

The Pride of Toronto

August 07, 2008 01:41.00 PM

So I was casually looking out of my hotel room window and from eleven stories high, I noticed quite the site. I wasn't sure if I was having some perception problems or if I was truly seeing what I thought I saw. I observed for a few minutes and came to the conclusion that it was exactly what I thought it was. So, to catch the moment, I tore apart my luggage looking for my camera. When I finally found it, I missed the best moments but I still caught enough evidence for my story.

Please note his pants at his ankles and the cup in his right hand. Yes folks, this guy was dancing in front of Toronto's town hall with his pants at his ankles trying to get money from pedestrians going to work. This was at 7:30AM so he was having quite an early start. Unfortunately, I was late to the first conference session so I didn't have time to run downstairs and get a closer look.

0 Comments

Hippos: Kings of the Jungle

July 26, 2008 02:55.15 PM

Plain and simple, Hippos are the sweetest animals of all time.

  • They have no predator... nobody will mess with these things
  • They're huge. Older males can weigh up to 8,000 lbs.
  • Suprisingly, they can run up to 30 mph on land. Michael Johnson only ran 23.15 mph when he set the 200M world record.
  • They can stay underwater for up to six minutes
  • Hippos are extremely social and gregarious. They stay in groups of huge numbers
  • Just check out the next pic...

Pablo Escobar kept four hippos in captivity at his home in Columbia. After the death, the hippos were too large to move and were left untended. As of 2007, they've multiplied to sixteen hippos and they're terrorizing the house for food. At this rate, Hippos will be taking over South America by 2050 and probably the United States in 2100. Good luck us.

1 Comment

Prototype doesn't evaluate JavaScript very well

July 09, 2008 11:33.58 PM

So here's how I call the Ajax.Updater to bring back some HTML with JavaScript in it.

new Ajax.Updater(myDiv, "/fake/test/",
{
parameters: params,
evalScripts: true,
onComplete: function() { doSomething(); };
}
);

Here's the HTML with JavaScript

<script type="text/javascript">
helloWorld = function() { alert( 'Hello World!'); };
</script>

<a href="#" onclick="helloWorld(); return false;">Click me!</a>

Click Me Doesn't Work!!!!! It throws an error saying helloWorld isn't in the scope as a method.

I'm pretty sure it only works when you have actual JavaScript code that has to be evaluated and not based on events. For instance, rather than having the helloWorld() method call come on the onclick handler, it could be listed as a call in the script tags. My rule... don't put JavaScript in HTML response of an AJAX call.

0 Comments

Kings will not survive without females

July 07, 2008 08:19.55 PM

Please play this song while you read this post...

I'm not talking about Arthur or Henry the VIII. I'm talking about the drinking game that requires a deck of cards, a huge social glass, and a large table. Some of you may call it Circle of Death but in my group of friends, we call it Kings. This is one of those games that a group of guys pregaming for a college party or getting ready to go out on the town just couldn't handle because it's hard to get into with that crowd. It's full of stupid jokes, embarrassing stories, and the best part, laughter. It has a recipe for success and I think I've figured it out.

I was at the beach last week and I realized a few things about people while they're in social situations. Most people will do anything to get a laugh. When it comes to making girls laugh, guys will go to extremes. They will act like farm animals, make sounds they've never imagined, and they'll act ten years younger than their age just to see smiles across the table.

Next time you find yourself in a party with a bunch of people that involves an even amount of gals to guys, look up the rules give it a shot.

3 Comments

A Django site.