Dwight Schrute Question

I don’t believe in “I wish I knew this sooner” mentality but if I did…I would say I wish I knew the following in regards to learning how to code.

Coding Rabbit Holes

Avoid coding rabbit holes at all cost! Theses take up hundreds maybe even TRILLION of hours to get out. What is a coding rabbit hole you ask? Well, I am glad you ask. Imagine a black hole except much bigger, meaner and slightly nerdier. It will suck you into a world of hurt and frustrations. In fact, it is a major contributor to adult virginities all over the world.

A coding rabbit hole happens when you try to solve the problem without realizing that you don’t really understand the problem to begin with. Please don’t continue programming if you are not getting anywhere. Just stop. Don’t kid yourself, you are NOT close. In fact, you just added three more bugs with last key stroke. Way to go. Your aunt Sally would be real proud. Just start with a fresh and importantly a working version of your code base. Build on top of that. In small increments that is.

The sooner you get out of the rabbit hole the smarter you will look and feel. A perfect example is when I worked with jQuery callbacks mixed with PHP code. Ooops, just vomited a little. But don’t worry, it didn’t make it all the way up. I had no clue what I was getting into. And thanks to my enormous ego it took me 6 months to get out. When I finally did Netflix had changed the time between episodes to just 4 seconds! Just fyi, it takes 5 seconds to decide whether or not to continue watching a show.

How Many Tabs Do You Have Open There Buddy?

Many Browser Tabs Open

Contrary to popular believes the worlds magnetic fields DO NOT reverse when you close tabs. I beg you close ALL tabs that you do not need and that better not be a an EXTRA window that you have open?! You ask what do you need? And I say ‘See, you are ALREADY learning’. You don’t need anything! Anything? Yes, A N Y T H I N G! Well, except for that index.php file. Oh and a chrome window. But that is it! Actually, don’t close that terminal window just yet. We do need to commit our changes. Git is kinda cool. I am not going to lie.

Hmm, I see Where the Problem Lies….

You only need one line in between code blocks. If that! Close your brackets. That one is an actual code requirement by most programming languages. Indent and use comments (let’s keep it real). Remove any code you don’t need. You get the point. Stay organized, consistent and clean. Bugs appear when it’s filthy. At least that is what I assumed all my life!

KISS, KISS, KISS

Dwight Schrute KISS Quote

Keep it simple. Keep it simple. Keep it simple. You don’t open a door before you reach it, right? So why are SO concerned about how to open the door when haven’t figured out how to get there? Get there first. We will figure out the door thing once we get there. Who knows maybe it’s already open. Ask yourself, in simple child like terms, what are you trying to accomplish right now? Then simplify that statement, simplify once more and…once more. There you go, you got it. And look, aunt Sally is proud of you again.

Ask

Still stuck? Fine, you can ask your question now. Wait what?! You figured it out while you were trying to formulate your question? How about that! Well, in case you get stuck again and need help goto my home-page on this domain AvanTutor.Com and request help or post a question on AskAvan.Com. I really should get better at plugging my business…

Happy Coding!