Tag: javascript

Outputting a CSV File from Node.js

After reading this article, you will understand how to export data from a database or other system using a csv library in Node.js.

CSV stands for common separated values file which means that data can be stored in a tabular format with commas separating each value.

Continue reading

What is Test Driven Development?

What is Test Driven Development?

TDD is a lot more than vanity metrics like the percentage of code covered by tests. Test Driven Development (TDD) is a development process that consists of the tests being designed and written before most of the code is written.

Continue reading

10 JavaScript Array Methods Every Programmer Should Know

Arrays are usually used to store a list of elements that need to be accessed by a single variable.

I believe that to use JavaScript effectively every developer should be able to use any one of these methods on an array. These methods can save a lot of lines of codes and also allow us to do some pretty awesome function programming!

Continue reading

Automatically Compressing Images With NodeJs

Over the years, I’ve worked on a number of projects where we deal with user or company provided images which are often very large resolutions which take a long time to download on mobile phones or or poor internet connections.

This is a simple script that can be used to compress images and avoid potential costs of a service like Kraken.io

Continue reading

Book Review: JavaScript: The Good Parts

Although, JavaScript: The Good Parts is nearly ten years old I would argue it’s still a pretty good book to read. Literally, as the title implies the book calls out the best parts of the javascript language and tells what parts of the language to avoid. Continue reading

What is ORM?

What is ORM

Most software projects need to talk to a database at some point – they usually do GET queries for data, update a field or create a record. In the past, people would write raw code that communicated with the database and built an object or some code representation of the data that they would manipulate. This lead to an incredible amount of duplicated code for every project that usually had some subtle bug that was present in all libraries. Continue reading

What is a Self Invoking Function

What is a Self Invoking Function

In JavaScript, it’s common to hear lots of strange terminology without a lot of description around what it is or what it does. I want to try and demystify what a self invoking function is and why you should consider them and the times when maybe you shouldn’t consider them. Continue reading

Why JavaScript

Why JavaScript

In the earlier days of the web, there was a battle between two scripting languages VBScript and JavaScript. VBScript, thankfully, eventually died and JavaScript became the dominant language for making really easy to use and interactive websites.

In the years since, JavaScript has become more and more used. Backend code can be written in basically any language, even in JavaScript, but the client side will almost always require a developer with some JavaScript knowledge. Every industry has a lot of javascript and some are even rewriting core functionality to use more. Surprisingly, even large banks and credit card companies are beginning to use JavaScript or Node in big ways. PayPal has been rewriting very large parts of their code base to make it more scalable and usable. Continue reading