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

20

u/override_acid Feb 08 '19

What a flying mess of BS! If that's the way you teach, I pity your students.

  1. C#, Java, Ruby, JavaSript, etc are just as good as beginner languages as Python. Your "Start with Python" is just the modern age version of "Start with BASIC". - Start with the language you *want*/*need* to learn.

    If you haven't yet realized, the special structure of loops in Python makes it quite difficult to translate them to other languages. Also the quite unique way that Python handles OO doesn't really ease the transition to other languages.

  2. While what you are saying about modifying the code is not bad, but just doing the same over and over with different texts has zero effect. It is important to try other things, not just plainly repeat the same. It is important to leave the comfort zone when learning, not to stay in it.

Whoever upvoted that crap has no clue about programming, nor about learning to program.

6

u/razibog Feb 08 '19
  1. No, besides from Ruby they are really not. A beginner shouldn't bother themselves with syntax but try to describe the problem as close to his natural language as possible. After when they start to grasp critical thinking and computational thinking, they should be able to learn any language fairly fast. Granted it's not from a different paradigm, OO -> Functional.

Are you speaking from experience in teaching?

2

u/lead999x Feb 09 '19 edited Feb 09 '19

I was a non-CS major in college and my Into to CS class taught Scheme/Racket so even functional languages CAN be used to teach programming and CS. And while I had already been programming as a hobby for a while, I still took away a lot from that class since I'd never used a functional language before.

2

u/razibog Feb 09 '19

Ah yes, I wholeheartedly agree with that, what I meant was: it's easier to switch from Python to Java as from Python to Clojure. I learned a heck of a lot when I made some projects in Clojure!

1

u/lead999x Feb 12 '19

That's definitely true.