Wednesday, July 29, 2015

How to accomplish your goals

I was home schooled my entire life.  We were "that weird home school family", you know, the one that pulls up in an old 15 passenger van, then piles out dressed like a bunch of Mennonites, but who aren't actually Mennonites.

Every Wednesday we would go to McDonalds for 99 cent Happy Meal night, we would order 12.  When I was 14 I picked up a crappy looking local newspaper that had even worse looking comic strips inside it.  I read the comics and said to myself: "These are terrible, I can do better."

I didn't know how to use the Internet, so I asked my younger brother Cody to email the editor, and see if I could drop off some of my comics by her office.  For the next 3 years I wrote comics every 2 weeks for 3 local newspapers.  I even started writing a fishing advice column.  I thought I had found my purpose, I thought I could be a full blown comic artist like Charles Schulz.

I read Charles Schulz's autobiography, I read every article I could find about how to become a comic strip artist.  I won the local Library Art Contest, and had to give a speech - I choked.

Everyone believed in me, everyone said I would be great.  At 17 I went to Staples and bought 8 manila envelopes.  I drew 2 months worth of comic strips and submitted them to all of the comic syndication companies, and anxiously waited.

I handled every form rejection letter fine as they rolled in, until one editor took the time to write: "What the hell?!!" next to my name.

I gave up, I went from being called "exceptional", to an editor telling me I sucked!  It took me a while to get over that rejection, I had made it "my everything".  I mowed lawns all Summer long, and stopped drawing comics.

I apprenticed with a 62 year old racist Blacksmith named Eddie, when I was first learning how to shoe horses.  He would yell and cuss at me, flip off any black person he saw when he drove down the road, and say: "I hate those N*^&%$!".  I was 20 and felt sooo much guilt ever second I was working for Eddie.

I prayed and prayed that I would have enough courage to leave him.  3 months later I finally did.  The amount of relief and joy that swept over me is hard to even describe.  I'm glad I quit Eddie, but I didn't give up on my dream to become a Blacksmith/Farrier.

After I got kicked in the face by a horse and then started learning how to code.  I finally landed a coding phone interview and the interviewer basically laughed at me and said: "Is there something I don't understand about your resume?  You are applying for a developer position???"

He then followed that up with asking me to design a relational database over the phone.  The entire rest of the interview revolved around databases, not a single question that did not involve databases or database design.  I didn't get the job, but I didn't give up.

I refused to give up even after failing interview after interview.  My 8th final interview I was told: "I had exceptional enthusiasm, passion, and would be a GREAT addition to the team!"  My dream became true, because I didn't give up.

I have a million more stories like this, all of them for me have been the same:  "Don't give up no matter what on something that you want, don't take it personal when people say you suck or laugh in your face, don't do things that you don't really want to do."

If you know how to code, you can get a job anywhere, I can help you make that happen.  You can do it on your own without my help as well if you want it bad enough.  Only do it if you really want to.  Don't believe the hype, there are no unicorns.  If you want to learn how to code and land your first job, it really feels great when you finally land your first job!

Keep coding peeps, you can do this!

Monday, July 20, 2015

What to do if you can't find a coding mentor...

Let's face it, we all know having a real life in-the-flesh mentor is the best thing for learning how to code - quickly, and correctly.

However that is not unfortunately always possible.  Stumbling along learning on your own is tough, and frankly not much fun.  Thankfully, I recently discovered a way that everyone can have their own virtual built in Ruby mentor!  :-)

Wouldn't it be nice if someone could help you with proper code indentation?

Wouldn't it be nice if a friend could point out "bad" coding habits right away, like unused variables?

Wouldn't it be nice if someone looked over your shoulder and not only showed you the "ruby way" to code, but would actually change the code for you, if you wanted???

This isn't a scam I will show you how to make all these wishes come true!

Here's how:

From your command line ( also called the terminal ) run this command:

'sudo gem install rubocop'

you will be prompted for your computer's admin password.


Install the 'rubocop' Sublime Text 3 plugin using package control on Sublime Text 3.  If you don't have Sublime Text 3 installed I highly recommend it.  Here's a link to Sublime Text 3

Now install 'sublime linter' plugin, just as we did before.  We will then install the 'ruby lint' plugin from Sublime's package control.

Finally we will install 'beautify ruby' using package control as before.  That is all you need installed to have your own built in virtual mentor!  In the video below I will show you how these 3 packages can become an amazing coding mentor.  Using these 3 coding tools you will be able to code faster and have 50% less coding 'bugs'.

In the video I show how to turn off some code warnings that you don't want by making a rubocop.xml file and configuring it.

 I will also show you how to check for errors from the command line using 'rubocop'.  Also how to automatically correct all of those errors!

Lastly I will show you how to customize the Sublime user package settings to automatically format your code every time you save the file :-)

Keep coding peeps, you can do this!

Sunday, July 12, 2015

3 ways to write code, which one should a "noob" pick?

There are basically in my opinion 3 ways to write code:

  • Bare Metal programming
  • Traditional programming
  • Easy-Lazy programming

Talk to an old programmer with a beard using Linux and he will talk about why all young coders really can't code and are really just "script kiddies".  

These programmers typically tell coding "noobs" to learn how to program using only “bare metal” programming.  "bare metal" coding is basically never using built in methods of the programming language.  A strict "bare metal" coder typically will try and only use if statements and loops to solve any and all coding challenges.  They prefer to write all of their own methods, and scoff at people who use built in methods.  The upside of learning to code this way is that you really can code, and don’t need to rely on any language's built in methods, you simply do it all yourself.  

The downsides of writing code using the "bare metal" coding method are many.  Writing code will be far more complex and with a much higher chance for overall “bugginess”.  Learning to code this way will also take much longer for a beginner to learn.

The traditional programmer will use a combination of “built in” methods and some of the “bare metal” style of coding to write code that gets the job done.  There is nothing really wrong with writing code like this, in fact it's very popular and is a fairly good happy medium.  Use the tools of the language whenever possible, and only write your own methods when you can't find a built in method.

The “Easy Lazy programmer” NEVER writes their own methods unless they absolutely have to.  When confronted with a coding challenge they will ALWAYS FIRST look to see if the language has a built in method to use.  If they can’t find a built in method in the language, they will look at using a library.  For example if we use the Javascript programming language as an example, we would look through the 4 most popular Javascript Libraries starting with:

‘jQuery’ jQuery Library
‘Underscore’ Underscore Library
‘lodash’ lodash Library
‘Ramda’ Ramda Library

If after looking through those libraries there wasn’t a method you could use to solve the coding problem, then and only THEN would the Easy-Lazy programmer write their own method to solve the problem.  The cons of writing code this way are that some coders will say that you can’t really code because you rely on as many of the helper methods as possible, and don’t write all of your code from scratch.

The upsides of writing your code the Easy-Lazy way are many:  Employers love it, as they want a code base that is less complex so that any programmer coming in behind you will be able to easily understand what the code is doing.  The Easy-Lazy method of writing code is much faster, cleaner,  requires less code, which makes for less complexity and overall easier to understand what the code is doing.

I see the value in “bare metal” coding, lots of older senior coders write code this way, BUT as a beginner learning how to code and solve coding challenges, you shouldn’t try to invent the wheel.  Try to solve the coding problem in the easiest, most tried and true way first.  Once you get better at basic coding, do more "bare metal" programming in your free time.  

I will say that using a Library does make the code run a little slower, I think most companies are fine with this, but I'm sure that in some cases you would want to avoid using libraries do to slowness.  The above is what I recommend for absolute beginners learning how to code.  This is not a blanket statement for never improving your own personal coding abilities.

Keep coding peeps!

Monday, July 6, 2015

Shoot for the coding stars baby!

Hey peeps, a lot has happened since we talked last, I was hired to work for the ettain group doing some really cool things that I can't say right now :-)  I am moving to the RTP North Carolina area on July 24th, and starting my new job the following Monday!  I also will be speaking at the Triangle Ruby Brigade meetup group on July 14th at 7pm.  If you are in the RTP area, come on out and say hi :-)

My wife and I have wanted to move to the RTP area for some time and are so excited to be finally making that dream a reality!  I plan on becoming part of the local tech scene, if you are in the RTP area, I hope we get to meet.  I've been busy these last few weeks getting everything set up and finalized for the move, but I plan on continuing to put out awesome blog posts as always.  I love the lifestyle you can live when you know how to code, I love how you can literally move anywhere in the country and land a great job.  Never let anyone discourage you with learning how to code, if you are willing to put in the time and work hard, your dreams can really come true!

Until tomorrow peeps, keep coding :-)