> On 4 feb. 2021, at 01:21, Johnson, Andrew N. via Core-talk <core-talk at aps.anl.gov> wrote:
>
> A colleague just presented me with one of those frustrating little problems where his database wouldn’t load because he spelled a calcout.OOPT field value using “to” instead of “To” and he couldn’t find it.
>
Thar is sad to hear - but who hasn’t been there ?
Doesn’t the database loader give a useful warning/error ?
What is the difference between “to”, “fo”, “io”, “tu” ?
They are all typos, spelling errors.
What is the “real name” ? “To” or “to” ?
My suggestion would be to use a (naming) convention here - the same problem hits me all the time.
“CamelCase" or “snake_case" or “UPPERCASE" or “lowercase” ?
None of my compilers is intelligent to figure out how to fix this typos - and that is a good thing.
And: Helping colegues to find this kind of bugs puts people together.
Exchange knowledge, chat about other stuff.
Best practise, new projects, problems, even the solved ones.
> How about when putting to a menu field we do a second pass through the choice strings using epicsStrCaseCmp() so this kind of thing would be silently accepted? The first pass should still use strcmp() in case some IOC has choices (in mbbo strings) that only differ by case, but the second pass would accept the first to match even when the cases differ.
>
> We could make this configurable so sites could turn it off, or even have it display a warning, but I’m not sure who would really want that much strictness.
>
> I already wrote the code, although it could be posted as a Codeathon project instead (requiring tests and Release Notes as well).
>
> - Andrew
>
> --
> Complexity comes for free, simplicity you have to work for.
>
- Replies:
- Re: CaSe-IndepeDent Menu SEARches? Ralph Lange via Core-talk
- References:
- CaSe-IndepeDent Menu SEARches? Johnson, Andrew N. via Core-talk
- Navigate by Date:
- Prev:
Re: CaSe-IndepeDent Menu SEARches? Michael Davidsaver via Core-talk
- Next:
Re: CaSe-IndepeDent Menu SEARches? Ralph Lange via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: CaSe-IndepeDent Menu SEARches? Ralph Lange via Core-talk
- Next:
Re: CaSe-IndepeDent Menu SEARches? Ralph Lange via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|