Hacker News new | ask | show | jobs
by 3amOpsGuy 4927 days ago
Good question.

I found others i had to share code with weren't as interested as me about writing maintainable perl code - i got really fed up with a patch work of "write only" perl scripts performing useful functions in prod. From DB maintenance tasks to general housekeeping, to work-arounds for prod app issues that never got prioritised for strategic fixes.

I found in practice python code produced by most others was easier maintained: it seemed to more or less force people to write more readable and therefore, maintainable code.

I also viewed the fact that Python was one of the premier languages across so many problem domains (Systems, DB, GUI, Web, Large data, GPU, etc.) as being a sure fire payoff for any time invested in it.

In environments this size it's not any one persons actions dictate what becomes the status quo: different groups will have different agendas and therefore priorities and views. I guess i was lucky that everyone else was either willing to give Python a go, or was easily convinced.

FWIW over the past few years it's proven to be a good choice for us. There are still O'Reilly books float about, esp between the newcomers but there's no zealous "where's my camel book!" shouts anymore.

2 comments

I am somehow surprised that people consider merely forcing indentation on bad programmers makes them good programmers.
I think you're confused about what problem indentation solves.
* ... it seemed to more or less force people to write more readable and therefore, maintainable code.*

What do you mean by "readable" and how does Python seem to enforce that?

So one of perl's nicest features is it just plain, flat gets out of your way. If you want to write something some way, go ahead, perl will allow you.

This is great - you can cook something up in 5 lines that would take 15+ in Python and 50+ in C++. It also means that it's really tempting for some to abuse this ability, even for code which will be long lived.

I'm not sure I understand how that answers my question. Are you suggesting that Python doesn't get out of your way and that somehow its intransigence provides the benefit of somehow forcing people to write more readable code?

I don't believe Python is that inflexible (it's not), and I don't see how the limited and superficial ways in which Python pushes all code to look the same are really that meaningful.