Unit Testing Node JS with Sequelize using NodeUnit

By | Development, Enterprise Mobility

One of the most tedious in tasks when building an application is writing unit tests.  In fact, most programmers immediately frown when this word is even mentioned.  However, when working on multiple projects that you may not get to finish, or someone else will pick it up on down the road, it’s always nice to include testing. How can you possibly expect any future developer to take over your code in a time efficient manner if they can’t test to make sure nothing is broken?

Read More

Building a Quick and Sensible API in Python

By | Development, Enterprise Mobility

With all the buzz (and some confusion) happening within the Javascript world it’s always nice to take a step back and use another approach.  I’ve been writing scripts in Python for a number of years and it is truly an impressive language.  A scripting language that has grown away from being just a task runner to it’s own full fledged application language.  My end goal is to have a series of blog post on building a full stack mobile application within python, but today I will start with the server side.

Now the tools I generally use for development is just Sublime Text 2, but any text editor is fine and if you want to go with a full IDE I highly recommend PyCharm from JetBrains.  Now we’ll start with setting up a virtual environment for python and building our document structure.  The reason for a virtual environment over using your systems, is well it’s just good practice! But seriously when working on anything outside of the general libraries for python it’s good to keep it contained within your own structure so you don’t have wind up with a ton of libraries hanging off your system.  If you don’t have virtualenv already installed you’ll need it.  Run the following in your terminal to get it:

bluefletch, API, Python

Now we are ready.  I do most of my setup within the terminal so I’m going to stay there for this blog post, and you should too unless you downloaded PyCharm in which case go ahead and setup a new project with a virtualenv of your own!

Read More