Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

501–510 of 718 posts

Re: I'm switching to Python and actually liking it

#501

>> I prefer to use a monorepo structure There is nothing more annoying than tons of little repos all of which containing tiny projects with a few hundred lines of code but (of course) you need most / all of them to do anything. Use a mono repo until there is some obvious reason to split it up imo.

in my experience, repo by "area" works the best. This usually means by team, but you don't want a team restructure to cause code relocation issues. And, yes, only when the org pressures push for it. On the flip side, we have an org with 50+ teams and our operations team is pinning for a monorepo. They are just fine with one team's push forcing N teams to have an unexpected deploy and recycling of caches, connections,…

Why do they want a mono repo though? What are the problems with the current situation.

Re: I'm switching to Python and actually liking it

#502

Earlier quoted context omitted.

you could say the same thing about a dozen other languages, but there is definitely a stereotypical cranky java dev that is frustrated writing corporate crud apps that should in theory be blazingly fast, but never quite are for reasons. They revel in the verbosity, and look down on anyone they feel is taking the easy path. If you've never met one you're lucky, but they've been at every company I ever worked for.

> you could say the same thing about a dozen other languages No, you could not. You could say it about maybe four others: PHP, C, C++, and C#. No other languages have anywhere near the userbase size while being fairly quiet when it comes to online tech discussion. I agree there are crusty old Java devs (as well as crusty old C, C++, PHP, etc. devs). In a decade or two, there will be crusty old TypeScript devs. It's j…

I think I made a conscious effort in my 30s not to become a crusty old Python dev. But I predict that in another decade or two, I (now in my 40s) will be a crusty old Rust dev.

Re: I'm switching to Python and actually liking it

#503

Earlier quoted context omitted.

> Millions of people put it into Docker, or they just deal with it and you see the results with tons of Stackoverflow questions Arrogantly wrong. I've coded in Python for almost 20 years. Many of those years I've had it as my primary language at work. 2024 was the first year I actually needed a virtualenv. Before that, I'd happily use pip to install whatever I want, and never had a version conflict that caused proble…

I was talking about pip, not venv. I don't use venv either, not because I think it's a bad idea but because I can't be bothered. Stuff does end up conflicting unless I use Docker (lol) or uv.

Well that explains why you think pip is broken

Re: I'm switching to Python and actually liking it

#504
> I prefer to use a monorepo structure

Worked at a company where that approach lead to huge unwieldy structure that no one dared to touch to not break anything other teams are working on. The problem was not so much the repo, but dependencies structure (like single requirements.txt for the whole repo) and build scripts.

In theory it should've worked great -- you only need to update a dependency once and be sure all the code has the most recent security patches. In reality everyone was afraid to touch it, because it will break someone's else code. Monorepos work great only if you have serious NIH syndrome (Google).

I actually started appreciating damned micro-services there, as long as each service just reflects organization team structure.

https://en.wikipedia.org/wiki/Conway's_law

Re: I'm switching to Python and actually liking it

#505

Earlier quoted context omitted.

I was talking about pip, not venv. I don't use venv either, not because I think it's a bad idea but because I can't be bothered. Stuff does end up conflicting unless I use Docker (lol) or uv.

Well that explains why you think pip is broken

Because I went to the official pip "getting started" docs and did exactly what it says? It's bad even in venv though, like not managing your requirements.txt or installing conflicting stuff. The web is full of questions about this, with answers that involve installing some other thing.

Re: I'm switching to Python and actually liking it

#507

Maybe I'm the only one that finds Python simultaneously verbose and lacking? Either you need 500 dependencies to do something in a simple way, or you need dozens (if not hundreds) of lines to do trivial things. I avoid writing Python because there's so much bullshit to add. Much prefer Perl, I can actually get things done quickly. Python feels like programming for the sake of programming.

Python is a language that the standard lib is big enough that you don't need dependencies

Re: I'm switching to Python and actually liking it

#508

Maybe I'm the only one that finds Python simultaneously verbose and lacking? Either you need 500 dependencies to do something in a simple way, or you need dozens (if not hundreds) of lines to do trivial things. I avoid writing Python because there's so much bullshit to add. Much prefer Perl, I can actually get things done quickly. Python feels like programming for the sake of programming.

> Much prefer Perl, I can actually get things done quickly Python lets you just nest data structures without having to twist your brain. You want a tuple in a list in a dictionary value: you just write it down and can access it with a unified notation. Bam. No reference madness and thinking about contexts. It's a big part of what I typically need to get things done quickly and understand how I did it 5 years later. T…

Major downside to dictionaries being so useful in python... Everyone uses dictionaries everywhere. I'm so happy for dataclasses and attr, because having to check that str keys are right without ugly ass constants is miserable.

Re: I'm switching to Python and actually liking it

#509
post #46

I'm glad someone else discovered they can like python. I got forced to learn it for a project where I was proposing Ruby and the customer insisted on Python. This was years ago when Ruby was much slower. I was annoyed but I got used to it and here I am enjoying it many years later. I take issue with the description and use of make though! :-D What is the point of it if you're not going to use dependencies? One might…

Ruby's syntax is much nicer. I just can't stand the idea of using whitespace for scope delimiting.

Re: I'm switching to Python and actually liking it

#510
post #274

Earlier quoted context omitted.

Algorithms are a lot easier to understand when they are written in Python. I'm actually right now documenting medium size Java codebase by writing pseudocode, which looks like Python. Just by doing that, I've already discovered multiple bugs, which I didn't catch by looking at the Java code.

Try Kotlin then. I wouldn't call it a new language, for me it's just a syntactic sugar over Java, but for any problem you would google "how to do X in Java", not "how to do X in Kotlin". But there you can do way simpler syntax, like: 0..100 meters with -45..45 deg within 3 seconds Because "0..100 meters ..." is equivalent to "(0..100).meters(...)" (0..100) is a built-in IntRange type, that you can extend: data class…

IMO Kotlin has some features that take it way beyond just being syntactic sugar over Java. Like, I know you could probably use some eye-watering gang-of-four pattern to achieve the same effect as extension methods. But it's going to be such a PITA to maintain that calling the Kotlin feature syntactic sugar for the same thing is about as useful as saying that function definitions are just syntactic sugar over assembly language calling conventions.
Post reply on HN