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

68

u/PC__LOAD__LETTER Feb 08 '19

So’s Ruby. So’s JS.

The advice should be “just pick a language.” Not “pick Python”.

26

u/[deleted] Feb 09 '19

JS is not for beginners. It's messy, behaves weird, and is hard to write clean code. An experienced programmer can deal with these things, but a beginner will just end up developing bad habits that will be hard to unlearn.

9

u/Yithar Feb 09 '19

JS is not for beginners. It's messy, behaves weird, and is hard to write clean code. An experienced programmer can deal with these things, but a beginner will just end up developing bad habits that will be hard to unlearn.

Honestly, it's hard to argue with what you say.

TFW my co-worker graduated from a coding bootcamp that only taught Javascript and it's hard to teach her good habits. We use Typescript at work for our frontend, but she still has a lot of bad habits (using any a lot, forEach instead of map/filter/reduce, etc.).

0

u/[deleted] Feb 09 '19

[deleted]

→ More replies (9)
→ More replies (1)

3

u/gyroda Feb 09 '19

I don't disagree, the only reason I might recommend it is because web development let's you get graphical things done quickly and everyone knows what a website is, so it can be more exciting than "look, I made a text thing".

Great for getting kids interested in the field, but I agree that JS is awful and that in a structured course it should come later.

54

u/[deleted] Feb 08 '19

Just pick a language

Loving me some paradox of choice. And thats if beginners can't even make an educated decision such as "my language should be OOP".

15

u/PC__LOAD__LETTER Feb 09 '19

Anyone can google “top 5 programming languages for beginners” and just pick one.

The important piece of information is that language doesn’t really matter for learning. Not “Learn Python”.

9

u/Pressingissues Feb 09 '19

Some people want to be told what to do, daddy

2

u/PC__LOAD__LETTER Feb 09 '19

That’s much more enthusiasm than I’m equipped to deal with here.

2

u/Pressingissues Feb 09 '19

What does your username even mean?

2

u/[deleted] Feb 09 '19

What the fuck does that mean?

18

u/At-LowDeSu Feb 09 '19

the point is that they were already planning on picking a language. So saying to 'pick a language' doesn't really help.

I think they should learn HTML/CSS/Javascript, but his point wasn't to 'learn python'. It was to learn a language.

2

u/Guy_Fyeti Feb 09 '19

Exactly. I spent a lot of time dithering about which one I should learn. It doesn’t matter and it’s easiest to have the choice taken away.

→ More replies (1)

13

u/[deleted] Feb 09 '19

Javascript? Easy to learn???

No. Hard no.

→ More replies (6)

34

u/antiproton Feb 08 '19

The advice should be “just pick a language.” Not “pick Python”.

No. The advice is good. Because "Just pick a language" doesn't resolve the question of "which language is best". Beginners need to learn how to code. The best language is the language that teaches you how to think like a coder.

Ruby doesn't have nearly the resources that Python does and Javascript is an "easy learn difficult to master" situation.

Only people who already know how to code suggest absolute beginners learn things like Ruby or JS.

→ More replies (5)

17

u/FanOrWhatever Feb 09 '19

Pretty sure this is the kind of thing the OP is talking about.

5

u/[deleted] Feb 09 '19

no, having a specific suggestion gets past the problem, which is indecision

→ More replies (1)

4

u/Moikle Feb 09 '19

JavaScript is no way as easy to learn as python. I think you misunderstand WHY python is so easy to learn for someone who has never programmed before

6

u/mehum Feb 09 '19

If you know what you want to learn then generic advice is obviously useless, e.g. embedded => C, web => JS. If you just want to learn programming, Python is the most logical place to start. General purpose, most popular, lots of learning resources.

9

u/PC__LOAD__LETTER Feb 09 '19

JavaScript is the most popular, source. And plus, OPs entire point was that language doesn’t matter, not that Python is superior. That’s exactly the type of discussion he was arguing against.

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]

→ More replies (1)

2

u/KwyjiboTheGringo Feb 09 '19

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

→ More replies (3)
→ More replies (11)
→ More replies (16)

2

u/Ran4 Feb 09 '19

Both ruby and js is much more inconsistent and contains more weirdity.

→ More replies (1)
→ More replies (6)