JavaScript Articles

Programming | 2 min read

So Long, “beforeEach”? New Testing Pattern in JavaScript

Tests in TypeScript or JavaScript often run setup code inside hooks like “beforeEach”: Developers must take care to get the setup correct, especially in large or nested test suites. Some test runners now provide fixtures-per-test. We can re-write our test suite as the following: This test setup addresses our original pain points, and adds a […]

JavaScript vs TypeScript graphic with logos
Programming | 6 min read

Curious About Code? Get to Know TypeScript vs. JavaScript in Node.js.

You may have heard of JavaScript, Node.js, and TypeScript. You may even know that they are programming languages used in modern software development. But, alas, you may be a non-technical person who doesn’t understand TypeScript vs. JavaScript, how they are related, and how they are different. In this post, I will explain the three technologies. […]

SEP hex pattern overlay of person working on laptop
General Info | 5 min read

System Testing Multiple Deployment Environments in Cypress 10

Brief intro to Cypress In their own words, “Cypress is a next generation front end testing tool built for the modern web.” If you are not familiar with Cypress, check out their Getting Started docs and then Write Your First E2E Test. If you’ve arrived here from a Selenium-based tool, you might appreciate this comparison article from Cypress. I found this Cypress […]

Angular logo
Programming | 3 min read

JSON Web Token Prevents Upgrade to Angular 6

The Setup This is a short episode of a software engineer’s experience with one node package bump-in-the-road upgrading to Angular 6. My team is building medical applications using Angular. Obviously, the application’s network transactions require a level of security. JSON Web Tokens, or JWT, is a package we depend on for secure network transactions. Here’s a brief overview […]

DevOps | 4 min read

Integrate and Deploy React with Phoenix

You’ve just finished your lightning fast Phoenix JSON API, what’s next? Motivation My most recent side project, Contact, is a JSON REST API written with Elixir and Phoenix, designed to be the backend to an instant messaging application (e.g., Slack). There was a hackathon coming up at SEP, and I thought it’d be fun to make a frontend for […]

Programming | 2 min read

A minor shift in mindset that improved my SQL

I am currently working on a project that involves writing stored functions in PostgreSQL. Typically the goal is one SQL query that returns all the data needed by a particular web page. At first I approached this from an Object Oriented perspective with a focus on minimizing redundant data. This led me down the path […]

Programming | 4 min read

Refactoring JavaScript – a play in three acts

“the JavaScript Code” by Dmitry Baranovskiy is licensed under CC BY 2.0 Originally published on my personal blog. Act 1, the setup Once upon a time, there was a JavaScript codebase. This codebase used the function expression syntax: const returnTheNumberOne = () => 1; For reasons that aren’t relevant to this blog post, I needed […]

Programming | 4 min read

A Template for Lunches

If you want to show anything on your page, you’re going to have to write a template. A template is the html to display on each page view. And if you use resources, they nest! Ember, by default, uses the Handlebars template engine. Lunchtime! It’s a Friday and I want ribs for lunch. But I […]

Programming | 4 min read

A Picture is Worth 1000 Lies

Last week, I wrote about Routing in EmberJS. And I kinda lied a bit. I laid out the Pokédex route like this … App.router.map(function(){ this.route(“pokedex”, {path: ‘/pokedex/:poke_id’}); }); That’s probably the wrong choice, but I made it for Pedagogical reasons. I regret nothing, but we are going to play with the routes of an example […]

Programming | 5 min read

Getting from Here to There

Where do we go from here? We begin with the Url. The history of the web is based around the URL and our ability to transition from one url to another. Ember is built around the Url. You are a Web Developer if you build apps with Urls – Tom Dale Every view we want […]

SEP hex pattern overlay of person working on laptop
Programming | 6 min read

The Ember Path

There was a recent blog post by Rob Conery about learning EmberJs by just flinging yourself at it. That was something that kind of resonated with me. I’ve been trying to understand EmberJS for a while, but I wasn’t getting it. I wasn’t feeling confident enough to actually start a project and get it right. […]

Programming | 2 min read

A quick note on EmberJs and ReactiveJS

I tweeted yesterday that I was having trouble with EmberJS and ReactiveJS integration. I’m hip-deep in an emberjs app and I can’t get my canvas to pump events through rxjs… — Brian J Ball (@Myotherpants) June 3, 2014 Well, I figured it out! With some help from the fine ReactiveX folks. The long story short […]