Method chaining is a way to return an object from a method call that allows for further methods to be called. It’s easier to see than to describe.
Instead of this:
var people = helper.getPeople();
var bob = people.find('bob');
var email = bob.getEmail();
You could do this:
var email =…
There’s an updated version of this script in this blog post.
At work, we use TeamCity to automatically build and deploy to dev projects as we check in changes.
One thing that’s always been a bit of a nuisance is dealing with the compression of JavaScript files that we've written for the projects. Developing locally,…
A couple of people I've spoken to in the past few days have made comments about how much they hate JavaScript and how bad it is as a programming language.
I'd agree that this is true for the code that people new to the language can sometimes create. Take this wrapper for the Google Maps API:
var map;
function…
Okay, a little bit niche but I couldn't find any decent info online.
<p class="disclaimer">
DISCLAIMER: This works for my hosting. Don't blame me if this borks your install. Remember that I'm just some random guy on the internet.
</p>
My site is hosted with Blacknight. I originally had the site set up…
So, my work does a weekly internal newsletter where they include a staff profile. This week it was my turn. The questions towards the end were submitted by colleagues. You'll probably be able to tell where the standard questions end and those begin.
Name:
Kevin Wilson
Position in Company:
Consultant / .NET Developer…
So, here’s the process as I go:
Pre-Launch
Back up stuff I don't want to lose on my phone (photos, call records etc.)
Take screenshots of all data connection info and home screen layout.
Charge phone completely.
Update Time
Launch Kies. It crashes.
Launch Kies.
It tells me a new version is available and asks me if…
The goal of unit testing is to create a small, self-contained tests for a piece of code that tests the functionality of that piece of code in isolation from the rest of the system. Put more simply, it should test the code you want to test and nothing more.
This can be a little tricky when dealing with writing tests…
I like learning new things. I've been like that as far as I can remember, from getting a “How Does It Work?” massive textbook-like tome when I was about 8 or 9 which, despite the intonation of the title, actually did a pretty good job of explaining how things actually worked from how they made Christopher Reeves fly…