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!