Personally, when I encounter such mistakes in the PRs, I leave review comments and request changes. What's your take? Does it make you feel uncomfortable?
Who cares as long as it works. Life is too short to fuss over stuff like that unless typo is causing a relevant problem.
A typo in code suggests a lack of attention to detail, something that is pretty important when writing code. Typos happen, but if you can't be bothered to fix them or don't even notice them, then why should I trust the code you've written?
I wouldn't say uncomfortable, but I do SUGGEST the change. Typo's happen all the time, we're humans -- not Gods. I was raised on the idea that when you see something wrong, you tell the person what's wrong so they can fix it.
Sadly these days such activities seems to be magically transformed into some form of personal attack -- you screwed up; OWN that. I screw up all the time, I'm fine with that. Getting your knickers in a twist because someone else found a typo, or bad practices, or outright mistakes is infantile... and indicative of a much deeper rooted societal problem that seems to be taking over.
... as now you can't even say anything negative; or you get the half-witted limp-wristed "It's not what you said, it's how you said it" BS; a lame excuse to just sleaze by on as little effort as possible and/or open the door to every two-bit scam artist and snake oil peddler.
But you know how it is, *Sex and violence are fine so long as nobody uses any naughty words." -- what South Park made fun of fringe whackjobs for twenty years ago is now the societal norm. You'd almost think we were conditioning people for generations to be herded about by outright lies -- creationism, science denial, cramming jade eggs in the holiest of hoiles, anti-vax, "organic foods" -- with mouth-breathers yumming up that type of manure as if it were chocolate soft-serve, is it any wonder so many hucksters and carnival barkers are able to take advantage of people on the IT side of things?
... and it all starts with the "wah wah, somebodies pointed out a mistake" mentality and endless apologism.
You see a mistake, POINT IT OUT. Otherwise they'll never learn or get better. YOU make a mistake and someone points it out, it's NOT a personal attack and if you don't know what's being said, LEARN!
I swear, with this attitude of slapping the rose coloured glasses on everyone's heads, whispering soothing-syrup platitudes in their ears whilst leading them down the path to failure to sing Kumbaya around the drum circle with the rainbow farting unicorn... well, it's hardly a shock the house of cards we call the Internet smells like shantytown sausages!
I do it everytime, be it typos in variable names or an explanation in the comment(not small typos). Only because once the code gets merged, other tasks take priority over this working code despite of typos and obviously the task of renaming variables to make it more meaningful wouldn't take the front seat anytime in future
Yes I do feel uncomfortable when spotting typos because:
When I noticed that IDEs and code editors don't usually have a form of spell-checking, I never could hate on a dev who misspells a word on a 2AM commit.
Just had the creator of Gatsby recently put in a PR to my Gatsby theme to correct a single typo I had in my README 😅
When I see a typo in a comment, I usually don't really care. When I see a typo in a variable or method name, I request a change. Bad things happen, though, when I see that very method being used all over the place by the very developer who wrote the code, even though they know that they made a typo, because they spelled the word right everywhere else... just... WHY?
trait Round {
fn ridius(&self) -> f32; // Y U NO CORRECT THIZ???
}
struct Circle {
radius: f32,
}
impl Round for Circle {
fn ridius(&self) -> f32 { // OH, the PAIN
self.radius
}
}
impl Circle {
fn new(radius: f32) -> Self {
Self{radius}
}
fn set_radius(&mut self, radius: f32) {
self.radius = radius;
}
}
fn main() {
let circle = Circle::new(5.);
println!("Radius is: {}", circle.ridius()); // Just NOoooOOO
}
Just half an hour ago, I asked someone to remove a period from Everest's README. I apologized for the nitpicking but tiny things like these say tons about the quality of your work. Details matter.
It's no biggie. I just comment that there's a typo, as others do for me.
Sometimes you want to leave them in though. I once derprecated a much-hated piece of code and it was a close vote on keeping the error message spelled that way.
Probably I miss half of them, but if I see them I'll make/request a change. I don't really feel uncomfortable when requesting changes though, perhaps I don't care enough about people...
gurudesu
Make a computer point out the mistake instead. No one can argue with a computer.