ckaygusu
Joined 13 years ago
Joined 13 years ago
It might be beneficial to spice things up, but this is in general not a good advice.
> He never spent a long time on a problem since he believed that the subconscious would continue working on the problem while he consciously worked on another problem.
This is definitely a thing. Intellectual labor just isn't physical labor.
There's nothing that prevents you from swimming against a stream, but we know swimming with the stream is faster. Same thing here. It's not impossible in javascript, but typescript makes code maintenance much more easier.
> Can’t you also write unit tests in JavaScript?
"Being more than sum of its parts" and all that.
> This is a false sense of security. “Compiling” without errors just tells me I did not do something dumb like assign a string to an int. Is this really the main issue devs have? From what I have seen no… Devs usually need to chase down and understand the code regardless of type checking.
Typescript does not solve all the software engineering problems. It makes common problems and annoyances much more easy to handle.
2 out of 3 of the items you wrote down has to deal with old baggage, so whatever form of language you are dealing with those, you aren't going to have a good time. You can either bite the bullet and write the type definitions yourself, or just disable the type system altogether, which, if you can isolate it to a certain area in the code, you are fine.
If you are writing code that some other person is going to read and/or you are interested in having it behave reliably in the long run, I think a static type system is a must. Coupled with good unit tests, if the type checker does not complain, you can be very confident the code you wrote is working and will work for a vast majority of the cases.
Typescript is especially great because, unlike some other statically typed languages, you can choose not do use it in some cases (e.g., setting up mocks for tests, writing a small script to see how stuff works, etc), which is liberating.
I went from Python to Typescript. Python is still my go-to language for random tasks, though unless I have a good reason to do otherwise, I don't want to deal with a production codebase that does not do static type analysis anymore. I don't know others, but I just get more done in less amount of time in this way.
I am going through F1->H1B process. I do not have an H1B visa, and I have a document that tells me I am allowed to stay in the country in the H1B status between a time period, and you are telling me I am in trouble because I do not have a visa. Ok, I suppose.