Wednesday, November 27, 2013

How "junior" developers can become Regex wizards

You need a Regular Expression to validate a phone number or a user's email address, so what do you do? Go onto StackOverflow and copy someone else's code and paste it into your code and be done with it? Well that may work, and if you are in an absolute pinch that can work, but what have  YOU personally really learned? Zilch.

At my job as a "junior developer" I am starting to have to use Regex (Regular Expressions) quite a bit to validate/check for certain things. I could become a "Googling wizard" but I'd rather expend the energy and effort now to become a "Regex wizard" instead. The truth is, Regular Expressions seems
daunting and intimidating, and they may be at as they get more and more complicated, however I think Regex are just different and you need to slow down and think of them as symbols and not try to rush through.

With that spirit in mind I recorded myself doing a basic Regex date string, I did it "cold turkey", so as to be authentic, and real. I did make one mistake and then fixed it, so you can see I'm quite new to this and human :-)  The point is not how much I suck, the point is to go ahead and just try to make your own Regular Expression before just "Googling the answer". I want to be a good developer one day, and I think as a young developer we should put in the extra time to try and really understand something and not just always do what is the quickest.










If you are new to Regex, www.rubular.com is your friend. Put test strings in the box on the site and then look at the Regex "cheat sheet" on the bottom of the page when you get stuck or need a refresher. To the right you will see a blue bar that tells you if you are matching the 'test string' correctly or not which makes it easy to tell if the Regex you are making is actually correct or not.

The other thing is, DON'T RUSH, if you can't take a few minutes at work to fiddle with Regular Expressions, then make sure while eating some turkey and watching the game at Thanksgiving tomorrow that you pull out some random strings to try and match, I find it's actually really fun and not stressful if you don't pigeon hole yourself into a time crunch.

I always have my "mentor" developer at work double check my work when in doubt. NEVER put something that you are unsure of into production. Certainly on your own projects and stuff you should be able to take 5 - 10 minutes to have fun with some Regular Expressions.

Keep coding!

Monday, November 18, 2013

I give you permission to no longer ask for permission to learn to code

Craziness happened this last week. My blog post went viral on Hacker News and Reddit, over 34,000+ people read the article in one week. Needless to say I got inundated with emails from lots of people who are trying to learn to code, others who are trying to get hired. I'm still trying to get back to everyone so I apologize if that's you.

What amazed me was the fact that people are asking "MY" opinion, (feeling like an impostor) just because I started from zero knowledge and actually got hired. Here's the thing though that I would say to everyone who is wondering if they should learn to code or if they "can" learn to code. Here's the thing: if you want it bad enough you can accomplish virtually anything so my answer is of course, "Yes! and Yes!".

I'll tell you a secret that helped keep me motivated when I was really discouraged and felt like I would never understand something. I would watch the movie In the Pursuit of Happiness with Will Smith. No matter how bad things got, they were never as bad as he had it. Not only is it an inspiring movie but it's also a true story. I find that a lot of people that email me are basically saying: "Hey how can I get a really really easy job that pays a lot of money... TOMORROW!!?"

I explained that it actually takes a lot of hard work and usually that's the last I hear from them. Then you have the other side of the coin: You have 80's mindset developers who practically scoff at the idea of "teaching yourself to code" and always point you to Peter Novig's article Teach Yourself Programming In 10 Years. I honestly like Peter's article and agree with it, BUT I think you can learn enough programming/coding skills to be able to add value to a company in a junior role certainly in 6 months to a year.

It's not like a company is going to give you the "root" passwords to their databases on day one even if you were a database wizard. Some things are simply about trust and establishing a relationship over time proving the quality and type of person you are.

So I give you permission to no longer have to ask if you can learn to code or get hired, the short answer is yes if you want it bad enough. That may even mean you need to relocate. Which brings us back to the question of how bad do you really want it?

The hardest thing for me about working in a new field is not being that good at it and having to ask for help and then banging my head against the wall or apologizing and fixing my mistakes. When I was a Blacksmith/Farrier I felt 100% confident that I could make 99% of all the horses that I worked on to move and feel better. I love the confidence that comes from absolutely knowing what your doing and having the experience (from lots of mistakes) of what doesn't work or isn't the "best" way to do something.

I no longer have that same confidence I had when dealing with horses when it comes to coding and in fact most days I have a slight migraine from trying to learn and absorb everything I can. That is what drives me now, I don't want to just have a job. I hate not being really good at something, I hate being the guy who can do the task but if anything goes wrong outside of the norm, I would drown. I push on for the day when I have enough coding history that I can actually draw from it. It's many years down the road but the quickest way to get there is to step on the gas.

I've been bad about blogging, lots of things going on but I do have some big plans for the end of December - early January. I'm playing around with some smallish ideas until then so don't worry. This isn't a "ghost" blog that will dwindle away. It just took me a while to get acclimated to the new place.

Watch out peeps, I've got big dreams let's see if we can make them happen!

Keep coding :-)  

-Josh

Ruby on Rails: Faliure

When I was a kid whenever I would put too much food on my plate and then not eat it all my dad would say: "Josh, I guess your eyeballs were bigger than your stomach...don't take more than you can finish".


Well apparently I still have not learned my lesson on that completely which brings me to the very sad news that +Dustin James  and myself have mutually agreed to end the:  Get hired the hard way mentorship program. 

Why? Not from lack of effort on Dustin's part, in fact he is much farther along at one month than I was at 3 months. The simple reason being there are zero listings for RoR jobs in Manatobia, Canada and a very small sporadic Ruby user group. The truth is I should have checked the tech market place and done some research. In short I failed,  my eyes were bigger than my stomach.

The good news is Dustin is still learning Ruby on Rails and I will be giving updates from time to time just not at such a "rabid" style pace. The man is smart and very talented. He will do well! Keep following him along his journey on his Blog

I guess the lesson to be learned is, you may have to move to get hired even if you are good at RoR. There are definitely certain areas of the country where it is easier to get hired as a junior dev just because the demand is so great.

My apologies to the junior rails community, keep coding :-)