Hacker News new | ask | show | jobs
by KenanSulayman 2127 days ago
Who hurt you?

This project is meant to make developers more efficient and support them in migrating projects to TypeScript. The entire point of TypeScript is to make developers more efficient, too, through clear structuring, types and assistance through its toolchain.

Static typing does not protect you from integrity issues. However, it allows you to extend existing code with confidence.

I'm not sure if you work in a team, but your general attitude isn't exactly conducive to a constructive, open and efficient working environment.

1 comments

>> Who hurt you?

TypeScript hurt me.

>> However, it allows you to extend existing code with confidence

This argument is often used and cannot be disproved but the words "with confidence" betray the case for its objectivity.

Confidence is a subjective emotion; I can tell you that I feel confident about extending my JavaScript code without TypeScript and you can't argue with that. So this is a subjective argument and my extensive subjective experience of both languages disagrees with the premise.

The most innocent explanation that I can come up with is that TypeScript caters to developers who are not good at coding and thus lack confidence in their coding ability. For me, TypeScript has 0 effect on my confidence and the transpilation step makes things more complicated and makes me less productive overall. Testing is the only thing which increases my confidence in the code; nothing else has any effect on my confidence levels... Not even the language (and I used many over the years). This leads me to think that the confidence which TS gives developers is an illusion, I remember a time when I was younger and used to harbor such illusions about static typing so I'm just drawing projections about other people from my own experience. And yes, your first observation about me is absolutely correct, my skills as a developer have been thoroughly battle-tested and this has hurt me. To me, the existence of this tool is like reliving a past trauma.

>> I'm not sure if you work in a team, but your general attitude isn't exactly conducive to a constructive, open and efficient working environment.

My team is very productive (I'm CTO). We're productive because we're pragmatic. We don't use TypeScript because we're pragmatic. I don't have to resort to this attitude because my team members were carefully selected for having high level critical thinking and so they wouldn't make such big mistakes as creating this tool.

> TypeScript caters to developers who are not good at coding and thus lack confidence in their coding ability

Any text editor besides notepad caters to developers who are not good at coding and lack confidence in their coding ability.

In fact, a good developer doesn't even need to run the code to test it works, they just know.

So basically, unless you're writing your production apps in notepad and shipping it without ever running it, you suck.

>> In fact, a good developer doesn't even need to run the code to test it works, they just know.

This seems like a perfectly reasonable goal to aim for even though it's not attainable beyond a certain degree. If your goal is to become so skilled that you can write an entire program which works perfectly from the first time without writing any tests, that seems like a pretty good goal to aim for. All developers should be aiming to write perfect bug-free code; if you do it long enough (intensively for over a decade), you will gain more confidence and coding becomes really easy and pleasant.

I've known several developers who instinctively know where bugs are within a few minutes of looking at very complex code. This skill needs to be trained and requires a certain degree of mental tension to do effectively (the brain is like a muscle). In my view, TypeScript reduces mental tension and does not train the alertness, awareness or 'I care' part of the brain. JavaScript forces me to keep a lot of stuff in my head and it helps me to reason about complex things better and gives me an incentive to minimize complexity as much as possible since I can't rely on my IDE for thought-completion. Also it makes me 100% responsible for the logic I produce; again because of less reliance on tools.

Training yourself to become more productive at coding is great. In my case it gives me a lot of spare time to write long comments on HN. I'm managing several large complex open source and commercial projects right now but you wouldn't know it given how much spare time I have left to waste on HN. In contrast, I've seen many other projects of similar sizes where the people who wrote the code spend almost all of their time fixing bugs for years after having released the thing. It's not because of the choice of language, it's not even because of the amount of testing, the problem is just that they don't really care about the product and their incentives were not aligned with making a product that works well.

I'm glad that someone else is willing to point out that the TS emperor has no clothes.

I see teams waste so much time on type garbage that serves no useful purpose, some code bases up to 70% of the code is all type stuff.

I guess it looks good for pseudo productivity when sprint planning though.

Perfect example of activity over achievement.

>> I see teams waste so much time on type garbage that serves no useful purpose

So true. And it's not just the time it takes to code and review the code but also the time it takes to talk and agree about types. In my last TS project we were constantly discussing what types should be called and whether a type should be split into two different types or if two different types should be merged into one. Mostly we had trivial arguments about problems which TypeScript forced us to think about which has nothing to do with logic and which we otherwise wouldn't have to think about at all.