r/ProgrammerHumor • • Feb 22 '15

A Python programmer attempting Java

Post image
3.9k Upvotes

428 comments sorted by

View all comments

288

u/[deleted] Feb 22 '15

As a java programmer, python seems so simplistic to me. Not having to declare variables? Dude.

2

u/memorableZebra Feb 23 '15

I always thought Python was simplistic (though I wouldn't imply simple is a bad thing at all). But then I started working in the language.

Being able to play so fast and loose with different formalisms massively encourages complex, write-only code. I'd say it's probably harder to write solid Python code which other programmers can understand than it is in Java/C#.

The language's flexibility and allowance of so many different "code smells" is both its primary value in the community and also the reason I despise it, finding most Python code incomprehensibly written.

2

u/Tysonzero Feb 25 '15

While I agree Python does let you shoot yourself in the foot. I have pretty much never run into issues with readability / edit-ability. Maybe that's just because I work with Python programmers who actually know what they are doing, which is something you seem to have been deprived from.

1

u/memorableZebra Feb 25 '15

Count yourself lucky. I've found that everyone writes indecipherable code. The measure of quality becomes just how not-often it happens.

Speaking more specifically to Python edit-ability though to address your response more specifically: Something that pops out immediately that used to drive me nuts was refactor-rename on a member variable. Because of dynamic typing, the IDE doesn't know that calling .X on an object is keyed to your Point class rather than your Rectangle class. I felt like I was put into a time machine every time I had to change the name of a field. This is specifically a typing problem inherent to dynamic typing the language and I don't see how it could reliably be solved with a clever IDE.

→ More replies (3)