Archive for December, 2005

So I Interviewed With Google

Friday, December 30th, 2005

I’m currently on a two week hiatus from work as this is the only couple of weeks of the year that I’m out of school, so it’s a good time to get some well deserved rest, catch-up on things in life and around the house which seem to slip during the busy year, and get recharged and ready for the year of work and school ahead.

Much to my surprise, I received some correspondence yesterday from someone at Google who’d came across my website and thought I might be a good fit for some positions they had open. This means one of two things to me– either I’m in good company and am on the right track with my career, or they really need help. Admittedly I get unsolicited interest a few times a month most of the time as I’m sure many others do, but this was really quite different from anything I’d ever been contacted about before.

I ended-up calling the person who contacted me from Google earlier today to get more details about what position(s) I specifically qualified for, at which time I opted to go ahead and do a pre-screen interview. Unfortunately I missed making it to the next round of interviews by 1/3 of a question (most of them were multi-part questions), but I was also being quizzed on topics which I have not yet taken classes on yet (such as Algorithms), or super low level details about Unix which I’ve never had to deal with though I knew what path I’d take to get the answer needed. I was fairly familiar with everything they asked me aside from strict details about the Algorithms (I actually have a Algorithms in Java book sitting on my desk at work), I just didn’t know the exact details they were looking for right off of the cusp on the questions I missed.

Following the pre-screen the person was very friendly and encouraged me to check out their site to see if there were any other positions I thought I was qualified for and he’d put me in touch with the right people. Honestly I know I need a few more years of experience in uber geeky software engineering and Unix hacking (if not a graduate degree from a research heavy University) before I’d consider myself within the realm of a viable candidate for them based on this interview. Granted the position I was interviewing for was a Senior level position, so maybe I’ll reconsider it and check out the site sometime for something else. Most of my experience at this point with anything compilable is academic or just stuff I’ve played around with at home so I’d honestly consider myself fairly green outside of various scripting languages.

Nonetheless, it was a very interesting experience, it gives me an idea of what I level I’d need to be at to work there, and admittedly it was pretty flattering that they contacted me & that I actually almost made it to a second round.

MIT Hacks: Super Mario Brothers

Saturday, December 17th, 2005

Ahh, how I wish I were geeky/elite enough for MIT sometimes– I love reading/seeing all of the pranks that happen there. The latest one turned a hall into a level of Super Mario Brothers.

Ruby On Rails 1.0 Released!

Tuesday, December 13th, 2005

Jake pointed out that Ruby On Rails 1.0 was released today. I’d been browsing around Trac and so forth a few weeks back and saw that it was close, but it’s good to see a 1.0 release go live after all of the hype about it.

How To Fix Flash in Firefox

Tuesday, December 13th, 2005

If you’ve ever had the Macromedia Flash Player stop working after upgrading Firefox, I’m sure you have an idea how frustrating it can be to find out the culprit or even try to google for fixes. I had the same problem again after upgrading to Firefox 1.5, but luckily I came across this great thread on how to fix Flash in Firefox.

If all else fails, I’ve also had good luck with uninstalling Flash and starting a new Firefox profile, and then reinstalling Flash. That is usually the last thing to try as it’s quite a pain, but it does seem to work every time.

Web Application Security Cheatsheet

Monday, December 12th, 2005

A nice quick and dirty list of things to test for during a penetration test as well as to keep in mind when developing a web application can be found here.

If you haven’t came across it before, you should also check out the OWASP’s top 10 most critical web application flaws.

ColdFusion Comparison of Large Integers Gotcha

Friday, December 2nd, 2005

With all of the praise of “typeless” languages in the past few days across a number of CF blogs, it was ironic that a co-worker ran into a real world example at work yesterday of a strong counterpoint to using typless languages. I use typeless in quotes as all variables in ColdFusion are eventually cast as something in Java. Now don’t get me wrong, I’m more of a fan of typeless languages myself because I can get things done much faster, but here is an instance where it lets us down (at least in ColdFusion). Granted this is one of those rare cases that most developers will probably never run into, but it does happen obviously.

Said problem seems to happen in all versions of CFMX when comparing two large integers. If both integers were different but contained a large number of digits, they would both return true. For instance, this bit of code will return true (pardon the formatting):


<cfset Variables.num1 = 25309420985992540513730623 />
<cfset Variables.num2 = 25309420985992540513730622 />
<cfif Variables.num1 EQ Variables.num2>
<p>They are equal</p>
<cfelse>
<p>They are not equal</p>
</cfelse>
</cfif>

If you add a letter into those variables or compare them using ListFind(), they are then cast as a string by CF and are evaulated correctly. Why would two seemingly normal integers which are obviously not the same not compare correctly? Our running theory is that all integers in CF are converted to the Java datatype of double in the whole auto-scalarizing magic that CF uses to convert our “messy” typeless code to typed variables.

So why does it matter that they are probably cast as double? At a very high level, the double datatype looses accuracy as the number of digits for a given number increase which explains why two large numbers with a difference of only 1 would seem to be the same at the machine level. There is a large amount of mathmatic theory regarding floating point representation of numbers behind this basic assumption, so feel free to read more about that here in detail if you wish to learn more about how they work. At a bit lower level, you can read about the various Java data types here.

I assume this is done so that if a number with decimal (a double, float, etc) is added to an existing integer, there will not be any casting problems. However, it does propose an interesting problem to be aware of when working with large integers in ColdFusion MX. It would seem like the best way to get around this is if you expect to be comparing large integers, use ListFind() rather than EQ in if statements.

12/5 Update: Spike Milligan tried to add a comment about this but apparently my comments are broken at the moment (still haven’t had a chance to take a look at them). Anyhow, apparently this is a known issue and you should use the Compare() method to get around problems like this. I almost always find myself comparing/evaluating booleans as most strings I work with are processed in a switch statement and had never run across this before, but it’s certainly good to know. Thanks Spike!