• 0 Posts
  • 36 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle
  • I had a fun one this week! I needed to make an SQL query that would aggregate rows by invoice and date, but only aggregate 5 then overflow to a new row. I also needed to access the individual row data because the invoice items weren’t summed, they were displayed on separate columns!

    I ask my senior if there’s an easy way to do this, he comes back with “chatgpt says you can assign row numbers then get individual row data with % row number”

    I go to Gemini and ask “how to aggregate rows by 5 and get individual row data out?” It says “you can’t” (since when has Ai’s been able to say you can’t do X) So I ask it about the modulo operator and it gives me an example that doesn’t really work. After screwing around for a while I give up and decide I’ll just run this query 3 times. 1 for rows 1-5 then for 6-10 and one more for 11-15 that’s so many rows surely no one will break this.



  • It’s funny, to me I’ve had an llm give me the wrong answer to questions every time.

    The first time I couldn’t remember how to read a file as a string in python and it got me most of the way there. But I trusted the answer thinking “yeah, that looks right” but it was wrong, I just got the io class I didn’t call the read() function.

    The other time it was an out of date answer. I asked it how to do a thing in bevy and it gave me an answer that was deprecated. I can sort of understand that though, bevy is new and not amazingly documented.

    On a different note, my senior who is all PHP, no python, no bash, has used LLM’s to help him write python and bash. It’s not the best code, I’ve had to do optimisations on his bash code to make it run on CI without taking 25 minutes, but it’s definitely been useful to him with python and bash, he was hired as a PHP dev.










  • I don’t get why we’re taking a swing at Linus here. The article only mentions him in relation to the rust for Linux project being slow going. But, it IS going and the US government has only stated that “you need a plan to move to a memory safe language by 2025 or you might be liable if something bad happens as a result of the classics (use after free/double free/buffer overflow/etc.)” but I don’t think Linux would count it’s free software and it does have a plan.








  • At work we have a lot of old monolithic OOP PHP code. Dependency injection has been the new way to do things since before I started and it’s basically never used anywhere.

    I assume most people just find it easier to create a new class instance where it’s needed.

    I’ve never really seen a case where I think, “dependency injection would be amazing here” I assume there is a case otherwise it wouldn’t exist.