ProgrammerHumor

pleaseBeTheFirstGuyWhileUsingTypescript

pleaseBeTheFirstGuyWhileUsingTypescript
https://i.redd.it/ziqrrbg1acdf1.jpeg
Reddit

Discussion

Sculptor_of_man

Types are just chains we voluntarily put on ourselves. Cast off your chains brothers! Cast them off I say.

15 hours ago
syntax_erorr OP

Can we cast these chains this into an integer? Yes or NaN?

15 hours ago
ThisUserIsAFailure

[] or ""?

15 hours ago
Longjumping_Try4676

`isPersonAboveMesCakeDay` or `1 // 1`?

11 hours ago
Ronin-s_Spirit
:js:

That's why I don't like the boastful ideals of typescript, it doesn't actually type anything post-processing but it sure as hell constrains you to write more boilerplate or even perform circus tricks to please the transpiler.

P.s. like there was this one Peacock guy where he spent an entire video on doing no useful work and just fiddling with type descriptions for deeply freezing objects or something. And in the end there wasn't even an indication that he can freeze more than 2 layers of objects.

4 hours ago
Sufficient_Zone_1814

Nah it is what it is. I'm making crud apps for cheap organisations not saving lives.

15 hours ago
Ok-Nectarine-2195

Every project ever: 'We'll start with TypeScript for structure!' ...three deadlines later: 'Just slap some JavaScript in there, we gotta ship!😂🎉

14 hours ago
AWeakMeanId42

tbh i wouldn't even care about that if there were tests. write tests. tests will save you. tests are great. you cannot have a serious modern tech stack without tests. I think after the 2018-2019 great hiring, this needs re-iterated. Write tests.

13 hours ago
Shufflepants

Or at least if you're building a restful api, add in a library that will automatically check the requests and your responses against the openapi specification and throw errors for requests and warnings logged on your end for responses.

12 hours ago
CandidateNo2580

I use FastAPI/Pydantic for this - I honestly couldn't imagine writing an API any other way.

5 hours ago
Shufflepants

It seems a lot of people like to just automatically generate an API spec from their code and annotations so that the spec is just "whatever the code does". I'm sure their users are very happy with them when they keep accidentally deploying non passive changes.

4 hours ago
CandidateNo2580

I'm still relatively new to web dev so I can remember a day where I was frustrated that my pydantic schema was throwing an exception because I was missing a value in the response.

Then I started in on Fullstack and holy shit, my pydantic schema throws an exception long before I have to troubleshoot the missing value from the frontend! It's glorious.

3 hours ago
rsumit123

I dont like types while writing code but i like types while debugging someone else's code. Am i the problem?

5 hours ago
DKMK_100
:cs::cp::j:

Yes

3 hours ago
Super_Couple_7088

Only time I would actually use static types is if I CARED.

2 hours ago
NAL_Gaming
:cs::py::dart::js::unity::s:

Honestly, fair enough :D

1 hour ago
raimondi1337

My first commit at my current job 1.5 years ago was to turn off type checking.

I have committed only JS to the TS repo so far.

I have never been happier and my team has no complaints.

10 hours ago
MeltedChocolate24
:c::j::ts::py::js:

TS makes things so much easier though once you’re used to it

10 hours ago
raimondi1337

JS skill issue

10 hours ago
Papierkorb2292
:kt::cs::j:

C-x M-c M-butterfly

9 hours ago
Bathtub-Warrior32

Object.is(NaN, NaN); // -> true

NaN === NaN; // -> false

13 hours ago
DKMK_100
:cs::cp::j:

that's a floating-point issue, this one isn't even javascript's fault.

10 hours ago