Programming

Lets try this.

I saw a poll on Twitter today which was “should I use typescript or javascript” that was 55% TS. I wonder if its just inevitable at this point. I have really not enjoyed my encounters with TS thus far. It seems highly verbose, ugly, and time consuming. React in particular has ways (propTypes) to mitigate the need for types. I use JSDoc on heavier functions to define argument types. Switching to TS after years of vanilla dynamic JS just seems completely unnecessary. Any thoughts?

Dude. I went off to an intern about this the other day.

I had never even heard of it really but was annoyed by it. I asked him to write some simple unit tests in node for a C++ module I have been managing and helping out on. He comes up with this super crazy and overly complicated build based on TS. Now I have to separate his crap with the other tests because they all need like 3 files each for some reason and must be compiled. I asked if he could just write the tests in JS/node because it’s easier to maintain for me and he insisted fiercely this was better. Kept asking how is it better and couldnt really get a straight answer.

This is one of my constant struggles actually. Give intern or relatively inexperienced person what I think is a pretty simple task with clear instructions I lay out (eg write unit tests, these are exactly what they should do, go for it) and they come up with some crazy overengineered or shitty thing. So my choices are to completely rebuild it myself, tell them to rebuild it which may take forever and a day, or just try to use it.

This typescript stuff is aids, it’s completely unreadable to me.

Another example - asked an intern to just write me a loop in bash or python, whatever he preferred, to iterate through some matrix of possible configurations for a test suite. It would be like N * M configurations. There’s probably a very simple single loop solution, 2 loops would be fine, whatever. I could write it but I’m so short on bandwidth and it can be challenging finding interns tasks they can actually do, so I delegate these things.

He comes up with monstrosity of a function that I shit you not, that had 4 nested loops. I have never seen anything like that in my life. On top of that he had some super complicated dynamic variable naming he was trying to do, and when I showed him an easier way to do it (just the bash equivalent of a foreach loop, iterating through a string of his configs via IFS delimiter) he looked at me like I was a total moron.

I guess this is an intern rant not a typescript rant.

Can this be expanded to general PC chatter? I tried getting a hardware thread going on Exiled but it went over like a fart in an elevator and I know most programmers have forgotten more about hardware than I will ever know

Sorry for mixing metaphors

Why not this thread seems dead anyway, in all forums it’s been in

Probably any of us could answer enough to point in the right direction

I just love gaming and I love building machines and talking shop but I know fuck all about programming beyond BASIC and who cares about that?

Yea, there’s a lot of topics other than strictly programming we discussed in the old forum. “Tech” would be a better title. It was just the fact that most of us are programmers.

I think programming as an ability is obviously extremely valuable but there are a lot of disciplines in tech that don’t require a strong programming ability, thank god. I consider myself average at best at writing code. I am a lot better at configuring (and especially hacking the shit out of) things than I am designing and writing a program.

I like to think I can write some pretty badass scripts though. My passion nowadays is anything Linux, I think it’s one of the most beautiful inventions of the last 100 years. My main machine is a PC which I game on but fuck me if I know how to do anything complicated on here. I had to modify a batch file last week and it was honestly making my eyes bleed.

Learning windows OS is on my endless todo but I’ll likely just pigeonhole myself into being a *nix guy

Hmm dont see a way to edit a title.

yeah because I’m dumb I blew up my last gaming pc a couple months ago by um getting it wet or something IDK. Motherboard was dead basically. To my shock it was surprisingly easy to take many parts of it and port it over. I had to buy a new case (probably not but meh), motherboard, CPU, but the m.2 drive, the other SSDs, the RAM, the PSU, the GPU all could be recycled from the old one - 2.5 years old. That would have been unthinkable 5 years ago. Weird stuff.

Still took me like 6 hours and dripping sweat to do this shit - last one I paid microcenter to put it together and totally worth it. Like I thought it was done and am playing some games and it locks up 3 hours in like 3x times and yeah I didn’t plug in the GPU fans right to the power supply and it doesn’t tell you in any way :expressionless:

1 Like

The typescript introduces typesafety to JavaScript and in complex, integrated applications this will pay off. It will prevent very hard to debug issues that are caused by unwanted and unintended type conversions. The trade off is that more effort is needed to keep the code simple.

For simple, isolated unit tests I don’t see the added value. Unless the rest of your code base would be in typescript as well.

There is no added value and I already have a maintenance nightmare on my hands. Going to have to refactor eventually but I’m very time and budget constrained so it’s a battle for a different day.

LMK if you want me to change the title to the tech thread, or tech and programming or whatever

i have to gently tell a very young and sensitive intern that the preferred way to testing his build changes is not to push a commit to master to trigger our automated testing.

his workflow all day has been, make a change to the makefile, push to master. It fails. Make another change, push to master. It fails. Like 7 or 8 times now. I don’t have the patience right now to tell him hey dude, maybe test the build before slamming it into master. It also isn’t really messing with anything other than being kind of annoying.

I get the sense that interns are kind of the bane of your existence lol.

It’s been a real struggle trying to hide my exasperation and i’m doing a very poor job of it. The good ones are great. The inexperienced and bad ones are more work than theyre worth.

I assume it would be unacceptable for the companies reputation to get rid of the not worth it ones and keep the worth it ones?

I know that we’re all super liberal here, but shitty employees are something I’ve lost a considerable amount of skin to and I’m now not very tolerant. Be good at your job or get a new one please. I’m pro UBI so I can stop feeling guilty about being super aggro about cutting dead weight lol.

I did recommend getting rid of one of them, because his attitude was so poor and he was so clueless and unable to contribute, but really, they are here for such a short period and are so cheap that it was deemed unnecessary.

The powers that be really underestimate the amount of overhead it is constantly trying to find things that these kids can do. The bright side though, is one of the good ones we are going to hire (which I really pushed for). He’s raw but very smart and will be a good fit.

Yeah… if you got one good engineer out of it it’s hard to argue that the whole thing wasn’t worth it from a business perspective.

The fuck can you push to master at all? Very easy to disable that on github and probably other things.