Fork me on GitHub

Davs Rants and Random Thoughts

Yahoo Open Hack London

May 10th, 2009


Yahoo Open Hack London 57

Originally uploaded by Jinho.Jung.


Yahoo Open Hack London 67

Originally uploaded by Jinho.Jung.

This weekend I had the privilege of attending the second Open Hack Day in London. This year I was a presenter instead of just there for user support. I have to say that it was an awesome event and I can’t wait to do it again.

I’ve uploaded the slides from my talk to SlideShare and posted the code example here.

I have to mention that one of the best parts was the band: pornophonique.de. They are a German duo that plays a guitar and a GameBoy. It’s a pretty sweet sound and so far I really like coding to it :D

There are tons of pics available from the event, so browse on over to flickr and check them out.

Git helper for YUI Contributors v2

April 18th, 2009

Last night I upgraded the git yui tool to version 2.

This new version adds in support for the new YUILibrary.com ticket tracker API.

Here are a couple of screen shots:

More information is available on the YUI-Git Wiki page.

Git helper for YUI Contributors v1

April 10th, 2009

Last week I started working on a little helper utility to aid YUI Contributors with GitHub and git.

Currently it is quite usable and ready for people to start using and providing some feedback.

The full source is available on GitHub: http://github.com/davglass/yui-git/

This helper app is an addition to the already awesome git porcelain (meaning pretty, not brittle). When you place the git-yui file in your path, you will now have access to the git yui set of sub commands.

The commands that are currently supported are:

  • git yui up
  • git yui merge
  • git yui sync
  • git yui build
  • git yui docs
  • git yui lint
  • git yui network
  • git yui pullrequest
  • git yui commits
  • git yui create
  • git yui log

The above commands are explained in full here: http://wiki.github.com/davglass/yui-git

Each of these commands are specific to YUI projects (yui2, yui3, yuidoc, builder). Some are only for yui2 and yui3: docs/build.

Hopefully these tools will help when contributing code.

Let me know what everyone thinks and please feel free to ask for feature requests :D

My take on Browser Sniffing vs Object Detection

January 24th, 2009

Some people are really hard core about object detection and others depend totally on browser detection. Personally, I think both sides are right. To me, it’s the same argument as what language to write your code in. You use what you need to get the job done, period. I’m not claiming one is better than the other, I’m just stating that they are both useful when used properly.

The first thing people say about User Agent sniffing is, “I can change the User Agent of my browser and things break.“. Well my answer is, “And I care why?“. I think that if you go through the trouble of changing the User Agent string on your browser, then you should not be surprised that things break. In fact, you should be expecting it. That would be like me changing the information on my license plates and then telling the officer: “You should have checked the VIN instead of the license plate, I didn’t like what it said so I changed it“. It’s a stupid argument, get over it already!

As for the object detection crew, you also need to do things right. If you are going to detect object’s make sure that you are doing it correctly. Here’s looking at you: document.all.

While developing the YUI Rich Text Editor I learned that browser sniffing is, in deed, quite needed. Now, YUI does browser sniffing a little different. We try to detect the different rendering engines, so there is no firefox, mozilla, safari or chrome. It’s gecko, webkit, ie, etc.. The main reason that sniffing is needed in the Editor is because of the execCommand method. All of the A-Grade browsers support the method. The method is there to detect, but they all don’t do the same thing when executed. So how am I to tell what I am supposed to do? I have to rely on sniffing in order to make the browsers behave the way I want them to.

Let’s look at a another example. The method getBoundingClientRect was introduced in FireFox 3 and Opera 9.5 to match what was formerly an Interet Explorer only option. Now using object detection you would have done this:

Now what about the few cases where Internet Explorer reports position off by 2 pixels? How are you going to deal with that? Browser sniffing, like this?

Not to forget you object detecting guys, I have seen others do things like this (snagged from Mr. Zakas, who i quote “I [Nicholas] have to say right off the bat that hate this solution“):

In my opinion, isn’t this the same thing as browser sniffing? Aren’t you checking something that you know is unique about a particular browser and leveraging it? Doesn’t that also qualify as browser sniffing? If you are looking for some flaw in a browser to determine a course of action, wouldn’t it be easier to just read the User Agent and work from there? You can process that info one time and use it everywhere.

Now to be perfectly clear, I am not saying one is better than the other. I am simply stating that there are uses for both, just like there are uses for both PHP and Python, VIM and Emacs, Gnome and KDE, Harley and Honda, Mac and Linux (Windows doesn’t count to me). You use what you need to get the job done. As with everything else make sure you make the right choice for the right job ;)

Server Move Complete

November 23rd, 2008

If you are seeing this post, then the server move is complete ;)

Now that the server move is done, all my examples are now being pulled from GitHub.

So if you want to add any or update any go right ahead :D

Opening my examples..

November 10th, 2008

I just finished the first scrub of my YUI examples, as of tonight I have 268!!

And it gets better ;)

Tonight I have pushed the full batch to GitHub.

The full source to all of my examples are now available for cloning via git.

For more information on Git, see the guides section on GitHub.

I will be happy to accept updates/additions or fixes for any and all examples, so feel free to clone and update the repository.

I am in the process of moving to a new web host that supports git on the server, so it may take a little bit for me to catchup with any changes you make.

On another note, my Tools and DHTML Forms packages are also available via git.

Update: Just added my Effects package as well..

YUI Local Combo Handler

November 8th, 2008

There have been several questions on how to use the Yahoo! combo handler to serve YUI files over SSL. The Yahoo! combo handler doesn’t support SSL, so I needed another option.

I have written an example what shows how to setup a local combo handler and configure YUI 2.6.0 to use it.

Currently the example doesn’t work for YUI 3.0.0pr1 but it will once YUI 3.0.0pr2 is released.

Las Vegas Trip

June 23rd, 2008


Las Vegas - 2008

Originally uploaded by davglass.

I have posted some pictures from our trip to Las Vegas last week.. Enjoy ;)

RTE Tech Talk Video

April 14th, 2008

Play The VideoIt’s been almost a year since I joined the YUI team and today I welcome my first YUI video. Last week I gave a presentation about the YUI RTE and it’s now available online in the YUI Theater. You can find all of the presentation slides here on my site.

Let me know what you think of my rookie debut on video :D

Screenshots of my Complex Example on an iPhone

March 13th, 2008

Here are a few screenshots of my Complex Example rendering on an iPhone. YUI Layout Manager - Complex Example - Home

© 2009 Dav Glass - All content is mine, except comments. Comments are the property of the poster. I speak for no person or company.
Can you tell me what this says? 01000100 01100001 01110110 01101001 01100100 00100000 01000111 01101100 01100001 01110011 01110011