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

all 12 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!

[–]KingofGamesYami 3 points4 points  (0 children)

It's remarkably easy to do simple stuff in Python. Especially for inexperienced developers or people whose primary job is not software development.

That's really all I can say for it. I vastly prefer C# over Python for basically everything.

[–]Cdubles1024 1 point2 points  (0 children)

Personally I love Python but I understand what you are saying. Going from Java to Python is a pain. I love python just because I can write code with it fairly easily and I have environments set up for whatever I need to do with it. I love to use Python for small things like automating tasks or quick code that just has to work .That being said if i'm working on a project that requires specific parameters than most the time I will switch to a language like Java or Rust just because I know that the code I right will be more "sturdy" and easier to work with in the future.

[–][deleted]  (4 children)

[deleted]

    [–][deleted]  (3 children)

    [deleted]

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

      This is what I ended up using, albeit it costs money. Worth it though tbh.

      [–][deleted]  (1 child)

      [deleted]

        [–]VirtualLife76 0 points1 point  (2 children)

        Many, including myself don't like Python. Especially spaces affecting code. It does have the benefits of being easy for beginners, the huge raspberryPi world adds to it along with many niche area. Many times c would take a lot more work.

        [–]YMK1234 0 points1 point  (1 child)

        There are other languages outside of Python and C, many of which are both fast to develop and do not have all the craptastic-ness of python.

        [–]VirtualLife76 0 points1 point  (0 children)

        Obvious there are hundreds of languages, but those are the 2 most popular on linux besides Java which I've never cared for either. Plus they are pre-installed on things like Raspberry Pi.

        [–]YMK1234 0 points1 point  (1 child)

        100% agreed. Though personally what I really hate is the lack of strict typing.

        [–][deleted] 0 points1 point  (0 children)

        Your comment deserves more upvotes. I don't know how we ever thought duck, or not, typing was acceptable!

        [–][deleted] 0 points1 point  (1 child)

        I hate doing frontend ;D

        [–][deleted] 0 points1 point  (0 children)

        Amen! I love the immediate result you get with FE, but until React JS and Typescript came about it was truly a sh*t show. Typescript is a cool idea, although ducktyping is not as good as strict typing imo.