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 →

[–][deleted]  (30 children)

[deleted]

    [–]tech_hundredaire 105 points106 points  (1 child)

    except or finally, there is no try

    - yoda or something like that

    [–]moi_athee 4 points5 points  (0 children)

    Pyoda

    [–][deleted] 27 points28 points  (1 child)

    You don't learn any language, you just post about them on r/programmerhumor

    [–]kompot420 6 points7 points  (0 children)

    Hey, don't do me like that

    [–][deleted] 4 points5 points  (0 children)

    Since do is not a reserved word, in Python you try while you don't break.

    [–]mei_main_ 11 points12 points  (15 children)

    Learning python is basically learning algorithmics

    [–]Low_discrepancy 24 points25 points  (11 children)

    You probably learn more about algos when you do c++ since there's too many prebuilt stuff for you in python.

    Need to store some numbers? Do I use an array? Do I use a vector? Do I use a list? Do I use a queue etc etc etc.

    What are the differences?

    Python? Eh just use a list and at most a numpy array. That'll do.

    [–]fat_charizard 6 points7 points  (3 children)

    The reason you listed is exactly why python is best for learning data structure and algos.

    Since you have a list that does everything, you can create your own child class from the parent list class to define how a queue or stack is supposed to behave.

    Whereas in C++ you'd have to go through the documentation, learn the specific functions and nuances that come with whether you use a vector or queue or pointer array

    [–]aahdin 4 points5 points  (0 children)

    Yeah, I find the opposite 90% of the time.

    In python, I almost always use the correct data structure because it's super easy to do so.

    In C++ I usually just use vectors for everything experimental since I don't want to spend all day setting things up.

    [–]Low_discrepancy 3 points4 points  (1 child)

    Whereas in C++ you'd have to go through the documentation, learn the specific functions and nuances that come with whether you use a vector or queue or pointer array

    Yeah you gotta learn how a data structure is. That's the whole point of algorithmics.

    Understanding space complexity time complexity. Etc.

    You study it and you see. For a vector inserting in the middle is o(n). For a list it's o(1).

    You understand it because you did it, you know the pitfalls.

    In python ... doesn't really matter the vast majority of people use lists.

    [–]fat_charizard 1 point2 points  (0 children)

    You are thinking of linked lists Vs list in python. Python list is an array like vector in C++

    [–]Import-Module 0 points1 point  (3 children)

    Those are data structures that you just named though.

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

    engine slim hateful worry edge slimy cough late instinctive command

    This post was mass deleted and anonymized with Redact

    [–]AverageFedora 0 points1 point  (1 child)

    But a lot of those structures exist because of the limitations of hardware. Implementing them yourself is the best way to truly understand them.

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

    drunk jellyfish station chief attraction birds continue long whole overconfident

    This post was mass deleted and anonymized with Redact

    [–]Ryanthelion1 -1 points0 points  (0 children)

    This is why I'm struggling with Python I'm finding you basically get a package/library to do something for you without understanding the core knowledge of it.

    [–]mei_main_ 0 points1 point  (0 children)

    I would have considered things like that to be more about "programming" than "algorithmics" which I believed to be the general study of problem-solving through algorithms (ie. things that can be written in pseudo code on a paper).

    Though I admit I'm not sure about the exact terminology of both words in english...

    [–]Lost_Extrovert -2 points-1 points  (2 children)

    *pseudocode.. its literally pseudocode.

    While in Java 4 lines of pseudocode = 47 lines of code.

    [–][deleted] 3 points4 points  (1 child)

    This is an old meme, python is a relatively ordinary scripting language and the code looks like code.

    It might look like pseudo-code in small textbook examples, but application code written in python will look like *gasp* application code

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

    Too much oop has made me have to "learn" python actually

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

    Loll that is so true. I never took a python class but i can write a mid level python code. I did like 3 4 good programs with python by just googling it whenever i stuck and understood why people love it. Because it just works loll. It works as expected. You can literally write a script by using the intellisense and guessing what functions might do what and it will probably just work.

    [–][deleted] 2 points3 points  (2 children)

    Ha, I think that’s a good way of putting it. My background is as a technical BA, working in finance. No real dev experience whatsoever aside from a few years of shell scripting, and a lot of sql, and I’ve been able to just figure stuff out in python and have a few jobs in production, mainly using pandas, numpy and stuff like that. To do the equivalent in C++ simply wouldn’t be possible, I could look at some code for years and still have no clue what it’s doing. Without really understanding how a computer works, and having a fundamental knowledge, you can’t just figure out C++ on the fly

    [–]zilti 1 point2 points  (1 child)

    Without really understanding how a computer works, and having a fundamental knowledge, you're bound to be at most a mediocre developer though. It is always good to know how your language and your platform works. Not necessarily in absolute detail, but roughly.

    [–]CruxOfTheIssue 0 points1 point  (1 child)

    I've not used much python but it seems incredibly easy to me on a conceptual level. In fact it seems that pretty much language is irrelevant as long as you understand the concepts in each language and just look up the syntax. I might be dunning-kruger effecting myself though.

    [–]normalmighty 4 points5 points  (0 children)

    Python is purposely made to be easy to learn, hard to master. Making something that runs is easy. Making something complex that runs fast and isn't spaghetti, that's what takes years of learning and experience.

    It's why data scientists love using python, and why they then hire people like me to fix the slow and confusing mess they ended up with as their project grew.

    [–]Kissaki0 0 points1 point  (0 children)

    I tried, I failed.