Tuesday, September 30, 2014

Coding Logic

When you first start learning to code, everything is incredibly hard to understand and intimidating.  The past couple of weeks as I am working on making a little Rails app just for the heck of it, I am surprised how much different I feel when facing errors or things that I don't know.

Since coding for a couple of years now, everything new I am learning seems to always have a "knowledge link" that connects the new thing I am learning to something I have dealt with before.  In no way does it mean that it is easy, but it gives me a feeling almost like swimming, this may be a new lake but it's still swimming.

I am really enjoying learning Javascript, I like Ruby and all of the awesome built in methods and cool magic.  I feel like my "coding logic" and understanding has grown more though with Javascript.  It's probably just me, but I really have to think more about how the code is working when all of the easy to use methods are taken away.  I also appreciate Ruby more now, after using Javascript.

One other thing that used to scare me like crazy was recursion, for the life of me I couldn't wrap my head around it, then it clicks one day and it's hard to understand why I couldn't grasp it until now.  I still don't understand all about recursion, but I feel very comfortable with how it works, how to use it in simple cases instead of a loop, and also reasons why I shouldn't use recursion.

I used to try and memorize lots of Ruby's methods and thought that if I simply could memorize them all I would be that much better of a coder, that is simply not true.  One thing that I find really cool about coding is that some languages have different syntax and cooler methods than others, but some computer science concepts are the same across the board.

For example recursion can be used in any language, if - else statements are virtually the same in most languages, also while loops are pretty standard.  I like knowing that I could solve a problem in another language even if I really didn't know the syntax all that well simply by knowing some basic computer science principles that are true across the spectrum.

Another thing I learned is that you need to always learn something new that isn't related to your current job or else you will only have the skills that you use in your day to day work, which could possibly limit your opportunities down the road.

What's funny is Stack Overflow used to be a guessing game for me.  I'd look up a problem I was having and then try some of the code listed in an answer.  If it worked I felt like it was "black magic", not understanding what it really was doing.  I still use Stack Overflow, but now I can usually have a much clearer idea of what is likely going wrong and what specifically I need to fix.

I am loving the journey of learning to code more and more everyday.  I like having those light bulb moments when something I learn can then be used to solve something else.  I only feel bad that I am not blogging more, I just hate to not be coding in my free time!  Life is good people, drink up!

Keep coding peeps!

Tuesday, September 9, 2014

Why moving, writing code, and golf are similar

I apologize for the long absence in writing.  My family and I have been collecting and packing boxes to move in our spare time for the past few weeks.  I forgot how much work it is to move especially with little kids!  We moved into our townhouse in Marshall, Virginia this past weekend after moving out of our little 2 bedroom apartment which was located  on the 3rd floor - 39 stairs up!  After this move I promised myself to never again, no matter what will I live on the 3rd floor of any building!

Life has been good otherwise, I haven't been able to do much of the Epicodus coursework, work has been busy.  I am learning some of the Ractive.js library as well as the mustache.js library so my spare time has been filled with moving and doing some tutorials using Ractive.js.

Over the past couple of weeks, I have noticed some similarities between the process one takes when planning, packing, and finally moving into a new home and that of coding.



  • Getting boxes from local stores can be painfully slow even when you call ahead and ask for them to be held for you I was immediately reminded of the process of setting up a dev environment.  No matter how easy it sounds there are always going to be a few unexpected snags.

  • Packing up everything we owned took far longer then I had originally anticipated, even though we did a move like this 2 years before.  The difference was all of the kids toys and junk that we had collected or been given for them.  Developers I am told are always way too optimistic on estimating how long something will take to make, the same was true for my move.

  • I remembered how steep and tough the 39 stairs were to climb 2 years ago when we moved into the 3rd story apartment, so I called all of my biggest, baddest, and strongest friends to help .  I promised them all an awesome lunch and drinks if they would give me a hand.  I estimated with every one's help that it would take no more then 1 hour to have the truck fully loaded.  2.5 hours later, on one of the hottest, most humid days of the year, everything was loaded into the truck.  Code is never the exact same and usually takes longer than what I think it will take in my mind.  I shouldn't ever try to rush it, same goes for moving.

  • The new place has only 2 steps, I estimated 35 minutes to unload everything.  With every one's help the truck was completely empty after only 15 minutes!  This rarely happens in software when everything goes perfect, but when it does it blinds us, confuses our memories and makes us think that we can be more optimistic with our estimates next time... which leads us back to the original problem  :-)

  • Moving, coding, and golf are very similar to me.  All of them hold perfectly still for you and just wait for the first move.  All 3 of them can be frustrating, but when you finally do get something right, hit the perfect shot of the day.  EVERY frustrating memory we ever had fade away.  It is a hopeless addiction, I can't say that I am any good at moving, golf, or writing code for that matter but I am enjoying the journey and the challenge to always learn, grow, and strive to do better next time!


Keep coding peeps!