6 ms·
My vision of it is Flow and TS and stuff prevent 15% of bugs that the beginner and intermediate level developers typically make, but engineers on the advanced a
by sAbakumoff 9y ago
My vision of it is Flow and TS and stuff prevent 15% of bugs that the beginner and intermediate level developers typically make, but engineers on the advanced and higher levels avoid these bugs by just writing a good code in any language they use.
- faceplanted 9y agoTrue, but a lot of those people would rather use a safer language to prevent those bugs than write preventative code every single time, or remember to replace built in language features with their own functions every time.
- Gys 9y agoSo it helps developers that need it and does not get in the way of developers that don't ? Then its a win without any downsides.
- dfischer 9y agoThat's an assumption for a best case scenario vs optimizing for the worst. I rather optimize for the worst, especially in a team; and furthermore a company with growth.
- oelmekki 9y agoI've been writing js professionally for more than ten years, and I totally love flow. Sure, it doesn't happen that often that I feel like I've caught with it a bug I wouldn't have without it (not even sure how you can tell one from the other, when you correct a type check error), but the most notable effect is the release of tension : I don't have to double check everything I write, I can rely on the type system to report obvious problems. If anything, I think flow does not go far enough, compared to compiled languages with type systems. The fact that it allows to mix typed and non typed code is error prone, and there are annoying edge cases, like the spread variables not being correctly checked for (this can cascade quickly, when passing properties in react). I would love to see types as a core part of the language, with native browser tooling.
- sAbakumoff 9y agoThanks, that's interesting experience!
- noir_lord 9y agoSimilar experience with typescript, the win is not having to make room in headspace for things the machine can handle.
- koolba 9y agoNo amount of good code will prevent a typo in a property name that's only encountered on the edge case of an edge case. It's arguably that 100% test coverage could catch such a bug but that's neither always possible nor cost effective. Static type checking is for catching exactly that sort of thing.
- zihotki 9y agoEven advanced and higher level developers can easily make the same mistakes as beginners or intermediate given that the code base is big enough and there are many people working on it. The probablility of that is lower but not 0. As an example you can look at quotes from MS guys, they said that it was benefitial for them to create TypeScript. And from my experience many MS engeneers are at very good level.
- ComputerGuru 9y agoOh yes, the old “I’m too good to need help from no stinking compiler” argument.
- sAbakumoff 9y agoI never mentioned my level, didn't I? :-) In fact our team is going to switch to TS and I just don't have any other option but start using it. I am OK with that, I guess.
- Can_Not 9y agoI dunno man, it sounds more like an intervention than a switch.
- sAbakumoff 9y agoThe best comment in this thread!))
- gldalmaso 9y agoWon't most code bases be written by teams consisting of some or even most beginner and intermediate level developers? My impression is that most companies experience a shortage of talent such that they take in greener members with each passing year. Ideally they should have the best conditions to turn out good quality code before they get to an advanced level. The tooling plays a big part.
- watwut 9y agoRevolutionary complement: if your definition of talent excludes junior developers, there won't be any seniors 10 years later. Every single senior was junior few years ago. Moreover, companies are biased more against older people then young. Which gives us few yes when we are hiring magically appearing seniors - after they got experience (elsewhere) and before they are old.
- Eridrus 9y agoTo not make type errors you not only have to be a perfect typist and completely engaged all the time, you also need to be an expert in the part of the system you're developing.
- preordained 9y agoDon't you just need to to actually use/test your code? Don't you need to do this in a statically typed language as well?
- lmm 9y agoOften you don't. When you're really leveraging the type system, if it compiles it'll be correct. You might need to test the actual business logic, but realistically that ends up being a small proportion of the code you write. People don't like talking about how type systems let you write fewer tests, perhaps because it makes them sound like cowboy coders, but honestly it's a huge advantage.
- Can_Not 9y agoNot only can you write more precise tests (because you don't have to worry about run time crashes from type errors or logic errors from type mismatches) but your tests themselves are also type checked.
- dahauns 9y agoI wouldn't consider engineers who think they "just write good code" and won't make those mistakes "advanced" or on a higher level. They have yet to learn one of the most important lessons.
- coldtea 9y ago>but engineers on the advanced and higher levels avoid these bugs by just writing a good code in any language they use. Belief that one can just "write good code" and you don't need types/tooling/linting etc is a sure sign of a still inexperienced developer. Actual senior developers are much more humble and use all the help they can find.
- sAbakumoff 9y ago>Actual senior developers are much more humble and use all the help they can find. sure, this is raison d'etre of package managers like NPM.
- lllr_finger 9y agoTyping systems for dynamic languages shouldn't be viewed as crutches for the inexperienced dev - experienced devs should seek them out when the ROI is there. If any level of your tech stack offers you guarantees, use them so that you have less code to write. Less code is less opportunity for bugs and faster development.
- sAbakumoff 9y agoI am wondering what level downvoters have :-)
- marksomnian 9y ago"I think you're arrogant in suggesting that only beginner and intermediate programmers make these mistakes" level. Yes, advanced programmers make these mistakes too, and they find tools like this helpful in catching them. That's why Microsoft created TypeScript. That's why Facebook created Flow. Facebook and Microsoft are two companies I wouldn't call beginner or intermediate.
- sAbakumoff 9y ago1. Never I suggested that advanced programmer don't make mistakes. They do. Beginners just make more and/or more expensive mistakes. 2. Never I suggested that MS and FB are beginners.
- mannykannot 9y agoThis is an issue on which self-serving opinion, on both sides, predominates, so this study is very welcome. If you think it is flawed, do your own study.
- mamcx 9y ago> writing a good code AND using good code. If a "Expert" have the option between use something that solve more problems better than other, is NOT a expert to not use it. Is just masochist.
- sAbakumoff 9y agoAgreed, re-using a good code is one of the most important skills.
- Can_Not 9y agoEngineers on the advanced levels are concerned about lightning fast and safe refactoring and resilience against spaghettification when passing on their code to other team members or outsiders of unoptimisticly unpredictable skill sets.