160 karma · joined August 19, 2016
So it's not a waste of time, but pick your battles. Sometimes nits need to be picked so you have some easy-to-grok code and documentation.
There's a 99% chance that they have a build process in place already, if for nothing besides minimizing and concatenating their JS files. Adding the `tsc` step is pretty minimal overhead, and all valid JS is also TS; although the language service is going to complain about the lack of types, everything will still work exactly as before.
My argument is that in general, it will cost more in time and effort to add types to a more mature product than to keep them up-to-date in a young product. It's like good comments and documentation - either go 100% or accept that you're going to have a lot of tribal knowledge that is difficult to efficiently disseminate to new employees.
Putting pain off until tomorrow is perhaps good for business, but not for people. Remember that developers are people.
The suggestion to add a `.d.ts` file is good - it allows people who do use TS to be able to use strong/static typing while using your library, without you needing to add any kind of type support within your library. Just make sure it stays updated ;)
But, you do add a transpilation step you might not have needed (unless you're writing ES6 code and are already using Babel or something to target ES5 browsers).
But, TypeScript is better for adding strong or static typing than anything else, IMHO, so if you need that feature, don't use anything else.
But, it can be harder to write good TS code because JS devs have long been taking advantage of the weak typing inherent to the language. It can be a challenge to change that mode of thinking and resist the temptation to use the `any` type in TS.
As to the list at the link, point 1 is a non-issue; if you're using advanced JS features that aren't supported by the browser, you already have a transpilation step. Point 2 is not a feature of JS, it's a side-effect. Static typing is awesome and (I would argue) necessary for advanced development. Strong typing is a bit of a double-edged sword, but I'd still rather have it than not. Point 3 is related to point 1 - if you already have a transpilation step for some reason and you want strong/static types, no reason not to jump to TS; it transpiles to JS same as CoffeeScript or Flow or JSX.
Since these boxes are all "below the fold", why have any animation on them or their titles at all?
https://github.com/metaloha/ts-boilerplate shows an example boilerplate that includes this.
For the final word in web speed, though, G-WAN - write your code in C and feel the lightning ;)
I actually can't recommend this enough. It's very, very basic, so throw some patience at it (or start with the next book, https://ultimatemusictheory.com/free-teacher-resources/basic... instead). You'll learn to read music, but also to understand it.
The cookie banner appears in front of some text but behind images and some other text.
The drag handle is missing in the whitespace between lines of text (the huge space under "API DEVELOPMENT" for example). It's a large enough space that I should be able to drag the background around, same as outside the text block, and same as the space below "BE THE BRAIN".
The super flashy "for FREE" button also appears half off the side of the viewport in my browser. If it's important, it should be kept on-screen.
Foreground elements should have a blur or fade effect behind them - it's way too easy to drag the background around and make the text completely illegible.
Actually, it's probably better to keep the interactive portion in it's own block and avoid all of those issues completely. Having it as part of the main design is an unnecessary and annoying flex.
I come in, handle some successful projects (occasionally unsuccessful, such is life) in whatever role (it varies from senior developer to product owner to staff developer to tech evangelist, etc.), then find a reason to move on. I've noticed that the types of companies I work for tend to be grouped - I'll work in legal tech for 2 or 3 companies in a row, then fin tech for a couple, then marketing, then oil & gas for another couplefew, etc. My remuneration has consistently grown as well over that time - I haven't taken a lower-paying position for at least 10 or 15 years now, and only one change that didn't increase what I take home.
I actually didn't realize I was doing this until I started my year off recently and looked back on my career. I still don't know if it's strange or not, but it worked for me.