r/badcode • • Apr 24 '21

python very efficient and scalable code

Post image
1.0k Upvotes

110 comments sorted by

View all comments

101

u/Big16th Apr 24 '21

I wish I knew how to code

21

u/devmanters Apr 24 '21 edited Apr 25 '21

Honestly, it isn't hard. Go follow a tutorial on writing some JavaScript, you need essentially no tooling and can write some happy little functions fairly quickly! It's a bit of a rabbit hole, but feel free to PM me if you have questions!

Edit: This has gotten a ton of traction!! Kudos to the guy who just said "No."

There are a lot of opinions floating around. Unless you are jumping the gun to go straight to university for programming, don't start with C. I primarily program in C++, Python, and JavaScript (specifically Nodejs).

Both JavaScript and Python are excellent for beginners. All these people with a ton of experience programming forget how unforgiving C#, Java, etc. Can be for someone totally green. I am talking about writing your first loops, hello world. Writing a script that runs infinitely and prints that your best friend is an idiot to send them a video of over social media. That is the kind of stuff that gets people to ease into it.

Regardless my offer still stands to help if you like, and I hope these goons haven't scared you off at the "choose a language to learn" step.

50

u/Tomekske Apr 24 '21 edited Apr 25 '21

No, if he wants to learn how to code he should investigate non Web languages. They're super inconsistent especially with javascript callback hell. As a starter he should focus on variables types, basic logic and some oop principles. I'd suggest C# and python. Ideally I'd suggest C but most beginners will lose interest very quickly

6

u/Naeio_Galaxy Apr 24 '21

Yeah, I like a lot JS (no hate please lol), but it's quite quirky (with its prototyped classes for instance), it's better as a second or third language. It's true that it requires no tooling, so it might be interesting for an initiation, but if you go deeper than that all its quirkiness shows up.

I'd advise Python as well, and I can't find any language that I know and that is as easy to learn as a first language. I don't know much C# btw, but I won't advise a strongly typed language as first language. I'd rather go on a weakly typed one and then learn that there are strongly typed languages and why so.

5

u/Suekru Apr 25 '21

I think C# and Java are fine as first languages. They are easier than C or C++ for sure, but still give a good grounding in programming.

I think it really depends on what the person wants to do with their skills. I'll recommend python if you want to make scripts or don't really know what you want to do with it, but if you wanted to say, make a game at some point, I'd probably say just bit the bullet and start with at least C# if not C++, because as an indie dev, making a game is difficult, so if you can't overcome learning a harder programming language, you're probably not making a game.

2

u/Naeio_Galaxy Apr 25 '21

Happy cake day btw 🎂🥳🥳🥳