• 0 Posts
  • 20 Comments
Joined 3 months ago
cake
Cake day: August 21st, 2024

help-circle
  • GooberEar@lemmy.wtftoProgrammer Humor@lemmy.mlComenting code
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    2 months ago

    I use VS Code and GitHub Co-pilot and develop in a variety of different languages and frameworks. I’ve got lots of experience with some, but I’m less knowledgeable on others.

    So, having the AI assist with languages I am very familiar with is basically a way to save time and preserve my mental energy. For languages and frameworks I’m less experienced with, it speeds things up because I’m not having to constantly search how-tos and forums for guidance. And for languages/frameworks I have limited or no experience with, it can be a helpful learning tool that speeds up how long it takes to get ramped up.

    With this set-up, if I start writing a line of code and then pause for a moment, co-pilot kicks in and tries to autocomplete that line, sometimes even suggests the entire block of code. It’s really good at recognizing simple patterns and common boilerplate stuff. It’s less good at figuring out more complex stuff, though.

    However, I find that if I start out by writing a comment that explains what I’m trying to accomplish, and to some degree how to accomplish it before I start writing one of those more complex blocks/lines, the AI has a much higher success rate in returning helpful, functioning code. So, basically yes, I write the comment to describe code I haven’t written, and I’ll let the AI take over from there.

    This works for code, raw database queries, configuration files, and even for writing tests. I’m not an expert at building out Docker configurations for local development or configuring auto-deployment on whatever random system is being used for a project, but I can often get those things up and running just by describing in comments what I need and what I’m trying to accomplish.

    The VS Code co-pilot extension also has some context menu items that let you ask questions and/or ask for suggestions, which comes in handy for some things, but for me, typing out my intentions in comments and then letting the auto-complete kick in as I’m starting a line of code is faster, more efficient, and seems to work better.

    Granted, co-pilot also likes to try to auto-complete comments, so that’s sometimes funny just to read what it “thinks” I’m trying to do. And most of the time, I do remove my comments that were specifically to guide co-pilot on what I wanted it to do if they’re super redundant. And, at the end of the day, not everything co-pilot suggests is production-worthy, functional, nor does what I actually described. In fact, a lot of it is not, so you should expect to go back and fine tune things at a minimum. It’s just that overall, it’s good enough that even with all the supervision and revisions I have to make, it’s still a net positive, for now.


  • GooberEar@lemmy.wtftoProgrammer Humor@lemmy.mlComenting code
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    4
    ·
    2 months ago

    I know some folks are joking about and dunking on this, but in modern times, I have justification. Call me lazy, but I have found myself writing out these comments and then letting the AI take over to at least give me a sketch of an implementation. Works reasonably well and saves me a lot of time and effort. Mostly I don’t bother to remove them, though I usually edit them a bit.

    On the other hand, there are factions within my colleagues who steadfastly insist that commenting is unnecessary and to some degree even potentially harmful, and that if you feel the need to comment your code, it means your code should be improved so that it’s obvious what it is doing without the need for comments.






  • My credit card offers virtual credit card numbers AND the ability to auto-lock the virtual numbers so you can set a date and after that the number will not accept new charges.

    I make sure to use a virtual card number for everything subscription based, then I immediately set the auto-lock feature to expire in a few days (give the initial charge time to clear but still plenty of time before the subscription would otherwise renew).

    Some subscription services make it super tough to cancel. This method fixes that issue for the most part. Some subscription services terminate immediately once you cancel the subscription, even if you still have “time left” otherwise. This way you don’t really have to formally unsubscribe. It’s easy peasy pumpkin breezy as the common folk like to say.



  • No. And he’s not just mad at cat ladies.

    This whole idea that people with biological children are more invested in the future of the country than those without kids is just a thinly disguised dog whistle that’s firmly rooted in misogyny and homophobia.

    This is a line that theoretically doesn’t precisely and specifically just target homosexuals, there’s also “collateral damage” to infertile couples and those who choose to go child-free. And there’s a sufficient number of those people that it serves as the basis for plausible deniability. That they specifically call out “cat ladies” fully reflects the misogynistic aspects of it. But make no mistake, this is undeniably a basis they might use to deny rights to the LGBT+ community.



  • I don’t think this opinion is really all that unpopular, but I get that this sub is often used to air grievances and somewhat popular opinions, so I won’t judge too harshly.

    Pretty impressive modlog rap sheet you got there OP! I had my last account for over a year and I don’t think I got banned or had a comment removed once, so seeing an account with dozens of entries is eye opening to say the least. This account is new enough that I’ve managed to stay off the modlogs so far with it as far as I’m aware. Maybe I should go into a random sub and say something racist and/or toxic! Are there any dog specific communities where I can request dog meat recipes?




  • Edit: I need to see what dried beans I have and maybe go shopping. I will give this a try with a couple different types of beans and report back if I fart or not.

    Hope you have some alpha-galactosidase at your disposal.

    The simplified explanation: A reason beans give some people gas is due to certain types of sugars and carbohydrates they contain. Those sugars are water soluble. Seems like brewing beans would concentrate those sugars and lead to epic tootage.

    Also, one method for reducing how much gas that beans cause is to soak them in lots of water. Basically, soak them for up to 8 hours, drain, rinse, and repeat a couple more times. It works on the same principal, that the soaking process will remove at least some of the problematic, water soluble sugars. Supposedly adding a small amount of baking soda helps, too. I’m less certain about that.


  • Earlier this year one of my relatives came for an extended visit. We were discussing what we might have for dinner that week and both of us were on board for the same ingredients, such as asparagus. My relative was also happy with the video services I’m currently subscribed to because I have a couple options they don’t have at home, so they were telling me about how they were rewatching some older Harrison Ford movies. And then there’s the age-old (or old age) conversations about our current health issues.

    In the following days, my relative kept bringing up the fact that their phone and tablet are listening to our conversations. Proof? After we had the food conversation, their news feed was suddenly filled with asparagus recipes. They were also getting ads for more Harrison Ford content on the service that they don’t subscribe to. And to top it off, they were seeing ads for a prescription my dog takes but that they had never even heard of before our conversation the day or two before. Isn’t it obvious? They’re listening to our conversations.

    To me this was easily explainable by Occam’s Razor. All our devices are on the same IP address. After we discussed the asparagus I went online that night and did a search for asparagus recipes. And when we were talking about my dog’s health condition, I used my phone to look up the active ingredient because I couldn’t recall off the top of my head. Plus, when Hulu or whatever random service sees you’re watching a lot of Harrison Ford movies, it makes sense they’d advertise others you might like.

    That makes a lot more sense and is a lot less complicated of an explanation than “our devices are always recording our conversations and uploading them to the internet as a basis to send us advertisements”.

    Sure it’s technically feasible, but if it were happening, surely they would be a lot more incontrovertible proof than a questionable and likely misinterpreted news source that seems to be more of a “sly” advertisement for a tech solution that the big players aren’t actually using.




  • This actually is a good point and is one of the reasons that overuse of emojis can be annoying for some folks. Basically it boils down to the fact that a lot of people using them don’t use them effectively or in a way that provides any “value” to the reader.

    For an otherwise clear and benign statement, a grinning emoji to signify that the writer wants their statement to be “fun” isn’t particularly useful, relevant, nor insightful for the reader. At best, it comes across as unnecessary filler like an ad at the end of a sentence. It makes no difference, it’s just there for the writer’s own pleasure. Nothing wrong with that, but hopefully you can see that it would be annoying for some folks.

    On the other hand, using emojis effectively, like putting one after making a sarcastic statement provides insight and meaning to people reading. In other words, it has value for the audience, provides useful context. A lot less annoying to people when they actually derive some benefit from it.

    One issue is, a whole lot of people don’t recognize this and/or don’t care.



  • Imagine if every language in the world used the exact same alphabet, exact same words with the exact same spelling, and exact same sentences but the meaning of those words/sentences varied from person to person, region to region, in different contexts, and sometimes changed day to day. Then on top of that, the words even rendered differently from device to device.

    Additionally, there was no way to look up what those words meant to the person writing them, who you don’t even know. Even if you ask for clarification, there’s less than 50% chance they’ll respond at all, let alone provide a sincere, meaningful, and accurate answer.

    That’s what emojis are like to me. Sure, some of these same complaints apply to text-based communication as well, but emojis take it to the extreme.

    I don’t typically care that much if people use them – for instance, to reinforce the meaning or intention of their message. But it’s mildly annoying when the emojis are a message all of their own and that person is trying to communicate with me.

    Additionally, there’s an extremely high degree of correlation between people and messages that use a bunch of emojis and actual quality of the message/meaning being sent. In other words, if someone’s using a lot of emojis to communicate, I can pretty much completely disregard anything they have to say because it almost certainly holds no value to me. And that’s okay.

    So maybe in a broader sense, comments/titles/descriptions with lots and lots of emojis is annoying similar to seeing advertisements at the top of my search results and interspersed in the front page posts. It’s useless drivel that mucks up the experience.

    And even to use your description as an example:

    I don’t understand at all how that emoji is necessary or even insightful. It seems completely contradictory to the “But seriously” at the start of the sentence, it doesn’t seem like anybody with any degree of reading comprehension would mistake what you’re saying as being something negative/nasty/mean/hurtful/etc so it’s like if I ended my sentence with “and I’m currently chewing gum”. Okay, nice to know I guess, but why would I need to be told that?