Live data from Hacker News

How we failed, then succeeded, at migrating to TypeScript

heap.io

41–50 of 60 posts

Re: How we failed, then succeeded, at migrating to TypeScript

#41
post #37

> Yes, we were adding TypeScript code, but we were adding CoffeeScript at a faster rate. Unsurprisingly. > how do we get our coworkers to buy in to this new paradigm? By forcing them? > and we’re all happy to spend hours figuring out exactly how we’ll set up our TypeScript config. Oh yes what a joy! > our data access layer (“ORM”) is ubiquitous, and most files use it in some way. Use SQL instead, it's better. > We al…

Hey, the reason I downvoted you here was that you is that you basically just quoted parts from the article and simply added dismissals or small jabs, but little truly constructive, and were kinda rude in the last paragraph. Judging by your other posts you can do better than the easy way out. Do you have something constructively critical instead?

So tell me what's constructive in your comment? Oh, and downvoting is about the least constructive you can go, I won't downvote you :)

Tell me honestly, what point I made you don't agree on? Try to make your point please.

Re: How we failed, then succeeded, at migrating to TypeScript

#42
post #35

Earlier quoted context omitted.

Depends on your team size. 5+ engineers and need to refactor things? Typescript will make those needs far easier. Tooling support is amazing, for things like autocomplete, module import insertion and sorting, symbol renaming, function extraction, linting capabilities, correctness of code after changing designs. There’s some learning around how to type things, but not too hard and very worth it. Need at least one team…

Dunno about you, but I do all of the things you mentioned, regularly, on a solo project. My test burden is greatly shrunken (getting rid of all those “did I pass sane args?” tests that one needs between modules) and I have much more confidence that I’m not shipping broken stuff. I don’t think writing TypeScript actually takes longer once you’re practiced and it eliminates entire categories of error. YMMV, of course,…

I agree, it doesn’t take me personally any longer to write typescript. In fact, it saves me tons of time and endless headaches. I _love_ typescript and use it at work in react and have used it in node for side projects. The benefits are incredible as you mentioned!

I guess it depends on what you’re doing. Setting up the tooling can sometimes be a bit of a pain in combination with other tools which are not designed with typescript in mind from the get go, such as react_on_rails.

If you’re doing a quick mvp in a weekend, I’m still not sure typescript is right. But it really depends on what other tools you are using and how well they integrate. If the mvp works, ya, definitely switch to typescript ASAP. That’s a fine line and really depends on the use case.

Re: How we failed, then succeeded, at migrating to TypeScript

#43

I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…

> Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all the visual clutter of a C-style syntax. I miss that.

Indeed, Coffeescript is one of the finest languages I wrote in. Consider that 95% of the time we are reading code, what is the win of TS with a linter? The TS codebases I've worked on really hurt my eyes and brain, and that for some stupid website where type safety hardly makes any difference at all. And all those average web developers I've worked with bragging about type safety while the code they are producing is full of wrong constructs, bad naming, dependent on heavy tooling, etc..

Re: How we failed, then succeeded, at migrating to TypeScript

#44

AFAIK, Ruby is the only language that people make other languages look like (CoffeeScript) and JS is the only language that people make look like other languages (CS, TS). Are there others? Edit: Well, I guess the JVM would be considered another?

Lisps exist on all the runtimes. LFE (liso flavored Erlang) is a good example.

Don't forget Hy and Clojure (which pop to mind, but I don't intend to be exhaustive).

Re: How we failed, then succeeded, at migrating to TypeScript

#45

> Yes, we were adding TypeScript code, but we were adding CoffeeScript at a faster rate. Unsurprisingly. > how do we get our coworkers to buy in to this new paradigm? By forcing them? > and we’re all happy to spend hours figuring out exactly how we’ll set up our TypeScript config. Oh yes what a joy! > our data access layer (“ORM”) is ubiquitous, and most files use it in some way. Use SQL instead, it's better. > We al…

Harsh, but true. I like your point of view. We often get sucked into latest trendy rabbit hole, where there isn’t much actual value delivered to your business/employer, other than feeding your ego and tinkering desires.

Re: How we failed, then succeeded, at migrating to TypeScript

#46

We’re now considering switching from coffeescript to ES6 (or maybe also Typescript). But coffeescript is seeing a bit of a revival, and I’m starting to wonder if we should stick with it?? Tooling seems a bit behind and also lacking things like tree shaking etc (??). But coffeescript is so clean and fun... Any tips/thoughts??

If you've learned to appreciate the elegance, expressive power, readability and overall speed of development of Coffeescript, tell me, are you going to drop that for some virtual type safety that doesn't even exist at runtime? There's no way you'll write a medium to large codebase in TS without the use of 'any' or 'undefined', otherwise you'll get completely stuck. Don't believe the hype.

When you are not writing critical code where lives or huge amounts of money depend on, then I'd say stick to Coffeescript. And when you find a type related bug in your code, fix it and write a test so the bug cannot occur again. Otherwise, first check out Elm, Dart and Livescript. TS is really the last on my list, I've had my share of pain there.

Re: How we failed, then succeeded, at migrating to TypeScript

#47

> The most important realisation we had going into this renewed effort was that a successful migration has to be centered around people, not just tech. Key insight. It’s always people first, code is a far distant second. Love Kent Beck’s series on this, so insightful https://medium.com/@kentbeck_7670/software-design-is-human-r... Great read, Heap team! Thanks for sharing :-D

> It’s always people first, code is a far distant second.

I'm afraid that's kinda political. In order to get the migration successful, hmm.. I assume developers did not have much of a choice, either accept it or leave. You can try to brainwash them by impose your subjective point of view in a friendly way, but in the end it's all about power, that's the untold story.

Re: How we failed, then succeeded, at migrating to TypeScript

#48
post #15

Typescript seems to be approaching C++ levels of syntax and expressiveness. The main difference seems to be the existing tooling, tutorials, libraries, etc for node.js and others. But if compiled languages like C++ or Go had as many dedicated libraries for webserver management as JavaScript, would there really be a benefit to using Typescript?

Yes, build times of a few seconds instead of minutes. Easier and more robust "write once, run everywhere". Integrating third party libraries in a matter of minutes instead of hours, sometimes days. Generally much faster prototyping capabilities. And so on.

Short build times come with less compile time checking.

You can get cpp programs down to seconds for incremental builds with good management while having compile time checking.

Re: How we failed, then succeeded, at migrating to TypeScript

#49
post #33

I was looking at some of my old repos today. Enjoyed the nostalgia. Lots of CoffeeScript there. I had to switch to ES and then TypeScript because CoffeeScript was abandoned at the time and I was stretched over other projects to be able to help maintain it. Reading my old code, I was surprised by how clean it looks. How easy it is to digest. There is a certain sense of calm when your brain doesn't have to process all…

CS is what happens when you let Ruby devs write JS. TS is what happens when you let .net devs write JS. Let's see how that turns out in the long run.

The most depressing thing for me as someone who loves F# is how `.net` is nearly synonymous with C# in most people's minds

Re: How we failed, then succeeded, at migrating to TypeScript

#50
post #37

Earlier quoted context omitted.

Hey, the reason I downvoted you here was that you is that you basically just quoted parts from the article and simply added dismissals or small jabs, but little truly constructive, and were kinda rude in the last paragraph. Judging by your other posts you can do better than the easy way out. Do you have something constructively critical instead?

So tell me what's constructive in your comment? Oh, and downvoting is about the least constructive you can go, I won't downvote you :) Tell me honestly, what point I made you don't agree on? Try to make your point please.

We've banned this account for breaking the site guidelines. If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future.

https://news.ycombinator.com/newsguidelines.html

Post reply on HN