josh.code

Posts

Testing Functional Mad Libs

Testing Testing is very important, but sometimes it gets left behind. This can be because it is not clear how or even what to test. Tightly coupled code is a testing nightmare. It is very hard to unwind specific units of code to test. In addition to this mocking can become a huge task where you have to recreate all the resources the application needs. This is where functional design comes in.

Functional Front End: Why React and Redux?

So, Why React? We will start with React as we need to show how to modify the DOM. Here is some simple code that we will discuss. const R = require('ramda'); const IO = require('monet').IO; //IO monad stuff let addChildren = (elements, root) => { R.forEach((el) => { root.appendChild(el); }, elements); }; module.exports.render = R.curry((root, elements) => { return IO(() => { while (root.firstChild) { root.removeChild(root.firstChild); } addChildren(elements, root); }); }); module.

Functional Mad Libs

I am continuing my path towards functional programming that I have been dabbling with the last year or so. This usually meant I would build things object-oriented for the most part, but then anytime an Array popped up I would transform it using functional patterns. This is pretty easy and does not force me to get uncomfortable. Although it is still very useful as there are many times collections come up.

I found a functional way to build Express middleware

Using functional design is the new cool thing. This is especially true when talking about JavaScript. Functional programming can make complex code much simpler and much shorter. I am going to highlight some code that I wrote for my Packt Publishing video course, The Complete Guide to Node.js. I want to note first that this is not a perfect apples to apples comparison. It is also not a judgment on the code written for Express.

The Secret of Functional Programming in JavaScript

I just finished an amazing book by Luis Atencio named Functional Programming in JavaScript. It is published by Manning and you can purchase it from Manning. If you have been reading my blog you will see that I have been trying to push myself further into the functional paradigm. I have been classically trained as an object oriented programmer, much like most of the programming world. The idea of functional programming initially just seemed weird and something that people talked about, but never really implemented.

Build Complex Express Sites with Redis and Socket.io

I have another video series ready from Packt Publishing named Build Complex Express Sites with Redis and Socket.io. This course builds on the foundation from the other course I built for Packt Publishing earlier this year, The Complete Guide to Node.js. It starts off by covering what and why of Redis. Then goes to building Express sites using Redis. After that, the course jumps to using Socket.io to build real-time sites.

The Complete Guide to Node.js Video Series

I have just recently finished creating a video series for Packt Publishing named The Complete Guide to Node.js. The course focuses on taking someone completely new to Node.js and giving them a great foundation to start building real applications. There is a good mix of theory and practical application as the viewer goes through the course. First, an idea is introduced and explained. Then the idea is applied. While I was waiting on Packt to send me some finalized videos as a preview, I received a twitter endorsement for the course.

Trecco  my First iOS app

Trecco my First iOS app

I have not posted in awhile, but I have been busy. I find that this is a recurring theme with my blog. I make a string of posts on time and then I get caught up writing code. Back to the post at hand. Over the holidays I spent some time to learn Swift and write an iOS app. Trecco was the app that I built. It will record a voice note, use IBM’s Watson to transcribe the voice note, and then save it to a Trello board as a card.

12 Days of Posts: Day 12

Technically this one is late. I did not account for all the things I would have to do on Christmas eve. Picking a subject and writing around 200 words on it every day for eleven days was more difficult than I expected. I had chosen some subjects before, but 3 were pretty much day of selections. I wanted these posts to be about the things that I learned or focused on for 2015.

12 Days of Posts: Day 11 – explicit dependencies

Today we are going to talk about a subject that relates to Docker and how projects are setup. A few years ago, managing a software project was more difficult. Every piece of software that is not a few lines of code relies on other software usually written by someone else. Managing the versions (if the software was even versioned!) was very difficult. In .NET things went into the GAC so that you had to prep your environment before deployment.