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.

AnUnusualRelic , in When someone corrects your code
@AnUnusualRelic@lemmy.world avatar

Grammar is code.

_Gandalf_the_Black_ ,

However, real grammar and prescribed textbook grammar are two different things.

SpaceNoodle , (edited )

Anybody who bitches about prescriptivism is just mad that their grammar sucks.

Edit: this always gets 'em crawling out of the woodwork

_Gandalf_the_Black_ ,

Oh, so you mean the whole of the contemporary field of linguistics?

Pipoca ,

Prescriptivism is mostly just an unprincipled mishmash of shibboleths someone pulled out of their rear end hundreds of years ago, classism, and knee-jerk reactions against language change.

For example - why do people distinguish less vs fewer to refer to countable vs uncountable nouns? Because someone wrote in 1770 that they thought that distinction was elegant, despite not actually reflecting the way English at the time was spoken.

Why is ain’t “not a word”? Because it originated in the speech of poor people, and was used less commonly by rich people. People roll their eyes at new business-speak because it comes from rich, powerful people, but look down their nose at language innovations from poor hillbillies and other disfavored groups.

And you can find writings from old prescriptivists complaining about literally every change in the language, such as hating the new ambigious use of singular ‘you’ when ‘thou’ was perfectly good and unambiguous or hating phrases like ‘very pleased’.

CookieJarObserver , in When someone corrects your code

Someone Renames your objects “because they sound better that way”…

jbk , in When someone corrects your code

reddit

explodicle , in When someone corrects your code

Correcting my code is helpful. The machine didn’t know what I even meant. Computers are interesting and changing rapidly.

Correcting my grammar is an unsolicited English lesson from someone who already knew what I meant. English is not interesting or changing quickly.

MJBrune ,

English changes very quickly. New words come out every year. Some programming languages takes years for updates.

Doug ,

Also that person may have known what you meant, but another might not and may have any number of reasons for not asking.

Better communication skills are a worthwhile goal and there’s no good reason to not learn and grow.

CanadaPlus ,

I mean, there’s a difference between something being phrased in an odd or confusing way, and a pedantic comment about whether you should use a Latin plural. 90% of the time you get the latter.

Doug ,

90+% of the time you get common mistakes. Should ofs, they’re - there - their confusions, apostrophes for plurals.

The kind of thing that confuses ESL speakers. The decent thing would seem to be to try and stick to the way it’s taught rather than go with the “it doesn’t matter” route when it absolutely matters to some.

CanadaPlus , (edited )

If you’re speaking to someone ESL, don’t do not even use contractions. They are perfectly valid but they are confusing to those new to the language. I also like to put all idioms in quotes when writing, as those are confusing in any new language. Misspellings are less of an issue than you might think because English spellings are dumb and arbitrary already.

When someone tells me “um, it is cacti, AKCTUALLY” I do not think concern for an ESL person listening in is the main motivation, though.

Doug ,

I think you and I have very different experiences. I rarely see that kind of correction if ever.

When you’re in a public space you never know when your words are being consumed by an ESL speaker. I think the best approach is natural yet accurate. They’re going to encounter contractions when dealing with native speakers, but the difference between it’s and its, for example, can be tricky so try to use them as taught.

Spelling mistakes can absolutely be an issue. It’s already hard enough to figure out English spelling without native speakers making it worse. Add on to that the difficulty in any added language of working out near homophones, let alone actual homophones.

I knew someone who was pretty decent with English as their third language but had trouble keeping Texas and taxes straight. I know another guy who is American and uses no in place of know. That one threw me for a while before I figured out what he was trying to say.

I will admit, I do like that “technically” the plural for octopus is “supposed to be” octopods (pronounced like oc-tip-o-dees) but that’s a fun “fact”, not a correction I’ve ever tried to make.

CanadaPlus ,

I really do run into issues talking aloud about plants of the family Cactaceae fairly often. It might be a hyper-local thing I guess.

I don’t remember where exactly I got the spelling thing from, so I could just be wrong about that.

Doug ,

I didn’t want to come off dismissive asking how often you’re talking about those specific kinds of plants but maybe it’s a relevant question after all lol

CanadaPlus ,

Yeah, but what percentage of normal speech is made up by words under 20 years old?

MJBrune ,

Depends on how you talk and what you define as normal. How much C++ is still using C++98 and how much uses C++20? It’s pretty silly of a comparison. As someone else put it, corrections are also there for a third party.

But let’s get down to the issue. You are right, correction of English is used as an insult a lot of the time. Sometimes correction of code is also used as an insult. When correcting someone is used out of line and abused, it’s always a bad thing. Correcting someone should never be used to insult.

If you don’t mind, let’s go down a rabbit hole, if you don’t care to join feel free to stop reading here. The upshot is that you are correct because the intent behind correcting English is usually abusive.

So, I corrected you earlier but this is to create a conversation. This is something I’ve been noticing a lot in social media overall: corrections seem to create conversation where if you agree with someone it’s not typically a conversation. “Yeah, you are right…” isn’t a path to an interesting exchange of ideas. There is another way that I’d also love to encourage people to try. Asking questions and digging into why. I’ve seen this happen a few times and it feels like it’s taken more as an insult. A lot of people get defensive if you ask “Why is this something you think.” We’ve created an internet culture of correction, where correction makes conversation. I wonder if this stems from people on the internet correcting people as an insult. Anyways, thank you for reading this random tangent :D

CanadaPlus , (edited )

But let’s get down to the issue. You are right, correction of English is used as an insult a lot of the time. Sometimes correction of code is also used as an insult. When correcting someone is used out of line and abused, it’s always a bad thing. Correcting someone should never be used to insult.

I like this. I don’t think that’s the intention for a lot of pedants, but rather they hold a belief in prescripitivism, and have taken it upon themselves to enforce the rules as they imagine them, for one reason or another. That being said, it’s still telling someone they’re wrong without any possibility of improving present or future discussions, and that’s why it’s annoying.

So, I corrected you earlier but this is to create a conversation. This is something I’ve been noticing a lot in social media overall: corrections seem to create conversation where if you agree with someone it’s not typically a conversation. “Yeah, you are right…” isn’t a path to an interesting exchange of ideas.

It’s true, and I think there’s some people that like that approach more than others. I wonder if that contributes to the high number of lurkers on every platform. The main other kind of space centers around venting about a common complaint as the main form of discourse, and those always end up being a little unhinged after a while.

Asking questions and digging into why. I’ve seen this happen a few times and it feels like it’s taken more as an insult. A lot of people get defensive if you ask “Why is this something you think.” We’ve created an internet culture of correction, where correction makes conversation. I wonder if this stems from people on the internet correcting people as an insult.

You know, I’ve never thought about it that way, but you’re right. Every once an a while I see someone take a truly odd position on something, and I end up just asking questions because it’s new and interesting and I don’t really have a bottled comeback. It seems like that actually makes them more defensive than if I had just called them an asshole.

Anyways, thank you for reading this random tangent :D

You’re welcome, it was a good one!

Edit: Oh yeah, and on C, I was expecting someone to mention it. It’s an outlier in being way more static than pretty much every other programming language, but it’s still faster changing than the average natural language. Maybe casual Hebrew has changed more since the 60’s, I guess.

ipkpjersi ,

Except for front-end technologies like JavaScript where there’s a new framework every week lol

explodicle ,

Which is easier - read a 50-year-old letter, or run a 50-year-old program?

lemmyingly ,

What if your grammar is that bad that people struggle to understand you?

I know someone who is incomprehensible most of the time. I have to ask probing questions just to vaguely understand what they’re trying to communicate. I’ve politely told them more than once about the issue but they never try; they’re not mentally challenged or anything, just an ass.

CanadaPlus ,

I’ve never met a native speaker like that, but yeah I think they’re the exception that proves the rule.

lud ,

Then they couldn’t correct you.

sj_zero ,

fr fr no cap

PP_BOY_ , in When someone corrects your code
@PP_BOY_@lemmy.world avatar

You’re* grammer

milicent_bystandr ,

No, you’re grammerer

15liam20 ,

Oh boy

UnfortunateShort , in There once was a programmer

ChatGPT was never made for programming and is horrible at generating code. It is nice for a peer-programming kinda setup tho, because it can quickly point you towards tools, libraries, APIs etc. to use

oldfart ,

It generated a custom needs GUI OCR tool in Qt5. I don’t know a single bit of Qt5 and went from zero to working tool in half an hour.

The tool takes a screenshot, lets me select an area on the screen, OCRs it and displays the text in a window.

If ChatGPT isn’t made for programming then I’m looking forward for a product that is.

Hotzilla , in When someone corrects your code

Fuck me, never touch my code, it is perfect.

hemko ,

Brother you don’t even remember what it does, how and why after 3 days

Hotzilla ,

Of course, but because it is perfect, no one, not even myself, needs to fix/modify/extend/understand

/s

UraniumBlazer , in When someone corrects your code

It should be normalized to kiss the furry femboy programmer who corrects your code as a thank you.

samus12345 , in When someone corrects your code
@samus12345@lemmy.world avatar

I use incorrect grammar all the time on Lemmy because I’m writing colloquially, comma splices are my biggest offense.

sj_zero , in When someone corrects your code

Excuse me, I think you meant "correct's you're code"

noli , in Fixing ancient bugs

How did a bug with something like that never pop up in unit tests?

JATtho OP ,

There were no unit tests and previous dev had opened the pandora’s box with half-written implementation. Gasp

MonkderZweite ,

Corner cases.

30p87 , in thisIsGoingToBeASeriousDebate

Personally,


<span style="color:#323232;">echo Hello World!
</span>
pranaless ,

<span style="font-weight:bold;color:#a71d5d;">use </span><span style="color:#323232;">std::process::Command;
</span><span style="color:#323232;">
</span><span style="font-weight:bold;color:#a71d5d;">fn </span><span style="font-weight:bold;color:#795da3;">main</span><span style="color:#323232;">() {
</span><span style="color:#323232;">    Command::new(</span><span style="color:#183691;">"sh"</span><span style="color:#323232;">)
</span><span style="color:#323232;">        .</span><span style="color:#62a35c;">arg</span><span style="color:#323232;">(</span><span style="color:#183691;">"-c"</span><span style="color:#323232;">)
</span><span style="color:#323232;">        .</span><span style="color:#62a35c;">arg</span><span style="color:#323232;">(</span><span style="color:#183691;">"echo Hello World!"</span><span style="color:#323232;">)
</span><span style="color:#323232;">        .</span><span style="color:#62a35c;">spawn</span><span style="color:#323232;">()
</span><span style="color:#323232;">        .</span><span style="color:#62a35c;">unwrap</span><span style="color:#323232;">();
</span><span style="color:#323232;">}
</span>

Like this?

30p87 ,

No, more like


<span style="color:#323232;">use std::process::Command; fn main() { Command::new("sh").arg("-c").arg("echo Hello World!").spawn().unwrap(); }
</span>

.
Just a little bit shorter, as it seems /s

funkajunk ,
@funkajunk@lemm.ee avatar

I just fucking threw up

30p87 ,

I did too. Multiple times in fact, I had to look at the other Rust code!

TadoTheRustacean OP ,

Isn’t echo a shell builtin?

pranaless ,

Yes and no. While coreutils does provide an echo binary, shells also have a built-in for optimisation purposes.

At first I had the code calling the binary directly, but then changed it to spawning a shell (and so using the builtin). It’s very cursed either way.

lugal , in thisIsGoingToBeASeriousDebate

<span style="color:#323232;">def main(): 
</span><span style="color:#323232;">    print("Hello world") 
</span>
SpaceNoodle , in thisIsGoingToBeASeriousDebate

<span style="color:#323232;">echo Hello World
</span>
starman , in thisIsGoingToBeASeriousDebate
@starman@programming.dev avatar

Console.WriteLine(“Hello World!”);

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