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

Show parent comments

22

u/givetonature Feb 08 '19

lol at JS. Pick a language that has classes, polymorphism, and inheritance.

57

u/PC__LOAD__LETTER Feb 08 '19

This is exactly the kind of analysis-paralysis circlejerkery that OP was warning against. It’s a fine language for learning. You can do a lot with it. End of story.

0

u/[deleted] Feb 09 '19

[deleted]

1

u/givetonature Feb 11 '19

Well said.

2

u/KwyjiboTheGringo Feb 09 '19

OP also said to learn python first, so imagine they had some reason for that.

→ More replies (3)

2

u/DrewSuitor Feb 09 '19

Yeah but you can also miss a lot of fundamentals.

6

u/ColdPorridge Feb 09 '19

You can have an incredibly successful and nuanced career using nothing but python, so I’m not sure what fundamentals you mean

14

u/DemonicMandrill Feb 09 '19

He's refering to JS, not python

3

u/DrewSuitor Feb 09 '19

Yeah but I’m talking about JavaScript

→ More replies (5)

5

u/lannisterstark Feb 09 '19

Ah yes, the elitism. I'm surprised it didn't get posted sooner.

9

u/I_am_a_regular_guy Feb 09 '19

I think its more the idea that classes, polymorphism and inheritance are fundamental programming concepts, and should ideally be a part of the first language a new programmer delves into. I don't think it has anything to do with elitism and just more to do with what language actually benefits the learner the most as their first language.

2

u/watsreddit Feb 09 '19

They are only fundamental to rigid OOP languages.

2

u/I_am_a_regular_guy Feb 09 '19

And OOP languages, like it or not, are still the most widely used.

1

u/givetonature Feb 11 '19

Exactly this. Thank you.

→ More replies (1)

1

u/givetonature Feb 11 '19

Not really about elitism. Javascript is king for a lot of things, but i don't think its a good learning language. It is a very unique language and I think it's better to learn a language that embraces the fundamentals of OOP a little more readily first. If your only goal is to get a job, javascript is probably best right now, but if its all you know, then you have a very narrow skillset and little understanding of a lot of important things.

0

u/[deleted] Feb 09 '19

[deleted]

6

u/musclecard54 Feb 09 '19

LOL you legitimately think that if someone codes in Python that they don’t uses classes?

2

u/[deleted] Feb 09 '19

Any python programmer who doesn’t know what a class is has no idea what they’re doing.

2

u/musclecard54 Feb 09 '19

That applies to any language. If you don’t know what a class is you can’t even say you k ow python

→ More replies (1)

3

u/whomwhohasquestions Feb 09 '19

Uh....

Everyone I know does

1

u/givetonature Feb 10 '19

I program professionally in python and I need classes pretty much every day. Classes and inheritance are insanely important once you start actually making applications. I would agree that a language with static typing is also important. C++ or C# for the win.