June 2011
1 post
JavaScript hoisting
JavaScript has an interesting feature called hoisting. Basically, it takes your vars and function definitions and moves them to the top of the scope. So this:
var string = "some global var";
function example(changeGlobal) {
if (changeGlobal) {
string = "modifying the global?";
} else {
var string = "definitely modifying a local";
}
}
is the same as this:
var string =...
February 2011
1 post
iOS blocks vs. selectors and delegates
Selectors
In the Objective C world you frequently use Selectors to interface with Apple’s API. Selectors are basically a way to pass a method (a.k.a. message) around. One of my personal favorites is:
[someObject performSelector:@selector(sayHello)
withObject:self
afterDelay:1.0f];
The above line sends the ‘sayHello’ message to someObject after...
November 2010
4 posts
Overview of Recent Project
I just finished a great project with modern tech, gave the client more than they originally asked for, and got to learn something new.
In this post I’ll cover details about the project and how things worked. Along the way I’ll also give my personal opinions and I won’t back them up with pesky facts either, because, you know, that’s what you get to do in a project overview!
I ♥ REST
“Web...
Working from home
I moved to a different city, started a new job, got to learn some new things and reuse some old ones. Things were pretty good, than all of a sudden, bam! My boss says they aren’t renewing the lease. We’re going to start working from home.
Yikes!
A few years ago I took the morning off for my daughter’s birthday party. I’m pretty cheap when it comes to vacation time, so I...
Sleep Well With REST (part 2)
In part 1 I covered the basics of REST: the URLs and verbs. In part 2 we’ll cover responses.
Response
A REST web service can return anything, though typically they return either XML or JSON. JSON stands for JavaScript Object Notation, and is pronounced just like the name “Jason”.
It’s JavaScript’s shortcut notation for creating objects, but it’s just a data format and doesn’t require...
Sleep Well With REST (part 1)
REST stands for Representational State Transfer, and REST web services can be thought of as a competitor to SOAP. By their very nature, REST services are simple and follow the design of the web.
Why Learn REST?
You may already know REST since it’s the way the web works. REST uses URLs and HTTP verbs (like GET and POST), HTTP status codes, and headers to construct requests and responses. The body...