It’s true that you can learn almost anything for free online these days. The trick is knowing where to find the information you need, though. These ten sites will help you get your geek on and learn something new.
1. 5min Tech
From tech news and product reviews to quick tips and tutorials, …
My first blog post for Geeklist.
A few weeks ago we launched Facebook integration and have been adding pieces of Geeklist to Facebook’s Open Graph. Initially, we only supported creating accounts and logging in with Facebook IDs. By having more than one login option, you could link your account to both authentication…
My new job!
Please join us in welcoming our newest full-time member of the team, Jon Keating.
Jon has been with us since very early on. A few months after we launched (Last year), he reached out to help with Geeklist on a part-time basis. His first project was the card headline / rename project, which…
First, a little background. I am currently working on a new project that is using Node.js for the server side API. The framework is Express, the database is MongoDB using Mongoose, and using a combination of Expresso and Vows for testing. I am using Expresso for integration testing and Vows for model testing.
The focus of this post is going to be around Expresso and how to get integration testing done when the controller is calling an external resource, Twitter’s API in this case. Expresso provides a convenient utility: assert.response. It will take a server object, make it start listening, and handle requests for us, which allows the test to work like an external client, but remain internal.
Below is an excerpt from one of my controllers, it is a simple function that gets called by the actual request handler. We want to test if the request is able to add friends from the Twitter API to the account object, but without relying on the 3rd party API.
Here is an example of how the Twitter API is accessed. Every API call will go through this one wrapper function. Which, is what we will want to stub in our test.
All of my tests include a helper.js file that can be seen below, to properly prepare the test. It sets the NODE_ENV so the proper database and settings get used on the server. And this is the perfect spot to stub the Twitter API. I found the Sinon library to provide the tools for what I was looking for.
The stub bases it’s action on which API endpoint is being called, and runs the callback with some test data for the controller to use. It is quite simple and a pleasure to use.
And what would a post about testing be about without an actual test? This gets run with the command ‘expresso test.js’.
If you have any questions or comments, please feel free to post a reply here.
How can you tell that summer is here? A 10-minute walk in the morning results in your short being obviously drenched in sweat.
After running WordPress on my site for a long time, I’ve decided to switch to Tumblr. I haven’t really updated my blog at all in the past year, so hopefully switching to Tumblr will make it easier.
Also, I won’t need to worry about getting my server compromised. It always feels that running WP is a big security risk, they are always releasing new security patches that one has to keep on top or have your server owned by a skiddie.
Anyways, this was a long enough “test” post.

