←back to thread

205 points michidk | 5 comments | | HN request time: 0s | source
Show context
dazzawazza ◴[] No.41835253[source]
Access to competant Rust developers can be a challenge even for large companies.

I recently finished a contract at a (very large game dev) company where some tools were written in Rust. The tools were a re-write of python scripts and added no new functionality but were slightly faster in Rust.

The reality was that these tools were unmaintainable by the rest of the company. Only the author "knew" Rust and it was hard to justify a new hire Rust developer to maintain this small set of tools.

The only reason these tools were written in Rust was because the dev wanted to learn Rust (a big but common mistake). I pointed out to the Technical Director that this was a big mistake and the teams had taken on a large amount of technical debt for no reason other than the ego of the wanna-be-rust-developer. Since I "knew" Rust he wanted me to maintain it. My advice was to go back to the Python scripts and I left.

replies(21): >>41835266 #>>41835268 #>>41835305 #>>41835386 #>>41835427 #>>41835460 #>>41835522 #>>41835570 #>>41835607 #>>41835745 #>>41835838 #>>41836318 #>>41836384 #>>41836673 #>>41836742 #>>41837344 #>>41839371 #>>41840322 #>>41840444 #>>41846616 #>>41848063 #
6r17 ◴[] No.41835607[source]
I switched up from python to rust for some processing pipeline at work - rust has a lot of advantages over it specifically for typing and speed, the work itself it a little bit longer to develop. But the quality output is not even comparable, the code itself is way more readable and explicit than in python code.

There is not a lot you can do to make your python code as good in terms of reliability or clarity of intent. I'm sorry to hear that you did not have a good experience with it, but frankly speaking, I cannot look at python code anymore because of the inherent "hidden" work that it creates, variables being passed trough without much care for their exact meaning, hidden "bugs" that make the overall job way more annoying to debug.

Python is like that person that tells you everything is fine but is mostly wrong and won't even tell about that. Whereas Rust will just straight up tell you what's wrong in the draft.

I prefer the honesty and the little additional overhead work to getting lost in debugs for weeks bc some person has inputed the wrong shape for some vals or whatnot.

The peace of mind is saving me a ton on maintenance as well. (project is a 2years on with distributed python pipeline with a bunch of IA processing - switching up to rust was not the easiest thing to do considering some parts had to stay in python because of code ownership being someone's else - the stack is a rust/python stack now with some parts being left out in python depending on the actual needs of update)

I understand very well that some people do not want to code in rust, specifically because they might not have the time or the will to do so. But objectively these people do not have to define the pipeline execution except for the actual order of execution, nor do they need to maintain every part of the code because it's just not their job.

Now if you are to compare the exact benefits of rust vs python for a company, the server pricing will just speak itself and the choice will be made depending on the cost of production, the lifetime of the code, and the actual benefits.

If I was to do some API today, I'd 50000% go for rust and I DO think of python as the `no-coder coder` thing. I initially learned C, switched up to Python for jobs, and the code quality of python is just downright bad. It does not push me in the right direction AT ALL.

The fact that we used a scripting language with no typing for tools that need any kind of guarantee for years does not mean it's the best way to do it.

Also to answer the problem concerning `rust` dev's being non-existant on the market, and no job being open is really simple : even tough rust has 10 years on the developer market on this is really young and need to learn.

You need 3 years of practice to get 3 years of experience with rust. There is no way around that. And there is just not enough experienced people with this language yet to make it a shift. I'm not saying there is none, i'm saying it's not yet democratized.

replies(3): >>41835662 #>>41835981 #>>41836362 #
1. physicsguy ◴[] No.41835662[source]
> You need 3 years of practice to get 3 years of experience with rust.

This is the major barrier. It's a difficult language to learn for people who've worked with a compiled, strictly typed language with manual memory management. That barrier is much higher for people who've only ever used a dynamic, interpreted language.

I'm on-the-fence about orchestration of pipelines with Python since I've experienced a lot of the issues you're talking about, but you can just abstract the Python algorithm parts in to APIs that your pipelines call and separate out those two concerns. Then it's clear who has maintenance responsibility, it separates out the algorithms from data collection + calling, and it doesn't introduce a big barrier next time someone wants to implement something that depends on the latest and greatest algorithm written in Python, which writing in Rust inevitably does.

To me though, I don't really understand the use of Rust in non-systems programming. For a lot of the use cases people talk about, Go seems like a better fit with a lot less of the pain since it's a much simpler language. When teaching people a language I'd much rather do that with Go than Rust, and that matters in an environment where developers who know either are not really that commonly available (at least here in the UK).

replies(2): >>41835832 #>>41837514 #
2. 6r17 ◴[] No.41835832[source]
I can 100% understand your take on `go` and will probably think of it more often !
3. ttfkam ◴[] No.41837514[source]
> This is the major barrier. It's a difficult language to learn for people who've worked with a compiled, strictly typed language with manual memory management.

This was not what Google and others found when they studied it.

https://www.theregister.com/AMP/2024/03/31/rust_google_c/

> More significant, Bergstrom said, is the comparison of rewrites of C++ code into Rust.

> "In every case we've seen a decrease by more than 2x in the amount of effort required to both build the services in Rust as well as maintain and update those services written in Rust," he said.

replies(1): >>41847003 #
4. pjmlp ◴[] No.41847003[source]
Most companies don't have Google level staff, they have folks that don't even care sites like HN exist.
replies(1): >>41854378 #
5. ttfkam ◴[] No.41854378{3}[source]
Every company has folks that don't even care sites like HN exist.