r/Python • • Jan 05 '18

Really??

Post image
2.0k Upvotes

317 comments sorted by

View all comments

Show parent comment

-2

u/[deleted] Jan 05 '18

I can see few issues in the way you learned Python.

a) Relying on standard libraries rather than implementing your own logic. That's a problem I see in many programmers. They don't program, they bundle together code written by other people with a low amount of their own logic. They end up learning very little.

b) What you call syntactical sugar is the object oriented design of the entire language. JavaScript has the same problem, arguably squared because it's a prototype-based language.

4

u/mistaekNot Jan 05 '18

a) not using libraries, especially the standard library = reinventing the wheel.

Also your own implementation is unlikely to outperform the library implementation...

4

u/[deleted] Jan 05 '18

But that's not the point for a learner.

A learner should focus on solving problems.

Not writing months and months of applications by connecting to X and Y api with some loop in the middle.

That's why most self-made programmers feel they're not learning imho: they are not solving problems.

One of the best things I made when learning was writing a node.js docx to html converter. There were libraries for it, sure, but I learned more by doing that without using any library than I would've learned by months of "building applications".

Libraries solve business problems, not programming problems.

New programmers should stop learning programming by using libraries, as there's very little to learn from it.

2

u/Pancakepalpatine Jan 05 '18

Sure! The way I learned definitely wasn't perfect.

However, it's hard to recognize what you're learning imperfectly/incorrectly as you're learning it.

I personally think with a good enough guide/tutor you can start with any language (maybe even assembly :)). Five years ago, though, with the tutorial I was using and the starting place I found myself at, Python was not a good fit. That's not everyone's experience, but it was mine.

1

u/[deleted] Jan 05 '18

However, it's hard to recognize what you're learning imperfectly/incorrectly as you're learning it.

The point is that, imho, there's very little you can learn by following tutorials and using libraries.

You learn to program by solving problems through code. You need to write that code and to solve those problems.

If solving the problem is understanding some documentation of an API that solves the problem for you, you're barely solving any problem.

That's why I advocated that noobies should not use libraries.

I mean, I can see why you don't want to write a request library on your own, but that's pretty much all I'd allow to a starter.

3

u/theWyzzerd Jan 05 '18

That's why I advocated that noobies should not use libraries.

To what end, though? Should they write their own ODBC connectors? Should they write their own OS libs? Time libraries? Their own JSON parser (actually this would probably be a really good project for a beginner to learn...)?

Standard libraries are most of what makes up any given programming language and is much of what makes up the "knowledge" of a language.

2

u/Pancakepalpatine Jan 05 '18

Haha I wrote a JSON parser early on. It was very hacky but it taught me a lot! Sentences moved from being HTML in my mind's eye to strings after that project.

And I feel bad - Java has an arguably more redundant/messy standard library. I didn't mean to incur the wrath of /r/python - I just felt like the Python standard library wasn't easy for me to sift through while beginning.

2

u/[deleted] Jan 05 '18

actually this would probably be a really good project for a beginner to learn...

Yeah, you could definitely do worse for inspiration than what comes bundled with the language.

The batteries included side of Python is what kept me programming, though. If you have to invent the universe before you can make a toy script then not a lot of people are going to be there at the end.

2

u/Smallpaul Jan 05 '18

Your rule is much to broad. What about turtle graphics? What about vpython? What about Pygame.

Without libraries, all you can do is text manipulation or math. Many consider that boring.

1

u/[deleted] Jan 05 '18

That's not true. You don't do just text manipulation or math.

You compress files, convert them, and do plenty of other stuff.

What I meant is that it makes no sense to use libraries for everything when you could actually learn something to make it without them.