Earlier quoted context omitted.
That’s interesting, I’ve never done the math myself but I’ve seen it mentioned in many places that those are the two most densely populated countries in the world. Maybe they are only looking at the density in urban areas and excluding agricultural areas?
Oh, I see now that the stats I frequently hear cited exclude small city-states, and have a smallish threshold of somewhere in the 10 to 20,000,000 range for the country population.
State of JavaScript 2019
361–370 of 372 posts
Re: State of JavaScript 2019
#362Earlier quoted context omitted.
Taiwan and The Netherlands are not even close to being the most densely populated countries in the world. Taiwan is 652/km² and Netherlands is 418/km². Compare that to Macau 20,286/km² or Singapore at 7,804/km². But I agree that The Netherlands has a pretty big development community, and generally their English is fairly close to being native.
That’s interesting, I’ve never done the math myself but I’ve seen it mentioned in many places that those are the two most densely populated countries in the world. Maybe they are only looking at the density in urban areas and excluding agricultural areas?
Re: State of JavaScript 2019
#363Earlier quoted context omitted.
Oh, I see now that the stats I frequently hear cited exclude small city-states, and have a smallish threshold of somewhere in the 10 to 20,000,000 range for the country population.
That’s still kinda surprising, compared to Singapore or Hong Kong, I never found Taipei or Amsterdam densely populated. But stats don’t lie.
Re: State of JavaScript 2019
#364Earlier quoted context omitted.
FWIW, MobX lets you mutate state in the same way. It does require you to make use of its observer/observable functions to make things reactive, but in general it works amazingly well. I strongly urge everyone to try it!
MobX is great. It's even better when you remove the virtual dom and rely only in its internal dependency tracking: https://github.com/ryansolid/mobx-jsx
Re: State of JavaScript 2019
#365Earlier quoted context omitted.
Yeah Svelte is the next thing. Backbone and Angular were great, but then came Vue and React. Vue and React were great, but then came Svelte. It's: - Simpler. You change values with `=` not some method call. - Faster, as the svelte compiler dynamically creates bindings at build time, vs a virtual DOM that has to dynamically track binding at run time - Smaller, since Svelte's output doesn't include Svelte.
Svelte is just a web framework, React is a software framework. Then there's the missing Typescript support... That's what happens when you create your own template syntax...again. I'll continue to use React so I can simply use Typescript for my components, not some random syntax. My styles are typed, my components are typed, my state is typed. Why would I ever go back?
Re: State of JavaScript 2019
#366Earlier quoted context omitted.
TypeScript slows down a project. Nobody seems to ever point out what benefits it supposedly offers. My claim: TypeScript offers no benefit. Ever. That's 2 years of fulltime TS experience talking and 18 years of fulltime JavaScript experience, on top of a whole bunch of full stack (Java and .Net with C#) experience. I think the popularity of TS is going to decline. And I think it's only popular because of the influx o…
Benefit? When my friendly junior developers add a variable where it isn’t supposed to go the system yells at them. This is much preferable to me yelling at them, or production getting broken. Typescript may be a little bit slower if you never make any mistakes ever , and can keep the full state of your program in your mind at a given time. Nobody makes no mistakes.
TypeScript is not a "little bit" slower, I've seen it take over 3 times more time (and frustrations, even for an experienced TS guru) to get simple things done.
TypeScript is a colossal waste of time that many sheep gladly embrace because they feel they're expected to. Nobody dares to ask "but why?" when someone else comes up with the idea of adding TS to a project. They should.
I wish I had the money to setup 2 teams of 5 developers each for 12 months. One team: JS only. The other team: TS only. Give them the exact same project instructions, same sprint length of 2 weeks, and the same expectations per sprint.
Here is my guarantee:
- The JavaScript team will get much more done consistently over the entire duration of the project; - The JavaScript team will have a higher quality of code that is more intuitive to read; - The TypeScript team will be the only ones that regularly fail to make deadlines; - The TypeScript team will have to be reminded time and again that they should focus on UI and UX details.
And at the end of the road the JS team will have a far superior project, simply because they didn't waste time typing all of their code.
I've seen it so many times already. Once you use TS the devs focus on the code and forego the idea of UX, a11y, i18n, progressive web, offline capabilities, etc.
They'll often pair-program and waste hours of time to figure out how the hell they're supposed to properly type that one complicated piece of code.
Meanwhile, the JS team using React will simply use JSDoc, code reviews, propTypes, and defaultProps and be done with it.
Re: State of JavaScript 2019
#367Earlier quoted context omitted.
TypeScript slows down a project. Nobody seems to ever point out what benefits it supposedly offers. My claim: TypeScript offers no benefit. Ever. That's 2 years of fulltime TS experience talking and 18 years of fulltime JavaScript experience, on top of a whole bunch of full stack (Java and .Net with C#) experience. I think the popularity of TS is going to decline. And I think it's only popular because of the influx o…
I personally dislike Typescript as it is most often a hindrance for me, but: About 2 years ago I had a pull request from a junior Dev - I can't remember all of it but basically he had an event (passed from some slider component) if something in that event was undefined he set a variable to be null otherwise it was an array, then he did an if check against something else in the event, and inside the if he checked the…
As for your junior dev, maybe that makes the case for TS. But honestly, I've experienced junior TS developers who were simply overwhelmed by TS. They couldn't be trusted to write proper TS since they already struggled with JS. It just required us to review more code in their PRs.
I'll take a project with naming conventions, proper unit tests & code reviews over TS any day.
Re: State of JavaScript 2019
#368Earlier quoted context omitted.
TypeScript slows down a project. Nobody seems to ever point out what benefits it supposedly offers. My claim: TypeScript offers no benefit. Ever. That's 2 years of fulltime TS experience talking and 18 years of fulltime JavaScript experience, on top of a whole bunch of full stack (Java and .Net with C#) experience. I think the popularity of TS is going to decline. And I think it's only popular because of the influx o…
I'll disagree with this completely. I recently wrote an extensive post about my experience learning and using TS as both an app developer and a library maintainer for Redux, and why I am now completely sold on using TS across the board. As part of that, I listed several benefits of using TS that I've directly seen myself: https://blog.isquaredsoftware.com/2019/11/blogged-answers-le...
The bigger a project gets, the more unreadably TS snippets you run into. The cost/benefit ratio is awful; I've sometimes taken the actual author of the code and myself to analyse it, and it would take us over an hour just to get to the bottom of something that would be incredibly simple in regular JS.
From your article:
> Ah, the joy of reviewing a PR for a lib you maintain, when the PR contains code that you are not even remotely qualified to pass judgment on...
And then that code. Look at that. That's not nice. That's terrible code, horrendous. That should be rejected for the simple reason that it's unmaintainable.
> I begged for help on Twitter, and got a solution from the community that worked. I don't even pretend to understand the type declaration, but here it is:
The problem in larger teams is exactly this:
Some self-important TS lover in your team spends 4 hours tinkering together some arcane magic TS definition by copy/pasting a ton of shit from StackOverflow, is proud that it works, commits and pushed it, creates a PR... and everyone reviewing it is clueless what's going on. But it works.
Hell, if he understands it and it works, it must be good. Accept PR. Merge. Fast forward 3 months. Someone has to add a feature to this particular part of code. They look at the TS definition and 2 weeks later they have a new job.
I've seen people flee projects because of endless amounts of arcane TS...
If I'm imagining the perfect project it's based on a few qualities that I hold dear:
1. Sensible unit testing in place 2. Well defined code review standards 3. Strict naming conventions for code 4. Optional JSDoc where it makes sense 5. Minimalistic but readable amounts of code*
* Meaning that code should be short and concise, functional programming to the max, but not one big clump of inline nested functions.
JSDoc in itself allows you to type parameters and variables, it even adds human readable comments to the mix.
Then, when reading the project's code, you'll stumble upon a beautiful and sleek code base that just makes intuitive sense from the start.
---
I recently had a chat with someone about us developers always inventing the next pain in the ass to deal with. I think TS is a pain in the ass. When I started out with Classic ASP (Visual Basic 6.0) it was basically functional programming (functions and subprocedures) and we'd get everything done in record time, blazingly fast.
If VB6.0 was released by Microsoft today, millions of people would be fawning over it and it would become the next best thing. "What a cool Python alternative, thanks Microsoft!"
Same with Perl. Cool language. Hardly anybody uses it anymore. It's mostly Booking.com recruiting endless amounts of Perl developers because they're almost as rare as the fossils they often are (I worked there, I'd know.)
When we switched to XSLT and XML it was basically Handlebars, except not restricted, full of features, and just gorgeous to work with. But it lost its sexiness for some reason; mostly because JSON isn't compatible with XSLT. So nobody uses it anymore.
Now there's JSX, and that will also disappear over time. Probably for no good reason at all. Look at Angular and VueJS, they offer alternatives that are vastly inferior in many ways (no intuitiveness would be one, you need to learn the damn frameworks before you can get started), but they're the new kids on the block.
TypeScript is too often too easily accepted as the standard addition to a project. And I've experienced it NEVER to be the right call. And I've gotten other developers on said teams to–sometimes after some prodding–agree with my assessment.
Every project would be better off without TypeScript. I fail to see any of the benefits people mention because I've never seen them, I've only seen the exact opposite.
Re: State of JavaScript 2019
#369Earlier quoted context omitted.
I'll disagree with this completely. I recently wrote an extensive post about my experience learning and using TS as both an app developer and a library maintainer for Redux, and why I am now completely sold on using TS across the board. As part of that, I listed several benefits of using TS that I've directly seen myself: https://blog.isquaredsoftware.com/2019/11/blogged-answers-le...
I love Redux, I love your dedication to the community (also on Reddit), and I love your work. But this is the first time I find myself completely disagreeing with you. The bigger a project gets, the more unreadably TS snippets you run into. The cost/benefit ratio is awful; I've sometimes taken the actual author of the code and myself to analyse it, and it would take us over an hour just to get to the bottom of someth…
Beyond that, yeah, we'll have to disagree, per all the reasons I listed in that blog post.
Re: State of JavaScript 2019
#370Earlier quoted context omitted.
Typescript doesn't make things easier, and react is intuitive? You know April fool's is still a few months away right?
I have to say, although I agree that type-safety is nice, in practice having worked on many javascript apps large and small throughout the past decade, type errors have never been something that slowed me or my team down. Lately I've been questioning whether the hype around TS, and the extra layer of complexity, is really worth it. I guess it depends on the team etc, but I certainly question whether it's a good choic…
Anytime you try to call a property on an object that's undefined, or try to call a function that doesn't exist - those are type errors. And they're the most common JS errors we encounter.
Rollbar aggregated the 10 most common JS errors, and virtually all of them are type errors: https://medium.com/@Iren.Korkishko/10-most-common-javascript...