How to type text on I2C OLED screen - Day 45 of

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024

Комментарии • 6

  • @BerndSchmitt-Martinique
    @BerndSchmitt-Martinique 2 года назад +1

    HI Tomasz . Just a little remark to the naming of variables : I love the code-completing function of this wonderful IDE . When i have to name some BUTTONS , i always start their variable-name with BUTTON_ ( second part = function ) like BUTTON_left , BUTTON_up and so on . If you want to refer to a button while coding - you just type butt... and you will get the complete list of all your defined buttons and you can simply choose the right one. Thank you for your excellent videos .

    • @tomasztarnowski4434
      @tomasztarnowski4434  2 года назад

      Hey Bernd, thank you for your suggestion🙏. I always strive for good code quality so I'll definitely keep that in mind when creating the next project with buttons 🙂

    • @BerndSchmitt-Martinique
      @BerndSchmitt-Martinique 2 года назад +1

      @@tomasztarnowski4434 HI Tomasz, thanks for responding. Naturally this idea is useful for every family of variables - not just for the button example . When i am coding for my FlightSimPanels there is a lot to do about the Autopilot ( AP ) . There are commands, modes , status and perhaps a lot more . My variable names are like the following:
      AP_MODE_heading or AP_MODE_approach or AP_COM_heading or AP_COM_approach . The first group means the logical mode, the AP is in , the second group gives a command to the AP to enter the heading mode. Thus you will never search for a name you have given long ago, you will always get an actual and complete list of all commands.
      little joke : you could call it " the reversed polish notation " auf deutsch : " umgekehrte polnische notation " something i had to learn long time ago with the programmable HP-calculators of the 1980s .

    • @tomasztarnowski4434
      @tomasztarnowski4434  2 года назад

      hey Bernd, really interesting I didn't know about "reversed polish notation" :). With the naming of variables I think the convention also depends on what programming language you use or paradigm you follow, for example with OOP you can narrow the scope by using classes and keeping variables as properties/enums/constants inside them as a result the code becomes more readable and it's easier to find things. Of course on the local level it should be like you pointed out.

  • @bartektgf
    @bartektgf 2 года назад +1

    Very nice presentation, it's a pity it doesn't speak Polish.

    • @tomasztarnowski4434
      @tomasztarnowski4434  2 года назад

      hey, thanks. I record in English to help as many people around the world as possible :)
      Although I'm gonna look into adding better Polish subtitles.