Writing Sane JavaScript Functions

Writing Sane JavaScript Functions

Meet Reggie

Reggie writes JavaScript all day. He sits in his cubical, has his VSCode editor opened up all the time and likes to write big, long, ugly functions with his VSCode editor. Let’s take a look at one of Reggie’s famed functions.

Essential Skills Every Kickass Developer Should Possess

Essential Skills Every Kickass Developer Should Possess

That’s right. You want to take your skills from beginner, bypassing intermediate, and land on advanced. You may have just started coding a year or two ago, but you’re determined to be the best developer on your team. It’s going to take hard work, no getting around that, but we like hard work. You’re going to feel dumb at times, no problem, you’ve fully embraced that feeling dumb means you’re learning and that’s the name of the game. Say ‘good-bye’ to your comfort zone, and hello to boot camp life.

Leveraging Reflux (flux) with React like a pro

Leveraging Reflux (flux) with React like a pro

My latest project for a well known clothing retailer has involved writing a React based web app. It has a staggering amount of data that needs to update different parts of the app. To accomplish this, we are using React (of course) and Reflux.

NG-Form To The Rescue

A project I’m currently work on (for a very popular apparel company) is employing AngularJS for their site. I’ve created some directives to handle collecting addresses for billing and shipping. Reusable directives with their own isolate scope. To add more awesome to the mix, I’m using ngMessage to show various error messages with the form. This all works great, but the problem was showing the error messages correctly when there are two forms on the page.

Deploy Web App with Grunt Compiled Assets to Heroku

The conundrum is how do you deploy a web app to Heroku that needs to be compiled without including compiled files in your source? Maybe you have some SASS that needs to be compiled into CSS. Maybe you want to minify your JavaScript, or cache bust with some appended hash tags. In any case you want to run some tasks on your code to produce your distribution or build.

Essential Node.js Development Concepts, part1

Every project tends toward insanity, it’s your job to Keep it Sane, Stupid. This is the first in a multipart series on Node.js concepts that I consider to be essential to writing sane web apps. You already know how to Node and now it’s time to get serious about building apps. The problem you’ll run into every growing project is complexity. These concepts will help you keep things sane.

Using GulpJS, Browserify, and Watch for AngularJS Development

That’s quite a mouth full, but in a nutshell we just want to develop AngularJS and have Gulp watch our files and recompile them when they change. var gulp = require('gulp'), _ = require('lodash'), fs = require('fs'), nodemon = require('gulp-nodemon'), ini = require('ini'), config = ini.parse(fs.readFileSync('./.env', 'utf-8')), concat = require('gulp-concat'), uglify = require('gulp-uglify'), htmlMin = require('gulp-minify-html'), browserify = require('gulp-browserify'), clean = require('gulp-clean'), watch = require('gulp-watch'), ngHtml2Js = require('gulp-ng-html2js'); gulp.task('default', function(){ // Update process.

JavaScript Casting Tricks

Here I want to go through some casting tricks that can be used for better data manipulation. Booleans Build in Boolean() The easiest way is to use the builtin Boolean() method. Boolean('true'); // true Boolean(1); // true Boolean('false'); // true !!!!GOTCHA!!!!! Boolean(0); // false // Careful Boolean([]); // true Double Negative This will cast anything as either true or false, there are of course a few quirks that may not be obvious.