• 0 Posts
  • 16 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle
  • It’s gotten a lot better in recent years tbf in terms of those kinds of resources. Beginner recommended languages like Python are still a pain because it’s super easy for a beginner to bork how they set it up, but on the whole there’s plenty of online code sandboxes and other ways to get started.

    Your point is definitely valid though. Why on earth would we want someone who’s just showing an interest in programming to write their own compiler??? Wtf? If someone wants to get into baking you don’t send them out into the fields for 6 months to grow some wheat.

    When I was a kid I mucked around with html and css to make some GeoCities sites. I decided I wanted to learn how to code so I got a book from the library called “how to code games for beginners” or something. The thing never told you how to set up an IDE or compile the game. So I was just frustratingly typing out the code examples into notepad without a clue as to what to do. I think this was during the dialup era so it wasn’t like there was a wealth of info online.

    I ended up abandoning programming for quite a few years. It just seemed like nonsense because writing graphics libs for C in notepad does feel like nonsense to a child. I wonder what life would be like if I had some better resources at that moment in time and decided you continue pursuing it.





  • To counter this I used to visit some factories for a big contract manufacturer in the UK. They would often make say lasagne for the supermarkets and for the “premium” brands. Whilst they were all made in the same place, the “premium” brands products had much better quality ingredients in them and different ratios of the good stuff (say meat) to filler (say pasta sheets).

    For some things it’s the exact same materials, but for many it’s different. You have to do blind taste tests to see which ones you prefer.




  • Keeping it simple and moving on was a smart move. Your portfolio doesn’t need to be super fancy unless that’s the specific skill you’re selling (fancy designs and UI). Most jobs aren’t doing anything with threejs. Most jobs are crud apps, so focus on demonstrating skills to do with that.

    Svelte is also cool but the majority of jobs aren’t for svelte Devs, and most aren’t for Greenfield projects with bleeding edge tech. Where I am for FE it’s something like 60% react, 30% Angular, 10% Vue/svelte/whatever else. Just focus on building things which show you can do what the jobs you’re looking to apply for need.

    If you’re going full stack then just focus on one stack and focus on building (preferably novel) actual things that all work together. If you have full projects showing you can self direct and implement semi complex systems from start to finish in a stack that’s close enough to what employers are looking for you’ll have a lot more luck landing a job.






  • Yeah “why” comments are absolutely fine, “what” comments are useless at best and can be harmful at worst.

    I feel like this constant flood of “write comments” posts are from CS students who are told to comment everything by their lecturers. Descriptive variable and function names help explain the “what” of code pretty well most of the time.

    Sure with some old languages like C89 where you are limited in your variable name length you probably do need comments to explain wtf is going on, but most code bases aren’t as constrained.


  • I’m definitely there with you. I actually forgot that hot existed because it’s basically a ‘new’ sort.

    On the one hand it’s handy because it makes me browse Lemmy less and do more productive things instead, but it isn’t good for encouraging growth of niche communities and topics if everyone is just looking at the same few posts.


  • We test the shit out of our Apis. We do more API level/integration testing though.

    I.e. a test will be something like “if the db is in this state, and we hit this endpoint with these params, does it return what we expect and update the db correctly”.

    Our app is primarily about users maintaining stuff on big datasets with complicated aggregation and approval logic. So setting up a scenario and checking the app does what the business logic says it will do is what we want to know.

    It makes refactoring wayyyyy less painful to just know that the app will always behave itself. Rather than testing whether a function can add 1 + 2 correctly, we can test each endpoint does what it’s supposed to do.

    It gives us loads of confidence that the backend is doing what it’s supposed to. If you do a huge refactor you don’t need to worry about whether you broke the test or if the test is failing correctly. If the tests all pass everything is working as it should.

    Downside is longer test execution times (because a temporary db needs set up) when running the full suite. Worth the trade off for us though.


  • It’s more for library devs when writing their libraries. Using TS means you’re writing in one language and then distributing the compiled version for users.

    As users can use things in a lot of different ways you have to do a lot of type “gymnastics” to make your library API as useful as possible.

    That means spending a lot of time setting up types when a jsdoc and .d.ts file will do the same thing for library consumers.

    It’s really a non issue. If some library devs think they can ship code which is easier for them to maintain correctly, and end users have the same developer experience, then it’s totally cool.

    Of course people with no nuance are using this as an argument for why no one should write in typescript (because they don’t like it for some reason). This thread has a bunch of people doing this. That creates drama, but there really shouldn’t be any. TS is bae for me, but I totally get why library devs might want to not use it.