← Back to context

Comment by chrismorgan

14 hours ago

And no, there are no dependencies in package.json either (other than devDependencies for tests).

Which cumulatively means a competent developer could probably port it in less than one day.

They almost certainly spent longer working out how to deploy and integrate the original JS and ironing out the problems, than it would have taken to port it in the first place.

That’s sad.

And then they definitely spent much longer making their optimised fast path for simple expressions. Which they probably wouldn’t have bothered with if they had just ported the whole thing.

As for trying things like embedding V8… this is getting ridiculous.

I strongly suspect no one had actually looked at the code, but had just assumed all along that it was much more complex than it actually was.

The entire thing is a tragedy.

> port it in less than one day

There's confidence and there's barking mad delusion.

Here's the reality.

I once ported 50k loc from Java to Go. Here are details: https://blog.kowalczyk.info/article/19f2fe97f06a47c3b1f118fd...

Java => Go is easier than JavaScript => Go because languages are more similar. That was a very line-by-line port.

Because I was paid by hour I took detailed notes.

I spent 601 hours to port it.

50k / 601 = 83 lines ported per hour, 665 per 8 hour day, but really 500 per 6 working hours a day. No one does sustained 8 hours of writing code daily.

I would consider that very fast and yet order of magnitude slower than your 5.5 k per day.

10x is not a mis-estimation, it's a full blown delusion.