• 7 Posts
  • 65 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle





  • Good advice, just to add to this:

    • Comments should be part of code review, having at least two pairs of eyes on comments is crucial. Something that’s obvious to one person maybe isn’t so obvious to another. Writing good comments is as hard or harder than writing good code, so having it checked for mistakes and quality is a must
    • Comments aren’t the actual documentation and aren’t a reason not to write documentation to go along with your code. Often I see larger projects where each class and function is documented in comments, but the big picture and the how and why of the overall structure is completely missing. Remember that in the real world you often have a lot of folk that need to understand how the code works, who aren’t programmers themselves. They can’t read the code or don’t have access to the code. Writing documentation is still important.
    • Please for the love of god when you change code, check if the comments need to be updated as well. Not just around the immediate area, but also the entire file/class and related files. I’ve worked on large codebases before with a high wtf factor and having the code do something different to or even opposite the comments is a nightmare. I’d rather have no comments than wrong comments.

  • As someone who has worked on embedded systems for the past 30 years: It used to be a real big deal, but for the past 10-15 years it hasn’t. We now have fully fledged multi core systems running everything. Even small embedded sensors or actuation controllers are 100+ MHz microcontrollers with oodles of flash and ram.

    Now there has been an interesting turnaround with the whole chip shortage for the past years. All the young folk are at a loss, being used to just putting powerful chips all around willy-nilly. So they turn to the old folk like me to figure out designs with less chips, running busses all over and connecting dumb sensors/actuators to a central processing unit.





  • One of the most important ones is this one: https://joint-research-centre.ec.europa.eu/jrc-news-and-updates/stemming-tide-beach-litter-2018-09-25_en

    This was the basis for the decision to mandate the caps be attached to the bottles, since they found a lot of caps and less bottles. This would indicate a lot of caps get separated from their bottles, which this change should mostly fix.

    The other was an interview with this guy: https://zwerfinator.nl/ I can’t find the interview, no idea why, but he hasn’t published the results yet (no idea why, it was scheduled to be published I think, but somehow got delayed). They were saying the new pfands really helped and the number of bottle caps have gone down. But this is highly depended on the location. For example a lot of research is focused on beaches, where there is obviously often a large delay between the deposition and the collection. In city centers this time is often much shorter, so the impact of changes are seen faster.

    So sorry to disappoint, it’s too soon for a peer reviewed study diving into this. Also with all the other changes the EU has mandated on litter and single use plastics, it would be hard to quantify which implementation has what effect.

    But my thinking was: There is for me good data showing this is an issue (which I was doubting) and the solution seems solid enough. Other changes like pfands on small bottles and cans have made a big impact (research is available for this, for example https://open.overheid.nl/documenten/ronl-8b11214f23388b3395402609d76286475b4f2908/pdf). And the people doing the research say they’ve seen results that it works. So that was enough to convince me.

    If somehow the caps being attached doesn’t lead to less caps in litter, that would be a very interesting result. Without a doubt the EU would change the regulation to fix it, depending on why they think the change didn’t work. But this would not lead to the caps being like they were in the past.



  • Thorry84@feddit.nltoMildly Infuriating@lemmy.worldEuro bottles are so much better now
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    2 months ago

    I can’t find it on mobile right now. It was a preliminary result, because the attached caps haven’t been required that long. Also most countries have implemented extra pfand systems for small plastic bottles, which also helps. So it’s tricky to say which regulation helped most.

    But there are plenty of sources of how many bottle caps there are in the streets and oceans. And how harmful they are to animals who think the small bright things are food.

    It also makes sense, instead of the bottle and the cap becoming seperate pieces of trash, it’s now a single piece. So it reduces the number of pieces if not the volume of trash.

    Also for people from the US where bottles are shredded and caps typically not recycled. In Europe the caps also don’t get recycled, but instead removed. The bottle is then checked for leaks and defects and if it passes it’s cleaned and then reused. Actually recycling plastic is hard, so this way a bottle can be used at least two or three times.

    You don’t get your pfand in many cases if the cap isn’t on, as well as the label many times. This isn’t so much needed for the recycling but important for the whole process. For example groceries are required to take in bottles, but are allowed to limit this to bottles they sell. So the barcode om the label is checked for this purpose. The label is removed in the recycling process. The cap is required to motivate people to return those and not have them turn into litter. It’s also a hygiene thing for the people handling the bottles, often there is liquid still in the bottle and without the cap it comes out during handling.

    I will find the data later when I’m on desktop.


  • Yes I hate them as well, they always get in the way and putting the cap back on is super annoying.

    However, since these bottles were introduced data has shown they work. Bottle caps were one of the most found items in trash picked up from the streets. The number of bottle caps has gone way down since these were introduced.

    So I’ve accepted them. Can’t argue with data. I’ve never returned a bottle without a cap in my life. I’ve never thrown away a cap separate from the bottle. But turns out the world is full of psychopaths who throw the cap in the street. Probably the same kind of person who throws their trash by the side of the road from their car. Fuck those people.



  • Voice actors are busy sometimes, it happens.

    I’m still mad about what Amazon did to Ray Porter on Bobiverse 5. Ray said he was super busy and might not be available, they pressured him to finish the reading on schedule anyways. Then somebody at Amazon decided the release date is going to be September 5th. So there was no reason to put Ray on a deadline and could have just let him figure out his own schedule.





  • There may be exceptions but everything I’ve seen from AI programming is next level trash. It’s like copy pasting from Stack Overflow without the thousand comments all around it saying DO NOT DO THIS!

    When ChatGPT was just released to the general public I wanted to try it out. I had it write a script to handle some simple parsing of network log files. I was having some intermittent issue with my home network I couldn’t figure out, so I had logged a lot of data and was hoping to figure out the issue. But I needed to filter out all the routine stuff that would be just noise in the background. I could have written it myself in about an hour, but figured hey maybe ChatGPT can help me bang it out in a couple of minutes.

    The code it wrote looked at a glance to be very good and I was impressed. However as I read it, it turned out to be total nonsense. It was using variables and declaring them after. Halfway the script it seemed to have switched to a completely different approach leaving some sort of weird hybrid between the two. At one point it had just inserted pseudo code instead of actual functional code. Every attempt to get it to fix it’s issues just made it worse. In the end I just wrote the script myself.

    I’ve seen examples from other people who attempted to use it and it’s just bad. It’s like having a junior programmer high on weed writing your code, checking it and fixing it takes more time than just writing the code itself.

    Then there’s the issue of copyright, a lot of the training data wasn’t licensed and stuff like Github Copilot want to add your data to it’s training set if you want to use it. That’s not OK on many levels and not even possible for people working on corporate codebases.

    A lot of programmers work on big code bases, with things like best practices and code standards. Not only does the AI not know the codebase and thus wouldn’t know how to do a lot of stuff in that codebase, it also doesn’t know about the best practices and code standards. So for those kinds of situations it isn’t useful.

    I feel like people ask it to do some first year student programming tutorial tasks and the result looks somewhat like what one would expect and conclude the thing can actually write code. It really can’t in reality and probably shouldn’t even if it could.