>(...) despite my experience and best intentions, I was in fact making mistakes with C. Subtle leaks, use-after-free,(...) Rust made it very clear that I was not the programmer I thought I was. This really resonated with me. I feel a lot more confident writing code in Rust than say in C or Java. However, in my opinion, it also comes with a downside: These days, whenever I use a 'more forgiving' programming language I…
Do you pine for the nice days of C/C++, when men were men and spend hours on debugging segmentation faults?
Why Rust is a great choice for startups
101–110 of 294 posts
Re: Why Rust is a great choice for startups
#102I started my first Rust project a month ago after working for years in Golang and before that Python (and before that Perl, C/C++ and Turbo Pascal). I really like the whole experience but I'm not sure if I'd recommend writing all your backend code in Rust as a startup. Rust definitely provides a pleasant experience and is very powerful. If you can stick to the standard library I think Rust is great, though the packag…
Two things I consider: 1. what languages does the team already know best? 2. are any languages dominant in the problem space? for us, I've used Python over 10 years and Python is the leader in data science / analytics. Some things might be a little faster if we used Rust, but compute is cheap. Go with what you know.
2 is fine. the more significant question is often do you want to work with that talent pool and does the pool tell you more about the costs structure of your sector against which information you may prefer to tack against the prevailing winds and even more patiently attempt to trade actual equity for deep abilities and stuff what language is chosen if your stock has value.
I don't understand how much attention individual languages receive. Plural understanding across your team and ability to transcribe the code into valid parseable docs against which APIs are easily written, is paramount in my mind. Corollary to my incredulity I have often thought that you emphasize the codebase language and dialects only to find you fuelled holy wars and dissipated your technical mission values. Which is disastrous for hiring the kind of colleagues we get up in the morning and forget about industry grief to share increasingly awful spaces with.
Re: Why Rust is a great choice for startups
#103Earlier quoted context omitted.
Rustian Safety Rustian Garbage collection
> Rustian Garbage collection Genuinely curious here: the Java GC (still in 2022) is often a major headache in production wrt latency when system is under load. How's the Rust GC in that regard?
Re: Why Rust is a great choice for startups
#104I started my first Rust project a month ago after working for years in Golang and before that Python (and before that Perl, C/C++ and Turbo Pascal). I really like the whole experience but I'm not sure if I'd recommend writing all your backend code in Rust as a startup. Rust definitely provides a pleasant experience and is very powerful. If you can stick to the standard library I think Rust is great, though the packag…
>Yeah, everyone wants to be a Rust programmer I understand why you might have got that impression, but that's a far cry from the reality
Re: Why Rust is a great choice for startups
#105>(...) despite my experience and best intentions, I was in fact making mistakes with C. Subtle leaks, use-after-free,(...) Rust made it very clear that I was not the programmer I thought I was. This really resonated with me. I feel a lot more confident writing code in Rust than say in C or Java. However, in my opinion, it also comes with a downside: These days, whenever I use a 'more forgiving' programming language I…
I understand the comparison with C (the memory management) but I wonder how do you compare Rust to Java? What is it that makes you feel more confident in Rust compared to Java?
Re: Why Rust is a great choice for startups
#106The biggest upside is that the stricter compiler does catch bugs. It makes changing existing code easier and it makes it easier to add invariants across the code via the type system. It makes an extensive test suite much less necessary, generally unit tests for pure parts of the code and some form of simple dev/staging environment will suffice. This can defer the need for expensive and slow integration tests running on every change.
Performance is also nice but it doesn't matter much. My service is running with 10m cores and 50MiB of memory, 10x those wouldn't be a major concern. I think that in 99% of cases performance only really matters when you are trying to optimize running costs and that is generally only the case when the operational costs matter relative to the cost of an employee. The performance of your application is very rarely related to the performance of your application code, usually it lies more in the database and network calls that you perform while serving requests. I think for many startups the cost of actually running your code tends to be tiny compared to staff and other infrastructure. The docker image is 160 MiB (with debug symbols) which is probably smaller than most Java/Python projects but not tiny anyways.
There are definitely cases where Rust is more verbose than Python (over Java I actually find Rust more productive) but even if you can write very high-level code with Rust part of the problem is that it doesn't necessarily encourage you to do so. With things like explicit `.clone()` calls and reference counting you are very aware of every time you make a performance tradeoff. It takes the right attitude and personality to say "that's fine" for most of these cases and leave the optimization to when it matters. (When you do want to optimize it is very clear where all of these expensive operations are which is nice.) But something like Python where these slow operations are completely hidden is definitely nice for focusing on the business logic.
Overall I think it is legitimately a close call. I definitely spent more time worrying about unimportant details with Rust but I likely would have shipped more bugs and had a harder time making wider changes. I would also be much less confident with the stability of the current code which is very important to me as this is running as basically a side-project without a 24/7 oncall. Also the more cross-cutting features I add the happier I am with the type checking.
I think Python (with a type checker) or TypeScript would have been slightly more productive but I think the investment of Rust was worth it. The fact that I can see the path forward with no rewrites or the need to break off expensive components into microservices in higher performing languages is a really nice outlook.
Re: Why Rust is a great choice for startups
#107I started my first Rust project a month ago after working for years in Golang and before that Python (and before that Perl, C/C++ and Turbo Pascal). I really like the whole experience but I'm not sure if I'd recommend writing all your backend code in Rust as a startup. Rust definitely provides a pleasant experience and is very powerful. If you can stick to the standard library I think Rust is great, though the packag…
I would like to add that async Rust still doesn't really work. That is a big negative for Rust.
Re: Why Rust is a great choice for startups
#108Earlier quoted context omitted.
There are lots of people curious about coding Rust in production, and most of them consider themselves competent to write it. But that is not what you look for when hiring. Or, it shouldn't be.
I would say that curiosity about languages in general is one item that you should look for in candidates. Not the only one of course but curious people do tend to learn and adapt well. For an analogy, I wouldn't hire a pilot that isn't interested in other planes than what's on their license. What if I want to operate some new models? Unless I'm looking for someone for a truly specialised role, I would avoid people th…
For hiring, what you should look for, first and foremost, is competence. Curiosity is not a substitute.
Re: Why Rust is a great choice for startups
#109I guess it works for a fully remote company, as you have a large pool of possible candidates. But in my area, I'd say it would be easiest to recruit using java. Next python or node/js, but still a vastly smaller group compared to java devs.
That sounds to me like a strong argument for any new startups founded by people in your area being remote-first.
Also, it can also be a pitfall that people want to work for you based on the cool tech, and nothing else. Which means they might be quicker to jump ship to the next cool thing and not in it for the long run?
Just speculation on my part.
Re: Why Rust is a great choice for startups
#110This is the most interesting part for me. Not the specific numbers, but the general notion of "performance actually matters". There's impact on ROI, UX, complexity and sometimes it lets you do things that you wouldn't otherwise consider.
There was a post fairly recently on here, where they showed a deployment architecture of a small business or startup. It was a simple thing, with a couple of app servers, databases and load balancers. Something like that. The app servers were written in Python/Django I think. The essence was that "this is a simple architecture on relatively cheap VPS instances with minimal complexity and it handles a ton of traffic", I think the bill was a couple hundred or a month maybe 1/2k max. I liked it.
But even then I thought that there has to be some overhead that can be cut there. If your app server plus database performs well _enough_ you can run them on just one instance, you can cut several load balancers. All you need is a backup machine if you care about downtime, especially during deployments. That would roughly cost you maybe 5x less. Then you might actually be able to cut down the performance of the machine, another factor of 2. Now your bills are 10x less, you have fewer things to worry about, possibly less complex tools needed.
So let's say a single developer can save them 1k (EUR/$) monthly, that would be 5-10h work hours gross, or just say a day of billable work, every month that they get out of it. And this is not considering the gains from reducing the complexity and setting themselves up for finer grained improvements and other benefits that were not possible before.
I'm not considering the downsides and the estimates are shaky at best. But there might be something to this, even for fairly small teams and companies.