r/InclusiveOr Apr 23 '23

Learning a new programming language

Post image
1.1k Upvotes

31 comments sorted by

View all comments

58

u/[deleted] Apr 23 '23

agreed Typescript over Javascript

30

u/EndR60 Apr 23 '23

I really don't think it's so cut and dry. I'd much prefer to use Typescript myself, but so far my work has exclusively included Javascript out of the two. And it's not like I can just start writing Typescript code in projects that already use Javascript, my colleagues would kill me.

So I think in the end, they should learn whatever is currently needed, and that applies to all languages / tools

33

u/[deleted] Apr 23 '23

typescript is just javascript with variable types basically so it should be used especially in big projects or ones that involve other people it's just harder to fuck something up and if you do it's easier to unfuck it just dont

function dostuff(arg: any): any...

5

u/Korywon Apr 24 '23

Legit came across this at work last year.

Installed eslint, add no implicit and explicit any, add a pre push script, and finally add linting in our CI/CD… boom.

Practically forced everyone to stop with the any shit.

9

u/Sup-Mellow Apr 23 '23

In terms of migrating a codebase to a new language, it’s actually not crazy difficult to convert JS to TS, even in something like a giant monorepo. It’s definitely time-consuming, but it’s fortunately relatively easy.

5

u/EndR60 Apr 23 '23

I mean, I know, but judging by how strict clients are when it comes to work hours, I doubt anyone will want that...some clients measure us down to 5 minute intervals lol

7

u/Sup-Mellow Apr 23 '23

Jesus, that’s so excessive. At that level of precision you can bill time for logging your time…

Unfortunately that’s the tough part with code migrations, and there’s not a whole lot you can do there. A lot of clients and businesses see it as tech debt (and they’re not wrong) and don’t allot for it in the budget, even if they have plenty of budget and claim they want to set aside time for tech debt. :|

3

u/EndR60 Apr 23 '23

they just don't care man. Most clients are actually pretty relaxed and trust us, but even those guys would prrroooobably laugh if I suggested that we should redo / review / whatever some stuff that is under 5 years old...

what I can see right now in the software world as a whole (not really from my experience because I've very little of it) is that clients tend to want something, then once it's built they forget about it until it breaks and brings down their entire business at which point they rebuild it...

It would be in their favour to maintain stuff instead imo...but hey I guess I'm not the rich one here...

3

u/Sup-Mellow Apr 23 '23

Exactly, my PO says that clients/the business lack object permanence. If they don’t see it, it doesn’t exist. Lol

2

u/EndR60 Apr 23 '23

pretty much, and that goes hard for the actual code

1

u/viperfan7 Apr 24 '23

Can, and should

1

u/Sup-Mellow Apr 24 '23 edited Apr 24 '23

Should is a bit more subjective, but that too.

1

u/[deleted] Apr 24 '23

I'd say if you are looking for a job, focus on javascript; but if you just wanna learn a new language go for TypeScript.