6 ms·
As a counterpoint, I’m a senior engineer at FAANG with 15 professional YOE. I’ve mostly used scripting languages in my career though. It took me probably more
by bin_bash 4y ago
As a counterpoint, I’m a senior engineer at FAANG with 15 professional YOE. I’ve mostly used scripting languages in my career though.
It took me probably more like 1-2 months to really understand how to code in Rust. I do not think a typical team of JS/Python devs would be productive in 3 weeks. I think it would be more like 3 months. Developers with C++ experience seem to pick it up much quicker.
Also, at this point I’m pretty proficient in rust but I’m still far slower than I would be in a scripting language. So I don’t think anyone would ever reach “equally productive” unless they’re comparing themselves to another compiled language.
I like Rust, but it’s challenging, and it’s certainly not a language for rapid development.
- LoganDark 4y ago> It took me probably more like 1-2 months to really understand how to code in Rust. I do not think a typical team of JS/Python devs would be productive in 3 weeks. I think it would be more like 3 months. Our very first Rust project (to learn the language) was a path tracer that was done (fully functional) in 2 weeks. I doubt it would take a team 3 months to become productive in Rust. There's always more to learn, but "being productive" is quite a low bar if they already know basic programming concepts. With that said, "typical JS/Python devs" might not even know said basic programming concepts, so maybe you're talking about those? Regardless, 3 months is an extremely conservative estimate. -Emily
- toyg 4y ago[flagged]
- LoganDark 4y agoI actually decided not to say "maybe we're particularly smart but..." for this reason. (I'm trying hard not to make it "humblebragging".) Regardless of that, we definitely don't feel smart due to ADHD. Really all I'm saying is that I can't fathom how someone could take 3 months to be productive in Rust, that's a massive over-estimate. -Emily
- pclmulqdq 4y agoA lot of people have a different understanding of what "learning a language" means. Your example of a path tracer doesn't show a lot of understanding of the deep parts of Rust (algebraic types, async, etc), while the guy who spent 3 months may have been trying to learn a lot more than just the basics to write a path tracer.
- LoganDark 4y agoAh, async is indeed the beast. We haven't really put a bunch of effort into understanding futures and reactors, but we understand them to be state machines (which is unfortunately glossed over by a whole ton of reference material?). AFAIK it shouldn't take 3 months to pick a crate off the shelf like tokio and use futures effectively, but it could take at least that long to understand them deeply enough to the point where you can make your own reactor from scratch (like tokio) if you're also trying to pick up the rest of the language in parallel. Most of the two weeks was indeed slaving away at math and not necessarily learning the language better. I think it wouldn't take longer than a few weeks to complete the official book and the nomicon if you're determined to learn the language. And then you'd use the remaining time to get acquainted with the ecosystem... but probably not 3 months of time. -Emily
- FpUser 4y ago>"With that said, "typical JS/Python devs" might not even know said basic programming concepts" If Python / JS is all they've ever used they most likely have gaping holes in regards to many general concepts of computing and some might not be able to grasp those for a loooong time.
- jcelerier 4y agoA path tracer is a classic classroom project example. I really do not think knowing how to write one is even remotely related to "knowing a programming language" at least in the way it's expected in a professional setting
- Thaxll 4y agoPather tracing / ray tracer are very easy to implement because it requires basic programming concept. It's all about the math not really programming. You can copy paste from one language to another.
- pjmlp 4y agoIndeed, in fact the raytracing weekend is one of my hello worlds to try out new languages.
- galangalalgol 4y agoI have 30 years in c++, and yeah, rust was easy, but I'll still admit I'm more productive in matlab or julia or pytorch. And I'm still in that phase where I have to check the internet every 10min in python. But deploying in those languages has throughput and/or latency impacts that may or may not be ok depending on the situation. The reliability is also a thing. Assuring correctness in a dynamic language takes a lot more time, more unit tests are needed. It is still faster to iterate to a solution in abdynamic language though. But rather than write all those tests and live with constraints, I usually rewrite in a non dynamically types language.
- bryanlarsen 4y ago"equally productive" is misleading. IME Rust is slower to write but faster overall because you spend much less time debugging and maintaining the code. "If it compiles it works" happens often to me, which is why I'm such a fanboy. For this reason I'd be much more comfortable jumping into an unknown Rust code base than anything else.
- sidmitra 4y ago>"equally productive" is misleading. You're right... but just to add. In any Enterprise project involves a lot of talking to other systems(think Salesforce, Netsuite, Slack) or implementing existing protocols(SAML, OAuth,LDAP) and other such things. Python being popular for very long means there's prior work in almost every area. I believe this can be one definition of "productive", basically re-using something existing and spend your time on other better things. In a lot of the same projects performance at the CPU level might not be a bottleneck because you're stuck waiting 10 seconds for an API call to Salesforce. I'm more excited about PyO3 and other Python+Rust advances, where it seems you can offload lot of CPU intensive stuff to Rust but keep the Python layer and its ecosystem.
- bryanlarsen 4y agoIn Rust it's easier for me to use the web API's than it is in C++, and in Rust it's easier for me to use the C/C++ API's than it is in scripting languages. Of course in most projects one or the other usage dominates so my glib response isn't particularly compelling, but in my current project we do use a similar amount of both. But we still have some Python Django code and will probably end up with C in driver code.
- zozbot234 4y agoYes, the key thing about being productive with Rust is that it heavily nudges you towards designs that compose well, avoiding shared state and enforcing a clear, RAII-based lifecycle for every object. There are facilities that you can use when you need something a bit more general than that, but you should only use them when appropriate - ideally, you'll want to document the reason for their use. It's a very compelling thing about Rust that problematic designs are clearly marked with boilerplate, so you know exactly what to look for and perhaps refactor. There isn't really a close equivalent to this in other languages, e.g. in C++, the "modern" facilities you're supposed to use have the heaviest syntax, and this is often true in Python, Ruby, JS etc.
- danjac 4y agoIt also depends on the larger ecosystem. If you know Python, it's not just Python the language, but the frameworks, libraries and tooling around it that boost productivity in specific tasks: for example Django and Pandas. Rust may have rough equivalents but they may or may not be as well developed and supported for all the edge cases.
- zozbot234 4y ago> It took me probably more like 1-2 months to really understand how to code in Rust. I do not think a typical team of JS/Python devs would be productive in 3 weeks. I think it would be more like 3 months. This is actually a very fast learning curve. Imagine a typical Python/JS developer becoming proficient with real, production-quality C++ in 3 months? The very notion seems ludicrous to even think about. So the Rust folks are not wrong when they point out that Rust is about empowering developers and enabling higher quality software across the board.
- bin_bash 4y agoYou’re correct. I actually spent the summer before I learned Rust learning C++. While that definitely helped learning Rust I was barely capable of writing anything in C++ after 3 months. (Though that wasn’t 3 months full-time)
- pletnes 4y agoI’ve done C++ in some projects and still think 3 months re-training might be necessary for new language features, and old foot-machine-guns for that matter! C++ is a dangerous beast if I ever saw one.
- friedman23 4y agoFair point! I've tried to learn and failed c++ 4 times (I knew C, python, typescript, java), I learned rust in a month after reading a 700 page book.
- ReflectedImage 4y agoIt's 692 pages, I did it in 5 days, 12 hours per day.