loading...

Discussion on: Those silly mistakes we all make

Collapse
yechielk profile image
Yechiel Kalmenson

When I was doing Ruby I always misspelled initialize!

Collapse
philnash profile image
Phil Nash Author

How did you spell it? As a Brit I am, of course, offended by the "z" and think it should be initialise anyway.

Collapse
yechielk profile image
Yechiel Kalmenson

Lol, it wasn't a consistent misspelling, it's just a long word I kept fat-fingering.

What was most frustrating was that I wouldn't get a consistent "no method 'intialize'" error, it's just that I wasn't getting expected behavior and it would take me forever to realize it's because my initialize method wasn't being called!

Thread Thread
philnash profile image
Phil Nash Author

Ah, the nightmare of a misspelled constructor. It's there, it's just pretending it's a regular method. Cheeky. And hard to track down. 😑

What are you writing things in most at the moment? And is it saving you from constructor woes?

Thread Thread
yechielk profile image
Yechiel Kalmenson

These days I work mostly in Go, but even in languages with constructors I struggled with them enough that I now recognize a misspelled one sooner.

Thread Thread
ben profile image
Ben Halpern

Programming has helped me discover that I truly never learned "I before E except after C". I'm always misspelling the BadgeAchievement model in the dev.to codebase.

As a Canadian I occasionally have hangups with keywords like color. Phil, you probably feel this too.

Thread Thread
philnash profile image
Phil Nash Author

That's why we have postcss-spiffing.

body {
  background-colour: grey !please;
}
Thread Thread
philnash profile image
Phil Nash Author

Top Tip!

Rename the BadgeAchievement model to BadgeAcheivement and never have this problem again!

Thread Thread
ben profile image
Ben Halpern

I'm sure there are things like this in the code already 😭

Thread Thread
philnash profile image
Phil Nash Author

πŸ˜…πŸ˜…πŸ˜…

Thread Thread
yechielk profile image
Yechiel Kalmenson

Unrelated, but my last job had a referrals-based business model, so you can imagine the referrals table in their database was the most important table with indexes on almost every other table in the database.

It was spelled referalls, and every table apparently has its own convention of whether to name their column referall_id or referral_id πŸ€¦β€β™‚οΈ

Thread Thread
halldjack profile image
Jack Hall

I once fixed a misspelling in a codebase without realizing that the name was coming from an external API's response so my correction broke everything. Misspellings that you can't fix are very frustrating.

Thread Thread
philnash profile image
Phil Nash Author

@yechielk At least that's just in one app and not the Referer header supported in every web browser and server in the world.

Come to think of it, I bet the Referer header has caused multiple spelling confusions leading to things like this.

Thread Thread
philnash profile image
Phil Nash Author

@halldjack Oh no! You must have thought you were fixing a bug instead of causing it. That's the worst!

Thread Thread
yechielk profile image
Yechiel Kalmenson

Yes! Someone pointed out the referer header to me once, and I instantly felt better for the poor developer who created that referalls table...

Thread Thread
candidateplanet profile image
lusen / they / them πŸ³οΈβ€πŸŒˆπŸ₯‘

are we sure they didn’t mean β€œrefer all”s intentionally? you know, all of the refered people. or referred?

never give in

Thread Thread
yechielk profile image
Yechiel Kalmenson

Lol, yes, we're sure πŸ˜‚

Collapse
annarankin profile image
Anna Rankin

Same! Also I type reutrn way more often then I type return. Every. Time.

Collapse
murjam profile image
Mikk Mangus

Looking for an error for way too long many times and finally realizing there's a "form" instead of "from" or vice versa.

Collapse
clmcgrath profile image
Chris McGrath

for me it's retrun lol
i also embarrassingly wrote pubic instead of public during a tech talk

Thread Thread
dansilcox profile image
Dan Silcox

I’ve done similar typos with β€˜countryCode’ πŸ˜‚πŸ™ˆ