Jump to content
Tommi Prami

Frequent and/or annoying typos you make while coding

Recommended Posts

Hello,

I almost always missspell Lenhgt and Widht, can't remember other on top of my head but there are few. This does not matter how slowly I spell it in my head while typing, fingers will do the wrong order 🙂

 

-Tee-

Edited by Tommi Prami
Typo
  • Like 1

Share this post


Link to post

lol, i flip my ie ei allot.. height, client piss me off..

i turn off all editor helpers, just slow me down..

i flow it all out, then correct my spelling, with a few ctrl-f9, compilers so fast, this works..

  • Like 1

Share this post


Link to post

I remember beginning in a new position and I spotted and corrected a misspelled parameter in the SQL in Delphi, while it actually was misspelled in the database, so... that didn't really help.  

Since I am a bit of a petimeter, I mentally spell check my names all the time and get a bit miffed when I stumble on the mistakes of others, but I don't always correct them anymore 😛

  • Haha 2

Share this post


Link to post
Guest

I hope that the HTML tag <strong> will perish, because i always type </string> into one of the tags.

Search often becomes Serach. Something from the Bible, by the sound of it.

Share this post


Link to post

There is the GExperts Code Proofreader expert which supposedly can correct typos like Heigth to Height etc.. Unfortunately it sometimes does more harm than good by "correcting" words that only look like some words it knows about but are spelled differently (e.g. I tend to use abbreviations for variables of enum types like "tnue: TreeNodeUserEnum" which then gets "corrected" to "True".) It can be set to beep when correcting but that goes on my nerves quickly, so I usually turn it off again.

  • Like 2

Share this post


Link to post
Guest
30 minutes ago, dummzeuch said:

more harm than good by "correcting" words

Sounds a bit like https://copilot.github.com/ being the age i am being.... i'll pass.

Correcting a misspelled database fieldname may create havoc as @Lars Fosdal experienced.

Share this post


Link to post
30 minutes ago, dummzeuch said:

There is the GExperts Code Proofreader expert which supposedly can correct typos like Heigth to Height etc.

This is a great feature--I've used it both for proof-reading and for simple keyboard macro expansion (before Live Templates).

 

3 hours ago, Tommi Prami said:

I almost always missspell Lenhgt and Widht

Using GExpert's Code Proofreader or Delphi's Live Templates, you can either auto-correct your most common misspellings or set up small keyboard macros to do the typing for you. For example, instead of typing "length" you could type "lg" and it would be expanded to "length" for you.  I misspell "string" a lot and so set up "sg" to type it out for me.

 

This productivity trick saves a lot of time--I blogged about it a few months ago: https://corneliusconcepts.tech/delphi-productivity-tips-live-templates

  • Like 1

Share this post


Link to post
52 minutes ago, Dany Marmur said:

Sounds a bit like https://copilot.github.com/ being the age i am being.... i'll pass.

Correcting a misspelled database fieldname may create havoc as @Lars Fosdal experienced.

It does not touch any text in strings, only source code.

Share this post


Link to post
34 minutes ago, corneliusdavid said:

This productivity trick saves a lot of time--I blogged about it a few months ago: https://corneliusconcepts.tech/delphi-productivity-tips-live-templates

There is also quite a few information about Live Templates in the Delphi Wiki:

(I wrote most of the latter from reverse engineering existing templates and reading blog posts about them years ago, when Live Templates were all the rage.)

and also Stefan Glienke's collection of Live Templates

  • Like 1

Share this post


Link to post

I find this all reassuring - all it really means is that we are all human. Which reminds me, I need to stop and go and cook the evening meal.....

  • Like 1

Share this post


Link to post

Nice info dudes but besides the original question 🙂 I am not asking for solutions how to fix or find them, I want to just know what words you have problem of getting right.

Please tell me what do you miss spell 🙂

 

-Tee-

Edited by Tommi Prami
Clearer, message amplification

Share this post


Link to post

This is where GExperts Code Proofreader come to rescue.

I couldn't code without it.

When I encounter situations like what @dummzeuch described, I don't disable it, doing that is like a Chinese old saying:

Quote

give up eating for fear of choking

;)

You can get around it, can't you? For instance, use another var name instead.

  • Haha 1

Share this post


Link to post
14 hours ago, corneliusdavid said:

This productivity trick saves a lot of time--I blogged about it a few months ago: https://corneliusconcepts.tech/delphi-productivity-tips-live-templates

Alas, Templates sometimes don't work when they're needed to. F.i., I created "fmt" that expands to "Format(...)" which is VERY boring to type every time. But "Log(fmt" won't get expanded even manually with Ctrl-J so this template is useless.

Share this post


Link to post

Top 3 for me, where i make the most mistakes, are words:  Height, Length and Exception (even now I should check these words 😀) => i try to avoid using Exceptions :classic_biggrin: (joke).

 

Share this post


Link to post

Hei/Len + Ctrl-Space for the rescue. Key words are harder. Sometimes I find myself typing "funciton"

Share this post


Link to post

'g' gets flopped a lot, esp. in -ing -> -ign. It happens so often that I've gotten to the point where if there's not a spell-check line under it, I have to really think about it.

Share this post


Link to post
Guest

Not my typo, but i had a laugh (non compiled code in an e-mail):

 

try

  ...

expect

  raise expect.create('exception');

end;

Share this post


Link to post
1 hour ago, Dany Marmur said:

Not my typo, but i had a laugh (non compiled code in an e-mail):

 

try

  ...

expect

  raise expect.create('exception');

end; 

Quite logical 🙂 "expect an error"

Share this post


Link to post

Apart from the obvious "length", "height" and "weight", I tend to mistype phonetically similar consonants. E.g. "t/d", "b/v" like "wader" instead of  "water".

Edited by luebbe

Share this post


Link to post
Guest
1 hour ago, Fr0sT.Brutal said:

Quite logical 🙂 "expect an error"

Agreed,  "logical typo".

Share this post


Link to post
On 1/19/2022 at 9:10 AM, corneliusdavid said:

This is a great feature--I've used it both for proof-reading and for simple keyboard macro expansion (before Live Templates).

 

Using GExpert's Code Proofreader or Delphi's Live Templates, you can either auto-correct your most common misspellings or set up small keyboard macros to do the typing for you. For example, instead of typing "length" you could type "lg" and it would be expanded to "length" for you.  I misspell "string" a lot and so set up "sg" to type it out for me.

 

This single feature is why I can't live without GExperts. (AutoHotKey is similar, but responds slower.) I started autocorrecting ;; to :=<space> with one of the earlier versions of Delphi and can't live without it now as a time saver. Hitting the Shift key to get : is annoying.

Share this post


Link to post
1 hour ago, BruceTTTT said:

This single feature is why I can't live without GExperts. (AutoHotKey is similar, but responds slower.) I started autocorrecting ;; to :=<space> with one of the earlier versions of Delphi and can't live without it now as a time saver. Hitting the Shift key to get : is annoying.

If that's the only reason to install GExperts, you could get the same functionality with a Live Template (built in feature of the IDE) similar to this one:

convert typo ";=" to ":="

This will convert a common typo where you type ";=" but really meant ":=" to what you meant.

TEMPLATE FILE NAME: semicolon-equals-typo.xml

<?xml version="1.0" encoding="utf-8" ?>
<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates" version="1.0.0">
  <template name=";=" invoke="auto">
    <description>
      convert typo ;= to :=
    </description>
    <author>
      twm
    </author>
    <code language="Delphi" delimiter="|">
      <![CDATA[:= |end|]]>
    </code>
  </template>
</codetemplate>

 

Share this post


Link to post
On 2/7/2022 at 9:56 AM, dummzeuch said:

If that's the only reason to install GExperts, you could get the same functionality with a Live Template (built in feature of the IDE) similar to this one:

convert typo ";=" to ":="

This will convert a common typo where you type ";=" but really meant ":=" to what you meant.

TEMPLATE FILE NAME: semicolon-equals-typo.xml


<?xml version="1.0" encoding="utf-8" ?>
<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates" version="1.0.0">
  <template name=";=" invoke="auto">
    <description>
      convert typo ;= to :=
    </description>
    <author>
      twm
    </author>
    <code language="Delphi" delimiter="|">
      <![CDATA[:= |end|]]>
    </code>
  </template>
</codetemplate>

 

The problem with Code Templates though, is that they require a space at the end. It may sound trivial but I want ";;" to immediately convert to ":=" without having to type ";;<space>". GExperts is the only thing I've found that will do it.

 

Regardless, I use GExperts for a lot of other things, it's just that this is my favorite feature.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×