Readit News logoReadit News
twawaaay · 3 years ago
My subjective personal experience:

* good developers seem to be more pissed off by poor code. Seems easy to explain -- people tend to do better when they care about what they are doing.

* even better ones seem to be more accepting people with varying ability to write code and spend more effort trying to help them make the best with their abilities,

* poor developers tend to try to make up for their perceived inadequacies by trying to look more professional in other ways (like behaving "professionally", dressing better, using marketingspeak on meetings, etc.)

* on the other hand large portion of developers have inflated egos and thing they are super good while really writing crappy code and not even understanding why it is crappy. I worked with two guys at two separate companies who were both lead developers and were saying they are best developers in the world. Both super confident and this helped them to advance. One of them was fired when the entire library they brought in as an "asset" failed spectacularly because it parsed XML messages by extracting "n characters from m line at n offset" rather than doing actual XML parsing.

TN1ck · 3 years ago
> poor developers tend to try to make up for their perceived inadequacies by trying to look more professional in other ways (like behaving "professionally", dressing better, using marketingspeak on meetings, etc.)

I would actually look more into their "professional" behavior purely from a code viewpoint. As an example, I once had a coding interview submission that I was looking through and at first sight it seemed everything is there, tests, code comments, framework patters. My first thought was "Oh nice, they really are thorough". But looking deeper at it, these things hid the actual problems. E.g. The function interfaces were poor and mixed side effects when not necessary, tests tested _something_, but not what was important. And the algorithmic challenge wasn't even really attempted. This made me acutely aware of how easy this person could have passed a less technical interviewer, as everything looked professional. The effects are worse that someone whose obviously a junior or poor coder, their code looks off at first sight.

trieste92 · 3 years ago
> poor developers tend to try to make up for their perceived inadequacies by trying to look more professional in other ways (like behaving "professionally", dressing better, using marketingspeak on meetings, etc.)

Don't forget:

- trying to solve things in a "clever" non idiomatic way instead of being clear and idiomatic

- gravitating towards non coding tasks

kkoncevicius · 3 years ago
I remember there was a study (can't find it quickly) that said people who swear are more honest and lie less. If that is true then it's not surprising for such qualities to somehow affect other things.

From personal anecdotes I would add that swearing seems to be associated with action and getting things done. People who work with their hands and tools: plumbers, car mechanics, etc, swear a lot. But even in academia I've met quite a few very intelligent people who swear in private conversations and one common characteristic among them is they hate when things are not moving.

usr1106 · 3 years ago
I met 3 coders who swore more or less continuously while coding. But that's 3 out of probably close to 100 I have been sitting close enough during 30 years. I do it myself but probably less than at one hairy problem a week.

At least one of the 3 does not produce better code than average. One produces clearly more code than average. Not really bad code, but we are still fixing his bugs quite a while after he left the company. The 3rd one I don't remember, just shared an office, but did not work with his code.

Edit: To be clear I talked about swearing aloud. Having swear words in the code I have not seen with 30 years of experience. Except some rare examples in open source which get then a lot of publicity.

coffeeblack · 3 years ago
Swearing while coding: “Who the f#ck wrote this code, looks like cr#p, what the… oh, I wrote that five years ago… why the f #ck did I write it like that, that makes no sense, what the… oh, that’s why! …”
ilyt · 3 years ago
The only swear words in our code is essentially "workaround for shit we can't change/fix" or "strong warning to not change this behaviour or something will break". Like

    # as of 5.x libvirt shits on intermediate certs included in certfile and need direct path
or

    # once a month restart, this shit leaks

guitarbill · 3 years ago
Measuring code quality is always fraught with issues. That said, I could imagine that code bases that allow for swearing generally have a more honest and open communication culture, so swearing may be an indirect indicator of this. Which may be a better explanation than the hypothesis that "the use of swearwords constitutes an indicator of a profound emotional involvement of the programmer with the code and its inherent complexities, thus yielding better code based on a thorough, critical, and dialectic code analysis process."
bawolff · 3 years ago
Well that sounds plausible, it seems like we could come up with all sorts of stories to say basically anything here. Maybe swear words keep other contributors away, resulting in smaller dev teams that can have more consistent standards.
ordu · 3 years ago
Well, your hypothesis is easy to check, one needs to repeat the study controlling for a dev team size. It would be harder to measure culture's openness and honesty.
Ma8ee · 3 years ago
Yes, projects were the contributors care about their projects. Corporations rarely allow swear words in their code bases.
twawaaay · 3 years ago
You are under impressions that corporations care about code in any way. They don't. They only care about business outcomes. If you mention "code quality" they will just stare at you. It is better to talk about "maintainability" or "development velocity" etc. It is teams/team managers who care about code quality.

It is people who work at corporations that self-censor themselves to keep the professional look of themselves.

I have never had any corporation disallow me from swearing in the codebase.

onlypositive · 3 years ago
Abstract:

> One of the most fundamental unanswered questions that has been bothering mankind during the Anthropocene is whether the use of swearwords in open source code is positively or negatively correlated with source code quality. To investigate this profound matter we crawled and analysed over 3800 C open source code containing English swearwords and over 7600 C open source code not containing swearwords from GitHub. Subsequently, we quantified the adherence of these two distinct sets of source code to coding standards, which we deploy as a proxy for source code quality via the SoftWipe tool developed in our group. We find that open source code containing swearwords exhibit significantly better code quality than those not containing swearwords under several statistical tests. We hypothesise that the use of swearwords constitutes an indicator of a profound emotional involvement of the programmer with the code and its inherent complexities, thus yielding better code based on a thorough, critical, and dialectic code analysis process.

liftm · 3 years ago
The opening sentence is really the best part of this thesis.
acd · 3 years ago
There has outside coding been correlation studies between swearing and higher intelligence. Where those swearing generally were found to be more intelligent fluent in languages.

May it be that swearing coders are more intelligent? If coders are more fluent in use of languages are they also more fluent in code?

Articles swearing intelligence https://www.sciencedirect.com/science/article/abs/pii/S03880...https://medicalxpress.com/news/2017-02-higher-language-relat...

scbrg · 3 years ago
I wonder how this applies to foreign languages. I swear quite a lot (not something I'm particularly proud of, or that I think is an indication of any other positive/negative quality I may or may not have). But I pretty much only swear in my native language, which is not English. I simply don't feel confident enough in English to use swearing appropriately, if there's such a thing.

However, coding is done in English. Period. And code comments are written in English as well. So you won't find a lot of profanity in my code comments or commit messages - even though there might have been some if English had been my native language, or the general practice was to write code, comments and commit messages in the local language.

I'd argue that swearing in particular requires a fairly deep understanding of the nuances of a language that general use does not - misplaced swearing makes you look a lot more like a fool than many other mistakes.

tasuki · 3 years ago
Funny thing, I swear more in languages other than my native tongue.

I guess I don't consider swearing in foreign languages to be real, similarly to how you do things in a video game which you wouldn't do in real life.

AlchemistCamp · 3 years ago
> However, coding is done in English. Period. And code comments are written in English as well.

This was not the case at my first tech job. The office communication, the reference books, the comments and the sometimes even the commit messages were often not in English. The same is true of many large projects on Github, even today.

_kb · 3 years ago
If that’s true, Australia is full of linguist polymaths.
suddenclarity · 3 years ago
Am I misreading or do they really equate swear vocabulary size with swearing frequency without providing data for this claim? Of course a large vocabulary in one general area tend to correlate with large vocabulary size in other areas? Especially among young university students when they haven't spent a lifetime dedicating themselves to one field.
amelius · 3 years ago
> There has outside coding been correlation studies between swearing and higher intelligence. Where those swearing generally were found to be more intelligent fluent in languages.

I guess they didn't visit the casino yet.

userbinator · 3 years ago
This is... not at all a useful analysis, to put it lightly.

The word "bug" or "defect" appears ZERO times in this study.

Any study that completely ignores defects in measuring "code quality" is at best misguided, and at worst could drive change that actually results in increased defect density.

High quality code can simply be defined as code that has few bugs. Unfortunately that's a little harder to measure, but they could've at least analysed the issues for a start.

That said, I don't think there's going to be any correlation between the presence of swearing and the defect density.

z3t4 · 3 years ago
The less code you write the fewer bugs, so LOC should be a good indicator of code quality :P

But bugs alone says nothing about code quality, the more you look, the more bugs you will find. More popular software will have more bugs (found).

Style guides are not the same as quality. Some people argue about line length, white space, and where to put line breaks, but that has nothing to do with the quality of the code/software, but it's easy to measure.

Do you understand what the code does ? How easy is it to make a change ? Comprehension and maintainability probably results in better code/software quality, but is difficult to measure.

Maybe if we measure the average bug count per user, as well as let users assess/rate the software - does the code/software do the job it was written for?

ordu · 3 years ago
> High quality code can simply be defined as code that has few bugs. Unfortunately that's a little harder to measure, but they could've at least analysed the issues for a start.

It is nearly impossible to measure directly. One needs to find all the bugs to measure defect density directly. There are indirect ways, one could use a proxy variable, and they did.

They used static analysis as a proxy variable, this choice has some traps to avoid, but bugs from bug-trackers or CVE's is highly dependent on a development practices and popularity of the code, they can (I'd say must) correlate with swearing by themselves. To deal with that one would need to formulate a causal hypothesis for real and to test it for real. Such a study is not for a bachelor thesis, it would be master's at least.

Though I'd like to see authors to sophisticate their techniques enough to dig out a causal explanation.

riffraff · 3 years ago
The tool they use for evaluation (softwipe) is discussed in another paper, but seems to basically count/combine the results of a set of different static and dynamic analysis tools (ASan, UBSan, cppcheck etc)

Presumably those results should correlate somewhat with bugs and defects.

fancl20 · 3 years ago
Note this is a correlation analysis. Before draw any causal effect between the result and Developers' identity, the data itself may include bias.

To give an example of possible bias that totally not related to developers' identity. From Figure 3.9 and Figure 3.10, Softwipe scores over LoC have a very different pattern from star-repos, which could be:

If whether a developer uses swearwords is statistically independent, then a project with more contributors are more likely includes swearwords. More contributors may correlate with having a coding style guide which has causal effect on the score from SoftWipe tool (https://www.nature.com/articles/s41598-021-89495-8).

Be careful when trying to explain data :)

comfypotato · 3 years ago
Came here to say this.

I wouldn’t be surprised if swearing codebases are better in open source, but I would be surprised if swearing in your codebase makes it better. (This paper only works to prove the former not the latter.)

The obvious traditional opinion is that swearing indicates a lack of intelligence and therefore worse code. I’m just saying that this is on the front page because it’s spicy (the naively-inferred causation goes against the traditional intuition).

nlnn · 3 years ago
I've worked with great developers that swore a lot, and great ones that didn't.

Main difference I observed was that the non-swearing ones were seen as less intimidating and more approachable. They were often more helpful to junior members of the team in terms of providing advice or guidance.

The swearier ones were left alone more, and the swearing was seen a bit like wearing headphones (i.e. I'm focusing and busy, don't you dare interrupt me).