Tuesday, July 19, 2016

Turning the Corner to 27

I started this post on the last eve of my 26th year and now four days have flown by. For me a birthday is always a time of reflection. What happened? Did it turn out well? What's ahead?

The biggest milestone of the year was the birth of our son Milo on January 12. He's 6 months now and is growing twice as fast as we expected. This "little" guy is almost in 1-year clothes already! He warms our hearts with his cheerful smile and loves watching his older brother Skyler run and dance!

We also brought a puppy into our family in the spring. Luna is a Pembroke Welsh Corgi, born just a couple weeks after Milo, and fits right in with the boys as she chases Skyler and makes Milo giggle. The cats still aren't big fans of her, but they're learning to keep their distance.

Even though each day has its challenges, it's a blessing for Kasey to be home with the kids.  She gets to be there for them as they grow and learn, which is priceless. A couple years ago I had a hard time imagining us having two kids and a dog, but here we are. It's been great so far and I can't imagine going back.

My job has been going pretty well and I can see myself staying where I am for a while. I'm grateful to be able to work on a variety of projects while pushing the limits of my skills. Like any job, there are ups and downs, but overall I think I'm on a good team. The University of Minnesota is a pretty unique place to work and some days I have to remind myself to not take it for granted.

So, my 26th year was pretty great. I have a lot to be thankful for and I look forward to what this year brings!

Saturday, April 30, 2016

Enjoying the Silence


Since becoming a parent of two and adopting a puppy, I've developed a great appreciation for this concept. If you were to sit in our living room during a typical hour of the day, you would hear the sounds of our older son shrieking as he runs around the living room, barks of our puppy as she follows close behind him and the cries of our younger son as he reminds us that it has been long enough since his last feeding.

With so many little ones in the house, chaos has become the new normal for us. I don't know how my wife handles it day in and day out, but I am infinitely grateful that she does. The small windows of time when all of the planets are aligned and all of the kids are asleep are precious. No one is screaming or stomping or throwing things or getting into things they shouldn't. It's just pure, blissful silence.

If you have kids, I'm sure you know what I mean. If not, then you will. When moments of quiet come, just sit back and enjoy them. They allow for reflection on the blessing that kids are, however noisy they may be.

Image Link: https://i.imgflip.com/o6fx0.jpg

Saturday, April 2, 2016

Adventures in Web Development: React


Recently, I went to a two-day workshop on React, given by Brian Holt of Netflix. It was a good experience to get a ground-up intro from an industry leader. Until now, my JavaScript experience has been vanilla with some jQuery mixed in. My experience with React turned everything I knew about JavaScript on its head, put it in a blender, and produced something completely different.

I'm on the far left of the middle row. If I look thoughtful, I'm actually just confused.
If there's one thing I learned from this experience, it's that using React involves juggling a lot of concepts and components. React uses functional programming at its core and the app we built ran on node.js. We used an extension of JavaScript called JSX to include HTML in our JavaScript components. As we created more components as .jsx files, it got annoying to manage which of those files to include in the index file, so we used webpack to bundle them together. We needed an easy way to route from one page to another so enter React Router. To use modern ES6 syntax (because less is more when writing code) while keeping compatibility in older browsers, we included Babel in the build pipeline to transpile our code. It's easy to screw up JavaScript syntax, so we included standardjs to enforce rules on our code. Naturally, we also wanted to ensure our code's correctness so we implemented some unit tests with mocha, chai and enzyme. We couldn't tell how much of our code was covered by our tests, so we threw in nyc to give us a nice report of percentage of code coverage. Once we completed the initial version of the app, our components were looking a little bloated from all the code used to manage our app's state, so we included Redux as the state store. Our app was fast, but it could be faster, so we employed universal rendering to speed up the load times.

JavaScript isn't just for browsers anymore
If reading the above paragraph didn't make your mind melt, then congratulations, you might be a good candidate for React. Every one of the components I named is based on JavaScript, and React only covers the front-end of the stack. Gone are the days when this language was used solely for making HTML pages dynamic. There are now JavaScript components that can be slotted in as any part of the web stack (see MEAN for an example of a full stack). Is this a good thing? I'm not sure, but there's no denying it has exploded the number of possibilities for the language.

Being in a small team that has invested heavily in a simple LAMP environment, I'm doubtful that React will be of much use at my workplace. At the end of the second day of the workshop, my brain was thoroughly fried, and that was after learning from someone who was much more knowledgeable and taught much better than I can. Even if I did manage to convince the others on my team to convert to React's ecosystem, it would take months, even years to fully adopt it. We would also end up with a more convoluted architecture to deal with, which would make it harder to bring students into our team (which is hard enough as it is).

Despite this, I think React is cool and I'll probably at least use it on a hobby project. I don't think it's meant for developers looking for a simple solution for existing code or as a stable component (the current version isn't even 1.0 and the team responsible for it has big changes in mind for future releases). If you enjoy living on the cutting-edge or want to be a UI Engineer at Netflix, then dive right in.

Image Credits
React Logo: https://facebook.github.io/react/img/logo_og.png
Frontend Masters Pic: https://twitter.com/FrontendMasters/status/713068151605370881
Toy Story: http://coderhouse.com/blog/wp-content/uploads/2015/11/javascript-everywhere-01-01.jpg

Tuesday, November 18, 2014

Adventures in Web Development: Grousing at Git


If you're in a situation where you want to use an IDE to work on a Git project hosted on an enterprise version of GitHub, EGit will save you a lot of headaches. 

The long version:

An exciting part of my new role is assisting my team adopt Git as our version control solution. I have very little experience with it and have been wanting to learn it for years. Everything I read and heard about it gave me the impression that it's an easy-to-use yet powerful tool (plus all of the cool kids use it). Why wouldn't I want to use it too?

My team is in the process of transitioning from a strictly server-side development environment to a hybrid of client-server development. To do this, we're setting up project directories on our dev server and mounting those directories on our workstations as extra drives using sshfs. This allows us to develop with IDEs and other tools while still being able to see our changes immediately.  Granted, vim and emacs have their charm but I'll take a GUI over memorizing cryptic shortcut commands any day.

A nice feature of most popular IDEs is integration with a version control system like Git. My current IDE of choice is Aptana (emphasis on current) since it's free and seems to have decent syntax support for web languages. Aptana comes with Portable Git which is a lightweight version of Git. I assumed this would be all I needed, but boy was I wrong.

When trying to clone a repository from GitHub enterprise, I got an error saying "Bad credentials". I was sure that I put in the right information so I was very confused.

I thought perhaps I had to point the URI to my repository for the validation test, but that didn't work. Then I tried alterations of my username, adding in the domain. No luck. The Git options in Aptana were less than helpful too. After some research, I came to the conclusion that Aptana's Git plugin just assumes that any repository you want to work with is on github.com. There appears to be no support for working with GitHub enterprise repositories.Very frustrating.

Next I tried GitHub's desktop client because a coworker got it to work in his OS X environment without a hitch. After I put in my information, I saw my repositories show up. This looked promising since the client was actually able to authenticate with the enterprise account. I selected one of my repositories in the "clone" menu and hit the go button. The transfer seemed to be working until the progress bar reach halfway and hit an error. I knew the client was able to reach my repository so I was doubly confused.

After failing with two GUIs, I figured that Portable Git's Bash wouldn't let me down. I tried cloning the repository onto my network dev directory using Git Bash. This actually worked, but trying to stage changes resulted in a similar credentials error.

At this point I knew my problem wasn't a random bug. I dug into the logs for each of these three situations and found a similar symptom: "insufficient permission for adding an object to repository database .git/objects". Answers on the Web said to change permissions on the objects directory to give my workstation user read/write access. The problem was that my user didn't have privileges to change that access. It seemed that I was at an impasse.

Then, I found out about the EGit plugin for Aptana and figured it wouldn't hurt to give it a shot. After installing it, I was surprised to see that I was able to clone a repository, make changes and push them to my remote repository flawlessly. If only I had tried it to begin with!

My coworker tweeted Aptana asking why enterprise repositories aren't supported and got the response "I would expect GitHub would provide support through the EGit plugin." This make me wonder why the EGit plugin is not included by default or at least clearly referenced in the help docs? This would have saved me a lot of wasted time.

Monday, November 10, 2014

Pondering a Pond

Having been in a new role for three weeks, I am starting to sorely miss being able to regularly enjoy a stroll through nature. For over two years, I had the privilege of working at an office that was right next to a park with a walking trail going around the pond pictured above. I used to have the pleasure of seeing views like that one every day. It was a refreshing escape from the stress that came from the day-to-day task juggling. With music flowing into my ears, walking that trail gave my mind some space to daydream.

Now I work in a basement office without windows, which is a bit of a shock. I can still take mental breaks outside when I need some fresh air, but now that the snow is flying, I won't be doing that for quite a while.

Leaving that trail feels like leaving a part of myself behind. To me it represented a place to breathe, think and explore. It was always there when I needed it and I never regretted taking a walk around it. I hope to find a similar place by my current place of work. The snow just started flying today, so it's going to be a long winter.   

Saturday, September 20, 2014

Adventures in Web Development: Getting Started with node.js

After being a Web Dev for over 3 years now and still using primarily procedural coding techniques, I'm feeling pretty behind the curve. I've never felt good about my skills but it's become apparent that I won't get better unless I put in the effort to do something about it. To help with this, I'll be digging into some of the current tools of the trade to put together some neat hobby projects.

Arguably one of the biggest must-have tools to come out in recent years is node.js. It's non-blocking I/O model has been proven to save a lot of network resources and to improve application scalability.

I wanted to start my first project with Bootstrap. Bower is a really easy way to pull in all of the Bootstrap files into my project folder. To get Bower, I needed node.js for its npm package manager.

I'm using Kubuntu for my dev environment but this tutorial could apply to any ubuntu-based distro. The steps below were heavily inspired by this blog post.

1) Get Compiler
To use node.js, we need to be able to compile it from source. A compiler is available from the "build-essential" package. 

Update your packages and then install the "build-essential" package:
sudo apt-get update 
sudo apt-get install build-essential -y
2) Get Git
Installing Git is a simple command:
sudo apt-get install git -y 

3) Get Python and libssl
node.js depends on Python 2 which is available via the packages:
sudo apt-get install python -y
If you want to use TLS/SSL encryption, you will also need libssl:
sudo apt-get install libssl-dev -y
4) Get node.js!
At last we can install node.js. Be sure to check the current version on their site before continuing. First we'll use Git to clone the GitHub repository for node.js onto our system. We'll put it in /usr/local/bin to make it globally available for the user.

cd /usr/local/src
sudo git clone git://github.com/joyent/node.git
Now go into the cloned repository and check out the latest version (replace the letters after 'v' with the version numbers):
cd node
sudo git checkout vX.Y.Z 

With the version checked out, we need to configure it to make sure we have the dependencies installed:
sudo ./configure
Everything should report OK. If not, check any dependencies you're missing.
At this point, we have all of the resources we need to compile and install node.js:
sudo make
sudo make install 

Finally, node.js is installed! You can check it in the command-line by doing a quick version check which will return the version number you just installed:
node -v

Friday, August 1, 2014


David Lamb was a joyful man of many talents. He loved to tell jokes to lighten up a room, sing and strum a guitar to lift heavy spirits, go on a boating adventure to reel in elusive fish and carve wooden mementos that would last for generations. Having earned diplomas in industrial arts and engineering from three universities, he also enjoyed sharing his knowledge. He was always active, never slowing down if he could help it. His love of activities was almost as great as the love he had for his family.

Last Wednesday, the only grandfather I knew as a child slipped away quietly, leaving this legacy behind him.

As I reflect on the time I spent with him, I think about things he shared with me that I didn't think much of at the time. Despite me not being much of an outdoors kid, he was eager to take me out on his pier and cast a line just so I could experience the challenge of getting a catch. Later on, he gave me a tackle box filled with lures and other fishing bits so I could be a fisherman like him. Even though that box ended up on a shelf in my parents' garage, it still holds the kindness he showed me on the day he passed it on to me. I was also not much of a singer but that didn't matter to him. Occasionally when he had his karaoke studio playing some of his favorite country hits, he pulled me in for backup vocals. I bristled at first, but as I sang with him, I let go of my embarrassment and enjoyed the music. 

If there is one thing to take away from these memories, it's that in everything he did, my grandfather always stayed true to himself. He didn't care what other people thought because he knew what he stood for. That's something he left that I'll carry with me for the rest of my days. I've tried to be like others, thinking that things like drawings done by my hand or stories fabricated from my mind would somehow make me feel more fulfilled. The truth is that I was just faking an identity instead of appreciating my true one. I believe my grandfather realized this about himself and that's why he lived with such passion. I will go forward remembering this and looking forward to seeing him again in heaven.