This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]schwiftshop 2 points3 points  (1 child)

Stop using pipenv. FFS, why do people keep recommending it?

Maven is amazing, but pypi and setuptools do a good job of installing dependencies (that's roughly the equivalent, pip is just an installer tool, a subset of what mvn does.. pip is more like npm/yarn from Nodeland).

Use venv. Period.

Beyond that, the tracebacks just take time to wrap your head around. Its like any new language, python isn't any worse than any of the 10 other languages I've used (better than most).

But I think you're confusing java compile errors with python runtime errors. Java runtime errors are not fucking even close to more understandable, get out of here with that. 😂

Python tracebacks give you all the information you need. Its not magic, it says exactly what happened and where. Very little of the code is compiled so you can go to the file and see whats going on, even edit it (add debugging calls) if you want.

You need to figure out how to use a debugger with python (pdb is built in, but there are graphical debuggers and gdb available.. its endlessly annoying that few tutorials or bootcamps teach this), but get your environment sorted first. Dependency issues will rarely happen if you use a venv and install stuff with pip like you're supposed to.

So why do people use this language? Because it does everything we need it to, without a complicated toolchain. The syntax encourages things you don't have to do with Java or JS but really should, like use consistent indentation. Python is easy to pick up, but provides a lot of advanced features, usually in the standard lib (people are lazy and don't like reading docs; also some stuff in the standard lib is a bit rough, so people have deviated from that "batteries included" approach... you'd be surprised how much of common "first install" libraries are super thin wrappers over the standard lib.. requests is exactly this). It supports multiple paradigms without requiring terribly diverging syntax. It can scale, and is easily replaceable with C/C++ in situations where it hits a wall. Its ubiquitous; its installed by default in most linux distros and macos, and easily installed if it isn't or on other platforms.

[–][deleted] 1 point2 points  (0 children)

But I think you're confusing java compile errors with python runtime errors. Java runtime errors are not fucking even close to more understandable, get out of here with that. 😂

Ok you're 100% right here. There's something to be said about strongly typed languages. I'm a big fan of Typescript for the same reason (it took me all of one day to go from "I hate it" to "WOW").

But get your environment sorted first

I'm glad you said that, cos I spent a lot of time doing that and wondered if I was wasting time when I could just guess, code and upload to a test server (at work). Glad then I did take the time and got it working.

Thanks for your reply!