DEV Community

John Hill
John Hill

Posted on

Github Conundrum/ Solving a problem in coding

So I have run into a conundrum; even though I am coding I can't get it on my GitHub so how do I prove my growth. After graduating Flatiron School @ Access Labs in New York I moved to a market where if you didn't have 3 to 4 years experience or a bachelor degree getting a job was near impossible. So I decide to pursue the degree.

The degree has already introduced me to 2 new languages in Python and Java. Due to academic integrity I can't post my code but I can start blogging on what I have learned or what I am working on when I start back up classes here in a week.

This week though I am going to talk about solving my coding problems then move on to languages next. So given a problem, whether I know the coding language or not, how do I approach it to either fix the code or write out the new code.

The first step for me is figuring out the problem to find a starting point. If there is code already in place I read over the code to make sure it makes since to me.

From there I will look at syntax, in Ruby make sure every method has a def and end; In Python, for instance, make sure everything is tab and spaced correctly. Also make sure that every ()/{}/[] has both opening and closing tags. Then check the spelling and punctuation.

After getting an understanding of the code in place, I will work on solving the problem. If it is something as simple as making calls to methods in the correct order or editing a piece of code to make it function correctly then that would be the first step. From there if it requires a new method I go to work on building the new method. Also test you code as you go, it helps simplify were a bug might be as you go.

Then probably the most common thing when it comes to writing code is the point where you eventually get stuck. From there go to google and look at sites such as stack-overflow to figure out how to fix your problem. The easiest way for me to learn is look at multiple solutions and then write my own from the ones you find on those type of websites. If it doesn't work then go back and figure out where I went wrong in the method and continue to build on it.

While writing new code and new methods it is important you also make sure you keep with the style of the current code. If the current code is camelCase then you don't write the new method in snake_case and vise-versa.

Top comments (0)