Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

500 lines a day feels very much on the low side to me, for most projects. That’s around one line per minute. Yeah, there are definitely parts where you have to go a lot slower, but also there are plenty of lines that take 0–10 seconds.

Going from Rust to TypeScript will normally be pretty easy—though if things like numeric and bytewise manipulations are involved, it can be tough. Going from TypeScript to Rust will often be easy, but also often be fiendishly difficult to do without refactoring a lot, due to ownership model differences.

Occasionally I’ve chosen to do a refactoring in the source language first, and then port that. That can work decently, though it depends so much on exactly what the changes are and why they are, which is often to do with which two languages are involved.



500 lines a day feels about right taking the whole project into consideration. I ported a physics engine from C to Javascript a decade or so ago. Once I was in the swing of it, I did a lot more than 500 lines a day too. But I also spent a few days reading the original code. And I tweaked how I wanted to represent everything in javascript - which slowed me down. I should have just ported it directly, then refactored afterwards. And I spent a few days at the end tracking down some bugs that snuck in. In retrospect, typescript would have been a better choice. But I hadn't learned it yet.

The best days I ported maybe 1500 lines. On the "worst" days I did 0 lines. In all, 500 lines a day feels like the right ballpark for this sort of work.




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

Search: