May 2013
22 posts
6 tags
Writing Testable JavaScript
Even if we know that automated tests are a good thing, most of us are probably only able to write integration tests right now. Integration tests are valuable because they focus on how the pieces of an application work together, but what they don’t do is tell us whether individual units of functionality are behaving as expected… That’s where unit testing comes in. And we’ll have a very hard...
7 tags
Big week for Google Chrome and Blink as both get...
Google’s decision to fork WebKit and launch its own Blink rendering engine came as a surprise when the company made the announcement just over a month ago… The fork, the Blink team told me at the time, would allow them to “remove 7 build systems and delete more than 7,000 files—comprising more than 4.5 million lines—right off the bat.” Clearly, Google has been moving quickly to identify...
2 tags
Native equivalents of jQuery functions
Obviously native methods are faster because jQuery has to deal with older browsers and host of other things. I completely agree. That’s why this post is not meant at all to be anti-jQuery. But if you are able to target modern browsers in your work, using the native C++ methods provided by your browser will not-surprisingly give you a tremendous performance boost in most areas… I think there...
4 tags
JavaScript Regular Expression Enlightenment
Codey Lindly has written a solid introduction for JavaScript developers who want to understand and effectively wield regular expressions. In his own words:
A lot of developers ignore regular expressions not necessarily because they are difficult, which they are, but in my opinion because not a lot of helpful resources to learn about regular expessions are available. I wrote this article because...
3 tags
How Good C# Habits can Encourage Bad JavaScript...
it is important that we as developers understand the language instead of just thinking that our previous language knowledge will get us by. — Elijah Manor
Knowing one programming language paves the way for learning others but we still have to take the time to understand the idioms, nuances and best-practices of the language we are working in.
In How Good C# Habits can Encourage Bad JavaScript...
4 tags
An introduction to RequireJS
If you have been following JavaScript development, you might have seen a lot of posts on modules. It’s a hot topic in JavaScript and it’s easy to jump on a bandwagon. The truth is that the problem that needs to be solved is very fundamental to the success of your code… In .NET or Java, you use classes or what have you to build your project. Then you have a compiler that comes along and...
3 tags
5 Things You Should Stop Doing With jQuery
When I first started using jQuery, I was so excited. I was using vanilla JS and really struggling with understanding when elements on a page were ready and how I could access them… Some of the worst jQuery code ever written was written by me – I can assure you of that. — Burke Holland
Some thoughts on writing jQuery that sucks less.
Read 5 Things You Should Stop Doing With jQuery.
6 tags
The Intern · JavaScript test stack
Intern is a complete test stack for JavaScript designed to help you write and run consistent, high-quality test cases for your JavaScript libraries and applications. It can be used to test any JavaScript code.
AMD compatible, Grunt integration, Easy CI and code coverage reporting are just some of the features that The Intern boasts. It’s worth a look!
Check out the JavaScript Test Stack...
4 tags
Using Dispatch Tables to Avoid Conditionals in...
The fundamental change we made is transforming the conditionals into a data structure. And data is much easier to manipulate than conditionals. — Joshua Clanton
There’s a lot of code out there with huge nasty switch statements, countless ‘if’ statements in one function and other abusive uses of conditionals. Here’s one way to clean some of those up.
Read Using...
4 tags
Coding, Fast and Slow: Developers and the...
Writing software involves figuring out something in such incredibly precise detail that you can tell a computer how to do it. And the problem is that, hidden in the parts you don’t fully understand when you start, there are often these problems that will explode and just utterly screw you. — Dan Milstein
Thoughts on why estimating how much time a project in it’s whole will cost is so...
5 tags
User Experience and URL design
We are all familiar with URLs: the string uniquely identifying the requested document. However, we don’t always consider they are more than that: URLs are user facing and should be considered important UI elements. — Andreas Bonini
It’s worth considering that URL design is a part of user experience not just a programming concern.
URLs are for People, not Computers
7 tags
What is Literate programming?
The literate programming paradigm, as conceived by Knuth, represents a move away from writing programs in the manner and order imposed by the computer, and instead enables programmers to develop programs in the order demanded by the logic and flow of their thoughts.
In case you’ve been wondering what Literate Programming is, there’s a really decent article on Wikipedia about it....
5 tags
On the credibility of JavaScript
Considering the four factors free availability, elegance, usefulness and tools, JavaScript is doing remarkably well. It certainly is not perfect, but right now (as opposed to in some hypothetical future), it is hard to beat. Thus, JavaScript can be described similarly to how Churchill described democracy: the worst programming language except for all the others. I see JavaScript’s glass as half...
7 tags
Author In ES6, Transpile To ES5 As A Build-step: A...
Today I used a Grunt task called grunt-traceur by Aaron Frost to author code in ES6 (maximally minimal classes, modules, rest params, spread operators) and transpile back to ES5 as a build-step. It felt fantastic and the final product now runs in all modern browsers. —Addy Osmani
Check out the tutorial: Author In ES6, Transpile To ES5 As A Build-step: A Workflow For Grunt
3 tags
CSS Generated Content And Counters
What can you do with CSS generated content and counters?
Find out with this article by Gabriele Romanato: How To Benefit From CSS Generated Content And Counters
6 tags
Demystifying Regular Expressions
From Fluent 2012 Quick, what does this do: /(\/\*?\/)|\/\/.*?(\r?\n|$)/g? If you’re like many developers, you just averted your eyes… — Lea Verou
A solid whirlwind introduction to the world of regular expressions replete with interactive challenges to complete.
Watch Best of Fluent 2012: /Reg(exp){2}lained/: Demystifying Regular Expressions
4 tags
Making accessible icon buttons
A thorough exploration to answer the question:
Do you know the best way to make a <button> that just has an icon accessible? — @pamelafox
Worth reading to see how different screen readers process markup.
Read Making accessible icon buttons.
4 tags
CheatSheet: see all available hotkeys in the...
CheatSheet shows you the available shortcuts of the active application after holding the command-key for 2 seconds.Then a panel will show up displaying the shortcuts of the application you are currently working in. After the panel shows up you can either type the shortcut or click the item in the panel to execute the command.
If you haven’t tried it, this app is brilliantly useful.
...
3 tags
IRC is Back: Here’s Your Starter Guide
How of many of you remember Compuserve? What about Prodigy? I’m asking because, back in the good ‘ole days, they were popular services that allowed you to communicate with other people from all over the world. — Rey Bango
This article includes a nice overview of the available networks, some of the more interesting channels and available IRC clients.
IRC is Back: Here’s Your Starter Guide
4 tags
MIHTool, the iOS web debugger
If you are a web developer, the strangely named MIHTool (MIH for “make it happen”) will make you happy. If you mostly work on mobile web applications, this will change your life. It’s the missing developer tool you wanted for so long, and Apple didn’t give you. — Paul Bakaus
I finally got around to testing MIHTool and it is wonderfully simple to get started. Download the iphone/ipad app, open...
5 tags
X-Tag - The Custom Elements Polylib
X-Tag is a small JavaScript library, created and supported by Mozilla, that brings Web Components Custom Element capabilities to all modern browsers.
This looks like a very interesting Mozilla project developed by Daniel Buchner and Arron Schaar.
X-Tag - The Custom Elements Polylib
3 tags
On Developing new metrics for measuring browser...
There’s an elephant in the room that we’ve been ignoring for years: window.onload is not the best metric for measuring website speed We haven’t actually been “ignoring” this issue. We’ve acknowledged it, but we haven’t coordinated our efforts to come up with a better replacement. Let’s do that now. — Steve Souders
Moving beyond window.onload()
April 2013
27 posts
5 tags
Firefox OS: Making your HTML5 efforts worthwhile
What happened? When did we give up on the idea of nice and responsive web products that use what is available to them? It can not be about the tools we have. Browsers have amazing developer tools built into them these days – all of them, really. Using these tools we have very fine-grained control over what happens in a browser. — Christian Heilmann
An interesting look at Firefox OS, why it...
5 tags
Optimizing website performance: One less JPG
People often build beautiful sites with multiple easy-to-use JavaScript libraries. Then, when it comes to addressing frontend performance, suddenly those libraries are an enormous download that the users are forced to bear.
— Chris Ruppel
A well-founded argument (that i have found true in my own experience) with supporting data that images not Javascript or CSS will make the quickest impact...
6 tags
Web Page Clipping with PhantomJS
Did you know you can set use a specific browser rendering engine, viewport size and clipping rectangle when using PhantomJs to take screenshots of a webpage?
Web Page Clipping with PhantomJS
6 tags
App review: Pins for Pinboard.in
There’s a new iPhone app for Pinboard users. Pins for Pinboard.in is certainly prettier than Pinbook and it offers more of Pinboard’s features than Pinbook: view your notes, subscribe to users (appears to be only in app not on Pinboard), view the Popular stream, Network stream, a specific user’s stream and add rss feeds. The navigation is generally really smooth and intuitive...
7 tags
Sublime Text Refactoring Plugin
Just published my first Sublime Text Plugin. With this plugin it is possible to select Javascript source code and extract it to a new methode aka function. The plugin will manage undeclared variable usages and pass them within a single bundled JSON parameter to the new function.
Check out the Sublime Text Refactoring intro video.
5 tags
Debug.js: A library to help with JavaScript...
Debug.js addresses various known issues which make javascript hard to debug. For example, debug.js implements strong type checking, for object properties and for function parameters. So you can check that a function is called the way you expect, with the precise number of parameters, for each parameter you can specify the allowed types: number, string… it implements value bound...
6 tags
Free books from O'Reilly: The Open Books Project
O’Reilly has published a number of Open Books—books with various forms of “open” copyright—over the years. The reasons for “opening” copyright, as well as the specific license agreements under which they are opened, are as varied as our authors.
Free books from O’Reilly
3 tags
How Developers Stop Learning: Rise of the Expert...
They fail even while convinced that the failure is everyone else’s fault, and the nature of the game is such that blaming others is easy and handy to relieve any cognitive dissonance. They come to the conclusion that they’ve quickly reached Expert status and there’s nowhere left to go. They’ve officially become Expert Beginners, and they’re ready to entrench themselves into some niche in an...
6 tags
Book Review: JavaScript testing with Jasmine by...
JavaScript Testing with Jasmine is a new book written by Evan Hahn and published by O’Reilly that aims to: …explain the concepts of testing and test-driven development, as well as why they’re useful… dive into Jasmine and explain how it can help programmers test their JavaScript code…
A review of JavaScript testing with Jasmine.Read the Review.
3 tags
I know jQuery, now what?
My default starting position is no longer “include jQuery by default”. I understand more JavaScript and how things work. I have my own criteria for when to include jQuery, and when not to include jQuery. But if I don’t include jQuery, then what?
— Remy Sharp
Along the same lines topically as Why it’s time to sunset jQuery. Remy Sharp has written a thoughtful and helpful post exploring his...
4 tags
AngularJS: Let's Make a Feed Reader
I’m looking forward to seeing what services appear to fill Google Reader’s wake… With that in mind, I thought it would be pretty cool to use a feed reader as the AngularJS tutorial series theme. A Bootstrap styled, AngularJS-powered feed reader would look and feel friendly and fast…
So you want to learn AngularJS? Here’s a new series on DailyJS by @alex_young
Read More.
4 tags
All about iframes
Iframes provide a level of security since JavaScript access it limited by domain name, so an iframe containing content from another site cannot access JavaScript on the containing page. This cross-domain restriction goes both ways as the containing page also has no programmatic access to the iframe. In all ways, the containing page and the iframed page are cut off from communication — Nicholas...
4 tags
Client-Side Error Logging With Google Event...
A really quick and easy way to get started with JavaScript client-side error logging in 3 lines of code. Client-side error logging with Google event tracking.
5 tags
A UX For Developers
Writing semantic, well-commented, well-tested code, defining straight-forward APIs, using debugging tools and relying on server-side security should all be par for the course for a frontend developer. It’s more about what you shouldn’t do…
In which, Stu Cox argues for the open web and being considerate towards other developers who may want to poke around in your source code.
...
9 tags
List of Pseudo-Elements to Style Form Controls
Styling form elements is a pain point when developing web applications. Historically, web developers have had to accept the form controls the browser provided with little hope of customization. However, web rendering engines are increasingly adding hooks through pseudo-elements to give authors some control over the display.
— TJ VanToll
A useful list of psuedo-elements available in: Trident,...
4 tags
The single most useful thing in bash
Nice tip: search through your history with the up and down arrows.
Read more.
7 tags
Client-side Messaging in JavaScript
The first in a 3 part series on pub/sub and Postal.js in JavaScript application architecture. Part 3 also has a worthwhile discussion of anti-patterns.
Read more.
6 tags
Package Managers: An Introductory Guide For The...
The purpose of this guide is to get the uninitiated front-end developer up and running with front-end relevant package managers.
— @codylindley
If you’ve been curious about package managers such as Node’s npm or Bower but have yet to dive into how to get started, this article is provides a nice entry point.
Read more.
7 tags
Up to 50% OFF JetBrains Tools and Support a Good...
Need more reasons to buy great tools from JetBrains? Welcome to JetBrains weeklong Earth Day Celebration! In the spirit of Earth Day, Get up to 50% OFF JetBrains Tools for personal use and support a good cause.
If you’ve been wanting to try or buy Jetbrains software now’s a great time: up to 50% off until April 22, 2013.
Check it out! (not an affiliate link)
4 tags
Encapsulate What Varies
I was once asked in an interview: Which object-oriented design principle do you think is most important? The answer was an easy one. Encapsulate what varies.
— Nicholas Cloud
Read the article.
4 tags
Why Its Time to Sunset jQuery
In many ways thanks to jQuery, jQuery itself is no longer needed.
— Chris Love
As might have been expected, Chris Love’s article suggesting that maybe front-end developers don’t need jQuery as much as they think they do has stirred up a bit of controversy.
Read the article and the responses on Hacker News.
6 tags
Styling your Console.log statements
Kind of like being able to use Markdown syntax in the console when your debugging.
Console.log with style
5 tags
Code Hard or Go Home
Google has already proven that it has the talent, experience, and resources to develop a world-class web browser. It made its own JavaScript engine, its own multi-process architecture for stability and code isolation, and has added a huge number of improvements to WebKit itself. Now it’s taken the reins of the rendering engine too… Google certainly has its own share of problems, but what may save...
3 tags
12 JavaScript quirks
Dr. Axel Rauschmayer is writing a new series focusing on the nuances of JavaScript semantics along with best practices on his blog 2ality.
Planned topics are:
Implicit conversion of values
Two “non-values” undefined and null
Normal equality ==
Unknown variable names create global variables
Parameter handling
The scope of variables
Closures and free (external) variables
Array-like...
3 tags
Round Table #1: Should Exceptions Ever be Used for...
I’m pleased to release our first ever round table, where we place a group of developers in a locked room (not really), and ask them to debate one another on a single topic. In this first entry, we discuss exceptions and flow control.
Read article.
Next steps
I’ve been considering what to do with this space ever since I started blogging on Svbtle. I’ve been considering shifting more heavily to a link blog focused on some of the more interesting things I find during the week. My focus would primarily be on JavaScript and CSS related articles and repos and maybe some of the better iOS/OSX apps I come across.
I’m curious what...
5 tags
Promises & Deferreds in JavaScript pt.2
In part 2 I dive more into use cases, nuances and a thorough exploration of jQuery’s .then()
Promise & Deferred Objects in JavaScript pt.2
February 2013
1 post
Book Review: Metaprogramming Ruby
Book of the Day: Metaprogramming Ruby