Be Shallow

Be Shallow
Do you want a secret that will make you 10x more productive? Of course you do. As a programmer, you’re designed to look for better, faster, more efficient solutions to all life’s problems. It’s in your nature, and if you could be 10x faster, you would at least be curious. Does This Sound Familiar You start working on a rather large code base. The previous developers did their best to organize the project into nice subfolders, and more subfolders.

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. const params = { tool: true, multi: 'some string', } async function updateFlurb (data) { const res = await request.post('http://www.example.com', data) return res.body } async function doItAll (data, opts, useDefaults) { const newDate = data.

Learn From the Past

Learn From the Past
Today we are going to look at software developers that have come before us, laying down important truths that we would do well to learn and heed. These old text are still as true today as when they were written, sometimes even more so. Don’t be fooled into thinking that we have entered a period of software dev that is new and different than 30 years ago. This is simply not the case, a new language or technology doesn’t change the fundamental underpinnings of how we design and develop software.

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.

Password Reset Token Expiration

Password Reset Token Expiration
Paige Niedringhaus writes a nice blog post called Password Reset Emails In Your React App Made Easy with Nodemailer, where she outlines how to use Nodemailer + ReactJS + Node.js + MySQL + Sequelize to build a simple password reset flow. Everyone reading these words has doubtless gone through the familiar password reset song and dance. Enter your email into a form field, receive an email with a link, click the link, reset your password, voilà!

The Wonderful and Dangerous to_json from Postgres

PostgreSQL is an amazing RDBMS. Not only is has it been ACID compliant since 2001, it supports many data types and functions, putting it on par with Document Store systems like MongoDB. Postgres supports a wide range of JSON formats and methods to store, search, and transform JSON object data. For instance, the to_json and related function json_agg allow you to collect a row into a JSON object. Handy for when you have nested data and want PG to return an object with nested values.

Amazon S3 Browser upload

Amazon S3 Browser upload

It’s 2018 and file upload is still an involved process

I’ll admit, this process is not straight forward, but once set up, it works like a charm. What’s the goal? We want the client (browser) to upload a file directly to S3 and then store the uploaded information in our server/database.

Starting a New Large Project

Here I want to talk about what a team should do when they start a new project. I’ve had the privilege to architect a large project and to come into several existing projects that have a fair amount of girth. These just a few thoughts about things that need to be established sooner rather than later. Create a glossary (terms that everyone can agree on) This is good for new comers to the project, getting their head around jargon.

Cool Tips When Using Knex with Postgres

Cool Tips When Using Knex with Postgres
I’ve been using Knex for a long time, closing in on two years. Just to clarify, Knex is NOT an ORM (Object Relation Model). ORM’s try to model your database into neat and logic classes, but I agree with Laurie Voss, and ORM is an anti-pattern. I’ve used Sequelize, Doctrine ORM, and others. Every. Single. Time. ORM’s will let you down and keep you from leveraging your database to its fullest potential.

Gitlab Docker in Docker with Postgres

Gitlab Docker in Docker with Postgres

I’m embarrassed this took me longer than expected, but here is a .gitlab-ci.yml that will fire up Docker in Docker (so you can can build and run containers) and run Postgres to use in your contract tests.