[mythtv] Naming convention for constants
Scott Theisen
scott.the.elm at gmail.com
Thu Jan 9 16:50:32 UTC 2025
On 1/8/25 22:12, Gary Buhrmaster wrote:
> On Tue, Jan 7, 2025 at 7:10 PM David Hampton via mythtv-dev
> <mythtv-dev at mythtv.org> wrote:
>
>> We could certainly switch to 'k_', but then clang-tidy will complain
>> about any constants in the current 'k[A-Z].+' format. I'm willing to
>> do the work to change all of them to 'k_' if that's the group
>> consensus.
> A coding style is a coding style. As long
> as everyone follows it, it does not matter
> what the style is. There are many parts
> of the MythTV coding style I do not like,
> but it is still a style.
The code is old and the coding style has changed, but the code has only
been partially updated to reflect that. Case in point, method names are
supposed to start with a lowercase letter, but often have an initial
capital letter. https://www.mythtv.org/wiki/Coding_Standards
>
> Some people feel very strongly about
> their own preferences, but ultimately
> is usually about their own ego, not
> functionality.
>
> Unless the project developers think that
> the best use of their (limited) resources is
> rearranging the deck chair of the
> titanic, they should let sleeping dogs
> lie.
>
> I do remember in a past life assigning an
> intern (that everyone agreed had no real
> clue, and would not be hired because
> they wasted everyone's time by going off
> on useless efforts based on their lack of
> actual clue, so any work product would
> be thrown away when then left) to do
> such meaningless work because they
> could be distracted from causing other
> issues with their useless work product
> (I am sure they believed they had clue,
> and they certainly had an ego, but they
> actually had zero clue).
>
> If the project has someone whose
> work product is of such uselessness
> that it should be thrown away, let them
> make the effort.
I don't think making the coding style more consistent is useless work.
Also, while it is boring drudgery, I think you overestimate the amount
of work:
```
git diff $(git hash-object -t tree /dev/null) --binary > replace.patch
# search and replace for each key as desired in replace.patch
git rm -r '*'
git apply replace.patch --index
# git status and git diff should only show the changes and replace.patch
```
> I would prefer the
> developers prioritize work with real
> productive results (like Vulkan and
> Wayland work).
That would require someone who is familiar with Vulkan or Wayland.
Regards,
Scott
More information about the mythtv-dev
mailing list