Websites

jQuery tinkering

If you take a look at my website portfolio and read the details, you'll see that I've been all over the place as far as technologies go. HTML, JavaScript, CSS, PHP, Drupal, Wordpress, AJAX, etc. Some things aren't mentioned on there that probably should be (Like the Faster Mustache Racetracker which used a lot of YUI, Google Maps, and KML things), and some things that I've done for various work things aren't on here, but theres been a lot of YUI over the past 6 months.

For the last year or so, I've been hearing a bit about jQuery but never really looked into it until Gallery decided that it would be the JavaScript toolkit in Gallery 3. Whatever I tried to do first with it was a complete failure, but in the relatively small amount of time I've been playing with it, I've figured out some pretty neat things and realized how truly easy it is to use jQuery instead of YUI (or even just basic JavaScript) for a lot of things.

The first example of jQuery I used on a production site it ithought's new website. Creating browser-compatible drop-down menus used to be quite a bit of work with CSS and JavaScript that relied on csshover.htc for IE support, but it's just a few lines of jQuery. Dynamically loading content used to require a lot of YUI code (see their example but it's just a little simpler with jQuery:

$('#status').load('/status.php');

That's it! That one line of jquery uses AJAX to grab /status.php off the server and load it into the div with the id "status". Awesome. Several million lines of JavaScript (like I used for the original collegemedium.com which is no longer there), compressed to ~40 lines of YUI that I used on the FM Racetracker, all compressed down to 1 line of jQuery. That seemed pretty easy, so I researched around to figure out what else I could do.

My friend Kurt helped me out by doing all of the design work for www.ithought.org which launched in mid-December, so January was my turn to help him out with his new website: www.krautstache.com. Given that he's a great designer and could use a spiffy website, and seeing how easy jQuery was to use, I set out implementing his design for his site, but added in a little extra. The hover actions on the front page are basic jQuery, the contact lightbox uses UI:Dialog, the slide animation between pages uses jFlow, the portfolio lightboxes use jQuery LightBox, and little bits and pieces of jQuery hold the rest of it together. Even though some of the lightbox code is a bit over my head (which prevented me from fine tuning a few things as I would have liked), it came together pretty well and he's happy with it.

I'm already using jQuery for a project at work that previously would have been done in YUI, and it's already coming together a lot faster than I'd expected, and I've found a few more plugins that is making this project look good and function effectively: dropshadow and quickSearch. If you're building a website for anything, I highly recommend you give jQuery a look! Give it a few hours, and it will save you countless hours of time on the first project you use it on.

Infion

Infion.com is now live! From the site:

INFION builds energy systems solutions to cost-effectively provide Power for the Life of your Product. Much smaller than micro-fuel cells, our power supplies are combined with storage, generation, and charge control devices to meet specific power requirements for wireless network, consumer, and life-safety products.

My Dad is the CEO, and my friend Kurt (then at Propane Design) and I put together a website for them. They make some really neat stuff!

Corndog-o-rama 2007

That's right kids, Corndog-o-rama 2007 is just around the corner! July 12th - July 15th, _tons_ of great bands will perform, crazyness will go down, and many many corndogs will be eaten. All at Lenny's Bar (and the parking lots around it) in the heart of Atlanta. (I've heard rumors of a new beach in the area..) It's likely I won't be there given the whole working in California thing this summer, but I did the website (with Kurt taking care of Photoshop) so you should check it out! If you like eating or music, which if you're reading this I assume you do, this is a weekend you should mark on your calendar.

Me and Microsoft's KB912812 Cumulative Security Update

So there I was minding my own business when Microsoft decides to make my life that much more complicated. They do their security updates all the time and given that I manage websites but don't have a windows box, I try and read the details of each release to be aware of any issues it may cause. This one in particular (KB912812)had me concerned because it changes the way that embedded objects are handled. On reading the details, it looked like my Javascript code that uses an ActiveX control to send asynchronous HTTP requests in IE would be fine because the code isn't activated when the page loads, only responding to user input. Cool.

The update came out, some people started getting it on their machines, and I started getting complaints about the dropdown menus on collegemedium.com not working. I sent them to ckdake.com which uses the exact same csshover.htc hack to let IE use :hover on any element of a page allowing for dropdown lists to be nested HTML unordered lists with CSS to display all of it. The ones on ckdake.com worked just fine for all of them which made no sense. If one broke, shouldn't the other?

After hours and hours of debugging I finally figured out the root cause. Microsoft forgot to document a fairly major change in some unconfigurable Javascript security settings. Most things you can change by setting a custom security level in IE preferences, but if there is anything similar to the about:config that Mozilla based browsers have, I've never seen it. Previously, I had to change a few things to get the Javascript to play nice in IE. For IE to allow an AJAX request to go out, the page, Javascript file, and AJAX target have to be on the exact same domain. I had to move the Javascript files from static.collegemedium.com to the includes folder on every other subdomain (marketplace, jobs, etc) to get any of that to work. This is to prevent phishing attacks and some cross site scripting attacks which makes sense I guess, but properly designed web sites should prevent the attacks and the limitation seems a bit artifical and unnessecary to me. Whatever. It turns out the new update now requires any CSS file that Javascript interacts with to be on the same subdomain, not just for writing to it dynamically in the DOM, but even for just reading from it! Thats crazy and completely undocumented. Putting the CSS file on all the subdomains and setting all the image paths in it to point to static.collegemedium.com instead of being relative URLs fixed the problem completely.

This all may not seem like that big of a deal, but because of the somewhat silly restrictions that IE places on Javascript, I now have to have an extra 20 kilobytes of files on each subdomain. Instead of these files getting cached on each machine, If a user hits each subdomain they will have to load 140 kilobytes instead of 20, slowing their user experience and upping the bandwidth usage on the server. If your nifty Javascript DOM CSS stuff stops working after KB912812, I hope you stumble across this and don't waste a day trying to fix your problem.

CollegeMedium.com

It's finally here. That top secret website project I've been working on. We at College Medium, LLC are proud to announcehttp://www.collegemedium.com/ CollegeMedium.com provides a network for college students to sell items, rent apartments, find local jobs and student roommates, in their school or other surrounding schools.
Employers and property managers can also target specific college campuses for their housing and employment needs. This service is FREE to EVERYONE. Basically, It's really cool. Stop by, check it out, sign up for an account, and let us know what you think! I'm the CTO of College Medium, LLC which means I've spent the last few months doing all the infrastructure work and putting together the site. I've learned a bit doing it and here are some of the cool things that are happening behind the scenes:

  • CSS for all visuals. That includes the nifty semi-transparent dropdown menus. Tables are only used for tabular data, where they should be
  • AJAX for loading state/city/school names and ids, as well for for dynamically loading contextual help and displaying it inline with the content when a user requests it
  • Secure one way hashing of passwords for storage, and one way generation of keys that are used to verify email addresses, cell phone numbers, referals, etc
  • mod_rewrite rules for pretty URLs and hiding things on the file system
  • InnoDB tables in MySQL for strict enforcement of foreign keys including properly deleting entitys that refrence a deleted parent entity
  • PHP running with suexec in mod_fastcgi for secure high performance PHP execution
  • On site messaging for completely anonymous communication between users. Absolutley no information is shared about users, not even their member id number on the site (unless they choose to share it)
  • Users can choose to receive text messages on their cell phone whenever they receive a new message on the site
  • Database of (hopefully) every single college in the united states
  • Logging of all system errors and hiding them from the user
  • Dynamic menu and page generation relying on group permissions in access control lists
  • Lots of other things I probably forgot!

Websites and all

It's been a little while but not too much is going on. David's website and Frank's website are finally showing some signs of coolness.In other news I have now had a test in all of my classes and they all went pretty much alright. (I just found a really cool website: http://www.kartoo.com) Anyways, I am working on getting my bookmarks up on here so I can get at them from everywhere and so people can get an idea of what I am interested in. I gotta figure out something a little more interesting to do after that but right now it is time for Probability and Statistics so more later...