[-] Von_Broheim@programming.dev 26 points 10 months ago* (last edited 10 months ago)

Yeah, that's great, until you need to conditionally compose a query. Suddenly your pre baked queries are not enough. So you either:

  • create your own shitty ORM based on string concatenation
  • create your own shitty ORM
  • or use a well supported ORM, those almost always support query composition and native queries

You write like it's ORM vs native. ORMs let you write native queries and execute them while also doing all the tedious work for you such as:

  • mapping results to model objects
  • SQL injection safety
  • query composition
  • connection builders
  • transaction management

So if you love native queries write native queries in an ORM which will do all the tedious shit for you.

[-] Von_Broheim@programming.dev 4 points 10 months ago

I'm learning Scala, is that close enough?

[-] Von_Broheim@programming.dev 2 points 10 months ago

Language absolutely is a marketable skill because most companies are looking to hire someone who can start working day one not someone they'll have to train for weeks or even months in a new language that heavily relies on some specific framework.

[-] Von_Broheim@programming.dev 2 points 11 months ago

The problem is that code is language and people who write shit code tend to write shit comments, so no value is gained anyway. The sort of person who'd write good comments will most likely write good code where these comments are not needed, and when they intentionally write shit code they'd probably explain why.

So best you can hope for is that both of these people write comments about why they decided to write a comment, and hopefully the person who writes shit code improves over time.

[-] Von_Broheim@programming.dev 2 points 11 months ago

In culinary terms a back end is usually a pasta bake that's undercooked in the middle but burnt on the edges. Front end is usually a pasta bake smoothie in a nice looking cup with an umbrella.

[-] Von_Broheim@programming.dev 2 points 11 months ago

People hating on Java because "inheritance" usually don't know the difference between inheritance and polymorphism. Stuff like composition and dependency inversion is black magic to them.

[-] Von_Broheim@programming.dev 12 points 11 months ago* (last edited 11 months ago)

Yeah, you never see this in enterprise settings. Sure builders or streams can get a bit long but you just pop each .x() on a new line.

And when they're on new lines intellij has a cool feature where it creates a little UI only comment next to the line showing what type it returns.

[-] Von_Broheim@programming.dev 2 points 11 months ago

Yeah that can get ugly but it's still better than writing native queries because you know it's gonna automatically translate to any db specific sql flavour.

When they get a bit too long and ugly I either write default methods using specifications or I create a more concisely named default method that wraps the verbose monster.

[-] Von_Broheim@programming.dev 11 points 11 months ago

Had an ultra wide for a while, went back to 2 27" monitors after 2 years. 2 monitors is more convenient imo. I can flip one vertical whenever. Less fiddly to have multiple things open at once. One is centered while the other is on the side and angled, much nicer way of separating what's my focus. Easier to screen share. I always found the curve distracting for text.

[-] Von_Broheim@programming.dev 4 points 11 months ago

I find ChatGPT more coherent than stackoverflow in many cases. Sure it hallucinates and sometimes acts like it has dementia but at the very least it won't write 5 paragraphs about how the framework behind my issue works without giving any examples.

Stackoverflow is good for finding alternative approaches, getting explanations for how stuff works in the framework, and error investigations. Useless for getting information on stuff you don't already know.

[-] Von_Broheim@programming.dev 3 points 11 months ago

That's why JavaScript and Python projects are also memed and a nightmare. Not because they're bad, but because it's so popular a huge amount of amateur code exists.

view more: next ›

Von_Broheim

joined 1 year ago