r/learnprogramming • • Feb 08 '19

Two mistakes that trap new programmers

Most aspiring programmers get trapped and fail to move forward. As a teacher, I get to observe how some programmers keep moving forward. Here's two signs you are trapped.

Trapped coders focus on anything but coding.

Trapped programmers love to debate which language or framework is best. They spend their time figuring out what to learn and end up learning nothing at all. So let me answer all your questions.

Learn Python.

But what if I need to learn C#?
Learn C# after.

Isn't Javascript the language of the future?
Learn Javascript after.

My developer friend told me I should learn C++ because all languages are based on it.
Learn C++ after.

New programmers fear they could be wasting time learning the "wrong language". Programming is the fastest industry in history. Good developers learn new languages and frameworks on a yearly basis. Three years from now, your knowledge will be outdated. If that scares you then find a different career.

Trapped coders following directions too well.

Trapped programmers follow tutorials like mindless robots. Copying pasting code doesn’t teach you anything. Imagine starting a python tutorial that taught you how to print “hello world”.

print(“hello world”)

Most people copy/paste this and move on. If you were my student, I'd push you farther.

  1. Change the code so it prints “howdy”.

  2. Print two alerts. One that says “whats up?” and “take care”.

  3. Continue with the tutorial (usually goes to variables). After a few problems, print “hi” from mental recall.

  4. Since we probably encountered variables by now, what will the code print below? Why?

    greeting = “howdy”
    print(greeting)
    print(“greeting”)
  5. Fix the code below so it prints “hello”.

    Print(hello)

By the end of my exercises, you would have a strong idea of how print statements work. A simple line of code can create a myriad of problems. Most people brush past it only to get stuck in the future. I always recommend finding a school or mentor for guidance. If you can't do that, be proactive with your learning and keep at it.

Good luck!

1.7k Upvotes

349 comments sorted by

View all comments

7

u/dtorssegment Feb 09 '19

My first language was C, and I think that in the long run, it was better. My friends who have learned python first found it difficult to understand memory management, the type system, and pointers. They also found it difficult to write programs without all the easy data structures provided by python. I think C is very good in that it has few features compared to Python and Java. Going from C or Java to Python is nice because you get to think of programming in a higher level way. Though, I am biased because I really like systems and hardware.

I do agree that the copy and paste attitude is detrimental. It is difficult to write programs when you suddenly do not have the structure and hints provided by tutorials.

I think, however, that tutorials are not a great way to learn. It’s better to have a goal like, “I’m going to implement a parsing calculator” than “I’m going to do 8 weeks of this online lecture”.

1

u/[deleted] Feb 10 '19

I think, however, that tutorials are not a great way to learn. It’s better to have a goal like, “I’m going to implement a parsing calculator” than “I’m going to do 8 weeks of this online lecture”.

Why do you think that?

For example, I want to learn Java so I can build an app. I'm already familiar with C and I've been programming for around a year now, so I'm quite familiar with the basics of programming.

But I don't know Java. So my plan is to complete a high-quality 12 week MOOC and only then will I build an app. Of course there's much more to learn before I do that, but taking only one language, in this case Java, into account, I feel it's better to go through a tutorial before jumping into projects.

0

u/DefNotaZombie Feb 09 '19

I agree completely. Started with C++ though I honestly haven't touched it in years. Moved on to C#/Java, then python. Now I'm circling around with golang because it's such a dope language but really not a first language for a new starter.