Learning and Using Git

Although most tutorials will have you use Git for version control, they can’t possibly go into as much detail as you’d like. Before last week, my Git knowledge was this: git add, git commit, git push. Github has taken the lead in being the repository (repo) of choice for most people/companies. It’s what we use at my current gig. If you’re just starting out and learning how to program, chances are, you aren’t working with a whole lot of people…if any at all. So you haven’t had the opportunity to use Git to its fullest potential.

I’ll be honest, I felt like a complete idiot when I first started pushing code to production. My worst nightmare: pushing code to the main code base and breaking everything. That or accidentally deleting the entire repo. I’ve heard of many SQL commands that omit just a few words or added some accidentally and taking down entire applications worldwide. I definitely didn’t want to do that. But when my manager asked me if I knew how to create a branch or make sure how to get the latest changes that people have committed, I had no clue. So hopefully this will help anyone who’s reading. Here are a few commands I use often and my general workflow with Git:

  • git checkout -b <name> 
    Example: git checkout -b fix-scrolling-bug
    Before working on any issue/feature/bug, you’ll want to create a branch. Some teams use branching differently, but generally, you’d have a branch for the one specific piece of work you’re doing. This helps keeps things concise and will help collaborators understand what your branch is trying to do. So try to name it so people will know what the code is doing. Or, simply put the issue number on it (more on that in a later post). If you’re just working on minor bugs and enhancements, sometimes it might make more sense to have a generic branch that you can push to that you’ll use all the time. More than likely, you’ll never want to be directly on the master branch.
  • git status
    This let’s you see what your current status is. If you’ve made any modifications to your code and it differs from the repo, you can see what files have changed. You can also see what you’ve added to be committed. So depending on when you run this command, you’ll either see red (modified files that haven’t been added) or green (modified files that have been). I like running this command before I add and after just to make sure I’m committing what I want.
  • git diff or git diff <path> 
    Example: git diff app/controllers/users_controller.rb
    I like using this when I’m not quite exactly sure what I’ve changed, especially if I’ve touched many different files. Almost all the time, I’ll forget what I’ve done, so I’ll want to compare my files to what’s in the repo. If I only want to see the changes for a specific file, I can add the file path to the end of the command. I use this frequently throughout my development. I’ll usually use this right after I do a git pull too (mentioned below).
  • git pull origin master
    This will pull whatever changes have been committed by others in the master branch. It’ll sync up your code so that when you’re ready to push to the repo, you’ll have the most up to date code. This is an important step because anytime you push your code, you want to make sure you have all the changes up to that point. It’ll make merging your code to the master branch a lot easier. Plus, you can take a look at whether or not someone has edited code where you’re doing your work. So if you changed something and then someone else changed that exact same line, you’ll have conflicts that you’ll need to resolve, which basically means you’ll need to either fix more of your code or talk to that other person to see who’s code remains. Important command here.
  • git add
    Basic command. Prepare the files you’ve changed to be committed. Make sure you do this before you do a commit or a push.
  • git commit -m “<your message here>” 
    Example: git commit -m “fixing javascript for scrolling bug”

    You’ll almost always want to add a message to your commit. It’s normally just what you’ve fixed. Don’t be too descriptive, just make it a one-sentence line. Chances are, it’s tied to an issue/ticket tracking number (ex: JIRA). Doesn’t hurt to append that number at the end.
  • git push
    Everyone should know this command. This actually pushes your code changes to the repo. If you’re on a specific branch, you’ll be pushing this to that one branch. This is another reason why it’s a good thing to be on a branch versus the master. Even if you push code here that breaks, you won’t be affecting the main code base. Someone will be able to review your code before they merge it in with master.
  • git stash or git stash save “<name>” 
    Example: git stash save “work for scrolling bug”

    This is another command that I highly recommend you use. As a developer, it’s common you’ll be asked to switch gears at the drop of a pin. Chances are, you’ll be right in the middle of something. You’re not quite done with it and it’s too incomplete to commit. That’s when stashing becomes the best option. Running this command will take all of your changes and put it in a stash. It’ll revert all your code back to what it was before. Whenever I stash, I normally like to run a pull too so I have the latest changes before stashing. Or, I want to test original functionality. So I’ll stash my code, test how the app originally worked, and the reapply my changes to test how my code makes it work now. This is a great command.
  • git log
    This is one that I don’t use too often. This is probably more for the person who has to manager the repo, but nonetheless, it can become handy. It’ll give you an audit of all the changes to the repo. You can see who committed code in what branches, when. It’s good when you need to do some detective work to see when changes were made.


There are a ton more commands and even more options you can append to them. Personally, these the most common ones that I use. I haven’t done a whole lot of merging since that’s normally done by the person managing the repo, but I think these will give you a pretty good head start. I know I wish I knew these before going in to a development shop. There are also plenty of free tools to make this process a little easier, like giving you a gui so you can visually see what’s going on (ex: SourceTree by Atlassian). Most hardcore developers will just work straight through the terminal, but if you’re coming from an Eclipse or RubyMine world, having a gui like SourceTree might ease the transition.

Just a final note: if you want to keep your code private, use BitBucket. It’s just another git-based repo. You can have unlimited repos for free and not display your code to the entire world.

Happy gitting!

My Development Philosophy – Be a Minimalist

Having been at my new gig for nearly 2 months now, I’ve learned very quickly what it’s like to use other people’s code. And when I say using other people’s code, I mean using libraries (gems). I’ve always been a proponent of staying as close to the bone as possible. When you start mixing in gems that seemingly make things easier, you begin to rely on them. A great example of this is using the simple_form gem. I have no doubt in my mind that the contributors of this gem know their sh*t and this is not a bash on the gem itself. But what it essentially does is makes Rails forms look cleaner (depending on who you ask). At first glance, things seem perfectly fine. Forms are cut in half because you don’t need a separate line defining a label. But I remember when Bootstrap 3 initially came out and simple_form hadn’t had the chance to update yet. Boy was it a mess. You couldn’t simply define a class on a form like you regularly do because on the backend, simple_form was mutating the default functionality. Long story short, you had to either hack your way around it or wait for the gem to update.

When you start relying on other people’s code, things are fine at that moment. However, as technologies change, you become a lot more susceptible to bugs and upgrade problems. Imagine a Rails 3 application with 50 gems. Now you want to upgrade to Rails 4. Well, guess what? You need to ensure that every gem is compatible, and if not, figure out which ones need to be upgraded or completely abandoned all together. Or let’s say you rely on a particular gem for connecting to your APIs. Whenever an API changes, you have to worry about whether or not it breaks your program. Granted, this is just the nature of software. Things change. But, personally, I want to minimize the impact of change. And one way to do that is to make sure your code is as self sustaining as possible.

The point I’m trying to make is that there are no shortcuts to becoming a great developer. Don’t rely heavily on other people’s code and simplify only when needed. Personally, I’m not a huge fan of compilers that make code look good in the editor but completely different when debugging *cough* Haml CoffeeScript *cough*. I can see using those technologies if you understand what they’re doing. However, I wouldn’t advise a beginner to start outright using Haml or CoffeeScript. Take the time to learn the grass roots of programming languages. Don’t add another layer of unnecessary complexity, or else you’ll always be wondering if it’s your code or the compiler’s/library’s/gem’s. I’m not saying you should learn C or Assembly, but at least learn (for example) vanilla JavaScript. It’s an extremely intimidating language to a beginner. However, if you can climb the initial hump and learn its syntax, you’ll appreciate its complexity. Same goes for any other language.

Be a minimalist. Not in the sense that you use less code to do what you want to do, but in the sense that you rely more on the core language. In the long run, you will become a stronger developer (at least in my opinion). Put it this way: if I were put in a position to hire someone who only knows CoffeeScript versus someone who knows JavaScript, I’d choose the JavaScript person.

Working on a Mac Development Team

I’ve only ever known what it’s like working in a corporate environment. Cubicles, business casual, and Windows PCs dominate the corporate world. Every computer at every company I’ve ever worked at before came pre-installed with Windows 7 and Microsoft Office. Outlook, Word, Excel, PowerPoint, and Outlook, Outlook, Outlook ruled 90% of my time. Did I mention Outlook? I’ve gotten so used to working with MS Office that when I started using a Mac when I began learning Rails, I couldn’t get over the fact that I didn’t have a word processor. I took all my notes in the Notes application.

My new gig uses Macs, which now seems more common than ever for development. They basically handed me my Mac and said, “Here you go. You can use whatever you want.” It was so foreign to me. At my previous job, we all had one text editor: Eclipse. Here, we can choose whatever we want.  I think the only other application that our systems guy installed was Apple TV. Everything else was out-of-the-box Mac. We’re heavy Google Apps users, so we have most of the business applications. We don’t have shared drives, everything is through Google Drive. We don’t have Windows Exchange servers for email, we use Gmail. We don’t have Outlook, we use Google Calendar to manage meeting invites. All of our repositories? On Github. It’s insane to think that everything we do is in the cloud, which has actually become very convenient since I can access everything from an internet connection. I went from a very structured environment with standard applications to working on a completely different operating system where I’m free to choose whatever I want.

That all being said, I’ve gotten used to using what I like. It’s great knowing that I can setup my machine with the applications that I like and what I use at home. In the beginning, it was a little hard because I wasn’t sure what to use. But as I played around with different applications, I’ve grown to like the ability to choose what I want. Another great thing is that Mac users are generally open-sourced believers, so there are a lot of great things people are putting out for free. So instead of paying Microsoft X amount of dollars for Lync, you can use Adium for free. Instead of paying for an Eclipse license, you can use Atom.

So a heads up to all of you who are looking to work on a Ruby/Rails development team. Chances are, you’ll be using a Mac. And chances are, you’ll be given the freedom to choose whatever application you’ll want to use (and if you’re lucky, they’ll pay for the ones that cost money).

The applications I use:

  • Email: Apple Mail. I still haven’t found a good email client that’ll incorporate Gmail and Google Calendar together. I’m so used to Outlook that I’m trying to find something comparable. I want to be able to send an invite via my email client, just like Outlook. If anyone has any suggestions, let me know!
  • Messenger: Adium. Great, free application that you can tie to your Gmail.
  • Atom: Another free application. Text editor that is very similar to Sublime Text. Will probably make the switch to Vim once I become comfortable with Ruby development.
  • Office: Google Drive. Still trying to get used to this one. Automatic saving of files is a little scary. Sometimes I just want to run some calculations real quick in Spreadsheet without saving it.

If anyone has recommendations, I’d love to know. I’m still trying to maximize my efficiency but am neck deep in code, so I haven’t had the chance to do more digging.


Minneapolis Coding Bootcamp: Prime Digital Academy

The Twin Cities area isn’t necessarily a hotbed of technology. It’s more of a mature, stagnant market full of corporations that move slowly when adopting new technologies. However, in the last decade or so, the tech scene has really started to blossom. It’s definitely not Silicon Valley, or even Denver, but there is a small beacon of light that is breaking through and companies are successfully growing in this area of the country. Buzzfeed just bought a small development shop, looking to expand by creating an office here. Big corporations like UnitedHealth Group and Best Buy are incorporating modern languages like Ruby and Python. It’s not just a .NET or PHP market anymore. Another testimony to this growing tech scene? We finally have a coding bootcamp!  (I kind of take that back. One was started by a local private college, but their focus was more on .NET and Java).

Prime Digital Academy will be starting their first wave of students in March. Their focus is primarily JavaScript, so the millions of frameworks/tools you’ve heard of will be taught to students (Ember.js, Angular.js, Node.js, etc.). It’s actually a breath of fresh air from the hundreds of Rails bootcamps. It’s a full time, Monday through Friday, in-classroom experience. Prime was actually started by The Nerdery employees (a mid-size development shop), so the folks definitely have the right resume. One thing they did that I haven’t seen any others do was hold live Hangouts for anyone and everyone to join. They answered a lot of questions and talked about their “employer network”. They really stress the importance of preparing you for a job after graduation, something others seem to have forgotten. No one spends $12,500 to learn a hobby (which is how much Prime costs). It’s not an obnoxious amount. They advertise an 18 week course, but if you read the fine print, the initial 6 weeks are homework to do before in-person class actually begins. Granted, you’ll have access to teachers during those initial 6 months. So all in all, this is a very standard bootcamp with a focus on JavaScript.

I posted a few months ago my opposition to joining a bootcamp. I personally believe that learning how to code should be affordable. Obviously, the comparison of $12K versus a $30K college education always comes up, but let’s be honest, you’re comparing 12 in-class weeks to 4 years. Whatever your stance is, $12K is not cheap. It’s a bit ironic that, as an open source community, we charge folks trying to learn it. It’s one thing to build a robust product and charge millions, it’s another to charge an arm and a leg just to learn the darn stuff.

All that being said, I applied to the program (this was before I got my job offer). I was in a state of desperation, having self taught Rails for a year while applying to jobs. As I’ve stated before, Minnesota isn’t a huge technology market. I got desperate and applied, not for the education, but for the network of employers. If I needed to spend $12K in order to land a $60K job in 3 months, it would be well worth it, which is why when I applied, I was only interested in the first wave of students. Employers are more likely to take a risk with the first group as a way to test the waters. Not only that, but Prime has pressure to produce quality talent or else they would lose their reputation.

The first part of the application consisted of a short quiz to test your logic (determining patterns, matching words, low level math). The second part was to create an HTML resume, which wasn’t too hard if you’ve spent a little time with HTML/CSS. After I applied, it was about 2 weeks later that I was contacted and invited to meet with them in-person. Thankfully, I received a job offer for a Ruby developer role before I was committed to Prime. I told them I wouldn’t be able to participate in the program and they graciously congratulated me on my new role.

I suppose the point I’m trying to get across is that the Twin Cities has a growing tech market that will need talent. This is a great time to be a prospective developer. With Prime creating a bootcamp, you can jumpstart your path in development with a positive outlook on job opportunities. If you have a little bit of time, I’d highly recommend learning on your own and using all the available resources you can find for free or for cheap. However, if you want to learn as fast as you can and be introduced to employers, Prime could be a great option. I personally will be keeping a close eye on graduates of the program, especially this first group of students. If you decide to apply, I’d say do it quick. There are only so many junior developer roles. Be one of the first few cohorts and you’ll have a much better chance at snagging one of those openings. I would’ve loved to have gone through it to report my experience, but I’m glad I was able to find a junior role on my own. As many bootcamps as there are, I’m surprised you can barely find any graduates willing to share their experience. Let’s just all hope they’re too busy at their new jobs!

How I Landed a Software Developer Job

It’s taken me a year’s worth of hard work and lots of dedication to get to this point. I’ve officially accepted a software developer position and will be starting at the end of this month. I’d like to share my experience with others so they know what a possible route in landing a developer gig could look like. Full disclosure, this is my path and I definitely don’t believe it’s the only one.

First, I’d like to put everything in perspective. I think level setting the field will give you an idea of who I am and what my skill set was at the time I decided to start my journey to Ruby/Rails development.

I’d say the story starts back in middle school. I was always interested in computers. I was an avid PC gamer and built a few websites when Geocities was huge. I took a semester long course in high school that covered the basics of HTML. This was back in 2004 when web development wasn’t all the rage it is today. I even (dare I say) played around with MySpace for a short while. It was in high school that I strayed away from technology and decided to pursue a career in human resources (they said average salary was $90K…boy were they wrong). I graduated with a bachelor’s in HR, got a job in HR, then made a pivot into becoming a business analyst at a software company. I played around with a few WordPress sites here and there, but this is where it gets interesting.

The BAs at this company weren’t your traditional BAs. Not only did we do all the requirements gathering and analysis, we actually did all of the coding as well. We build HR software, working in our own DSL and framework. So we are actually grouped with the development department. That being said, we went through the typical SDLC. Although we worked within our own framework that nobody else would ever know, we were still a development team that went through the same process any other development team does: analysis, design, coding, documentation, maintenance, etc. What I’m trying to get across is that I was essentially a developer already, just not working with common frameworks. This, I strongly believe, was an advantage over someone who comes from a completely different background.

After a few months in my new role, I came to the early conclusion that none of my technical knowledge was transferable. If I wanted to stay in development, I needed to learn other languages. That’s when, almost exactly a year ago, I decided to learn Ruby on Rails.

First off, why Ruby? In all honestly, it was because of the simplicity of the syntax combined with the power of Rails. My primary interest was web development, and there are plenty of resources for Rails. I ignored all the JavaScript-is-the-new-way comments. A simple job search on Indeed showed Rails was still flourishing. After all, if PHP is still around, Ruby/Rails shouldn’t die all that fast.

January 2014

  • I bought a used mid-2009 Mac Book Pro 13″ for $300. Rails development does not require a whole lot of power, so this thing has gotten me very far. It was strictly used for Rails.
  • The first tutorials I started: JumpstartLab’s Blogger, Rails Guide’s Blog Tutorial, and Hartl’s tutorial.
  • Started this blog (something I highly recommend everyone does).

February 2014 – April 2014

  • Attended a few Meetups. There’s a great one here specific to Rails.
  • Continued my learning path. I started a personal project to help learn since tutorials are a bit of a spoon feed.
  • Scoured Google and StackOverflow.

May 2014

  • Landed an interview with a local company for a Ruby developer. It was a decent size company. I think they said it was around 140 people. I want to stress that this was for a Ruby development position, not strictly Rails. This deserves its own post because boy was I humbled. There was an initial lunch meeting to get a feel for who I was, then a 4 hour interview where I was grilled by 8-10 people on my technical knowledge. We pair programmed for the last part of the interview and it did not go well at all. I have an HR background and did recruiting for many years. I’m generally comfortable in interviews, but boy was this an eye opener. I’ll explain my experience more specifically on this in a separate post. For now, just know I bombed a Ruby developer interview.

June 2014 – October 2014

  • After my dismal interview, I actually became more encouraged. It really showed me what to expect if I wanted to break into real development. I NEVER want to feel like an idiot again.
  • I continue my personal project and actually have a few under my belt. I use a variety of resources to further my knowledge.
  • Things start to click for me during this time. I start to understand a little more on how to tackle certain issues and can build skeleton apps.

November 2014 – Today

  • I release a Udemy course that goes over how to build a Craigslist Clone. I’ve received good feedback. 24 students and counting!
  • I apply for a Ruby/Java developer position and get an interview. It’s with a smaller company, 40 – 50 people. It’s actually a great thing because then I have more chances to get my hands dirty with all different parts of development. I start my new role end of this month :).

Essentially, a lot of persistent and resilience to the challenges that you will most definitely encounter. Being a self taught developer takes a strong will, and I think companies know that. Ruby is one of the few languages I’ve seen to be primarily self taught. The community is very supportive and it seems like most of the senior developers have all been in our shoes. There is a certain level of empathy, and if you’re willing to learn and stick with it, it shows commitment and perseverance. All of which, regardless of your title, are great assets to have in an employee.

Depending on where you are located, your path may be a lot shorter. I’m located in the Twin Cities. We don’t necessarily have a booming tech scene. Therefore, it took me a lot longer to find a gig since companies were less willing to take a chance. If you were out in California or New York, I’m positive you will take a lot less time than I did to land a developer position.

Here’s a blog I posted a few months ago on what I used to help my learning:
List of Resources to Learn Ruby on Rails

My hope is to further my knowledge, only to return the favor and help others learn.

New Year, New Job!

I’m excited and anxious about a new job offer I received. It’ll be a Ruby developer position, working more so with backend stuff and doing some light front-end work. Thought I’d get a post up. Too excited to post more. Just goes to show that even in a smaller market, there are definitely places willing to take a risk on a junior developer.

Tips for Researching Your Programming Issues

One of the greatest attributes the modern day developer can have is resourcefulness. With the age of the internet, we have unlimited amounts of data and information at the tip of our fingers (yes, there are other things on the internet than cat videos ;) ). You will undoubtedly run into a brick wall when you’re learning how to program, and for that, you have to rely on your research skills.

Back in the day, people would scour through textbooks with 1000+ pages of content. These days, you can simply ask a question on a forum or Google to find an article. There’s a popular saying out there somewhere stating that if you’re running into a coding problem, chances are, you’re not the first. The reality is, we’re all working on different applications. Someone might be working on a movie reviews site while another on a restaurant coupon site. Although the applications are different, the code itself is fundamentally the same. This is where effective research skills come into play.

Something I learned very quickly is that I can’t simply type my question in Google and expect to find an answer, at least not directly. Here’s the perfect example of what happened to me: I’m building out a Groupon clone with vendors who have deals. I ran into an issue where I didn’t know how to create a new deal while being in the context of a vendor. So I searched for an hour and couldn’t find anything related to my question. That’s when a light bulb turned on.

Instead of looking for creating a deal of a vendor, I instead decided to search creating a menu of a restaurant. Bam! First result was a StackOverflow question that was exactly what I was looking for. I learned a valuable lesson that day: you have to be methodical in your research in order to find a solution to a problem, not just your problem. In its essence, I was looking for the exact same thing they were looking for, just in a different context. Don’t get so focused on your model names or controller methods and instead broaden the horizon by looking more generically at your issue. You’ll be surprised by how many people have already asked the very same question you’re asking.

Learn Ruby on Rails by Building a Craigslist Clone

I’m excited to announce that I have a course up on Udemy! I want to teach folks what I’ve learned to help ease the transition of learning Rails. Most tutorials you find out there only help create a shell of an app. With my Craigslist clone course, I’m diving a little deeper into more of the things you can do. While it doesn’t have all the features of Craigslist, I think it’s certainly more than creating a trivial blogging or Pinterest application. It takes a dive into using Devise for user authentication, Geocoder for geolocation, and I’ll even cover building out a search method from scratch (instead of relying on Solr or Ransack).

My philosophy is to do as much of it as you can without the use of gems. Gems are fantastic and definitely help with implementing a feature very quickly, but from a beginner perspective, it can be a bit of a crutch. The course’s focus is strictly on how to put together the application, so it doesn’t go over version control or production (ex: Git or Heroku). But, I think that this is a great start if you’re looking to build out your own classifieds website. And if you want to add more features, you’ll hopefully learn enough from the course to learn how to implement whatever you want!

Here’s a $5 off coupon to use when you’re checking out: 5OFF

Or, if you’d like to go there directly, click on this link: Learn Ruby on Rails – Build a Craigslist Clone

Udemy Courses for Learning

Been busy with the holidays so I haven’t been able to post lately. I’ve also got another project in the works, so more on that to come.

I just wanted to get a quick plug in here. I’m no way affiliated with Udemy, but I’ve found some great material there. It’s basically a user-generated course website, having everything from public speaking to how to program. I strongly encourage you all to check it out. They ran some great deals during the Thanksgiving week (I bought a $199 course for $11!) and now they’re having some great Holiday deals (last I checked, the course I purchased was at $19). I purchased a Learn-Web-Development type of course, covering everything from HTML to Javascript to PHP. I haven’t had the chance to go through it yet, but the real reason I bought it was for the Javascript/jQuery lectures.

Give Udemy a try. I’d sign up for the email lists and wait for great deals. I’m not sure if there are any deals throughout the year, but if you’re able to get a highly rated course for $10, I think that’s a steal.

More on my other project soon!

Alright…I need to learn JavaScript

Seems like JavaScript has really taken a turn. With all the new frameworks like Node, Ember, Angular, Coffee, D3…JavaScript has really become a core language to know. It seems like it’s almost becoming synonymous to web development, much like HTML/CSS are. Having been primarily focused on learning Ruby/Rails, I’ve been able to sidestep JavaScript for some time now. But with the new technologies and the live-action magic it provides, it looks like I’m going to have to start learning it, at least to a point where I’m functional.

I’m thinking jQuery is the place to start. It has just about everything you’ll want/need to do with a web app. Everyone I’ve spoke to and all the posts I’ve read, they say to stick to one language. After all, you don’t want to be the “jack of all trades, master of none.” But I’m starting to think some things just can’t be avoided. Learning JavaScript is one of them. From what I understand, it’s being used everywhere: in the web, for mobile apps, even some Java applications. Possibly some scripting too now.

I’d hate to stray away from my learning path, especially because I’m not at a point yet where I’m comfortable with Ruby/Rails. But, I’ll tack on another language. Maybe I’ll start with CoffeeScript or Angular as those seems to be a little better of a learning curve. We’ll see. Hopefully I’ll still have hair left when I take the dive.