Swearing In Your Code Make You A Better Developer??
Key Takeaways
The video discusses a bachelor's thesis that investigates the correlation between swear words in code and code quality, using tools like softwipe and GitHub API to analyze open source C code on GitHub.
Full Transcript
the Linux kernel is notoriously full of swearing and I don't just mean Linus's history on the mailing list I mean in the code base itself and there is even a website that tracks this usage over time if you want to go and check it out for yourself I'll leave it in the description you can go and add in your custom words and just see what words are being used here and there but Linux is also known for being an incredible Foss project depending on who you ask it may or may not be the gold standard for how a project should operate and should run could there possibly be a link between swearing in your code and the quality of your code base now you're probably thinking and rightly so Rudy that sounds completely ridiculous and you would be completely correct but that doesn't mean it's not worthy of you know maybe some research time so Jen stremel bachelor's thesis on is there a correlation between the use of swear words and code quality in open source code now before you start running around throwing the results to people keep two very important things in mind one bachelor's thesis when you're writing a bachelor's thesis the level of academic rigor expected is considerably lower than what you'd have at a Masters or a PhD level so there may be things in here that are wrong and this would need further research to properly prove any results that are demonstrated and two correlation does not equal causation this is just a correlation analysis and it's a bit of fun but with that out of the way let's see what it's about I know this whole thing sounds like a joke but we are being serious today let's have a look at the abstract one of the most fundamental unanswered questions that has been bothering mankind during the anthropocene which is the period where humans been having a lot of impact on the planet is whether the use of swear words in open source code is positively or negatively correlated with source code quality already off to a good start not really fixing my this is not a joke point so how did this study work our hypothesis going into this study was there would not be a statistical difference between repositories that contain swear words and the control group which contains repositories that may or may not contain swear words to test this hypothesis we developed a program that gathers repositories from both groups on GitHub this was done utilizing the GitHub API basically they made a tool that downloads repos and collected the repos which allowed us to directly search for Repository is containing swear words after identifying and downloading repositories we assess their code quality using a tool called softwipe which returns a score in the range from zero which is low to 10 which is high that correlates to the code quality this right here is the repo for soft wipe check and score C and C plus plus software quality now there is some debate out there about whether you can really analyze a code base and then just assign a score to it I don't know enough about the details of those cases but there is a lot of research has gone into this and if you want to go read that research I will leave that paper in the description down below it's not the focus for today the author of the paper use softwipe so that's what they use now after this data crawling an evaluation was done we had a sample size of approximately 3 800 for repositories containing swear words as well as approximately 7 600 for repositories for our control group so a total of approximately 11 400. this is a lot of data and a lot of repositories to search through however there are two very important things to note our study only considers open source code written in the C programming language and found on GitHub so it doesn't include things from gitlab it doesn't include python code it is just C on GitHub while it is technically feasible to extend this to C plus plus using the same crawling and data analysis scripts we decided to disregard C plus plus code for the sake of Simplicity and due to time constraints however we're agnostic as to whether C plus plus programmers have the same mindset as C programmers or are politically more correct therefore we are cautious with respect to generalizing our findings to the object-oriented programming Community also due to time constraints and the knowledge of the author it was limited to only English swear words you can find this data set over on the no swearing website and this includes over 300 English swear words now before we can discuss the results we need to discuss some of the methodology why we choose to use the git API initially the author was going to make a web scraper to search through the repos the issue with using github's API is it provides a limit of a thousand results per search query and when you're dealing with you know 11 000 repos and you're not sure that every search you do is going to include repos you want this could be a massive slowdown to acquiring the data the author realized though that uh most most of the other functionality they needed was already there with the GitHub API like searching by terms and things like that so rather than wasting time building something completely new that was just used instead and then the limitations were dealt with as they needed to be dealt with but it was still quicker than writing something entirely from scratch also when downloading the repos a file size limit was applied this being 625 megabytes this wasn't a limit of the API this was a limit of time the bigger the repo is the more time it's going to take to download and the more time it is going to take to analyze also with softwipe they limited the run time to one hour softwipe can take a really really long time on some of these bigger repos it could take an entire day just to analyze one and if there was a longer period available that is something the author would want to do but it just wasn't feasible in this case it could have been avoided in One Way by just having less data in the data set but then you have less data in your data set so this would need a more long-term study to properly flesh this out also repos were split up into two categories the sweary Repose and the star repos Square repos are repos obtained that contain swear words and star repos are the more general population but these have at least four stars on GitHub and may or may not contain swear words there is a good reason for choosing four stars or more explained in quality filtering this restriction was put into place to filter out barely known or used repositories and to only consider repositories of presumably higher quality as a reference for comparison basically providing a much stronger competition to the swear repositories now just quickly before we get to the results I highly encourage you to go and read the paper yourself there is a lot of stuff I skipped over that I just didn't really think was that important for today's video a lot of it is like the mathematics behind how the analysis works and all that fun stuff it's a good read I highly highly recommend it it should be in the description down below but now let's see what happened the test results are very intriguing the swear repos have a higher mean of 5.87 as opposed to the star repos of 5.41 and the confidence value is way higher as well 5.81 to 5.93 as opposed to 5.38 to 5.45 the confidence value is basically where 95 of the values fall allowing you to crop off the ends and get rid of the outliers and and in another Form This is demonstrated very well with the histograms on the left hand side are the star repos and on the right hand side are the swear repos the star repos as expected are a standard bell curve this is normal in everything in life there is always going to be low result on the low end and low result on the high end and most people are somewhere around the middle but if you include swearing it seems that the amount of repos that are getting a higher score is considerably higher and there is that really weird outlier around seven and a half ish points and the Scatter Plots show this quite well as well once again left side star repos right side swear repos the star repos showing the normal sort of curve where most things around the center and then spread out from there but the swear repos it seems to be a lot more random but they're also seeing seems to be a lot more going towards the high end as well obviously things get a bit weird as more lines of code are added into the code base but it does seem to be a general Trend that projects that include swearing have a higher score so does all this mean you should just start constantly swearing in your code base and that will improve the quality of your code well it's not that simple remember correlation does not equal causation and this is still a preliminary finding it is only including C code so more work needs to be done in the future including other languages like C plus plus and also other languages that people use as well like python C sharp rust and anything else out there that may have any sort of community attached to it maybe in different languages swearing affects the code to different extents maybe certain communities are you know more willing to accept it whereas others it drives away potential developers also the author would like to include natural language processing because they just got the swear words with a simple regex but there is context meaning that can very easily be lost by that which may be picked up by some sort of machine Learning System but also could be neat to see how the lines of code and the number of stars on GitHub affect the quality of the code you would assume that a project that has more stars is a better project because it's a project that does things that people wanted to do but if it does things people want it to do does that also mean it's a well-written project maybe maybe not it needs further research but as it stands though because this is observational data and you can't have a proper control group where you know you write code that doesn't have swearing and then you have code that does have swearing does it affect the quality like that just doesn't really make any sense in the context of what we're doing here nothing conclusive can be said but it seems like initially there is at least a correlation between swearing and the quality of your code in a positive fashion if someone wants to do this research though go ahead and do so and I'm sure to do a video on it because that would be incredible so let me know your thoughts in the comment section down below do you swear in the code you write have you read through the Linux kernel have you seen some of the crazy comments that are inside of that code base I would love to know and if you like the video go and like the video and if you really liked the video and you want to become one over these amazing people over here check out the patreon Scribe Silly Bear repeat Link in the description down below that's gonna be it for me and swear in your code [Music] [Music]
Original Description
Are you a developer, do you like to swear, well you might be in lucky because this recent bachelor's thesis attempts to link the 2 together to show that swearing in your code may actually improve the quality of your code.
==========Support The Channel==========
► $100 Linode Credit: https://brodierobertson.xyz/linode
► Patreon: https://brodierobertson.xyz/patreon
► Paypal: https://brodierobertson.xyz/paypal
► Liberapay: https://brodierobertson.xyz/liberapay
► Amazon USA: https://brodierobertson.xyz/amazonusa
==========Resources==========
Word Count: https://www.vidarholen.net/contents/wordcount/
Bachelor's Thesis: https://cme.h-its.org/exelixis/pubs/JanThesis.pdf
=========Video Platforms==========
🎥 Odysee: https://brodierobertson.xyz/odysee
🎥 Podcast: https://techovertea.xyz/youtube
🎮 Gaming: https://brodierobertson.xyz/gaming
==========Social Media==========
🎤 Discord: https://brodierobertson.xyz/discord
🎤 Matrix Space: https://brodierobertson.xyz/matrix
🐦 Twitter: https://brodierobertson.xyz/twitter
🌐 Mastodon: https://brodierobertson.xyz/mastodon
🖥️ GitHub: https://brodierobertson.xyz/github
==========Credits==========
🎨 Channel Art:
Profile Picture:
https://www.instagram.com/supercozman_draws/
#Developer #Programmer #Linux #OpenSource #FOSS
🎵 Ending music
Track: Debris & Jonth - Game Time [NCS Release]
Music provided by NoCopyrightSounds.
Watch: https://www.youtube.com/watch?v=yDTvvOTie0w
Free Download / Stream: http://ncs.io/GameTime
DISCLOSURE: Wherever possible I use referral links, which means if you click one of the links in this video or description and make a purchase I may receive a small commission or other compensation.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Brodie Robertson · Brodie Robertson · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
This Linux Patch Removes Spectre & Meltdown Protections
Brodie Robertson
Linux's Most Degenerate Terminal Application
Brodie Robertson
You Can Buy Modern Linux Distros On A DVD??
Brodie Robertson
Bypass Paywalls Vanishes From Firefox Addon Store
Brodie Robertson
CoreJS: The Web & Open Source Are Broken!
Brodie Robertson
Begone GTK4, Long Live The New King GTK5
Brodie Robertson
Flathub Finally Adds Much Needed Flatpak Feature
Brodie Robertson
Google Should Be Worried About ChatGPT Bing
Brodie Robertson
How To Never Improve The Linux Wayland Experience
Brodie Robertson
Fedora Linux Unveils New 5 Year Roadmap
Brodie Robertson
Linux Desktop Randomly Stuttering? Here's Why #shorts
Brodie Robertson
Why We Need Even More Linux Distros!?!
Brodie Robertson
This Wayland Change Will Improve Linux Forever
Brodie Robertson
Ubuntu Linux Was Once Spyware Says EFF & Stallman
Brodie Robertson
Rise Of A New Kind Of Linux Package Manager
Brodie Robertson
Rolling Release Linux Distro Probably Isn't For You
Brodie Robertson
Ubuntu Flavors Put An End To Shipping Flatpak
Brodie Robertson
WINE Will Finally Run On Wayland NATIVELY!!
Brodie Robertson
No ZDNET, Linux 6.2 WILL NOT Run On M1 Macs
Brodie Robertson
Ubuntu Linux Announces New Kind Of Mini ISO??
Brodie Robertson
Fedora Linux Finally Kills Off Delta RPM
Brodie Robertson
Linus Torvalds Is Sick Of Useless Git Merges
Brodie Robertson
Arch Linux Bricks Dual Boot With One Kernel Change
Brodie Robertson
Linux AppImage Finally Addresses Greatest Flaw!!
Brodie Robertson
Refusing To Use Windows For "Religious Reasons"
Brodie Robertson
GNOME Shell & Mutter Finally Drop GTK3!!
Brodie Robertson
11 Documents Showing Microsoft Tried To Destroy Linux
Brodie Robertson
Manjaro Linux Is The Joke That Never Ends
Brodie Robertson
The New Ubuntu Linux "Flavor" We All Expected
Brodie Robertson
NEVER Write Git Commit Messages With ChatGPT
Brodie Robertson
Why GNOME? Why Didn't KDE Takeover Linux?!?
Brodie Robertson
Discord Tried To END This Reverse Engineered Server
Brodie Robertson
Mesa 23 Makes Linux Shader Stuttering A Thing Of The Past
Brodie Robertson
Linux Kernel Broke A Feature NOBODY Uses!
Brodie Robertson
Manjaro Broke Asahi Linux... AGAIN!!!
Brodie Robertson
Linux Hasn't Become Complicated & Limiting | Distrotube Reply
Brodie Robertson
Ubuntu Linux's Steam Snap Is Almost Stable
Brodie Robertson
Wayland Is Linux's Future, But Why Do I Care?
Brodie Robertson
John Deere Refuses To Respect Free Software & GPL
Brodie Robertson
Why BSD Documentation Is Just Better Than Linux
Brodie Robertson
KDE Fixes Discord On Wayland Because Discord Can't
Brodie Robertson
Xorg Foundation Has A Serious Problem
Brodie Robertson
Manjaro Linux's Biggest Drama That Never Happened
Brodie Robertson
I'm Leaving Arch Linux For A Better Distro!!
Brodie Robertson
Red Hat Linux Once Featured A REDNECK Translation
Brodie Robertson
Android Authority Doesn't Understand Linux or Android
Brodie Robertson
Switching To Wayland: Why I'm Daily Driving Hyprland
Brodie Robertson
Private Security Patching Is A Nightmare In Open Source
Brodie Robertson
Xorg Vs Wayland Is Just A Technical Detail
Brodie Robertson
Why Did Fedora Linux Drop Its Wacky Release Names?
Brodie Robertson
KDE App Theming On Other Desktops Is A Mess
Brodie Robertson
Xenocara: That X11 Server That Isn't Xorg
Brodie Robertson
PopOS New COSMIC Desktop Has Me Excited Again!
Brodie Robertson
Hilarious GNOME Archive Bug Finally Gets Addressed
Brodie Robertson
Rust Foundation Has A Serious Trademark Problem
Brodie Robertson
Top 5 Best Hyprland Linux Features
Brodie Robertson
Installing Linux Software Is More Confusing Than Ever
Brodie Robertson
Clipboard: Simple Unified Linux Clipping Tool
Brodie Robertson
Solus Linux Returns From The Distro Afterlife
Brodie Robertson
uBlue Linux: Immutable Fedora With Batteries Included
Brodie Robertson
More on: Data Literacy
View skill →
🎓
Tutor Explanation
DeepCamp AI