Hacker Newsnew | past | comments | ask | show | jobs | submit | ashishb's commentslogin

Python is amazing for scripting.

Python is terrible for writing big systems.

Projects whose V1 is written in Go/Rust/C++ don't normally go out and re-write V2 in Python.

The reverse is really common.

Even many famous Python packages are now Python wrappers.

https://ashishb.net/programming/python-in-production/


> Projects whose V1 is written in Go/Rust/C++ don't normally go out and re-write V2 in Python.

That's because you would usually rewrite your Python program in something like C++ if you realise that it's too slow and you need the speed of a compiled language, despite the enormous extra complexity to create and maintain it that way.

You wouldn't go back the other way because it's very rare to go to all that extra effort writing in a more efficient language only to realise that the slower performance of Python would've been adequate after all. And, thanks to sunk cost fallacy, even someone that does realise it is unlikely to make the switch back.

There's no way you could convince me that writing your program in C++ is easier to code in, even for a very large system, than Python. C# maybe.

> Even many famous Python packages are now Python wrappers.

Of course! That's precisely because Python is much simpler to code in. If your Python libraries are wrappers around native code then you get the speed benefit without having to drop into those languages. (Plus they can release the GIL, allowing true multithreaded Python.)

If native coding languages were good enough then there would be no need for Python wrappers - you'd just call into the native library directly.


I dont know if the reasoning for a rewrite is purely for maintainability though. Ive used python at scale and its fine if you have reasonably good code hygiene. The reason I'd want to rewrite in any of those languages is they're significantly faster _and_ are maintainable at scale.

> Ive used python at scale and its fine if you have reasonably good code hygiene.

True but that's the problem. Once you have a big enough team, it becomes an uphill battle to maintain that.


Exactly. A lot of people forget that Python is just shell scripting++, taken way too far.

Python is faster to write so obviously you'll see things built in Python first more often than the reverse. What's that quote -- "Better to remain silent and be thought a fool..."

Indeed. Python is faster to write and harder to maintain over the long run.

The "faster to write" advantage becomes less relevant if most code is going to be auto-generated.

The "harder to maintain" might still remain more relevant.


Software engineers drastically underestimates GUI - Web layouts, mobile app layouts, and even PDF layouts are non-trivial pieces of work to get right in all circumstances.

Nobody who has actually worked on those things think that. You might want to qualify if you're only talking about people who have never worked in this area.

In my experience it's the NON software engineers who tend to underestimate the complexity


I didn't qualify.

And the reason was that majority of backend engineers have never worked on frontend.

At almost all big companies, the team working on the frontend problem is relatively small +and that's how it should be).

> In my experience it's the NON software engineers who tend to underestimate the complexity

Yeah. That too as well.


Yep, they (can) rarely enter your domain... so it's easy to assume its going to be trivial (maybe because things like .md or .txt files are trivial, so it's easy to think there's not much of a delta)

Always run third party code inside a sandbox

> At least 80% of what you’re describing would be satisfied by trains and buses. It’s wild that Americans are so obsessed with self-driving cars while ignoring public transit that solves most of the problems. It’s reliable, more efficient, better for the environment, and less stressful for you.

So, let's say you take public transport from SF to Yosemite/Los Angeles. Now, how do I cover the last mile (or even multiple points)? Take more public transport? Hitchhike?

The reason long-distance public transport works well in Europe is that there is good local public transport in both the source and the destination cities. When that does not exist, you are better off driving.


This has nothing to do with Apple/Firebase notification service.

It has to do with the fact that any notification displayed on your device goes via a separate system service which was caching them.

It is amusing to see how often people confuse device notifications with Apple notification service.


WordPress was great because of the plugins.

WordPress is now a dangerous ecosystem because of the plugins and their current security model.

I moved to Hugo and encourage others to do so - https://ashishb.net/tech/wordpress-to-hugo/


I wrote a Docker-based sandbox [1] for myself last year to control the blast radius of such malicious packages.

https://github.com/ashishb/amazing-sandbox


Very useful, thanks


^ Vibe-coded slop spam ^


What makes you think that? Your can see the commit history <10% of code is written by agents.

Rest was all written by me.

Unlike other criticisms of the project, this one feels personal as it is objectively incorrect.


Oops, sorry. Only had a look at recent commits.


Run npm/pnpm/bun/uv inside a sandbox.

There is no reason to let random packages have full access to your machine


Sandboxing by to default world be really nice. One of the things I really appreciate about Claude Code is its permissions model


Rather than being hopeful why not start running 'uv' inside sandbox?

Why does your python package (cli/Web server/library) need full access to your full disk at the time of execution?


You're doing all of your software development inside containers, all the time?

That is very inconvenient.


> That is very inconvenient.

All executions (especially of random third-party code) inside the containers are not inconvenient at all for me.

Infact, I even open-sourced my setup - https://github.com/ashishb/amazing-sandbox


I'd argue it's not only not inconvenient, but also a great way of keeping your system clean of all the random system-wide dependencies you'll end up accumulating over the years.


Devcontainers are looking pretty gold right now…


Why? Just open your entire editor/whatever inside a limited namespace and that's it no?


> Why? Just open your entire editor/whatever inside a limited namespace and that's it no?

How will that prevent `npm run dev` or `uv run python` from accessing files outside your current directory?


Do you know what linux namespaces are?


I do. It wasn't obvious that that's what you were referring to. If you use it regularly then that's great.


I wrote this[1] for myself last year. It only gives access to the current directory (and a few others - see README). So, it drastically reduces the attack surface of running third-party Python/Go/Rust/Haskell/JS code on your machine.

1 - https://github.com/ashishb/amazing-sandbox


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: