Give up being a programmer


#1

I have been trying to become a programmer for many years now. I have completed several courses and learning paths on popular learning sites like teamtreehouse, codeschool, lynda etc. I know the syntax of several languages like swift, javascript, php etc. And I know the concept of programming like variables, loops, conditionals, functions etc. even oop-principles like classes, methods, initialising etc.

But even though I know the concepts and syntax I still can’t get my head around really simple assignments like the ones found here at freecodecamp. One example is a task found in an old book on php. On chapter 3 after learning about basics, variables and loops there is a task to echo these numbers:
1
12
123
1234
12345
I struggle with a simple newbie task like this.

What am I missing? What do I need to learn?

Should I pick up some old third grade math books? Should I hire a tutor? Or should I just give up and admit that programming isn’t for everyone?


#2

Hey there,

We all struggle with small and newbie problems from time to time and that’s not a reason to give up or think that programming isn’t for everyone. It also doesn’t matter how many courses you have taken or if you know the syntax of several languages or how well you know the concepts.

What mostly matters is what do you do with those concepts and knowledge. You have to learn the art of breaking problems into smaller chunks and breaking those smaller chunks into even smaller chunks and from there on work up, find solutions to your smaller problems and keep adding them to complete an assignment or solve a programming challenge.

You have to learn how to think like a programmer.

  1. Break down the problem into smaller problems
  2. Find solutions to your smaller problems
  3. Assemble the solutions in a coherent manner
  4. Refactor and improve

One of my favorite things about FCC algorithm challenges is that every time I solve one then I go to the FCC forums, find that challenge and see other campers code and it’s so amazing to see that everyone has a completely different solution for the same problem, there are some similarities but the overall solutions are all different. That’s just so beautiful because it’s the same languages (JS) and the same requirements (TESTS) but you’ll see dozens and dozens of different solutions from campers and that shows their thinking pattern how they went about solving an issue.

Read this => https://medium.freecodecamp.org/how-to-think-like-a-programmer-3ae955d414cd


#3

That is some awesome advice. I never thought about looking how others do it, but am glad i read you post. thank you very much. I feel like am heading the right direction and that is awesome. Am about to start algorithms.Thank you again


#4

I think I know what you mean. What you were doing is learning how to make apps.
I think what you need to do now is practice. Practice makes perfect. The newbie task that you said I’ve done hundreds of times and now I’m aiming for thousands.
So my advice is: learn about algorithms & data structures and practice practice practice problem solving.


#5

How do you practice? do you go on sites like code wars ? or hackerrank ?.


#6

Yes.
And if you don’t want to be just a programmer but you want to be a GREAT programmer, please check this out:


It is one of my favorite github repo’s.

The only time when you cannot become a programmer is when you give up on learning and practicing.


#7

I like the advice that you were given to break the problem into smaller steps and I thought I might be able to add a little to the idea myself.

Sometimes you’re not necessarily looking for “smaller” steps, but more like “things you can do that are a bit like the thing that you need to do”.

Using the example you give, you might ask yourself, for example:

  • how would I make it print out “1” five times?
  • how do I make a “1” into a “12” into a “123” etc…

In my opinion you need to pick one language and stick with it until you can solve any of these “algorithm” kind of problems with it. If you do that, you will find that learning new languages is much easier, afterwards.

As for whether programming is “for everyone”, clearly it isn’t. It’s for people who enjoy solving problems like that one :slight_smile: Only you know the answer.


#8

I would suggest learning algorithms. There are some free courses on Coursera and Udacity specifically on algorithms, and of course there are books and online resources.


#9

Algorithmic thinking is like a muscle - the more you use it, the stronger it gets. Some people are more naturally predisposed to muscles and some aren’t. But for everyone that works at it, the muscles will get stronger.


#10

Thinking like a computer is hard. It doesn’t come naturally - at least, not to most people. The key thing is to really understand the problem before you try to solve it in code.

This specific problem is testing what you know about data types. Is this a group of numbers? In that case, you can try to solve the problem using basic maths operators. Or is this a group of strings? What is the difference between addition and concatenation? How do you convert numbers to strings, or strings to numbers?

Really understanding the primitive data types and how to work with them will help you a lot with challenges like this.


#11

No. I actually just try to solve my own problems and ideas. Maybe I am practicing wrong :slight_smile:
I’ll check those sites out. Thanks.


#12

Thanks for all the replies. I will check out algorithms and data structures.
I feel motivated again :smile:


#13

The beauty of getting into coding nowadays is that not necessarily you have to be a Computer Science guru going nuts for algorithms and memory allocation…
You can just get comfortable with the usual “basics” HTML CSS JS, perhaps explore some libraries/frameworks like bootstrap, foundation or even React and Vue…nevertheless get some creative skills with some Design concepts using Adobe packages or similar.
Algorithms are great for training how to approach problems, but they are not the only keyword in the coding environment.