Archive

Putting a cliché to the test

Written by UI-Staff

I’ve been telling friends that part of what I like about my job is that I learn something new every day. It could be the wide variety of work we do for clients, the fact that I’m taking a crash-course in multiple technologies at once, or the high throughput caused by delivering results for every fifteen minutes of client-billable time. Or maybe it’s just the fresh perspective my six-month break from software development gave me last year. Whatever the cause, I feel like I am making progress every day, moving projects forward but also getting better, bit by bit. (Byte by byte?) I wanted to test this “learn something new every day” theory by actually tracking a week’s “a ha” moments. This was last week:

 

Monday:
Learned how to use multiple selectors for the same jQuery method call. For instance, to perform an operation on all purple *and* all polkadot elements, you simply do:
$('.purple, .polkadot').someOperation();
The syntax is directly analogous to the comma-separated selectors in CSS. It’s a very basic jQuery technique, but I’m relatively new to jQuery. Every li’l shortcut counts!
Tuesday:
Learned the required syntax to enable inheritance and polymorphism in JavaScript. It’s
ChildClass.prototype = new ParentClass();
Also learned that this guy doesn’t like it.
Wednesday
Referenced and memorized the official order of attributes for the CSS shorthands for background and font.
background: color image repeat position position scroll;
font: style variant weight size/line-height family;
Browsers didn’t seem to mind, but I’d historically been putting the two background-position properties before the background-repeat property, which is incorrect. For the record, I’ve never used font-variant and I don’t think it should’ve been included in the font shorthand sequence.
Thursday:
Speaking of incorrect CSS, I finally started paying attention to CSS warnings in the Error Console of the Firefox Web Developer toolbar. Caught a few typos and incorrect style declarations in my current project. The Warnings console is nothing new, but I was previously living entirely in the “Errors” tab and ignoring what’s actually a useful tool to maintain high levels of code purity.
Friday:
While doing some research on TypeKit and web typography in general, I learned that Cascading Style Sheets derived from a college student’s doctoral dissertation. I think I’m just nerdy enough to read it this weekend. That is, if I’m not refactoring some jQuery code and cleaning up my stylesheets.