Archive

Archive for July, 2009

My HP Pavilion tx1000 (Laptop) Died

July 31st, 2009

I joined the HP Pavilion tx1000 drop dead club last month. Apparently the tx1xxx models of the HP Pavilion laptops have an issue with the NVIDIA chip frying the CPU hamsters (melting the solder on the motherboard) – I’m not really sure about the technical details, but a broken laptop is bad news.

Whatever happened it first killed my wireless, then the machine wouldn’t turn on (black screen, no BIOS, no boot). However; I’m writing this post from the same defective laptop. That’s right folks! I did NOT have to find a penny older than 1982, I did NOT have to dismantle and cook the computer under a halogen lamp for 5 minutes. Instead I…

How to fix your tx1xxx laptop:

  • Put your laptop on a firm grounding like the floor, counter, or sturdy table
  • Placed your right elbow on the enter key and push down hard
  • Pull on the opposite side of the laptop casting until you hear creaking (while pushing on the enter key with your right elbow)

I heard creaking and crunching as I physically bent the case (and the motherboard I’m sure). Now, aside from a crack in the case and a still defunct wireless card I’m temporarlily back in business – and in active search of a replacement laptop.

I’ll give any company or product a chance, but quality and user experience is the deciding factor. I doubt that I’d purchase another HP machine, but I now have an excuse to get a Mac!

Update: my HP tx1000 kicked the can about a month after writing this article. I chop shopped it on eBay for a cool $400, then used the cash to get a spanking new MacBook Pro!
Author: Adam Kahtava Categories: Musings Tags:

Free: Win a Copy of: JavaScript: The Definitive Guide by David Flanagan

July 23rd, 2009

Free to a good home: JavaScript: The Definitive Guide by David Flanagan.

It’s rare for technical books to be held in such high esteem, but the numbers speak – this book has close to 200 five star ratings on Amazon, confirming that The Definitive Guide is still one of the seminal guides to the JavaScript language. Flanagan’s book is a must read for developers and designers alike. Along with JavaScript: The Good Parts by Douglas Crockford of course. I reviewed this book a while back, you can read my review.

The Details:

  • Comment on this post
  • Leave a valid email in the email comment field
  • The winner will be chosen at random and notified through email on Oct 1st
  • I cross my fingers hoping that you don’t live on the other side of the world (I pay for shipping)

Good Luck!

And the winner is Dan Carlson!

Author: Adam Kahtava Categories: Book, Contest, JavaScript Tags:

Book Reviewed: Designing with Web Standards by Jeffrey Zeldman

July 20th, 2009

The title of Jeffrey Zeldman’s book (Designing with Web Standards) says it all – this book promoted accessible, usable, search engine friendly web design and development through the use of XHTML and CSS while debunking the myths surrounding web standards. Zeldman is a well recognized name among web developers and designers – he’s the the founder of A List Apart, and co-founder of The Web Standards Project (WaSP). His writing is entertaining, witty, easy to read, and insightful – it’s very much like the content we’re used to reading at A List Apart. It’s also fair to mention that this book has been edited by industy experts and influencial writers like Eric Myer. Any developer that works with the web should read this book along with JavaScript: The Good Parts by Douglas Crockford.

Author: Adam Kahtava Categories: Book, CSS, DOM, JavaScript, Review, Web Standards Tags:

Chronic Divitis And Classitis, What Are They?

July 15th, 2009

Jeffery Zeldman offers this entertaining definition for Divitis and Classitis:

Classitis is the measles of markup, obscuring meaning as it adds needless weight to every page. The affliction dates back to the early days of semi-CSS-capable browsers and the many designers’ initially childish comprehension of how CSS works.
Alas, many have not yet outgrown that childish misunderstanding of CSS … Classitis is as bad in its own way as the <font> tag ever was; rarely does good markup require it … At other times classitis is exacerbated by a still more serious condition … divitis … Classitis and divitis are like the needless adjectives with wich bad writing is strewen. They are the weeds in the garden of meaning. – Jeffrey Zeldman, Designing with Web Standards

An example of markup wraught with divitis and classitis:
googleexercise-divitis1
13 div elements and 11 classes for a single item. What a stench! :)  View this markup in action.

The equivalent markup disease free:
googleexercise-semantic
Cleaner, more meaningful, and with all the functionality of the former code. One div element and 3 classes for a single item.  ShamWow! View this markup in action.

Both of these markup snippets are visually and functionally equivalent. In the first example the divs, classes, and cryptic ids weigh down the page and pollute the meaning of the markup. In the later, a more semantic / structural approach is taken  Both these snippets were pulled from my attempts at the Google Web Developer Exercise.

Clean meaningful markup is the API that users and web crawlers consume – it’s important and easy to keep things clean, it just takes a little experience. Thank goodness for patterns like MVC that let us control our API (the markup).

What Is Semantic / Structural Markup and Why Does It Matter?

July 13th, 2009

I always found the definition of “Semantic / Structural Markup” murky on the intertubes. I thought Jeffrey Zeldman described it well in his book Designing with Web Standards.

What Is Semantic / Structural Markup?

Markup is “semantic” when tags are chosen according to what they mean. For example, tagging a headline h1 because it is the most important headline on the page is a semantic authoring practice. Tagging a headline h1 “to make it look big” is not. … I use the phrase “structural markup” to mean pretty much the same thing as “semantic markup.” (“Structural markup” takes its name specifically from the idea that the web document has an outline-like structure.) – Jeffrey Zeldman, Designing with Web Standards

Zeldman goes on to make many great points on why semantic markup matters, here’s my paraphrase.

Why Does Semantic / Structural Markup Matter?

If you’re interested in learning more about semantic markup then view A List Apart’s source code, or read their many online resources: Topics: Code: HTML and XHTML.

Author: Adam Kahtava Categories: CSS, DOM, JavaScript, Web Standards Tags:

RailsEnvy: Funny Geeky Videos on MVC and HTML

July 10th, 2009
Author: Adam Kahtava Categories: Videos, Web Standards Tags:

The Google Exercise Revisited: Semantic Markup with jQuery

July 9th, 2009

A couple years ago I tried getting a Web Developer position at Google. After a few interviews they had me complete their Web Developer exercise. I did it, and my initial submission would have made any respectable web developer ill – you can read more here: Getting a Job at Google: A Web Developer Fizzbuzz. I redid the exercise over a year ago, but today even that code stink.

I did the exercise yet again (the third time) because my last attempt needed some improvements:

  • it suffered from chronic classitis and divitis (too many classes, ids, and divs were making me itchy)
  • it wasn’t really using semantic / structural markup (all the extra divs etc… cluttered my markup, and some of my class names like container-borders are non-semantic altogether)
  • it performed poorly and wasn’t accessible (everything was being rendered in the DOM, there was no immediate rendered markup which kind of violated the idea of unobtrusive JavaScript, nor was it screen reader friendly)
  • it wasn’t making use of any JavaScript libraries to abstract browser inconsistencies out of the code
  • it suffered from my software ethnocentrism (my variable and object naming like GoogleExercise was mirroring statically typed languages and not the native language they were being written in)

Here’s my latest Google Exercise (addressing all the above concerns):
View this post outside your RSS reader to see it in action or view it here.

This attempt makes use of jQuery and uses 57 lines of JavaScript (almost 200 lines less from my last one).

You can view the code for this attempt here: google.contact.widget.js, index.html, google-contact-widget.css.

You can view the old code here: GoogleExercise.js, index.html, GoogleExercise.css.

If you think I can improve on my code then let me know. Oh yeah, and if you’re a recruiter from Google then hire me! :)