News for hackers. Stuff that matters.
Re:Choose Boring Technology (2015) by austincheney on Sunday February 21, 2021 @09:47AM (#26213770)
There was no hate intended in my comment, but I can understand how you came to that conclusion. My experience posting on r/javascript of Reddit has taught me some developers are insecure, extreme conspiracy-theory paranoid insecure, about working without their favorite framework.
Re:Choose Boring Technology (2015) by spion on Sunday February 21, 2021 @11:00AM (#26214400)
How much experience do you have working with JS?
Re:Choose Boring Technology (2015) by austincheney on Sunday February 21, 2021 @11:13AM (#26214520)
I have been writing it full time about 13 years. I love writing in this language, and TypeScript even more. I am just frustrated by what appears to be some combination of insecurity, false expertise, and a vehement lack of passion in the work force. If I want to be happy I should move on to a different technology stack, but I really enjoy making products in this language.
Re:Choose Boring Technology (2015) by BigJono on Sunday February 21, 2021 @12:01PM (#26215047)
It's funny, I have about 13 years experience, have been senior in both enterprise, start-ups and everything in-between, and have basically the exact same view about front end dev as your original post.

Except I fucking hate using Typescript, and totally wasn't expecting to see you mention you like it, given all the other stuff.

IME all the same people that overengineer everything with god awful dependencies are the same ones pushing super hard for typescript on every project I'm on. When they get their way (as always, since everything is decided democratically and everyone is dragged down to the level of the worst dev on the team), they write the worst typescript ever. On my last project, one of the people championing typescript defined some constant strings containing css breakpoints as the type 'string | int'. Rather than getting knocked back as one of the dumbest lines of code in the history of front-end, this somehow generated 3 pages of discussion in code review then got left in. I'd give the person a pass, assuming they'd never used a typed language before, except (a) they were senior and (b) they're the one that wanted types. These "seniors" lack even the most basic understanding of the shit they're using, but feel the need to impose their opinions about libraries, tooling and languages constantly.

I don't feel like I'd mind using TS at all on my personal projects, but on work projects with average devs it just adds another entire layer of complexity that they spend hours and days and weeks and months wrangling with instead of writing any code that might be remotely useful, by say, maybe implementing a business requirement, or doing anything that makes the company money instead of pissing away millions in salaries playing npm lego.

Plus, although I'm not familiar with any of it since I'm never the one pushing for TS, and so never the one setting it up, I've seen people spend absolutely ludicrous amounts of time tinkering with webpack and fussing over TS integration with 3rd party libraries and whatnot.

I'm surprised you haven't run into more of these people that just seem to use TS as a complexity multiplier for every bad engineering decision they make. Like spending 6 months setting up Gatsby or Next isn't costly enough for them, so they decide to tack on 3 months of TS integration and 'upskilling' for 3000 combo points, when they already (more or less, usually less) know how to write Javascript.

Re:Choose Boring Technology (2015) by deckard1 on Sunday February 21, 2021 @02:19PM (#26216254)
> some constant strings containing css breakpoints as the type 'string | int'

yeah this really is the fundamental problem with TypeScript advocates. They seem to come in two different breeds: A) people that would rather be doing Haskell but are forced to use JavaScript because that's where the jobs are and see nothing at all wrong with type inference and error messages that are 10 lines long and completely indecipherable by actual humans, and B) people that have never used a language that isn't JavaScript and have no clue how to structure type interfaces within an actual system (you end up with partial/omit and optional fields every-fucking-where and no rhyme or reason behind anything).

For some stupid reason this entire industry seems to suddenly believe that a 40+ year old debate of static vs. dynamic typing was settled because Microsoft came out with TypeScript.

Re:Choose Boring Technology (2015) by spion on Sunday February 21, 2021 @02:50PM (#26216495)
This really isn't true, and TypeScript is fundamentally different from most other typed languages (except perhaps for typed Scheme / typed Racket) and as such is often used in different ways. You should look into the differences.
Re:Choose Boring Technology (2015) by real-dino on Monday February 22, 2021 @04:45AM (#26222552)
I've used typed languages before (C#), and I've used Javascript for 8 or so year, and yep, I too can't see what the hell Typescript brings.

I also used Haxe, which was a similar typed language, that compiles down to Javascript, and writing typed language for an untyped environment was an exercise in frustration.

It's almost like the React trend to write CSS in javascript. It separates the end result from the code even more, and doesn't really get you anything other than the typescript tax.

Maybe one day I will have that aha moment and get it, but the only real reason I see to learn Typescript is if the industry deems it essential to learn.

One of my favourite things about Javascript is how expressive you can be in it. Some of the new ES6 stuff helps with this too, but at the point when you write Typescript, you might as well be writing in a whole different language.

But naturally every typescript fan has a few stories about 'type-safety' saved their bacon, and no stories about how they struggled with defining types for callback functions or getting everything scaffolded for hours.

Re:Choose Boring Technology (2015) by spion on Monday February 22, 2021 @09:58AM (#26225233)
TypeScript is a fundamentally different type system to most of the other mainstream languages (similarities exist only in typed racket and clojure's core.typed). The fundamental differences stem from the fact that it tries and succeeds to model almost all existing expressive dynamic JS constructs. The resulting different features include:

* structural instead of nominal types (i.e. if it walks like a duck and talks like a duck, it is a duck)

* mapped types let you transform object types into other object types: https://www.typescriptlang.org/docs/handbook/2/mapped-types....

* conditional types let you apply conditional type transformations, and combine with mapped types to provide the equivalent of for comprehensions https://www.typescriptlang.org/docs/handbook/2/conditional-t...

* template literal types let you generate dynamic string types on the fly, which you can use in various places including property names: https://www.typescriptlang.org/docs/handbook/2/template-lite...

and so on.

It does have a learning curve, and the tooling is annoying to set up.

Re:Choose Boring Technology (2015) by pjmlp on Tuesday February 23, 2021 @05:03AM (#26235558)
Which means that what looked like a nice WebIDL like in version 1.0 has grown to Haskell level language features by 4.2.

I expect Template TypeScript and Liquid TypeScript are not far off.

My enthusiasm for it has died, and I enjoy just doing a plain old <script src="myfile.mjs"/> on my own projects.

Re:Choose Boring Technology (2015) by austincheney on Sunday February 21, 2021 @01:18PM (#26215704)
TypeScript is nice when you are working with data structures because everything can be defined as interfaces, including functions and methods. This allows you to identify errors as you are writing code instead of having to execute it. Of course this only works if you make use of strict type definitions. TypeScript is like steroids in that it only makes you more of what you already are, which could be quite negative. TypeScript is not a supplement for missing discipline.

> I'm surprised you haven't run into more of these people that just seem to use TS as a complexity multiplier for every bad engineering decision they make.

AngularJS claims to be TypeScript but most instances of Angular code rarely make use of type definitions, which then defeats the whole point of TypeScript and then only contributes to spaghetti and tech debt.

Re:Choose Boring Technology (2015) by pjmlp on Tuesday February 23, 2021 @05:05AM (#26235568)
AngularJS doesn't do TypeScript, Angular does.
Re:Choose Boring Technology (2015) by pjmlp on Tuesday February 23, 2021 @04:59AM (#26235546)
I love Anders work, but TypeScript seems to have gone too far in type system experiment.

Configuring the compiler is now as complicated as selecting the right set of GHC compiler pragmas to successfully compile the code, and they are anyway type annotations that have zero impact in code performance, just a friendly than using JsDoc.

I look forward to when browsers just adopt WebIDL and be done with it.

Re:Choose Boring Technology (2015) by phendrenad2 on Monday February 22, 2021 @12:02PM (#26226875)
> These "seniors" lack even the most basic understanding of the shit they're using, but feel the need to impose their opinions about libraries, tooling and languages constantly.

Oh yeah, I feel this. The problem is many "seniors" went from junior->senior by being the big fish in a small pond (small startup + golfing buddies with the CTO) so they never had to question their own assumptions. Then they just glide from job to job at the senior level. It makes for monsters who can't differentiate their own personal preferences from industry best practices, and will attack your PRs if you go against either.

Re:Choose Boring Technology (2015) by reasonabl_human on Tuesday February 23, 2021 @11:05AM (#26238875)
How did you get into the startup world? I’d like to work with people like you.
Re:Choose Boring Technology (2015) by BigJono on Wednesday February 24, 2021 @12:25AM (#26246878)
Wish I had a better answer, but it was pretty much just luck. A bit of accidental networking and good timing.

When I finished uni I had a few interviews for large enterprise-y companies to get into their graduate programs. None of those panned out. Then while I was looking for more things like that, one of my classmates asked if I wanted to interview to be employee #1 at the startup him and a non-technical friend had created.

They didn't have much funding, so it was ~45k (minimum wage or close to it in Australia) to start, as opposed to the grad programs that I think would have been around 55k-60k. But the job was basically building an entire fairly large and complex web app (as well as a bit of desktop and hardware related stuff) between the two of us, who had close to zero real world experience, my friend on the back-end and me on the front-end. So we basically just had all the responsibility, with no experience, and nobody to guide us.

From there I just hopped around a few jobs, looking for small places where I was the senior or second most senior person on the team. I learnt from the first job that the easiest way to learn is to be in a position where you have as much responsibility as possible so failure isn't really an option.

Re:Choose Boring Technology (2015) by spion on Sunday February 21, 2021 @02:31PM (#26216344)
Similar situation here. I disagree that frameworks are the problem though. Build tools, especially related to CSS and assets are IMO the biggest issue. TypeScript's support for monorepos could also be better.

Things have improved a lot since 2009 however, IMO. There was barely a concept of modularity at that time, the tools (e.g. AMD / requirejs / r.js) were way worse and managing the state of the DOM was a pain, jQuery or otherwise.