There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

doctorcrimson , in The Perfect Solution

“Is this number even?”

“yes of no”

“Invalid Response, please answer with yes of no”

“yes of no”

"Invalid Response,…

MrOxiMoron ,

Dutch programmer, ‘of’ is dutch for ‘or’.

I wonder if OpenAI is smart enough for that

olutukko ,

I would imagine it is. I have tried all sort of typos and it has never misunderstiood me because of that

pressanykeynow ,

I dunno, I once combined two languages in the context and it started to give me a bunch of python code. Was scary.

xx3rawr ,

“Is this number even?”

“ja”

Gobbel2000 , in Need a rust version too.
@Gobbel2000@feddit.de avatar

Rust:

Cannot move princess out of castle which is behind a shared reference

Octopus1348 ,
@Octopus1348@lemy.lol avatar

It will also complain that trying to break into the castle is unsafe, so you have to tell it that you know.

Rodeo ,

That just means you designed your castle unsafely.

Hazzia ,

Skip the castle and call the princess directly!

CanadaPlus , (edited )

“Alright, but you better be outside of a properly locked up and OSHA-compliant castle with the princess by the time I get back, or I’m not compiling”

And then you do that, but you miss a smoldering ember from one of the castles torches, and everything including the horse and princess catches fire. Next time, pick an escape plan that only requires unsafe for the drawbridge.

There’s a totally safe way to do it too, I guess, but it involves building a series of replacement castles, and it’s also totally ugly and sinfully slow.

magic_lobster_party ,

You can’t rescue the princess, but you can borrow her.

cactusupyourbutt ,

…good enough.

Ill get her back in 3 minutes

marcos ,

Just clone the princes and get on with your day.

GBU_28 , in Your scrunglebop is disponscabulated
Bubs , in Brainfuck is the sixth circle

Apparently, this is the code for a Hello World program in Malbolge:

(=<#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:H%c#DD2^WV>gY;dts76qKJImZkj

Shyfer ,

Beautiful

Yearly1845 ,

deleted_by_author

  • Loading...
  • gravitas_deficiency ,

    Idiomatically nonsensical, as all things should be.

    RootBeerGuy ,
    @RootBeerGuy@discuss.tchncs.de avatar

    Biblically correct hello world

    LostXOR ,

    Looks like the backticks in the program messed up the formatting a bit, here's it with fixed formatting.

    (=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj
    
    

    Not that it's any more intelligible. :D

    brbposting ,

    What steps did you take to fix the formatting?

    (Save me the Unicode identifier / dive into console :) )

    stebo02 ,
    @stebo02@lemmy.dbzer0.com avatar

    just copy the comment?

    LostXOR ,

    I just grabbed the original program from Wikipedia and put it in a code block.

    mindbleach ,

    The document icon below each comment is “view source.”

    brbposting ,
    mindbleach ,

    … where are your vote icons, in general?

    brbposting ,

    Wasn’t logged in,

    https://sh.itjust.works/pictrs/image/da351898-0631-4b4d-b967-89acca032873.jpeg

    nice thanks :)

    Still curious why your comment doesn’t show on Lemmy.world!

    mindbleach ,

    General ban by an admin being an asshat. Haven’t bothered asking nicely to get reinstated.

    Lemmy desperately needs some default notification, because what newbie is checking a site’s modlog with any regularity? I didn’t even know it existed. I was bickering with some troll who said ‘you’re cruising for a report, mister!’ despite being far further over-the-line than me, and I said, that’s adorable, knock yourself out. And then things so thoroughly stopped working that I assumed my LW account had been straight-up deleted.

    Meanwhile, that troll suffered no consequences whatsoever. Despite starting shit, getting personal, and being wrong. My accordingly low opinion of moderation across Lemmy has since been vindicated more often than not. This was the largest instance that didn’t demand “civility” as a constant choke-collar, and the worst problems I’ve had have still been mods flying off the handle in cases where I’ve been perfectly polite.

    Apparently I can’t say please and thank you without people taking it as vicious sarcasm, so I don’t fuckin’ try and I don’t fuckin’ worry about it. It’s been freeing.

    brbposting ,

    You’re cruising for a double report now, mister!

    Aww man. Good point about the notification. Better luck in the future.

    FreshLight ,

    Ah, yes! Much better!

    mox ,

    Huh. Looks just like Perl.

    yetAnotherUser ,

    And I’ve heard it took years until someone managed to do it

    JATtho ,

    Holy cow.

    mrkite ,
    @mrkite@programming.dev avatar

    Mom, put down the phone, I’m using the modem!

    teamonkey , in My Journey
    mvirts ,

    Lol

    Blackmist ,

    You still need doctors, because Dr Google just thinks everyone has cancer.

    Speculater ,
    @Speculater@lemmy.world avatar

    Every fucking time. “Cancer or an autoimmune disease.”

    See a doctor: Oh, it’s a pinched nerve / sprain / hemorrhoid.

    Fuck Google.

    frankyboi ,

    how the hell did you make this username ?

    Speculater ,
    @Speculater@lemmy.world avatar

    On your instance profile page you can change your display name. It allows some emojis.

    frankyboi ,

    thanks

    ChickenLadyLovesLife ,

    “Just because my medical school was in the Cayman islands doesn’t mean I’m not a real doctor.”

    bjoern_tantau , in Touch a file in Linux
    @bjoern_tantau@swg-empire.de avatar

    Does anyone actually use touch for its intended purpose? Must be up there with cat.

    BestBouclettes ,

    The intended use of touch is to update the timestamp right?

    bjoern_tantau ,
    @bjoern_tantau@swg-empire.de avatar

    Yeah. It could just as well have issued a file not found error when you try to touch a nonexistent file. And we would be none the wiser about what we’re missing in the world.

    BestBouclettes ,

    If you touch -c it should work I guess

    4am ,

    “Do one thing and do it very well” is the UNIX philosophy after all; if you’re 99% likely to just create that missing file after you get a file not found error, why should touch waste your time?

    0x0 ,

    Because now touch does two things.

    Without touch, we could “just” use the shell to create files.

    
    <span style="color:#323232;">: > foo.txt
    </span>
    
    deegeese ,

    Touch does one thing from a “contract” perspective:

    Ensure the timestamp of <file> is <now>

    dan ,
    @dan@upvote.au avatar

    Systemd also does one thing from a contract perspective: run your system

    emptiestplace ,

    Oh no.

    :(

    dukk ,

    Does it do it well, though?

    stebo02 ,
    @stebo02@lemmy.dbzer0.com avatar

    with this logic, any command that moves, copies or opens a file should just create a new file if it doesn’t exist

    and now you’re just creating new files without realising just because of a typo

    Kusimulkku ,

    But this directly goes against that philosophy, since now instead of changing timestamps it’s also creating files

    kautau , (edited )

    You can pass -c to not create a file, but it does go against the philosophy that it creates them by default instead of that being an option

    EDIT: Looking closer into the code, it would appear to maybe be an efficiency thing based on underlying system calls

    Without that check, touch just opens a file for writing, with no other filesystem check, and closes it

    With that check, touch first checks if the file exists, and then if so opens the file for writing

    magic_lobster_party ,

    I sometimes use cat to concatenate files. For example, add a header to a csv file without manually copy and paste it. It’s rare, but at least more frequent than using touch.

    wewbull ,
    
    <span style="color:#323232;">$ cat file1 > output_file
    </span><span style="color:#323232;">$ cat file2 >> output_file
    </span><span style="color:#323232;">$ cat file3 >> output_file
    </span>
    

    I’m sorry!

    dan ,
    @dan@upvote.au avatar

    That’s its intended purpose - combining files together (the opposite of split). See the first line of the man page: man7.org/linux/man-pages/man1/cat.1.html

    funkajunk ,
    @funkajunk@lemm.ee avatar

    TIL it’s actually for changing timestamps.

    www.man7.org/linux/man-pages/man1/touch.1.html

    TheBat ,
    @TheBat@lemmy.world avatar

    Wtf. All these years I thought ‘touch’ was reference to Michelangelo’s Creation of Adam.

    funkajunk ,
    @funkajunk@lemm.ee avatar

    That’s beautiful, bro 🥲

    gandalf_der_12te ,

    touché

    orphiebaby ,

    That’s not how you use “touché”. Pet peeve of mine.

    BitsOfBeard ,
    @BitsOfBeard@programming.dev avatar

    Touché!

    RustyShackleford ,
    @RustyShackleford@programming.dev avatar

    🇪​🇳​ 🇬​🇦​🇷​🇩​🇪​

    or…

    ʳᶦᵖᵒˢᵗᵉ…?

    ik5pvx ,

    Yes, when you are for example checking if the permissions in the directory are correct, or if you want to check if your nfs export is working. It’s one of those commands that once you know it exists, you WILL find a way to use it.

    bjoern_tantau ,
    @bjoern_tantau@swg-empire.de avatar

    Well, those aren’t really the intended use either.

    tubaruco ,

    what is cat’s use if not seeing whats inside a file?

    Navigate ,

    It is short for concatenate, which is to join things together. You can give it multiple inputs and it will output each one directly following the previous. It so happens to also work with just one input.

    kautau ,

    That’s why we have bat now

    github.com/sharkdp/bat

    0x0 ,

    To bonbatenate files?

    kautau ,

    Exactly

    DrWeevilJammer ,
    @DrWeevilJammer@lemmy.ml avatar

    Bat bat bo-at

    Bonbaten-fana fo-fat

    Fee-fi-fo-fat

    Bat!

    Hamartiogonic ,
    @Hamartiogonic@sopuli.xyz avatar

    Cat with wings? Isn’t a bat more like a rat with wings?

    Mad_Punda ,

    TIL

    I never realized. Thanks!

    ulterno ,
    @ulterno@lemmy.kde.social avatar

    It is to use along with split. e.g.

    1. You take a single large file, say 16GB
    2. Use split to break it into multiple files of 4GB
    3. Now you can transfer it to a FAT32 Removable Flash Drive and transfer it to whatever other computer that doesn’t have Ethernet.
    4. Here, you can use cat to combine all files into the original file. (preferably accompanied by a checksum)
    Tangent5280 ,

    Doesnt computers do this automatically if you try to copy over a file larger than its per file size limit?

    Octopus1348 ,
    @Octopus1348@lemy.lol avatar

    No. It just gives an error that it’s too big.

    sqw ,
    @sqw@lemmy.sdf.org avatar

    i use both frequently but im also a pretty dumb user

    marcos ,

    When you updated a Django server, you were supposed to touch the settings.py file so the server would know to reload your code. (I haven’t used any for a long time, so I don’t know if it’s still the procedure.)

    There are many small things that use it.

    alexdeathway ,
    @alexdeathway@programming.dev avatar

    it now has a hot reload, How long ago were you using Django?

    noproblemmy ,

    cat

    Ahhhhh, fuck. I’m quite noob with linux. I got into some rabbit hole trying to read the docs. I found 2 man pages, one is cat(1) and the other cat(1p). Apparently the 1p is for POSIX.

    If someone could help me understand… As far as I could understand I would normally be concerned with (1), but what would I need to be doing to be affected by (1p)?

    survivalmachine , (edited )

    The POSIX standard is more portable. If you are writing scripts for your system, you can use the full features in the main man pages. If you are writing code that you want to run on other Linux systems, maybe with reduced feature sets like a tiny embedded computer or alternates to gnu tools like alpine linux, or even other unixes like the BSDs, you will have a better time if you limit yourself to POSIX-compatible features and options – any POSIX-compatible Unix-like implementation should be able to run POSIX-compliant code.

    This is also why many shell scripts will call #!/bin/sh instead of #!/bin/bash – sh is more likely to be available on tinier systems than bash.

    If you are just writing scripts and commands for your own purposes, or you know they will only be used on full-feature distributions, it’s often simpler and more comfortable to use all of the advanced features available on your system.

    Phoenix3875 ,

    If you execute a binary without specifying the path to it, it will be searched from the $PATH environment variable, which is a list of places to look for the binary. From left to right, the first found one is returned.

    You can use which cat to see what it resolves to and whereis cat to get all possible results.

    If you intentionally wants to use a different binary with the same name, you can either directly use its path, or prepend its path to $PATH.

    zurchpet ,
    @zurchpet@lemmy.ml avatar

    We use it to trigger service restarts.

    
    <span style="color:#323232;">touch tmp/service-restart.txt
    </span>
    

    Using monit to detect the timestamp change and do the actual restart command.

    dan ,
    @dan@upvote.au avatar

    This is an interesting idea to allow non-root users to restart a service. It looks like this is doable with systemd too. superuser.com/a/1531261

    zurchpet ,
    @zurchpet@lemmy.ml avatar

    Indeed. Replacing monit with systemd for this job is still on our todo list.

    Speculater ,
    @Speculater@lemmy.world avatar

    Cat is actually super useful.

    Crow ,

    I mean, timestamps aren’t really all that useful. Really just if you do some stuff with makefiles but even then it’s a stretch. I did once use cat for it’s intended purpose tho, for a report. We split up the individual chapters into their own files so we have an easier time with git stuff, made a script that had an array with the files in the order we wanted, gave it to cat and piped that into pandoc

    NotSteve_ ,

    I used it recently to update the creation date of a bunch of notes. Just wanted them to display in the correct order in Obsidian. Besides that though, always just used it for file creation lol

    Anticorp ,

    I use it all the time, especially in ssh on a server.

    qaz ,

    Yes, Nextcloud can’t sync files with a timestamp of 0

    NaiveBayesian ,

    Yup, stupid zip files and their directories from 1970

    starman2112 ,
    @starman2112@sh.itjust.works avatar

    I don’t know anything about Linux but I do love touching cats

    YoorWeb ,

    You would love Linux cli.

    Trainguyrom ,

    Touch is super useful for commands that interact with a file but don’t create the file by default. For example, yesterday I needed to copy a file to a remote machine accessible over ssh so I used scp (often known as “secure copy”) but needed to touch the file in order to create it before scp would copy into it

    emptiestplace ,

    Sorry, what?

    makingStuffForFun ,
    @makingStuffForFun@lemmy.ml avatar

    I use it regularly

    mox ,

    Creating an empty file is one of its intended purposes. Unix commands were designed as multi-purpose primitives, so they could be reused and composed to handle many different tasks. The touch command is no exception.

    www.youtube.com/watch?v=tc4ROCJYbm0&t=287s

    sirico , in I'll just be a quick 3h
    @sirico@feddit.uk avatar

    ❗❗❗❗❗❗❗❗❗❗❗URGENT❗❗❗❗PLeSE READ ASAP❗MY REQESTS ARE MORE IMPORATNT THAN YOUR TIME❗❗ CC: yourboss,your mum,your uni prof

    derfl007 ,

    Behind every ❗️❗️❗️🚨🚨🚨URGENT🚨🚨🚨❗️❗️❗️ there is a person who’s about to miss a deadline and, instead of working on themselves to prevent that from happening in the future, makes it the developer’s deadline to miss

    pomodoro_longbreak , (edited )
    @pomodoro_longbreak@sh.itjust.works avatar

    Also that urgency is rooted in job insecurity, not even customer impact. They just don’t want to look bad.

    E: which I mean fair enough, me too, but still.

    jaybone ,

    But if you do your job properly, you don’t end up in this situation.

    pomodoro_longbreak ,
    @pomodoro_longbreak@sh.itjust.works avatar

    Yeah but we’re all learning, so a certain amount of grace is called for.

    Anyway, not to counter my own point. There’s a line, is what I’m saying, and it’s blurry.

    dependencyinjection ,

    So much this.

    I’m in my first professional role and the first project was completed and aside from my boss I was the only other dev. So I was naturally excited for their (clients) feedback on it.

    Well fast forward a couple of months where they really didn’t interact with the application much and then came the queries and then not understanding how to use it. Find boss sets aside 10 days for me to write some documentation with screenshots of all the journeys (free of charge).

    Again, tumbleweeds. Then all of a sudden it’s boom emails a plenty.

    Can you fix this, this is a major bug kinda emails. Like it isn’t a bug, you don’t know how to use it.

    Now we are dumbing down the software to make it more align with what the business is used to, which is fine but even my boss has said (as I over think and want to reply to things instantly) that just because they have come to life doesn’t mean we drop everything else to tend to them now.

    Gumbyyy ,

    Sorry to break this to you…but this won’t be the last time that happens. In fact, it’ll probably happen on more projects than not.

    bregosh ,

    that just normal software development with contacts and waterfall. usually with agile it’s meditated to some extend, because with agile the customer is on board and cannot say afterwards i didn’t want it.

    dependencyinjection ,

    We don’t do agile, my boss usually keeps it all in his head and I have to pry it out of him what he wants done.

    Also, I think you dropped this “a” from one of your words. Hehe

    TeenieBopper ,

    Welcome to the professional world where everything is iterative and and 95% of your clients (internal or external) are data illiterate and don’t want to learn whatever self service tools you build.

    dependencyinjection ,

    Yeah it’s going to wild I can already tell. I know your right to as it’s only a small company I work for, less than 10 of us and they all complain about stupid things the clients do.

    I have a colleague who is the contact for a dude that takes a picture of a site with his phone, so he photographs the monitor. Which I know isn’t that unusual, but wait.

    He then emails this to himself, perhaps to have it on his desktop. Proceeds to print off the image, but not just the image, but the image as it appears in the email. THE ACTUAL EMAIL.

    Then he will annotate the printout and I shit you not, will take another photo, but this time of the printout. Inception level shit.

    He then sends that in by carrier pigeon email.

    Hazzia ,

    Jesus christ

    onlinepersona , in Bill is a pro grammer
    philm ,

    Yeah, but unironic…

    If your code needs comments, it’s either because it’s unnecessarily complex/convoluted, or because there’s more thought in it (e.g. complex mathematic operations, or edge-cases etc.). Comments just often don’t age well IME, and when people are “forced” to read the (hopefully readable) code, they will more likely understand what is really happening, and the relevant design decisions.

    Good video I really recommend: www.youtube.com/watch?v=Bf7vDBBOBUA

    Vilian ,

    and if you need an unnecessarily complex code for performance sake?

    hstde ,

    There’s a comment for you to explain the why.

    Rule of thumb: code explains the how and what, comments explain the why.

    philm ,

    Yeah that’s a good summary

    magic_lobster_party ,

    Those cases are rare. Often the most basic solution is good enough.

    If you have to write complex code, then you should write a comment (write the name of the algorithm for example).

    Test_Tickles ,

    Rare?
    Where do you guys work that all you do is write basic AI generatable code?
    The only thing I can think is that you are a bunch of freelance devs who never have to maintain anything or add functionality to old code. Either that or you are all new and are just full of theoretical bullshit that you read on the internet.

    magic_lobster_party ,

    So you implement A* type of algorithms every day in your work?

    Test_Tickles ,

    Yes. I mean often enough that I wouldn’t call it rare.

    You are a front-end js/ts devel, aren’t you? That makes sense. I can understand why you would have such a skewed view of programming. When everything you write is disposable and might be scrapped every 2 - 3 years, comments would seem like nonsense and a waste of time.

    But that is definitely not everyone’s experience. More than half the code I have written has had a minimum 15 year life expectancy. Comments are essential to remember what I was doing in whatever random language I had to use at a given point. I might not comment on “x++;” but I sure as shit will on “x += (xDelta * yDelta + 31) / 32;” Actually, that’s not true, if the logic is complex enough for the rest of the code chunk, I might just comment on “x++;” to make it clear what x is in this case and why it needs to unconditionally be incremented here. Even if the reason seems ridiculously obvious right now. Because that shit might not be obvious at all in 10 years.

    magic_lobster_party ,

    My job title is actually a data scientist. I’ve seen few pieces of code that couldn’t have been made more explainable by just using a more clear and concise naming of variables and functions. Don’t try to be so overly clever with your single letter variables and Greek alphabet. Just explain what it is with a good name.

    If I’m lucky I get to write a cool new algorithm once per quarter or so. Usually it’s just a standard algorithm that has an explanation in a Wikipedia page, so I just give the name of the algorithm and a link to that page.

    Most of the time we’re just doing basic data processing building on the preexisting solutions. These generally don’t need comments.

    The worst code is usually when someone has tried to be overly clever (including myself). Often a simple and straightforward solution had been overlooked. Simple solutions are easier to understand and maintain. Anyone can just look at the code and get a sense of what’s going on without any comments. In many cases a simple solution has also more accurate and faster to compute.

    In my work, having explainable results far outweighs anything else, and you don’t get that by writing difficult to understand code.

    Pickle_Jr ,

    Yeah, another way I’ve heard it phrased is comments are for explaining why you did things a certain way, not for explaining what it’s doing.

    heikomat ,

    Exactly that! Everyone can See “what” is happening, the code is right there. But the code usually doesn’t tell you “why” that is happening - good comments help understand the authors intent and give context, so you don’t have to guess.

    Good comments should explain the things that are not obvious.

    Good comments more than once prevented me from accidentially undoing a fix.

    nilloc ,

    Yup my comments are generally along the lines of:

    • I could have done this X way, but it ran slower
    • I was running out of time so this it’s mostly copied from (stack overflow url)
    • refactor when time allows

    This is a side effect of doing lots of tiny websites , microcontroller code and mini web apps for under budgeted marketing projects with constantly changing designs and requirements that don’t need to last too long.

    ChickenLadyLovesLife ,

    comments are for explaining why you did things a certain way

    A while back I spent more than a year modifying my company’s iOS apps so that they would work properly with VoiceOver (Apple’s screen reader technology for blind people) and be compliant with FCC regulations for accessibility (and save us from $1 million per month fines lol). The thing about VoiceOver is that it’s bizarrely buggy (or was - maybe they’ve fixed the problems since then) and even when I didn’t run into VO bugs, the way that developers tended to architect these apps often made getting them to behave properly with VoiceOver extremely difficult.

    I often had to resort to very strange hacks in order to get things to work, and I would always leave comments explaining what I had done for this. My manager was one of the new breed who not only thought comments were unnecessary in ALL cases but also thought comments were a “code smell” and indicative of professional incompetence on the part of anyone who used them. Whenever he reviewed my code, he would leave in the hacks (after trying and failing to fix the problems without them) but remove my comments. This resulted in many cases later of developers contacting me to ask me why some bizarre bit of code was in the app in the first place. I always referred them to my manager with an NMP (Not My Problem any more).

    magic_lobster_party ,

    I think most people fail to understand what code smell really is. They think code smell means bad code. A code smell is actually an indication that something else might be bad with the code. The code smell itself might not be bad.

    So when a code smell appears, it means you should identify the reason it exists and potentially fix it. In this case the bad code is a buggy external library, which is difficult for you to fix. Therefore, leaving the “code smell” is the best course of action.

    Your manager was in the wrong and you were right to write comments.

    zalgotext ,

    This resulted in many cases later of developers contacting me to ask me why some bizarre bit of code was in the app in the first place. I always referred them to my manager with an NMP (Not My Problem any more).

    I hope this isn’t a real story. It would have taken you just as long to refer them to the commits with your comments still in, and run a git blame to show your manager took them out. Instead you just make yourself look unhelpful and incompetent.

    docAvid ,

    Bold of you to assume they were using source control under that manager…

    magic_lobster_party ,

    I’ve seen code that look like this:

    int delay = 15 * 60; // 10 minutes

    Even if the comment was on the same line someone forgot to update it. People just ignore comments.

    Better solution is to write (in C#):

    TimeSpan delay = TimeSpan.FromMinutes(15)

    Much more obvious what the code actually means.

    18107 ,

    A better comment would be delay in seconds as that is the one thing not obvious from glancing at the code.

    magic_lobster_party ,

    Or just name the variable delaySeconds if you really want to store it as an int. Bonus is that every use of the variable perfectly communicates what it is.

    CCatMan ,

    Is the better way is a runtime performance hit. Does the compiler optimize this?

    magic_lobster_party ,

    It’s probably a little bit slower, but there are other things more worth to optimize than to shave off a few microseconds from a 15 minute delay.

    CCatMan ,

    Yeah, it adds up eventually when working with embedded platforms, but for PC stuff I agree.

    magic_lobster_party ,

    If you’re working in embedded I guess you can probably make an inline function or a macro so it’s taken care of at compile time.

    astraeus ,
    @astraeus@programming.dev avatar

    This mindset is good, but unfortunately enforces bad programmers to leave their undocumented code in critical places where someone eventually has to figure out what the hell they were doing or refactor the whole damn thing because they got promoted to middle-management and can’t remember why they even wrote it.

    magic_lobster_party ,

    Chances are that the comments quickly turn out of date and become incorrect. Misleading comments is worse than no comments.

    astraeus ,
    @astraeus@programming.dev avatar

    We shouldn’t waste time documenting our code when we need so much of that time breaking our code

    heikomat ,

    If the comments tell you “what” happens, then yes, they can geht outdated fast. The details of how something works can change quickly.

    But comments documenting “why” something is done (a certain way) - explaining the intent - are probably valid for mich longer.

    In the best case comments aren’t viewed as something that is seperate from the code, but part of it. So that if someone changes the code, the comments has to be checked aswell (if the explanation of “why” something is done actually changed).

    ChickenLadyLovesLife ,

    This is something that is always stated by people who are opposed to comments, but I’ve never seen any such thing in practice. If being mislead by incorrect comments is so common, there should be a bunch of stories around about disasters caused by them - and I’ve never read a single such story.

    magic_lobster_party ,

    I’ve seen it. That’s why I’m opposed to comments unless they really bring value (like explaining the why instead of the what).

    ChickenLadyLovesLife ,

    I’ve seen it.

    OK, so let’s hear your story about how misleading comments caused a major (or even a minor) problem.

    magic_lobster_party ,

    One example was when a method's documentation said that it would throw a certain exception. Turns out it was actually throwing a different exception (deep into the code), so no wonder why we never captured it in time.

    Anticorp ,

    Code comments are useful for browsing a script and understanding it at a glance. I shouldn’t have to scroll up and down across 700 lines of code to figure out what’s happening. It’s especially useful with intellisense, since I can just hover over a function and get a tooltip showing the comment, explaining what it does. It also helps when using functions imported from other files, since it’ll populate the comment showing me what parameters are needed and what each should be. Comments save time, and time is valuable.

    floofloof , (edited )

    If you’re working with others, even simple code benefits from comments explaining what it’s intended to do. Sure you can read code and get a good idea of what it seems to do, but you can’t be sure that’s what it was meant to do, or why it was meant to do that. Having a quick statement from the author enables you to work faster. And if you find a mismatch between the comment and the code, it’s a smell that could mean a bug.

    And for methods and functions it’s particularly helpful to have a description at the top. Many IDEs will pop this up when you’re using the method, so you can quickly confirm that it’s appropriate for your needs and get your arguments in the right order.

    I even comment code for myself because it will save me time when I return to the project months later.

    No comments would be fine if you could trust that everyone writes code that does what it’s intended to do and you can read code as quickly as you can read English. Maybe I’m a poor coder but I find neither of these is usually true.

    philm ,

    Don’t get me wrong comments != documentation (e.g. doc-comments above function/method).

    I probably was a bit unprecise, as others here summed up well, it’s the why that should be commented.

    CowsLookLikeMaps OP ,

    Or you’re stuck within the confines of a horrible legacy system which the business will not allow you the time to refactor/rewrite but still want your code to be somewhat readable.

    But in general, I agree with your argument. When writing from scratch or improving reasonably well designed code, often documentation could be replaced by breaking it up into another function or naming variable better. It’s a bit of a code smell for violating the SRP. And yet there are times that documentation is needed for the “why”. Things are nuanced I guess.

    BeigeAgenda ,
    @BeigeAgenda@lemmy.ca avatar

    Sounds very theoretical, my experience working on some 40 year old software full of business logic, where customer A got some feature but customer B needs it to work slightly different. Aka something approaching spaghetti.

    Regarding old comments I have several times used ~15 year old comments by the original author, close to the actual code to piece together the use of that code, and if I can add my fix there.

    In this setting You write comments for yourself, when you in two years need to fix a bug in the new code caused by your old code. And for the next developer that will look at your code decades after you left the company.

    Sometimes you, against good practice, comment out a section, with a note why, because you know this will have to be re-enabled in a few months.

    Report from the frontlines…

    DaleGribble88 ,
    @DaleGribble88@programming.dev avatar

    I have such a love-hate relationship with that video. On the whole, I think that video is bad and should be taken down. The creator is arguing against a very specific type of commenting but is harassing comments in all forms. It even addresses as such with a 20 second blurb 2/3 of the way into video distinguishing between “documentation comments” - but doesn’t really provide any examples of what a good documentation comment is. Just a blurred mention of “something something Java Doc something something better code leads to better documentation” but doesn’t elaborate why.
    It’s a very devious problem in that I don’t feel like any particular claim in the video is wrong, but taken within the context of the average viewer, (I teach intro. comp. sci courses and students LOVE to send this video and similar articles to me for why they shouldn’t have to comment their spaghettified monstrosities), and the inconsistent use of comments vs. code duplication vs. documentation, the video seems problematic if not half-baked.
    In fairness, it is great advice for someone who has been working in the industry for 15 years and still applies for junior positions within the same company - but I can’t imagine that was the target audience for this video. In my experience, anyone who has been programming on a large-ish project for more than 6 months can reach the same conclusions as this video.

    ChickenLadyLovesLife ,

    I’m from the camp that thinks if you’re trying to make a case (about any subject), you should start with your strongest point and work to your weakest point. Every argument I’ve ever seen against code comments starts off with the weakest imaginable points. Usually the first point made is sample code like “x = x + 1” with the absurdly unnecessary comment “add 1 to x” - as if that’s ever something that pro-comment programmers do. This video at least started off with a novel weak point (somebody using a comment with a magic number instead of making it a constant) although it’s just as weak as the “x = x + 1” argument.

    potustheplant ,

    That’s like saying a book’s synopsis shouldn’t exist because you can just read the whole book. Sometimes comments can save you a lot of time and point you in the right direction.

    philm ,

    Nah, it’s not, code is modular (IME should be kinda tree-structured), a book is linear.

    So the API should be in your analogy the synopsis. And I haven’t said, that there shouldn’t be any comments. E.g. doc-comments above functions, explaining the use-cases and showing examples are good practice.

    potustheplant ,

    Books can be modular as well (ever heard of “Rayuela” by Cortazar?) But that’s beside the point. The analogy is fine and it works.

    Awkwardparticle ,

    One day you will inherit a code base so bad that you’ll end up commenting old code just to make sense of it for yourself because nobody in the company has touched in a couple years and the last people that did no longer work there. It will be dangerously coupled, if you make the right change somewhere it will break everything else. It will be true spaghetti code where you spend 30 min just following a code path to figure out what and why an input into a function needs to be what it is to able to come out of another function in an exact format for anything to work.

    Your so called comment standards and principals are fine if you are building something from the ground up, but the other 95% of the time, you do what you gotta do because your were blessed with a turd that is impossible to polish.

    philm ,

    One day you will inherit a code base so bad that you’ll end up commenting old code

    Will not be the case, I won’t take a job, where I have this situation (or I’ll quit pretty quickly)…

    Yeah my “comment standards” (btw. as others mentioned here, I was unprecise/unlucky with the choice of words, I meant “comment the why” or doc-comments totally fine and should be aimed)

    Your so called comment standards and principals are fine if you are building something from the ground up

    Yes that was also targeted with my comment. But what you’re referring to is just missing documentation, and I think this should be done on a higher level. The “comment why” rule applies for spaghetti code non-the-less…

    whileloop , in Stop doing Computer Science
    @whileloop@lemmy.world avatar

    This could be so much longer.

    Killing children, class systems, so many programming language names, the ridiculous ways equality and order-of-operations are done sometimes. Plenty of recursion jokes to be made. Big O notation. Any other ideas?

    MxM111 ,

    GOTO

    Hoimo ,

    GOTO is the only thing that makes sense. It’s the “high-level” concepts like for-loops, functions and list comprehension that ruined programming.

    series.append(series[k-1]+series[k-2]) for k in range(2,5)]

    RAVINGS DREAMT UP BY THE UTTERLY DERANGED

    Vilian ,

    if goto make sense why don’t you go to get some bitches

    newIdentity ,

    Because “get some bitches” is an invalid instruction

    ChickenLadyLovesLife ,

    I started coding with TurboBasic, which included the helpful innovation of GOTO {label} instead of GOTO {line number}, which allowed you to have marginally-better-looking code like:

    GOTO bob

    bob:
    {do some useless shit}
    return

    which meant you essentially had actual, normal methods and you didn’t have to put line numbers in front of everything. The problem was that labels (like variables) could be as long as you wanted them to be, but the compiler only looked at the first two letters. Great fun debugging that sort of nonsense.

    chfour ,

    WHAT DO YOU MEAN IT ONLY LOOKS AT THE FIRST TWO LETTERS WHAT

    Gork ,

    Big Orgasm notation

    dukk ,

    A monad is just a monoid in the category of endofunctors.

    dylanTheDeveloper ,
    @dylanTheDeveloper@lemmy.world avatar

    The only reason I enjoy C++ is because I can cast destroy on children and it’s parents if they’re present in the world

    Lightor ,

    Masters and slaves

    Cloning

    Deploying code (that’s what you do with soldiers!!!1)

    Using Git to rewrite history.

    Atomic values (like the bomb!)

    These people are madmen.

    Gustephan ,

    One of the slave node’s child process failed, so the master node sent a signal to terminate the child and restart the slave

    There’s pretty solid reason my research group is pushing to use “head node and executor nodes” nomenclature rather than the old-school “master node and slave nodes” nomenclature, haha

    lowered_lifted ,

    Floating point operations with decimals not always adding up

    xmunk ,

    They always must add up - if they added down then they wouldn’t be floating points now would they!

    aksdb , in I'll just sort it myself

    Looks like they should have called that function sortOf()

    Carighan , in Malware As A Service
    @Carighan@lemmy.world avatar

    This is, in a lot of ways, impressive. This is CrowdStrike going full “Hold my beer!” about people talking about what bad production deploy fuckups they made.

    henfredemars ,

    You know you’ve done something special when you take down somebody else’s production system.

    bruhduh ,
    @bruhduh@lemmy.world avatar

    *production systems around whole world

    cheddar ,
    @cheddar@programming.dev avatar

    Few people can put that into their CVs, that a real achievement!

    KomfortablesKissen ,

    I’m volunteering to hold their beer.

    Everyone remember to sue the services not able to provide their respective service. Teach them to take better care of their IT landscape.

    ricecake ,

    Typically auto-applying updates to your security software is considered a good IT practice.

    Ideally you’d like, stagger the updates and cancel the rollout when things stopped coming back online, but who actually does it completely correctly?

    KomfortablesKissen ,

    Applying updates is considered good practice. Auto-applying is the best you can do with the money provided. My critique here is the amount of money provided.

    Also, you cannot pull a Boeing and let people die just because you cannot 100% avoid accidents. There are steps in between these two states.

    ricecake ,

    you cannot pull a Boeing and let people die

    You say that, but have you considered the savings?

    Iheartcheese ,
    @Iheartcheese@lemmy.world avatar

    People are temporary. Money is forever.

    KomfortablesKissen ,

    I have. They are not mine. The dead people could be.

    Edit: I understand you were being sarcastic. This is a topic where I chose to ignore that.

    ricecake ,

    That’s totally fair. :)

    I work at a different company in the same security space as cloudstrike, and we spend a lot of time considering stuff like “if this goes sideways, we need to make sure the hospitals can still get patient information”.

    I’m a little more generous giving the downstream entities slack for trusting that their expensive upstream security vendor isn’t shipping them something entirely fucking broken.
    Like, I can’t even imagine the procedureal fuck up that results in a bsod getting shipped like that. Even if you have auto updates enabled for our stuff, we’re still slow rolling it and making sure we see things being normal before we make it available to more customers. That’s after our testing and internal deployments.

    I can’t put too much blame on our customers for trusting us when we spend a huge amount of energy convincing them we can be trusted to literally protect all their infrastructure and data.

    bleistift2 ,

    You seem knowledgable. I’m surprised that it’s even possible for a software vendor to inject code into the kernel. Why is that necessary?

    joshcodes ,
    @joshcodes@programming.dev avatar

    Not who you asked, but did you ever hear of Valiant and their kernel level anti cheat.

    This is not a 1:1 comparison but anticheat software running in the kernel has the ability to monitor all other processes due to its permission levels. It can monitor all scheduled tasks and infer from that information.

    Drivers need similar access but for different reasons, they need access to os functionality a user would absolutely never be granted. This is because they interface directly with hardware and means when drivers crash, they generally don’t do it gracefully. Hence the BSOD loop and the need for booting windows without drivers (i.e. safe mode) and the deletion of the misconfiguration file.

    deadbeef79000 ,

    TL;DR: Because the underlying OS is garbage.

    Whatever CrowdStrike’s “features” are should already be core security features of the kernel itself, or be exposed/extracted into user space.

    NT was supposed to be a micro kernel. That this tool injects itself into the kernel immediately compromises the kernel. Edit: I should point out that it seems that CS injects drivers into the Linux kernel too, it might just be that Linux handles a driver crash more elegantly.

    No different to the gaming anti-cheat kernel crap.

    Having a “security” tool immediately compromise your actual security is absurd.

    ricecake ,

    I’d love to know how you plan to do user mode packet filtering. Keep in mind that on Linux, the designated API is inherently kernel mode. netfilter.org

    This isn’t one of the cases where we’re talking about Linux being superior to windows. Any OS will be fucked if you give it a mangled kernel module. In this case, it’s just that only one got one.

    Your perception that anything that touches the kernel is an intrinsic security risk is unfounded.

    xor ,

    I, too, work in a similar type of company, and can confirm from experience that Linux can get just as absolutely fucked up by a bad kernel module as windows.

    And it’s not just changes to the module that can cause things to go wrong.

    For example, the kernel released alongside the latest Ubuntu LTS included a change that conflicted with our module behaviour, so machines with that kernel or newer would panic on boot.

    It was a super minor change, but when you’re deep in the weeds, it’s really easy for these things to be brittle. But that’s just an inherent consequence of the fact that this sort of stuff is intrinsically low-level interaction with the OS itself.

    ricecake ,

    The kernel is responsible for managing hardware and general low-level system operations. Anything that wants to do those things needs to get itself into kernel mode one way or another.

    The typical way you do this is called a “driver” and no one thinks about them as being kernel code. Things like graphics cards and the like.

    Things that want to do actions like monitor network traffic or filesystem activity system wide or in a lower level capacity than the normal tools provide also need to be kernel level.
    In a security context, that specifically would include things that want to monitor raw packets rather than the parsed content that assumes the packet is well formed in a way that a malicious one might not be.

    Cloudstrike does the same thing on Linux, and the typical tools for network management or advanced security are also either compiled in or loadable kernel modules.
    It’s easy to forget that ip/ebtables and selinux and friends are kernel level software frequently distributed as kernel modules, in the case of the firewalls, or compiled in with a special framework and not just user mode software.

    deadbeef79000 ,

    I’m actually willing to believe that CrowdStrike was actually compromised by a bad actor that realised how fragile CS was.

    KomfortablesKissen ,

    I can put the blame to your customers. If I make a contract with a bank they are responsible for my money. I don’t care about their choice of infrastructure. They are responsible for this. They have to be sued for this. Same for hospitals. Same for everyone else. Why should they be exempt from punishment for not providing the one service they were trusted to provide? Am I expected to feel for them because they made the “sensible choice” of employing the cheapest tools?

    This was a business decision to trust someone external. It should not be tolerated that they point their fingers elsewhere.

    ricecake ,

    Can’t fault you for feeling that way. I definitely don’t think anyone should be exempt from responsibility, I meant blame in the more emotional “ugh, you jerk” sense.

    If someone can’t fulfill their responsibilities because someone they depended on failed them, they’re still responsible for that failure to me, but I’m not blaming them if that makes any sense.

    Power outage or not, the store owes me an ice cream cake and they need to make things even between us, but I’m not upset with them for the power outage.

    KomfortablesKissen ,

    You can be reasonable in your choice of words, but there are heads that need to roll. In this case it is not the one pushing the final button, but all those that created this system. Developers, Project Managers, Team Leaders, all the way up to the CEO. If the space to work in is so limited that the possibility of such pushes seems like a tolerable idea, then everything leading to this is broken. And people need to invest to make this right. Therefore there needs to be incentives, good and bad. To steer out of the current course there need to be very unfavorable incentives.

    You can mock my argument by giving a ridiculous example. Once people die it will be too late. It’s why there was a time where people thought it to be a good idea to employ giant generators to keep the power in a hospital running even in case of a power outage. Or to have redundant systems in an airplane.

    There is a need for adequate standards in the software world. Trusting businesses to create them will evidently kill people. Creating something like certificates for personal skills and products is severely lacking.

    ricecake ,

    I wasn’t mocking your argument, I was agreeing with you and clarifying that my feeling was about who I’m most “irritated” with, not about responsibility or legal culpability.

    My example was for simplicity, not mockery.
    The power going out is the power companies fault, so I’m most mad at them. The store didn’t have a generator because they trusted the power company, so my cake got ruined. I’m still mad at them but less so because they weren’t the cause of the problem, even though they could have done more to prevent this from impacting me.
    Culpability wise, I can only make demands of the store and hope that enough other people do so that they in turn demand answers from the power company.

    There are actually a fair number of certifications, including ones from government agencies, relating to software development, deployment, and related practices. That so many organizations didn’t have the ones relating to protection from supply chain issues is distressing, to say nothing of it slipping through quality control in the first place.

    Please, if you think we’re in a place in this thread where I’d be mocking you, re-read it with the understanding that I agree with you entirely on legal and structural issues, and at most just have a different opinion about where the balance of "fuck you"s go. I think I put more scorn towards the vendor because doing the thing is worse than failing to prevent the thing. Also, I work at a parallel company and so I’m more familiar with exactly how much you have to be fucking up for this to happen because I spent the last three days dealing with the more minor controls that prevent this from happening. Everyone has outages because you can’t prevent 100% of errors, but it’s on the vendor to build to the spec of their most sensitive customer and ensure that outages don’t keep a doctor from patient records.

    KomfortablesKissen ,

    I wasn’t mocking your argument, I was agreeing with you and clarifying that my feeling was about who I’m most “irritated” with, not about responsibility or legal culpability.

    Okay, sorry for that. It happens to me sometimes to be mocked without me seeing prior cause for this. Thank you for clarifying that.

    If a shop can’t sell me cakes, then it’s inconvenient. If a hospital is not able to keep people alive, that’s where things get intolerable. Them not having access to their PCs is a hospital thing. If they cannot use them they should not use them. If it’s a cost saving measure at the cost of people’s lives, then I want heads to roll. Literally, preferably.

    For the icecream, yes. If I want icecream and the shop doesn’t have any because of a power grid failure, then I blame the power company more. The generator would be overkill, as it needs constant maintanance and checkups; immense running costs. This would not be justifiable for something like ice cream.

    The hospital needs to be way more thorough with their supply chains. This discrepancy of responsibilities towards patients/customers is why I thought I was mocked, sorry again for that.

    I called the certification processes “lacking” because they are very often out of date, if at all applied, like you said. The timeframe for product certifications needs to be drastically reduced for software products. I am aware that those checks need time the developers often don’t have, but that doesn’t matter. If that is a crucial issue, then they should stay the fuck away from critical infrastructure.

    barkingspiders , in Please stop

    I am a little biased because I’ve been using Debian professionally for many years now but we don’t deserve Debian. It is fantastically stable and reliable and makes an excellent platform for running your services off of. If you are at all interested in offering some time and energy to the open source community, consider adopting a Debian package!

    A_Union_of_Kobolds ,

    I’m thinking about a Linux laptop with FOSS software for my business actually, Lemmy’s relentless horde of pro-Linux propaganda has won me over

    (OK I’ve always liked FOSS I’ve just never taken the jump)

    qprimed ,

    ONE OF US! ONE OF US!

    but seriously, modern FOSS distros (yes, debian is modern, damnit!) are amazingly good. you have an exceptionally high probablility of switching and staying switched.

    A_Union_of_Kobolds ,

    I’m looking forward to it!

    Side note: anyone got recommendations for business software? I’ve started browsing the FOSS community here for ideas but I’m not sure what QuickBooks alternatives exist

    F04118F ,

    A quick Google shows Quickbooks to be cloud-based accounting software. For FOSS accounting, GnuCash exists so you could try that (it can also run on Windows and macOS). However, it’s unlikely to have feature parity so if you like the added convenience that Quickbooks offers, see if you can use Quickbooks in a browser. Being cloud-based, they would probably build a browser version before building a Linux desktop app. If they don’t and you need to run a Windows desktop app on Linux, you can probably do this using Bottles (which uses Wine and Proton under the hood, the tech that enables the Steam Deck).

    A_Union_of_Kobolds ,

    I mean yeah, but specifically I’d like something built for Linux that’s good for just basic spreadsheet stuff. I’m an electrician so I mostly just need to track jobs and accounts.

    F04118F ,

    Most of (what we call) Linux OSes are formally GNU/Linux. GnuCash is as close as it gets to “made for Linux”. If you don’t want an accounting-specific application, but just generic spreadsheets, check out LibreOffice.

    I highly recommend GnuCash for accounting though: a fellow board member cleaned up an org’s accounting by putting it all in GnuCash, where it was a bunch of error-prone Excel sheets before. That really made it easier to keep track and to do it right.

    roguetrick ,

    GnuCash

    Huh, they’ve even got active development on an Android app. github.com/GnuCash-Pocket/gnucash-android?tab=rea…

    mexicancartel ,

    Yeah I installed the android app just for fun.(I don’t do accounting lol)

    realbadat ,

    Take a look at Apache OFBiz, Akounting, Frappe Books, and LedgerSMB.

    fine_sandy_bottom ,

    I’m an accountant.

    The best accounting software will be the one your accountant uses.

    When clients are on the same platform that I use internally everything just matches up and it’s beautiful and elegant and amazing.

    When clients are using something else it just doesn’t fit our workflows and it’s just more of a fuck around, which of course the client gets charged for.

    JoMiran ,
    @JoMiran@lemmy.ml avatar
    nexussapphire ,

    That’s how I feel about arch, it’s not “stable” but the few issues I’ve had they typically have it fixed with an update within hours.

    I do have to clarify when I switched to arch from windows my entire computer was brand new and practically no other distro booted or if it installed it dumped me to a black screen.

    After running my server on archlinux with the stable kernel for 7 years I did install Debian on my new server. Zfs just required an older lts kernel than I could get on arch without a ton of hassle. I didn’t need it on my Mac mini with an external hard drive plugged in. From my experience it’s not very different to maintain compared to arch but it’s nice having built in automation instead of writing my own.

    Man it’s weird using a system of what I can guess is a bunch of bash scripts on Debian to set things up compared to just using the tools built into and written for systemd.

    dan , (edited )
    @dan@upvote.au avatar

    it’s not “stable”

    “stable” in this case means that it doesn’t change often. Debian stable is called that because no major version changes are performed during the entire cycle of a release.

    It doesn’t mean “stable” as in “never crashes”, although Debian is good at that too.

    Arch is definitely not “stable” using that definition!

    nexussapphire ,

    Yeah, I know the definition. I knew someone would quote it verbatim, someone always does. I quoted it because it’s not the word I would use. I like scheduled or versioned releases better but someone always disagrees with me. As far as I’ve seen it’s a major/minor version release cycle anyway.

    Frozengyro , in "prompt engineering"
    don ,

    copied ur nft lol

    Frozengyro ,

    I’ll never financially recover from this!

    fidodo ,

    It’s not an nft, it has to be hexagonal to be an nft

    nyandere ,

    Giving me Jar Jar vibes.

    Frozengyro ,

    Yea, feels like a mash up of pepe, ninja turtle, and jar jar.

    bingbong ,

    Frog version of snoop dogg

    lemmy_get_my_coat ,

    “Snoop Frogg” was right there

    rikudou ,

    @DallE Create a mix between Pepe the Frog and Snoop Dogg.

    DallE Bot ,

    Here’s your image!

    AI image generated with the prompt from the previous comment


    The AI model has revised your prompt: Create an imaginative blending of an anthropomorphic green frog with an individual characterized by long, sleek braids often associated with a hip-hop lifestyle. The frog should exhibit human traits and appear jovial and mischievous. The individual should have a lean physique and wear sunglasses, a beanie hat, and casual attire typically seen in urban fashion.

    Natanael ,

    Funny how this one has less detail and less expressions despite the more complex prompt.

    DallE Bot ,

    Here’s your image!

    AI image generated with the prompt from the previous comment


    The AI model has revised your prompt: Create an image of a green cartoon frog, wearing glasses and featuring typical hip-hop fashion elements such as a baseball cap, gold chains, and baggy clothes. The frog has a cool, laid-back demeanor, characteristic of a classic rap artist.

    peter , in remember, if your gf isn't open source and running locally, you don't own her
    @peter@feddit.uk avatar

    If the service is free you are the product. That’s why I pay my girlfriend

    baseless_discourse ,

    Does your girlfriend pay you too?

    embed_me ,
    @embed_me@programming.dev avatar

    😮

    Am I the product?

    Grunt4019 ,

    Oftentimes now if the service is paid, you’re still the product!

    DogPeePoo , in remember, if your gf isn't open source and running locally, you don't own her

    I can fix her

    humorlessrepost ,

    Lawyer up, hit the gym, :wq!

    morrowind OP ,
    @morrowind@lemmy.ml avatar

    mfw debugging my gf for the whole weekend and she still wants to talk about things other than programming language design

    firelizzard ,
    @firelizzard@programming.dev avatar

    You’re also a programming language design nerd? Like, “Compare the features of language A to those of language B”, or nerding out about the underlying mechanics of things like generic types, virtual method dispatch, and no-stop garbage collection? I thought I was the only one. Well not the only one but it doesn’t seem that popular of a thing to nerd out over.

    morrowind OP ,
    @morrowind@lemmy.ml avatar

    I’m too new to know too much about the underlying mechanics, but yes I find it very interesting, including the syntax, which I know most nerds dismiss as superficial.

    firelizzard ,
    @firelizzard@programming.dev avatar

    I’m definitely biased because I love the language, but I think Go is a good place to start. The authors talk about the language design more than I’ve seen for other languages. The Go blog occasionally has posts like that but Russ Cox’s blog is the place to go for the gnarly details. Another good place is the proposals repo, e.g. the generics proposal. I also browse issues on GitHub and look for ones with interesting discussions.

    including the syntax, which I know most nerds dismiss as superficial.

    Syntax is mostly irrelevant as far as what is possible with a language, but it is a critical aspect of how easy/hard it is to use a language, and most critically how easy/hard it is to read code written in that language. IMO the only thing that’s more important than readability is whether the code works as intended.

    oce ,
    @oce@jlai.lu avatar

    git checkout -b fix/her

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines