Justin Herrick

Rubyist, Software Craftsperson, Indie Game Devotee

Front End Instructor Justin Herrick’s Story: Finding the Path

tiytampa:

By Justin Herrick, Tampa Bay Front End Instructor

justin herrick tampa bay st petersburg the iron yard front end javascript instructor

I can remember sitting at our family computer fifteen years ago, opening up a text document, and writing out the world’s most basic website. The fact that I could type in a window on a computer and it would do something was so incredible to me. However, our Mac from 1995 was not situated toward web development and my frustrations eventually drove me away from tinkering with code.

Ten years ago, I was sitting in my room building video games for my little brothers to play, letting them record their voices for sound effects and using their drawings as the art. I would throw these assets into a folder and change some code around until they could play the game that they had helped make. At this time, I never would have called myself a programmer— I didn’t even know what a function was at the time. All I knew was what I had copied from a book about game programming for teenagers. It was a language and framework that made making games pretty approachable for someone just starting off. In BlitzBasic, I learned about run loops, variables, and coordinate systems, but I didn’t know where to go from there.

After finishing high school, making websites was just some talent that I had, but never put much thought into, and the games I would make from time to time were nothing more than a hobby. I never thought it was a skill set I could develop into a career. Still, there was something there. Every job I got, I would find myself thinking ”some type of program could make this easier,” and that would lead to me tinkering on something at home after work and on the weekends. These programs never led anywhere, but they proved to be engaging and exciting. I learned about what programming was through this slow process.

Eventually, it clicked, what I wanted to do with my life and career was to make websites and applications. To build things for people and to create new experiences. How to get there was completely unknown to me.

I was building websites for friends and acquaintances while working part time waiting tables when I was given the opportunity to partner with a local development shop. Together we started a social media management firm, under their brand and my direction. Leveraging their existing clients, we were able to provide full management of their social media accounts and act as their online presence. To some clients we immediately became an essential part of how they operated. They were thrilled to not only have someone to handle these services, but available to ask technical questions to and provide insight about how the web operated.

During this time I continued to build websites for myself and others. I had learned about Ruby and Rails. I bought myself The Pickaxe Book from my local Barnes and Nobles. I had to read the book a few times, because some sections just weren’t making sense. I knew that no amount of reading was going to teach me what I needed to learn; I went to the internet and consumed every tutorial I could find. I wrote twitter clones, to-do lists, and blogging engines. I made a commitment to myself to always be working on something; this was how I learned and how my skills would grow. I didn’t realize how valuable this commitment to myself would be over the rest of my career.

Fast forward a few years, and I could confidently call myself an accomplished freelance developer. I was doing ‘full stack development’ for my clients, everything from managing the database schema to implementing the Javascript and CSS. I enjoyed having my hands in all the layers, making sure the site worked as expected and looked good as well.

When the opportunity presented itself to apply for a position at the new 8th Light office in Tampa, I jumped at the chance. This seemed like the opportunity to get myself the mentor that I never had before. 8th Light hires every employee through an apprenticeship program where they are paired with a mentor for 3-18 months until they are ready to work along side their fellow developers. The 3 months of my apprenticeship was the most intense period of learning of my entire career. Being able to collaborate with other developers helped me to gauge my own skills and to know my own strengths and weaknesses. After my apprenticeship, I worked with 8th Light for the next two years on various client projects while also mentoring apprentices of my own. I also found myself regularly teaching and tutoring those who came to our space eager to learn.

After leaving 8th Light, I returned to freelance development while searching for ways to continue to mentor and teach others. That is when I found The Iron Yard and joined their amazing team.

Looking back over my career, what stands out are all of the areas where I struggled, and how much further I could have made it with guidance. I see how much faster I grew when I had a mentor, and how valuable a peer group is to succeed. I am beyond excited to be able to impart my own knowledge and experiences onto a new group of developers who are ready to take that step into professional development.

I look forward to fostering the environment right here in Tampa Bay for people to learn how to be professional developers and how to pursue their dreams. The road is not easy, and it’s something no person should have to do alone.

Ruby’s gsub - Hash and Blocks

To those who did not know. Ruby’s gsub method can take either a hash or a block. While the hash allows for multiple replacements, the block allows for further manipulation of matched data.

> “Hello World”.gsub(/(Hello)|(World)/,{‘Hello’ => ‘Goodnight’, ‘World’ => ‘Moon’})

=> “Goodnight Moon”

> “Hello World”.gsub(/Hello|World/) { |s| s == ‘Hello’ ? s.upcase : s.downcase }

=> “HELLO world”

Could come in handy!

http://ruby-doc.org/core-2.0/String.html#method-i-gsub

Recovering (Surely) Lost Data!

Accidentally ran git reset —hard just before you realized that you really really didn’t want to do that?

There are a few ways you can possibly recover it. 

  1. Some editors keep backups of your current files for some time. Check your /tmp directory. If you use vim you could try undoing until you reach the changes, or check where your editor of choice might possibly save backup files.

  2. `git fsck —lost-found`  will place referenced files into .git/lost-found  check to see if your files are there where you can copy the needed bits into the code you are working on.

  3. If you are using a backup service like Apple’s Time Machine, and you’re lucky, you can traverse into a backup and grab the files before the reset.

Probably the most important step is to be more careful from the beginning. Really really make sure git reset —hard is the tool you need, because there are other options out there.

What is true and what is false [In Ruby]

People coming from other languages may have some confusion over what actually is considered false by ruby. I quick run at the command line can tell you a good picture of that.

The !!(double bang) operator in ruby converts the given element into a boolean value. (A single bang (!) would convert it to a boolean, but the of the opposite value)


As you can see, the only items that are false are false itself and nil. With few exceptions, this is how all of ruby operates. If you are asking if an empty string or 0 is true, you will get true in response.