8 ms·
A reverse situation here. I deal with strict no typescript policy, so besides a problem of finding typescript devs, we have a problem of having to "de-typescrip
by baybal2 7y ago
A reverse situation here. I deal with strict no typescript policy, so besides a problem of finding typescript devs, we have a problem of having to "de-typescript" a lot of 3rd party code.
Typescript has a lot of adoption within with ex-Java devs, and with that comes a lot of "Java-think." It's hard for these people to adapt to not doing things "the Java way" and vice versa.
And another part of the problem is that people have burnt themselves badly with Coffeescript, Clojurescript, and few other *scripts that were coming and going trends, and were an enormous LTS burden because of tooling that breaks as fast as you fix it.
- manigandham 7y agoWhy? Typescript just compiles down to JS, and type definitions are used IDEs so they still help when writing JS. How does removing typescript help you?
- baybal2 7y ago> How does removing typescript help you? https://github.com/microsoft/TypeScript/issues https://github.com/microsoft/TypeScript/issues Please count the number of open bugs JS tooling is already an enormous jenga tower as it is, with tooling breakages eating a double digit of developer time. Adding typescript on top of that would be the real madness. Typescript will not help us a dime with type checking for most of devs we hire are long past the stage when typing errors are a thing for them. On the down side, even certainly not cheap to hire devs with 6-7-8-10+ years of experience have to battle JS tooling every day. Like half of all genuine bug triage time is already spent on webpack, bable, and other things in the tooling stack. 200 hours a month for $30-$40 per hour devs. Imagine doubling that digit when they have to also spend time on learning typescript, and fixing it. No, it does not pay off at all
- manigandham 7y agoYea bugs exist, yet there are still thousands of teams using it to build very complex projects with less bugs because of Typescript safety and features. TS tooling either replaces JS tooling or interacts with it seamlessly. It's not like you're skipping JS altogether and there's no type-checking in JS anyway so where's the interference? Can you give a concrete example where TS is a blocking issue for your development?
- baybal2 7y agoIf you get less bugs because of type checks and you are a serious JS/web dev with 5+ years experience, then your skills are plainly not good enough. People who spent time with JS and webdev in general got to learn that JS is a minefield of a language, and they work with that in mind. Typing discipline is pretty much the first thing people learn when they try doing JS seriously. How to say. There is no way just adding typing to JS will make JS less of a JS. You still have to be a very disciplined dev to work with a typescript for it retaining many other tricky parts from JS. > Can you give a concrete example where typescript is a blocking issue for your development? Typical example: the tsc transpiler plainly dies, and you know nothing how to debug it, you know nothing of its internals, and you loose the rest of the day doing fruitless email exchanges with typescript dev team, and trying to trace a breaking commit. Second example: you got a prod breakage report in some hard to reproduce case. You fire a debugger in chrome through vscode, and then you find out that the debugger completely loses the execution flow in transpiler/tooling garbage, and broken source maps. Having a debugger pick code that went through webpack (be it cursed) is already a 50/50 lottery, and additional layer of tooling makes it even worse.
- sbergot 7y agoDo you still put your seat belt in your car after 5+ years of driving experience? If yes, would you say that you do that because your driving skills are "plainly not good enough"? Typescript allow you to spend less energy on minor issues like typos and more energy on design. It also provides you with the ability to reason locally about some code. When you inspect a function in js, you cannot know what are the contracts that it has to deal with. To be sure you have to unravel all the calling and called functions. Typescript also enables better intellisense. About your issues: - I never had tsc dying on my hand in 5 years. - About the transpilation noise: it can be as noisy as you want. Have you checked the default result for the es6 target? It litteraly look like your source code with only your type signatures stripped. The noise comes from the transpilation to lower versions and bundling and those are independent of typescript.
- thawaway1837 7y agoConsidering typescript compiles down to JS, and incredibly readable JS at that, the fact that your developers are unable to debug the JS directly may indicate that they are not as amazing at JS as you may believe they are.
- scrollaway 7y agoYou're removing typescript because you think it's creating bugs... You realize you're probably creating bugs yourself by removing typescript manually, which is a thing.. typescript itself can do, by compiling down to JS? This is some prime dailywtf material.
- afiori 7y agoWell not exactly, the parent said something quite different, in the comment they were comparing tooling not languages and they say that the tooling makes for a significant part of the bugs they have to solve so they want a build process as slim as possible. Nothing was said about whether typescript code is more or less buggy, just that the typescript tooling had issue to work with other tooling.
- inertiatic 7y ago>Typescript will not help us a dime with type checking for most of devs we hire are long past the stage when typing errors are a thing for them. Who are these mythical people? Do they just magically decipher what interface an argument conforms to? What methods are accessible on a returned result from any random library they're using?
- orange8 7y agoI'm not a myth. Some of us started JS programming over a decade ago, with no strong typing and IDE to hold our hand and tell us every time you make a mistake. The key is just discipline, good design patterns and a good linter. I see TypesScript as a VERY opinionated linter that affects how you think and write JS. JS is a dynamically typed language, which means you loose a lot of its power and flexability by shoe-horning it into strongly typed languange patterns. Yes, I get it, many programmers think best and are most productive using strongly typed languages, but for those of us that can think dynamic or both, TS just gets in the way. >> Do they just magically decipher what interface an argument conforms to? This is a good example of the object oriented, strongly typed way of thinking. Explore languages that follow different paradigms, where interfaces just don't apply. >> What methods are accessible on a returned result from any random library they're using? Do not use random libraries. A good library should have even some basic docs outline its API and how to use it.
- manigandham 7y agoTypescript is as strongly typed as you want it to be. You can easily work with dynamic types and it will fill in where it can.
- danShumway 7y agoEh... people say this, and in theory it should be true. If you actually use Typescript with a lot of dynamic/unsafe types, in practice you will very quickly end up with a lot of code littered with `any` casts, and those unsafe code blocks will end up (for lack of a better word) infecting the rest of your code and making the compile-time errors much less useful. For whatever it's worth, my advice is in the instances where you decide Typescript is right for you, commit to it. For the most part, use interfaces, and use strict types that don't get recast a whole bunch. You don't want Typescript to be guessing too much about your code, because some of those intuitions are fragile and can turn into bugs later if you assume Typescript just knows what you mean. I've had code that works until it gets refactored and Typescript stops being able to intuit what a type is. At that point, going back and retroactively trying to make things more explicit becomes a lot harder and a lot more error prone. The temptation there is to just shortcut the entire process and force Typescript to accept that a type is what you say it is -- and that can lead to very subtle bugs that are hard to track down. The best Typescript code I've seen is code that embraces the rigidness. When I see a Typescript project with a lot of `any` casts, I start to get kind of nervous.
- cageface 7y agoI would never hire a JS dev with this attitude towards typescript nor work for one. I’ve done JS with and without types. I’d find a new job before going back to working without them. That’s how dramatic the benefits have been in my code.
- smichel17 7y agoI like going type-less for prototyping (pun intended), then converting to or rewriting in typescript for anything I'm going to need to maintain or refactor.
- blackoil 7y agoRatio of open/closed issue is a very strong indicator of how active a project is. My perspective, with 21k closed and 4k open issues, shows a very active project where I should not be finding major blockers if I adopt it. If it has an issue 1000s of people are actively looking at it and it will be caught at beta stage or will be solved quickly.
- williamdclt 7y agoThis is the weirdest and least convincing thing I've read about Typescript. I won't comment on such experienced devs spending so much time struggling with tooling that shouldn't change all that often, but I have to react that "fixing Typescript" means "fixing your code". If you're saying that you can't handle the overhead of Typescript config because your devs already spend so much time struggling with the rest of your tooling, by all mean get your shit together with your tooling, this amount of time spent on it isn't any sort of acceptable. You have huge problems. > most of devs we hire are long past the stage when typing errors are a thing for them This is just not a thing.
- miffy900 7y ago> https://github.com/microsoft/TypeScript/issues https://github.com/microsoft/TypeScript/issues > Please count the number of open bugs You do realise the large number of open issues almost certainly relates to Typescript's compiler and language implementation? When a project is written in Typescript, it does not mean all those bugs will inevitably plague the project itself. If I wrote "hello world" in Typescript with a Webpack + Babel project starter, it doesn't suddenly mean I now have thousands of open Typescript bugs to deal with. Also: the number of closed issues outnumbers open ones by almost x5. Moreover, the total number of issues exceeds 20 thousand; the number is only so high because so many people have already adopted Typescript into their dev workflows. It's a sign it's been battle tested extensively. > Like half of all genuine bug triage time is already spent on webpack, bable, and other things in the tooling stack. 200 hours a month for $30-$40 per hour devs. Half? This just seems totally implausible; this could only be true if you were constantly modifying your webpack and babel setup and config files and breaking things.
- MaxBarraclough 7y ago> long past the stage when typing errors are a thing for them Nonsense. Static type systems help you write correct code. They're also extremely helpful for refactoring. They also help readability. Outside the JavaScript world, they also help performance. The list goes on. No-one is too smart for type systems to be helpful. > it does not pay off at all You've entirely ignored that TypeScript helps reduce bugs, and helps catch them earlier.
- matthewmacleod 7y agoTypescript will not help us a dime with type checking for most of devs we hire are long past the stage when typing errors are a thing for them. It's genuinely terrifying to think that people out there with this attitude are producing software that I might be at risk of using.
- karatestomp 7y agoSeriously. “We manage OK without static types” is one thing but “LOL we’re not n00bs so we don’t need your productivity-killing static types” is... wow. WTF. Keep anything that team writes far away from important data and processes, please.
- SaxonRobber 7y agoSounds like you need to raise the bar on hiring if learning static typing is an impediment. I recommend less JS monkeys and looking for actual engineers.
- cvlasdkv 7y agoTheir 6+ year engineers are getting paid less than many interns do in America according to said poster. The big tech monopoly means that hiring good senior engineers is nearly impossible. :)
- ThePhysicist 7y agoWhy do you have to de-typify Typescript dependencies? You can mix typed and untyped code with a gradual typing approach, and tools like webpack make this very easy?
- Kiro 7y agoSorry, but that's just crazy. I would avoid your company like the plague.
- W4ldi 7y agoI've worked with both. And I have to say: It depends. Mostly I feel like typescript slows me down A LOT. In my opinion, the better your code style, guidelines, linting, infrastructure, error reporting and tests - the less you need typescript. I worked in a team that had about 150 micro-apps and services, it was maintained by roughly 15 devs. Each microservice had it's very small scope and it was very very easy to work with it. Everything was very predictable, which made it easy to work without having types.
- anton_gogolev 7y ago> ...the better your code style, guidelines, linting, infrastructure, error reporting and tests Doesn't TypeScript kind of solves (at least partially) those issues?
- wues 7y ago"We have problems, let’s introduce some code style guidelines, linting, error reporting and most importantly tests!" "Nah, let's just switch to Typescript, it will solve all those problems. At least partially."
- gherkinnn 7y agoIt’s not either/or. Nice strawman you put up here.
- wues 7y agoNo I didn’t. The statement was that Typescript solves the listed issues, which is obviously not true. There may be of course discussion whether TS _helps_ to solve such issues but you won’t be able to convince me that TS _solves_ e.g. lack of testing.
- capableweb 7y agoI'm also avoiding typescript as much as I can, but not because typescript itself, but because of how typescript projects tends to be outlined. Lots of the projects are way over-engineered for where they are on the timeline and typescript makes people reach for classes too early. Seeing the same with vanilla JS projects now too when `class` been introduced. Instead I'm stricly using ClojureScript as the tooling is really solid in everything Clojure, backwards compatibility is a huge selling point in everything Clojure and projects using Clojure/Script tends to be just of the right size and think more about the data structures themselves instead of what many refer to "proper engineering" (SOLID patterns and other nonsense)
- christophilus 7y agoI’m spinning up a few new projects at the moment, and was sooo close to doing them in ClojureScript. I ended up going with JavaScript, Preact, and Rollup just because of familiarity allowing me to move faster. That, and my build times are sub-second, something that was not true of my previous Webpack and typescript projects. My total application bundle size is still smaller than React alone. ClojureScript is really good, though, I gotta say. How are your production bundle sizes? Are you using shadowcljs? If not, what tooling are you using? Also, what editor? I’m a VSCode guy, and last time I used Clojure (a year or more ago), Calva wasn’t up to snuff. I wonder if that’s changed.
- capableweb 7y ago> How are your production bundle sizes? Application I'm working on is not that complex, 20 something different pages with multiple sub-sections themselves, bundle ends up being 1.5MB or something like that, 300kb gzipped. Main weight comes from using multimethods which pulls in a lot of cljs.core, so not using that would make it a lot smaller. Also gonna start splitting the bundle per page but haven't yet. > Are you using shadowcljs? If not, what tooling are you using? No, using figwheel-main, project was started before shadowcljs starting to look as good as it looks today. Starting a project today I would probably look into shadow-cljs first. But we're not using any npm dependencies, but shadow-cljs seems to have better introspection properties than figwheel-main (like seeing partitions of bundle size easier, we're currently doing it by looking at the sourcemaps...) > Also, what editor? Using vim + fireplace which been working really well for me. > Calva wasn’t up to snuff. I wonder if that’s changed Haven't used Calva myself but tons of people in the community swear by it, so I'm thinking it's been improving since the last time you tried it. I'm not sure when was the last time you tried Calva but Calva been in at least two Clojurists Together (https://www.clojuriststogether.org/ https://www.clojuriststogether.org/) funding cycles, so if you tried it before mid-2019, give it a try again (and report back :) )
- Vinnl 7y ago> we have a problem of having to "de-typescript" a lot of 3rd party code. What do you mean by this? npm packages at least are already "de-typescripted", in the sense that they're just .js files with accompanying .d.ts files describing the former to people using editors with TypeScript support. (Also, it feels like you've experienced a weird subset of TypeScript code. It also happens to be an enormous help when doing things "the Javascript way", which is what it's actually designed for. But I can imagine that encountering bad apples can sour the experience for you.)
- chvid 7y agoI agree with this. TypeScript makes Java and .NET developers think they understand the language and platform and causes a lot of irrelevant design to be copied over into the JS world where it mutates and becomes absolutely poisonous. Just look at Angular where the boilerplate and crazy dependency injection completely surpasses anything seen in the Java / .NET world.
- dynamite-ready 7y agoIt's especially apparent when Java / C# developers are introduced to a simple idea like a Flux pattern store. Store structures, despite the initial difficulty in learning the pattern, simplify things enormously, but can somehow become nightmarishly complicated in the hands of a developer who expresses API/client relationships in terms of Factories and Services... When it's not hell to work with, it's actually quite interesting to observe.
- 112 7y agoEvery language comes with its own culture, and with its own stereotypes. Java's over-engineering and boredom, JavaScript's throwing shit on the wall and see what sticks, PHP's developers that do stackoverflow-driven development. There are experts, average people, and bad people in every field. TypeScript brings sanity that is valuable for both experienced developers and less experienced developers. The peace of mind that you get with types when doing refactoring is invaluable. I would never be able to go back and write vanilla JavaScript, because it's broken. You can over-engineer and write crap code in any language. Also a comment on anyone that says experienced devs get no benefit from types: you think you're good, but you're not. As good as you think you are, if you seriously deny the benefits of static typing, you're probably shit as a developer. If you understand static typing and it's benefits then you agree it's a good trade, if you don't understand it and still have a strong opinion against it, then you're just a lazy human.
- bregma 7y agoTo be fair, cargo-cult programming is a scourge in any domain. Since the cult many folks started with when they took their college (or free online) programming course was Java, all cargo looks like Java.
- deleted 7y ago[deleted]