As someone who started out doing JavaScript in the 1990s, I’ve been through the dark ages of debugging. Alerts, logging application data into DOM elements, etc. After having been through all that doom, I’m clearly a fan of console.log. I use it all the time. I bet you do too. It’s super useful.
The one downside? Leaving calls to console.log into code that’s being tested (as in, QA) or is destined for production (as in, emergency bug fix.) With Firebug or a similar tool running, you’re fine. Without it?
I’ve been busy (day job x spending a lot of time outside because it’s summer = less time for writing)
Anyway, it’s really good. It’s short, but well-written and focused so it’s an easy book to dive into, digest and integrate into your day-to-day.
One of the things I liked about it is that the topics cover enough ground that even as an experienced/expert developer you can learn some things that you’ve probably never run into in a production environment. Maybe you haven’t dealt with a lot of heavy-duty string manipulation and regular expressions or possibly you haven’t done a ton with build systems. They’re covered here, by experts. You might not be an expert after reading it, but you’ll definitely have enough to go on to start working in some solid enhancements into your own code.
All in all, this is a recommended book for all intermediate to expert JavaScript developers. It will get you thinking about your own code, about convenience and about JavaScript performance in a very fundamental way. That’s good for you, for your users and for the web as a whole.
Well, I leaked it earlier this week, so I might as well get started.
Welcome to How to Make a Web Site the Modern Way, a blog series outlining, to the best of my ability. how to build an HTML page using today’s best practices. The focus won’t be on specific coding techniques, although there will be some of that, it will be on how the pieces fit together. Without experience, it’s tough to know how the pieces of a web page fit together in the best way. I’ve got some of that experience and I’d like to share it with people. So at the end of all of this, I’m hoping this series will serve as a one stop shop for people looking to understand the big picture.
First up: The Anatomy of an HTML Page .
Some basic principles:
Fast: I want pages to be as fast as possible by default.
Findable: This isn’t really the same as SEO, but it’s kind of like a cousin to it. I want to make pages spiderable, human scannable, computer readable and generally information rich.
Standards compliant: I’m not a standards zealot, but I try my best to follow web standards wherever possible.
Accessible: I try to make pages as accessible as possible.
Usable: Usability is a deep topic, but there are things you can do, by default that will enhance the usability of your site.
Intuitive: I want developers to look at the stuff I do and say “hey, that makes sense.” I also want it to make sense to me when I return to it in six months
Breakable: Which is a funny way of saying “graceful degradation,” a concept that colors a lot of what I try to do. The idea being- if something’s going to break, or not work as expected, make sure that it’s not totally screwed up
This being a technology blog, with plenty of code samples being posted on a regular basis, it’s no surprise I give soem thought as to how that code is displayed. Personally I’ve gone for the old school, green on black text (using the excellent code font Consolas, where possible.) I like the way it looks.
function heckYeah() {
check.it.out();
}
The one problem is with really long lines. Since I use a lot of real world examples and it’s code I’m caught between a desire to have one line of code=one line on the screen (easier to scan) and the readability issues that a scrolling text box creates. Read the rest of this entry »