News for hackers. Stuff that matters.
Re:Thank You, Guido by ohduran on Wednesday October 30, 2019 @11:07AM (#21398534)
I hated C++ and Matlab as an undergraduate. Hell, I hated programming as a whole - and effectively swear never to write a line of code once I was done with my BSc in Physics.

Then, at work, I was introduced to Python. It was so...obvious, for lack of a better world. It was like a language I always knew that never spoke before.

I'm now a software engineer, write Python almost all day, and looking back to the 18-year old version of myself, I would only say "if only you knew".

That, and more, is what people like Guido and those who followed his path enable people like me to do: enjoy the art of programming.

Thanks Guido, and enjoy your well-deserved retirement.

Re:Thank You, Guido by xtracto on Wednesday October 30, 2019 @04:21PM (#21402156)
Interesting. I myself come form an Software Engineering background, and started programming very young in Logo (a LISP derivate), then BASIC, C, C++, Java, Ruby and a bunch of others. I have hated programming in Python every time I have had to do it (several times through my career). It I think the only language that I have really hated ... the language itself. I've done Z80 and 8086 assembly, I've done Prolog, I've done Pascal, VB, VB.net, C#, R, Matlab, JavaScript, ActionScript and even Z (formal language) but no other language has made me swear at it haha.
Re:Thank You, Guido by tahdig on Wednesday October 30, 2019 @05:48PM (#21403169)
I think it is about the thinking process of the person, I assume you are >35, you grew up at a time that people were think about the performance more than the readability, that was the bottleneck back then.

Now that you have bigger systems and more complex requirements and cheap high performance computing, the balance is tipped.

And because python is (almost) on the opposite side of the spectrum for your thinking process, you might have a harder time wrapping your head around why it does something in a particular way.

I think this is also true for Haskell evangelists over here also, I think they started acquiring the programming mindset through advanced math(in my experience most have PhDs) etc., so haskell fits the way they solve a problem in their head the best.

For me personally it is Python, the delay between solving a problem and having it translated to python in my head is slim. You probably feel the same way about your own favourite programming language, because it is the tool that makes you most productive with the least effort.

Re:Thank You, Guido by xtracto on Wednesday October 30, 2019 @05:52PM (#21403218)
> For me personally it is Python, the delay between solving a problem and having it translated to python in my head is slim. You probably feel the same way about your own favourite programming language.

I feel that with Ruby, which I do a lot nowadays and love

WIth regards to Python, it is the things like having to write 'self' on each class method, having spaces as part of the language syntax, inconsistent Object orientation (len(string)?? instead of string.len ) and the neverending Python 2 vs 3 pain.

Re:Thank You, Guido by tahdig on Wednesday October 30, 2019 @06:06PM (#21403362)
Python and Ruby although in the same category have still different mindset. It is understandable the way you think fits Ruby more.

I tried to learn ruby and was put off by all the magic, last value calculated is magically returned, the useful but cryptic method calls.

It is shorter and more implicit, I like the explicit approach more.

to give you my perspective on the points you made:

- self: more explicit, I would prefer to write it, because there is classmethod(with cls) and staticmethod(without any) params.

- spaces vs. braces: I don't hate braces, but spaces makes it more readable, less things I see(whitespace vs. {}) the less distracted my eyes are from the the characters that do the actual work, you get used to it, I like it more to be honest.

- len(string) vs. string.length: again, no preference, I am used to both.

- py 2 vs py 3: it is not never ending, I helped move a 170K Django project from Django 1.6 to Django 2.1 and python 2.7.4 to 3.6 in a span of a year, we were mainly 3 people working on it on the side, our work was not even in the sprints, 2 senior engineers + 1 really good QA & deployment engineer, it took 1 year because the platform was business critical and we incrementally fixed stuff. At this moment whoever still runs py2 either has been lazy, does not care about technical debt or their business does not value solving technical debt, so they can not allocate time to do it. This is my opinion, might be wrong, maybe there are other reasons also. But the change had to be done for the health and longterm viability of the language.

Re:Thank You, Guido by shrimp_emoji on Wednesday October 30, 2019 @07:02PM (#21403915)
>spaces vs. braces: I don't hate braces, but spaces makes it more readable

Really?? This is my least favorite thing about Python. D: It can't possibly be more readable when you're talking about large code blocks. It just happens that we're never supposed to be talking about large code blocks in Python. "If you want to write a lot of code, you use another language," they say -- probably one with braces, which syntax highlighters can match-highlight on. In Python, you just hope the indentation is far enough to make it obvious where something ends and another thing begins.

Re:Thank You, Guido by lionelw on Thursday October 31, 2019 @10:15AM (#21409026)
If large indentations bother you, good. Braces or not, large indentations and large code blocks should make you start wondering how to refactor them.

And if Python's design seems to discourage over-indentation and oversized code blocks, brilliant.

Re:Thank You, Guido by mixmastamyk on Monday November 04, 2019 @02:37PM (#21445520)
Nope. The indentation bothered me for an hour one afternoon in the spring of 2001, then it dawned on me what a master stroke it was. Code with ~25% less redundant bullshit.

Less is definitely more here.

Re:Thank You, Guido by swat535 on Wednesday October 30, 2019 @11:41PM (#21405546)
This is really interesting to me because Ruby and Python are really close to each other, yet have completely different paradigms.

The syntax, dynamic nature (lack of privates, etc) are so similar yet one is a lot more flexible (Ruby) and another is a lot more explicit (Python).

Ruby is incredibly expressive, the language puts the full power into the authors hands and let them go wild.

There always good arguments on both side of the camp, both have mature web frameworks backed by massive communities. I don't think one is inherently better than the other, it's more a matter of style/mindsets.

I personally love coding in both, in fact today I wrote some ruby code that would run some python code and do stuff with it!

Re:Thank You, Guido by mixmastamyk on Monday November 04, 2019 @02:32PM (#21445473)
Developer fashion is moving towards more restrictive, explicit, static languages that reduce bugs. The traditional drawbacks and ceremony of that approach are being mitigated through inference and better tooling.

This is likely one reason Ruby is falling out of favor while Python is hanging on and still gaining.

Re:Thank You, Guido by Myrmornis on Friday November 08, 2019 @03:17PM (#21486257)
> having to write 'self' on each class method

Um, "end"?

:)

Re:Thank You, Guido by FpUser on Wednesday October 30, 2019 @08:10PM (#21404433)
I assume you are >35, you grew up at a time that people were think about the performance more than the readability, that was the bottleneck back then.

From the old fart: conflating performance conscious code with the lack of readability is plain wrong.

Re:Thank You, Guido by pfeller on Thursday October 31, 2019 @02:56AM (#21406294)
When you see performance factors beyond 1000 on some algorithms between python/ruby and C/C++ and you see python being deployed everywhere, no wonder where all the earth's energy is going. At least these are promoted by silicon vendors.

Edit: I cannot blame too much though, its generating comfortable revenue for me as a consultant. Still, having to deploy nginx/haproxy to load balance python servers for only 200 requests per second each makes me pray for our planet, but it grants me the money the customer saved on developers ;-)

Re:Thank You, Guido by FpUser on Thursday October 31, 2019 @07:43PM (#21414964)
I do some consulting as well. Same thing, total python on back-end servers. All young programmers, some calling themselves pythonistas. Many actively support green movement to the point of wearing "green" labeled clothes. I loved their reaction when I showed them a table outlining energy consumption of python vs C (75 times difference).
Re:Thank You, Guido by mixmastamyk on Monday November 04, 2019 @02:49PM (#21445675)
Most services are IO bound, not CPU bound. For the later, there is Cython and C, as you mention.
Re:Thank You, Guido by Skunkleton on Wednesday October 30, 2019 @05:00PM (#21402660)
I'm not sure how you can be annoyed by Python, but not by VB.
Re:Thank You, Guido by xtracto on Wednesday October 30, 2019 @05:53PM (#21403228)
> I'm not sure how you can be annoyed by Python, but not by VB.

I think it might be that back when I worked with it I was young and did not know better. Nowadays I assume that if someone put me to do something in VB6 it will be super painful.

Re:Thank You, Guido by aerovistae on Wednesday October 30, 2019 @12:22PM (#21399393)
> It was like a language I always knew that I never spoke before.

God that's well put

Re:Thank You, Guido by wil421 on Wednesday October 30, 2019 @02:02PM (#21400601)
Agreed. Learning Python for side projects and hobby stuff. The zen is real. It’s making me dislike writing JavaScript at my day job.
Re:Thank You, Guido by shrimp_emoji on Wednesday October 30, 2019 @06:58PM (#21403869)
Have you tried Ruby? It's the most "what you describe" language I've used.

I don't use it because Python's more popular and I'm a slave to fashion and critical mass, but it's so much more easy and expressive than even Python's syntax.

    for i in 0..5
I can't believe Python didn't adopt that syntax, which comes from Bash... I surmise it didn't because Python is actually something of the philosophical opposite of Ruby. In Python, there is one way to do things. You use the range() call, so we only use the range() call. In Ruby, the same thing can be done in many different ways. More expressive although a little wild.
Re:Thank You, Guido by hexane360 on Wednesday October 30, 2019 @10:12PM (#21405058)
There's plenty of ways to do most things in Python. That's one of its strengths as much as anything, despite what the Zen says.

Also, I hate how discussions like this seem to always turn towards small syntactic differences rather than actual differences in functionality.

Re:Thank You, Guido by mixmastamyk on Monday November 04, 2019 @02:52PM (#21445714)
What do you do when you need to change the step? Unique syntax can fall down where a generic function call would handle it.
Re:Thank You, Guido by b0rsuk on Wednesday October 30, 2019 @01:57PM (#21400544)
On the upside, it gave you motivation to double down on Python to make up for the lost time.
Re:Thank You, Guido by marcosdumay on Wednesday October 30, 2019 @12:46PM (#21399723)
> obvious

Yes, coming from Perl that was a huge hit.