Hacker News new | ask | show | jobs
by xupybd 1587 days ago
Having spent a few years in Perl I understand some of the frustration of an IDE. I find dynamic languages don't gain a lot from an IDE. But if you're in something with stronger types like Java, typescript or F# the IDE is a God send. The best tool ever is refactor rename. When the IDE can parse your entire code base and rename just the function or variable you want it's amazing. Go to definition is worlds better too.

I found, in Perl and JavaScript, these tools didn't work reliably enough so the IDE was just a slower tool.

Also reading the documentation is important regardless of the tool you're using. I don't think that's a true reflection of IDE development.

1 comments

Well, what's the old saying - nothing can parse Perl, but Perl?

As for JS and IDEs, you should try an IDE again. Far better.

Haha I've not heard that one. Perl is very much an unreadable code soup.

I will have to try on next time I'm in plain JS. It doesn't happen often. I have a preference for strongly typed languages. I suspect I have something similar to dyslexia. I mix the spelling of words and sometimes even the words. Strong typing is the tool that makes that problem go away.

I use Intellij and it really does its level best to bring code insight to dynamic languages.

But I fully agree wrt types. Even if I'm not using an IDE, types, or type hints a la Python, help me understand what's going on far better.

I once heavily refactored a hand-rolled build tool written entirely in Python that read and write JSON. Everyone was terrified of touching it.

Introducing Pydantic to replace dicts of dicts of dicts with dicts of App instances that had Environments immediately made the code far easier to understand.

Then introducing type annotations and mypy completed the transition of a business critical tool from one everyone previously approached in what I called a "special forces" manner (get in, achieve your very narrow goal, get out before anyone notices you) to something where code flow was easily understandable.

Immediately, the tool received a lot of attention and refactoring. Something like 20% of it was dead code, amd there was some functionality that, had it been used, would've corrupted the build state or just flat out died.

And it was simply adding types that made this obvious, and made the code accessible to people who wanted to refactor it fearlessly.

(Unit tests were entirely absent, but without the understanding of the code that types brought, how would you even start?)

> Perl is very much an unreadable code soup.

It has been said that perl is the only language which looks the same both before and after RSA encryption.