Built a CRUD API for Robots with NodeJS, Express, and MongoDB

After building an API about myself I wanted to get into another API project right away. I found this article on Scotch.io about building a CRUD API using NodeJS, Express, and MongoDB. As I have been learning the MEAN stack I have put off working with MongoDB. In my previous attempts I had multiple issues setting it up and running it locally. I had enough issues that I put it off for too long. The Scotch.io tutorial mentioned a couple different online hosts for MongoDB databases, one of which is mLab. They offer a free instance that you can use as a sandbox database for development purposes. This was perfect to me as I want to learn how to interact with MongoDB, retrieving data and saving new data, but I’m not interested in learning how to admin or run a MongoDB instance. At least, not at this time. So, having a way to easily run Mongo and work with it was a definite catalyst to this project. It also lead to this tweet.

In the Scotch.io article it goes over the basic setup of Express and Mongoose. I used that as a template for getting my API up and running. It was a pretty straightforward process as I only needed one route with the appropriate handlers for each verb. Working with Mongoose was really easy and it worked to set it up on the route file. Working with the Mongoose docs made it easy to get my schema as ai wanted. In my API I used Robots as the example object I am creating, reading, updating, and deleting. I gave the object two custom parameters, designation and evil. Designation is a string and seemed more appropriate for a robot rather than calling it name. And it feels pretty important to know if a robot is evil or not, so I have that as well as a boolean. Each of these are given to the API via query strings. Being that I only have the two parameters I went with query strings in the URL instead of parsing out the body of the requests. In my next project I want to make a more complex object and that should lend itself to working with constructing custom objects to provide in the requests. Maybe that one can be superheroes. I can probably come up with a few more parameters for a superhero object.

It felt like the project went pretty smoothly and I was able to it up and running. I used Postman for testing out the routes and worked pretty well. I was able to run the requests as I needed and simulate a few error situations. I already know of one that I am not accounting for right now that needs to be addressed which is that requests will still go through to the POST route if neither of the parameters are supplied. It will end up with an empty object being created with no designation or evil params. I need to fix it so that the request is checked for both before I go to the database with nonexistent values.

Once that is fixed I will feel pretty good about the project. In fact I am likely going to fix it after I post this tonight. Next, I am work on an API for a more complex object. After that, I want to tackle adding in authentication so that I can have individual users. Right now anyone could use this API and it will all come in as one person.

If you want to check out the project you can find it on Github here. Feel free to let me know what you think in the comments here or submit PRs with your own ideas.

I made an API about myself as a web developer and human

I have really been focusing my efforts on learning web development on backend lately. It is the most interesting to me. I’m not really a fan of creating interfaces and dealing with moving elements of a page a few pixels at a time until it looks right on one of a million different devices. I just like making connections between things and moving data between them. I also rally enjoy making command line apps where I don’t have to worry about a UI, but that is for another post.

Since I have been focusing on backend / API work I figured it would be fun to build an API that could be used as a resource to learn about me and what I have done in my self-taught journey. It would help me learn further and would be a fun talking piece. Plus, I think it would be hilarious if someone asked for a resume and I gave them a URL for them to make a GET request to for the appropriate info.

I started out making a JSON object to describe me as a web developer. I also threw in some fun personal stuff to ensure someone making requests for it that I am indeed a human being. It was both weird and fun to create this data structure that is supposed to represent me. Once I had that mostly complete I installed Express to the project and began building out the routes for the API. This part was pretty simple as I am only supporting making GET requests for this API since I don’t want someone changing data about me unless it is me making the changes.

The necessary data for this API is pretty simplistic and since I don’t need to write new data or update existing via requests I decided that implementing a database like MongoDB would be overkill. Instead I decided on just creating JSON files with the necessary data for each route to return. I have a main route that provides a brief explanation of the API and the available endpoints. I have my resume style object in another JSON file. This way requests made to the appropriate endpoint will quickly return data. I even made a JSON file for custom errors that I require in each route file so that I can give a custom error message when someone attempts a request other than a GET.

Along with providing info about myself I also setup a /fun endpoint to provide info about fun things that can be done with the API. I am saving this part of the project for the silly ideas I have for micro-services to do hilariously “useful” things. The first one is /api/band-names which returns a listing of awesome band names I have created, each with their own id number. You can use /api/band-names/{{id}} to return a specific band name based on its id number. This spawned a separate project to create this object. Since I don’t have a database generating the id numbers for me I needed a way to create them. I keep this list of band names in a sheet in Smartsheet. I used the Auto-Number system column to generate unique five digit numbers for each name. Then I build a script that connects to the sheet and builds out an object with the id numbers and name. This object is then written out to a JSON file that I copied into my data directory along with the other necessary JSON files. Now, as I come up with other fun ideas for micro-services I can place them in as part of this API.

This was a really fun project to make and it helped me learn a lot more about Express and building out the backend of an app. Next up I am going to build out a simple CRUD API that connects to a MongoDB database. This will be a more typical API that handles GET / PUT / POST / DELETE requests. At first I was thinking that I would base it around the ideas of todos for a todo list, but instead I’m going to go with robots. That sounds more fun.

If you are interested in checking out my API about me you can find it here:


And the project can be found on Github here:


Some of my favorite definitions of NPM

NPM is super awesome and I totes heart it. First coming into the world of Node.js and seeing the power of installing modules to add new functionality to my projects I was super excited. It also made sense when I heard or saw people call it “node package manager” since it was for loading and managing packages in Node.js.

But, I quickly learned how it was much more than that and how that definition limited how one could think about NPM. Most obvious is that even though NPM is bundled with Node.js you don’t have to use it solely in Node.js projects. It can be used to manage dependencies of a purely frontend workflow. You can also find lots of awesome CLI tools for making your shell life easier as well. I am also a huge fan of the purely silly packages that exist to bring smiles to people’s faces. I keep thinking about how I need to write more of these.

Through posts online and such I have seen that the folks who maintain NPM also feel the same way, that NPM is so much more than a Node.js package manager. On the NPM homepage you can see in the upper left corner a playful definition of what NPM stands for. It changes every time you load the page. I recently found myself refreshing the page repeatedly and taking screenshots of the ones that made me laugh the most.

So I present to you, my favorite “definitions” of NPM.








Going back to bash-ics with dev tools

I recently nuked my entire development environment and I did so purposefully. As I have been teaching myself to write code I have come across many fun, shiny things that can make developing for the web easier, flashier, or something-er. As someone new to the whole world I just kind of grabbed everything because people said it was cool and would fix so many problems. I also installed things at the advice of others I met who said a particular tool made something really easy for them.

Over time this has gotten me lots of cool things, but in the end it is LOTS of things. I recently read an article on Hackernoon regarding How it feels to learn JavaScript in 2016 and it got me thinking about my own dev setup. If you haven’t read it already I would suggest it because it is funny and sadly accurate at the same time. After reading it I began to think about my own development process and how I would make an app today if I was working on a project. It also reminded me of how a few months ago I erased my system and set everything up cleanly on my Mac. When I did this I made a list of all of my tools that I would need to install afterwards. I took great care to make sure I got all of these “important” items.

As I mentally went over what I have installed on my computer I realized that if someone asked me why I use a particular thing that I don’t think I could truly defend my choice in using it. I would likely start with a story of how I found out about the thing and read or was told how it solves a certain problem. If I was asked if I had experienced that problem I probably couldn’t say so for sure. For example, I was using Oh My ZSH on top of zshell instead of using bash as my shell in my Terminal app, which was Hyperterm instead of Terminal that comes with macOS. I was told awhile ago that Oh My ZSH was an awesome tool with these great configurable features, but it required using zshell. So, I changed the shell on my system and installed Oh My ZSH without ever really using bash and seeing how they are different and if I actually prefer one over the other.

This is also true of NVM, another tool I installed after reading a blog post. I understand the benefits of having multiple versions of Node on your system in case you need to develop apps using a particular version, but I have yet to actually have that need myself. It will likely come as I work more, but until then I am leaving it off.

Now, I have my shell set to bash, hence the awesome and pun-tastic title of this post, and I’ve uninstalled all of the things I can’t justify using. Going forward I plan on working on projects and as I experience the pitfalls of a certain process I can look into solutions for that issue. But, until then I am going to work with a more default setup. One benefit to this is that to get my dev environment setup on another computer will just take a .bashrc and .bash_profile along with installing Atom and Node.js. The contents of those bash files are stored in Google Keep, so I can easily copy and paste their contents into place. Fun fact, I have already replicated the things I was using and like about Oh My Zsh and zshell in bash. So, I probably won’t be switching back unless something pretty drastic comes up. I’m also using Terminal over Hyperterm.

In the end this is meant to help me solidify my learning in web development so that I can speak directly to the stuff that I am doing and why I am doing it.

Teaching myself math from the beginning

Awhile back I read a book called Innumeracy: Mathematical Illiteracy and its Consequences by John Allen Paulos where they argue that a lack of understanding of numbers is just as detrimental as being unable to read or write. If you were to tell someone that you are illiterate they would probably be shocked and feel sorry for you. They would wonder how you get through life and probably offer help to find you a way to learn those necessary skills. But, the same isn’t true if you tell someone you aren’t good at math. “I’m not a math person” or “I’m not a numbers person” or something similar is commonly uttered by people and no one bats an eye. People often nod in acceptance or openly agree claiming the same for themselves.

But, not being good with numbers can have serious consequences on how we see the world around us. Things that are seemingly magical or special can actually prove to be statistically likely when observed mathematically. AsI have been teaching myself to write code I have begun to see things much more formulaically and I have come to see just how much I don’t understand in mathematics. Growing up I was much more into writing and other creative forms of expression. I did just enough as far as math was concerned to get by in school, so that I could move on to the next grade.

It is funny how as I have gotten older and working in code how much more I enjoy mathematical processes over creative ones. I do still think of myself as a creative person, but my creativity will likely get expressed more often within my love of technology.

Writing code has shown me how with a better understanding of math I could be much better at writing code. In some lessons I have found that it was a mathematical concept that got in my way rather than the code I was trying to write. For example, I was going through some algorithm tests and needed to write a function to produce the factorial of a number. I spent more time on learning what a factorial was than on the code that made it happen.

So, I have decided to go back and teach myself mathematics. Doing a cursory search online I have decided to go with Khan Academy as it is free and looks to have a lot of content. I am starting with their Arithmetic Essentials course. Getting a good foundation / reminder of the basics seems like the best place to start. Then I can get into the fun stuff after I remind myself of how long division actually works. Doing these courses has been humbling and eye opening to how much I rely on a calculator.

If you are interested in learning math better I would suggest checking out this article on how one person taught themselves math as an adult. It was a great starting point for me. If you have done something similar or have other resources you think I should check out I would love to hear from you. Let me know in the comments below.

Now, I should get on with my next lesson.

Upgraded to macOS Sierra

I am generally an early adopter of technological things. I like to get a new iPhone on launch day, which I did this year, and I like to download new operating systems once they are available. I have been burned by this in the past, but over time I have grown a willingness to wipe my computer clean and re-install the previous system. I do a pretty good job of backing up important files online that I am mostly okay with deleting my whole system on a whim to try out something new.

My only concern with upgrading was how it would effect my development environment on my machine. My environment is too complex, but I have set things up the way I like and it would be a pain if it stopped working as I expect. I did some simple research online for issues with Npm or Node.js and Sierra. I couldn’t find anything terrible, so I went for it. It just finished installing a few minutes ago and so far so good. I have opened both Atom and Hyperterm and they didn’t blow up on me. I should be good. If not, it will be a fun / horrific weekend project to go back. If you happen to know of something terrible I should know about regarding Node.js development on macOS Sierra please let me know.

Being that Siri is one of the tentpole features I gave it a shot first. I figure that the existing features of Siri on iOS should all work on macOS. I asked it to “open system preferences” and was told Siri couldn’t do that for me. Later on I asked Siri what it can do and saw the example where you have to tell it to “launch” the app you want opened. I did a web search which was cool, but it couldn’t open the results in Chrome after Siri found them.

I asked Siri to message my wife and after the third or fourth attempt I got it to work. I was frustrated that I had to tell Siri who my wife is even though I have already done this on my phone. I know Apple’s approach to AI assistant tech is to handle it on the device to promote user privacy and differentiate themselves from Google, but this definitely felt like a shortcoming. It felt weird that a service I use on my phone doesn’t have all of the same data when I go to use it on another device. In our everything is connected cloud internet service world, isn’t that the idea? I use a lot of Google products and that is one of my favorite things. I can sign in anywhere and have access to everything right away.

The other feature I was excited to try was the Universal Clipboard which looks to be super cool. It was so easy to setup and use that all I had to do after installing was make sure Bluetooth was turned on on my Mac. Since I’m using the same Apple Id on everything, like a sane person, and I have Handoff turned on it just worked. I copied a url in Chrome on my iPhone and pasted it into Chrome on my Mac. It took probably two or three seconds for it to be available. I tried pasting right away with no delay to see how fast it would be and on the second tap of V on my keyboard the URL pasted in as if it were copied on my computer. It was very cool.

So, I guess I like macOS Sierra. It is good to be on current software, but other than these two features I don’t know of anything else I will try to take advantage of. I will probably use Siri on my computer more since talking out loud to a device in my home rather than out in the wild makes sense to me.

Writing an API about myself for my Github page

All Github users have the option to make a personal page ({username}.github.io) from a repo. I have long had one setup with no content in it whatsoever. To check it out in all of its blank white page awesomeness you can go here, if you really want. I’ve always wanted to use this page to make a simple portfolio for my projects and show off some of the things that I have done in the realm of web development. As I learn more and more about building things for the web I have come to realize that I really enjoy backend processes much more than frontend work, hence my focus on NodeJS. And since Github pages only support frontend things like Javacript, CSS, and HTML I haven’t really put much effort into designing this page.

But, I want to have something fun and interesting. The other day I had a great idea. I will write up a server that will return an object that describes me and the work that I have done. It will be a resume in a JSON object, a kind of API all about me. I can make the main endpoint return the whole thing and set other endpoints to the various sections of it. Then I can build out the page to make AJAX requests to this server. I will host it on Heroku likely, the server that is, and maybe even set a dropdown for the various endpoints with a button to send the request. Then I will display the raw object on the page. This is a project I can get behind and will actually want to build.

I will admit that I have seen this done before by others and I am no way saying that I am doing something unique here, but it will definitely be fun. One in particular I have seen and really like is one by Ashley Williams, who works at NPM. I figure this kind of project will turn out much better than if I just tried to make a fancy looking page to be flashy. I am even thinking of making it text only and I might have it display the raw object. This will speak much more to the kinds of projects I like to work on. As I have been writing this I am thinking about the various sections and how I could have them break down. One section could be for full fledged web apps and another for CLIs that I have made. This will be fun indeed.

Holy moly! I gave a talk about code I wrote!

As I have been teaching myself how to code I have been trying to go to various code meetups in the Seattle area. It is always fun to get into a room full of like minded individuals and hear people’s perspective on different web technologies. Most of them have talks of some kind where a couple people will present their idea on something in the realm of code. I have always wanted to give one and just recently got the opportunity to do it. I go to most of the BellevueJS meetups as they are usually pretty close to my work and are easy to get to after I leave the office.

A friend of mine, Matt, helps run it and after I put up my post regarding publishing my first package to NPM they asked me if I wanted to do a talk about that. I thought about it for a moment and said yes without really thinking about it. As I thought about it more the more it felt like a great idea. I have been wanting to do a talk about something and I could never really think of a topic. This would be a perfect subject for me to talk about as it is more about my getting over fears of putting code I wrote out into the world than the actual code itself.

So, I began preparing the presentation. I decided to keep it simple and had about five slides or so. Each one with a few talking points on them. I tried to keep it moving as I spoke and kept to the topics on the slides. I let the audience know that it was my first talk at the start which was more for me to get the nerves out than it was a disclaimer for them. It was a very receptive group and there was even a couple of questions for me afterwards. The group seemed to be mostly folks that are new to world of writing code, so it felt like a topic that resonated with them. At least it felt like it did to me.

I got some good feedback afterwards on the talk and on my package. Much like when I published the package it felt good to put myself out there. To be honest this was really more for myself than anything. Knowing that I could get up in front of a group of strangers and talk about code I wrote makes me feel really good about where I’m at as far as my learning in the field of web development. And also like the package, as simple as the presentation was, it felt great to get something out there. Now I can take what I’ve learned and use it for future things. I’m actually excited about the idea of speaking in front of people again. I plan on giving more talks about code and my views on it.

If you have ever wanted to give a talk about technology or really anything you feel passionate about I say do it. Take the leap and put yourself out there. It’s the only way to really know how it will make you feel.

I published my first package to NPM!

As I have been learning more and more about developing software for the web I have been wanting to be part of open source software and getting code I’ve written out in front of people. Part of that is writing about code here on this blog and another part is writing code and publishing it somewhere people can find it. I recently did a post about my plans to publish my first package to NPM and now I have done it, hooray! Just moments ago I published the package.

The package is an ExpressJS project boilerplate creator. It creates a simple directory structure along with some files to get started in creating an ExpressJS app. If you are interested in seeing it you can find the project here:


I’ve done some basic testing and it works pretty well. There is on occasion errors that I have to look into, but running the package again seems to work. So, that should be fun to troubleshoot, yay!

But, really getting this project out in the world is really meant to be the catalyst for me to get over my fears of putting code I’ve written out there. It may not be the most sophisticated and it may not even be the best way to do this, but it is code I’ve written and it does the thing it is meant to do. That is pretty cool to me.

Let me know if you have any questions in the comments!

Deploying my first app to Heroku

I recently checked off a couple of goals for myself in learning web development, deploying an app to Heroku and building an app that uses the Smartsheet API. I was able to do it with one project, a Smartsheet based quiz game. It has a familiar style and game play to a certain well known and trademarked game show. I originally made this game as a simple HTML page using JQuery to hide and show the questions and answers. It worked for its purpose, but was difficult to maintain since the questions and answers were in the markup. If you wanted to edit the game you had to go into the HTML. I also didn’t have it hosted anywhere so to use it you had to share a folder and open the index.html file.

I started to think how it would be a great project for an app hosted somewhere that could have some kind of database of questions and answers to create a new game board each time you played it. Naturally, I thought it would be great if that collection of questions could be stored in a sheet in Smartsheet. At the time there wasn’t a method to use the Smartsheet API with JavaScript, but I found out that a JavaScript SDK was being built using NodeJS. So, I patiently waited and once it was available started working out ideas for how the app could work.

I took some time to get to know the Smartsheet API and how to work with it in Node. Once I felt comfortable I began working on the app. During this time I also worked on learning how to build apps in Express which I used in the project. It is an Express app built on top of Node with Jade, or I guess I should say Pug now, for the view templates. As I’ve been working on my learning to write code I have come to really enjoy working on back end development work over front end. The more I learn about HTTP requests and piping data into streams the less I am interested in writing click events or the hex values of colors. The process to pull the data from Smartsheet and randomly build the object for the game board was a really fun logic problem to solve.

But, I guess you can’t call yourself a full stack developer if you can’t write some CSS to go along with your POST requests. Once I had the project done and functioning it was time for the fun part of deployment. I chose to put my app up on Heroku. I had a little experience with deploying apps there before, but nothing I built myself, only apps from tutorials. It is really simple to deploy to Heroku as they make it really easy. I published the app and visited the url to see the dreaded “Application Error.” I should note that I attempted to do this deployment on a morning before work. I finished up the functionality and layout of the app the night before. I thought about publishing it then, but in the interest of getting a good night of sleep I chose to not do it. I woke up the next morning with it still on my mind and had the great idea of deploying the app over breakfast. I started troubleshooting the errors and almost forgot to go to work as I got so involved in research. I ended up bringing my laptop to work to finish it up in my free time.

Looking at the app I realized I hadn’t updated my port to the environment variable so that it loads to the assigned port. Instead it was still going to port 3000, which I was using for testing. I adjusted my app.js file and updated the app on Heroku, but still got the error. Looking at some support docs I found some mention of supported versions of Node and since 6.0.0 had just come out my version of 5.x didn’t look to be supported anymore. I updated my version of Node and the app still worked locally, so I pushed that change to Heroku. This allowed me to load the first page, but the game board failed with the same error.

Looking at the app logs I saw it wasn’t finding needed environment variables. I remembered that I am using dotenv to set some environment variables so that I can connect to the Smartsheet API, but keep them out of the files I am pushing up to Github. Call me crazy, but publicly displaying my API access tokens seems like a bad idea. Next, I looked up how to set the environment variables for the server for my access token and everything started working! Once the server could connect to Smartsheet for the data it was able to do everything it needed.

Now the game is up and running. It is awesome to think about how an application I built and designed end to end is on the internet. I definitely learned a lot in regards to Node, Express, and especially Pug (Jade?) since it was my first time using a template language to build out a front end. It also gives me a great idea of where I want to go next in my learning. Now that I’ve got a good understanding of Node and Express I’m looking to start learning Mongo and Angular to complete the rest of the MEAN stack. I’ve joked around with the idea of making apps that work with Smartsheet are like SEAN apps(Smartsheet-Express-Angular-Node). It would be awesome if that became a thing.

If you want to check out the Smartsheet quiz game app you can find it here:


And the Github repo is here:


I’d totally be interested in any feedback or ideas. I have a list of a few things to add for a next version, but it would be cool to hear what others have to say. Let me know in the comments! 🙂

Building my first NPM package

As I teach myself to write code I’m trying more and more to get involved with open source projects and to contribute my own code to the greater JavaScript ecosystem. NPM is an awesome resource I have used quite a bit in my own projects to find helpful packages and it’s time I start paying the community back with my own code.

Last Fall I decided I wanted to create my own package as a learning process, but I couldn’t really think of anything to build. I mulled over the idea and nothing exciting came to mind. I chose to not force the issue and worked on other things. I thought to myself that I should just work on other projects and as I work I should think about the processes I’m going through. If there is something I’m doing often by hand it could be a great idea to automate it with a package and if it is something I find useful others might find it useful as well. That would make a great idea for something to publish to NPM.

A few weeks ago I had an idea. I really like working with Express to build Node apps. It makes routing super easy and it’s simple to get something up and running. In the Express documentation there is mention of a project generator. I’ve tried it out and it definitely does what it advertises, but after working with it a few times I found I was editing the folder structure pretty extensively to have it the way I like working.

So, this will be my first foray into creating a package for NPM. I’m going to make my own Express project creator. I prefer a more stripped down directory structure and this will help me automate a manual task. Most likely, only I will find it useful as it will set everything up the way I prefer to work, but maybe others wil try it and like it too.

The true point of this project is to get over the nervousness I have of creating my first package and putting myself out there in the open source community. Using a simple project to get started will help me relax. Maybe then I will have an idea that might be more community driven to solve a problem I see others facing. But, that time is not right now.

I will put up a post after I publish it. Have you published your first package to NPM recently? Or are you a seasoned pro with advice for a newbie? Let me know in the comments!

Tabs in my browser

I’m the kind of person that will have roughly a bajillion tabs in my browser open at any time, give or take. It helps me to organize things that I am working on, want to read later, or will share with people on the internets. Looking at them this morning it got me thinking that a good way to share them would be here in a list. Most of them are related to web development and my self-teaching pursuits in JavaScript and NodeJS.

  • Node for Beginners – great resource of links (a link in a list of links to a list of links?!?! Linkception!) from Raquel Vélez that covers places to learn JavaScript and NodeJS ranging from the beginner level up to advanced stuff.
  • Node Hero – a blog from RisingStack for learning NodeJS from the ground up. It is a blog series that updates weekly or sometimes bi-weekly with a new article on working in node with each topic building on the last one going the entire process of building an app.
  • Clippy.JS – this is too good to not share with everyone I know. I’ve already tweeted about it, but it deserves to be here too because it’s that good. It is a project from Smore that makes it super easy to implement everyone’s favorite digital assistant.
  • Botkit – an interesting project from Howdy to help make creating powerful Slack bots easy. My team switched to Slack as our main chat system awhile back and it got me interested in the world of Slack bots and making one for myself.
  • Meatcube – this one is technically related to code since I heard about it at a talk. I saw Ryan Lewis present on using Handlebars as a template system, which was super interesting. Ryan also mentioned that they run a small Japanese music label called Meatcube. I was immediately interested and have left it up in my browser since.
  • Make 8-bit Art – this is another one that is code related because it was made by a developer I recently followed on Twitter, Jenn Schiffer. They make all kinds of stuff, but also try to make art with code. This is one of their creations and it is a super fun site to draw and be silly with. It also makes me feel like playing Nintendo games all night, which is a pretty good feeling.


[UPDATED: May 2nd, 2016] – Got reached out to by someone at RisingStack on Twitter to let me know the Node Hero blog updates weekly or sometimes bi-weekly.

My first tech conference – WebDevCon

presentation space before the talk began
One of the talk rooms just before the keynote from Paul Duncan at WebDevCon.

Earlier this week, April 21st, I went to my first tech conference, WebDevCon. I heard about it from my Free Code Camp group and being free plus in my hometown I decided to go. To be honest, at first I wasn’t going to go, but Cassidy told me I should and I agreed with her. So I went and it was super fun! Having never gone to a tech conference I didn’t really know what to expect except for what I have read and seen online.
It was held at one of the Amazon buildings in South Lake Union here in Seattle, which was nice since this allowed me to walk to it. This conference is something that Amazon has been hosting internally since 2009 and this year was the first time they have opened it up to the public. It is a mostly front end focused conference and admittedly as I learn more I enjoy back end development more, but I still found the topics to be interesting and overall it was a great time.
I saw a few of the folks in my Free Code Camp group and also saw another friend of mine that works as a Java developer. The talks ranged from the performance of loading web fonts, to using observables to handle async issues, and keeping things as simple as possible in your workflow. That talk was the keynote given by Paul Duncan. He had some great points on keeping work simple and free of waste. He brought up a lot of kaizen practices and even called out the Toyota Production System as the prime example of creating waste free work. Cassidy loved hearing about this since that is her line of work at Virginia Mason now and they have a deep relationship with Toyota to create waste free work in the medical field.
My favorite talk was one given by Rachel White. Her talk was about her process making a robotic cat feeder titled Internet of Cats. The name had me, but I also saw it was built using NodeJS and Johnny-Five, so I had to check it out. Her talk was also about how scary it is to try something new and to put it out for all the world to see. She decided to make her project open source and she brought up some of the anxiety that can come from putting your thoughts and ideas out into the world for others to see and possibly judge very harshly. She gave some examples of things other developers she knows have gone through that has made them wary of working on open source software, but she also showed the awesomeness of others who have helped her on her project. It was a great talk on not only NodeBots, but also on the open source community itself and how it owes it to itself and its members to be a kind, respectful place. I really liked it.
Overall, the conference was a lot of fun. I got some stickers, a water bottle, and my brain filled with ideas on how the internet works.
This definitely makes me want to keep going to more conferences and web development type group talk/presentation things.

A decoder ring CLI for secret messages

I’ve recently been using Free Code Camp for exercises to continue my learning of JavaScript and NodeJS. Some of my favorite challenges are the algorithm scripting ones. They give you a specific process to accomplish along with expected results that your code is tested against. Once you get your code to pass all of the tests you can move on to the next one. They are super fun.

The latest one that I’ve finished challenges you to decode a set of strings using a ROT13 cipher. You have to figure out how to run through the string, taking in each character, accounting for punctuation, and then returning the appropriate letter based on the ROT13 system.

In the description of each challenge there are some tips on how to accomplish it with suggested methods to try using. But, you really are free to do it however you want. As long as the tests pass, you pass the challenge. I eventually got the challenge completed, but didn’t like my method. So, I checked out the FCC Gitter channels to see how others had accomplished it. One person had a really cool idea of creating an object to be a cipher to compare the given letters to and return the corresponding letter. I tried it out myself and was able to get my own version implemented.

This got me thinking about how it could be fun to have a little app the encodes or decodes messages using this system. It would be like a decoder ring for your terminal. This coupled with my recent discovery of VorpalJS and I had my next idea for a CLI project. Side note, I’m currently obsessed with the idea of making command line apps. It is kind of my jam.

So, I got to work on the project and it came along faster than I thought. As I was making the decode command I got to thinking about how I don’t really have to make separate functions for decoding and encoding. All I’m really doing is converting the letters from one to the other. So, I can just make a single conversion function to run for each command.

The code looks like this:

var cipher = {
"A": "N",
"B": "O",
"C": "P",
"D": "Q",
"E": "R",
"F": "S",
"G": "T",
"H": "U",
"I": "V",
"J": "W",
"K": "X",
"L": "Y",
"M": "Z",
"N": "A",
"O": "B",
"P": "C",
"Q": "D",
"R": "E",
"S": "F",
"T": "G",
"U": "H",
"V": "I",
"W": "J",
"X": "K",
"Y": "L",
"Z": "M"

function conversion(str) {
var converted = [];
var original = str.toUpperCase().split("");
for (var i = 0; i < original.length; i++) {
if (cipher[original[i]] === undefined) {
} else {
return converted.join("");

I am pretty happy with it in its current state. Like my weather CLI I will revisit it later on and see what else I can add to it. If you want to check out the project you can find it here on my Github page.

I made a command line tool to lookup the weather

After typing in a zip code the results are shown on the command line.
After typing in a zip code the results are shown on the command line.

Now that I am putting the majority of my projects on Github I have been trying to come up with things to build. One of the first few things I set out to make was a command line app to get the current temperature based on a zip code. It is a simple node app that asks the user for a zip code, then looks up the current weather, and reports it back. I am using a couple of free APIs to make it happen. For the weather data I am using Forecast.io, but that requires a latitude and longitude to get the data. To get that based on a zip code I am using Zippopotam.us.
The basic flow of the app takes the user input using an npm package called Prompt and makes the request to Zippopotam.us. That returns a latitude and longitude for the zip code which is then passed into the call to Forecast.io along with a name for a city/town in the zip code.
The results are then printed out to the console in a basic sentence. I built something similar to this from a tutorial on NodeJS I did awhile back. I thought it would be a good starting point for getting up and running on Github as well as get me going on the “just build stuff” advice I get from basically everyone. I really liked the fact that this time around it was much easier to build and get working. I feel like I could have just built it in one sitting. I didn’t because I didn’t want to rush things, but it felt really good that this wasn’t as hard as I remember the tutorial being. It’s like I have actually learned a few things when it comes to building stuff in NodeJS.
If you want to see the code or even use the app yourself you can find the repo here. Feel free to submit a pull request if you come up with anything it needs.
I wouldn’t say this is complete, but it works pretty well. Let me know what you think!