055 Top Level Code Review of Zoomie Control Program

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 9

  • @WilliamBurlingame
    @WilliamBurlingame วันที่ผ่านมา

    I became a programmer in the 1960s before computer science programs were introduced in universities. OOP programming came along late in my programming career and I never mastered that concept.

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  วันที่ผ่านมา

      Good morning WilliamBurlingame,
      Good to hear from you again. I started the game a while after you - late 70s/early 80s. OOP still wasn't a thing yet so I too was a bit too early. Oddly enough, I really don't mind it, and I kind of like it in some ways but for whatever reason, I just don't lean towards it naturally.
      Perhaps it is one of those "New fangled ways" and I don't want to do it LOL!
      Cheers William,
      Chris

  • @Ron_Rhodes
    @Ron_Rhodes 14 วันที่ผ่านมา

    Have you experimented with NFC tags? I have n-scale streetcars and I put the tags on the bottom of the cars along with a magnet. I have one reader under the track to log the starting position of each trolly car and then the hall effect sensors track the exact position of that car when it enters a station. Since all cars follow the same route, I make assumptions about which car triggers the sensors and grabs a virtual token. I'm sure there are limitations as to the speed of the readings if the cars are moving too fast but these are slow streetcars. Your zoomies have the sensors onboard so things are reversed from mine. I also have a large program for controlling lighting on the layout so I understand your concerns.

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  13 วันที่ผ่านมา +1

      Good morning Ron_Rhodes,
      I have not done anything at all with NFC tags. I just did a quick search to learn more about them and that sound VERY intriguing. I will have to get the needed hardware and look into those.
      Thanks for the suggestion! All too often I don't explore much outside my world and miss out on a lot of cool technology to play with!
      Cheers!
      Chris

  • @tubeDude48
    @tubeDude48 14 วันที่ผ่านมา

    What are you using for that green round circle for your pointer? PS: Coming along fine!

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  14 วันที่ผ่านมา +1

      Good morning TubeDude48,
      I use Vokoscreen for the screen capture software. It has a feature to put that halo around the mouse pointer. It certainly is a great feature for helping people follow along with my point of reference on the screen, don't you think so?
      This is a link to the developer....
      linuxecke.volkoh.de/vokoscreen/vokoscreen.html
      Thanks for the kind words and the question!
      Cheers
      Chris

  • @wktodd
    @wktodd 14 วันที่ผ่านมา

    Hooray finally OOP ;-) Python string operations are very good at generating garbage . if you're passing them around a lot, it may be better to use named constants.

    • @MakingStuffwithChrisDeHut
      @MakingStuffwithChrisDeHut  13 วันที่ผ่านมา

      Good morning wktodd,
      That sounds like a really good suggestion as "taking out the trash" isn't a welcome function. Do you have any suggestion or example to demonstrate that so I could quantify the gain? I think that would make an great story to produce.
      Cheers and thanks for the suggestion!
      Chris

    • @wktodd
      @wktodd 7 วันที่ผ่านมา

      ​@@MakingStuffwithChrisDeHut sorry for delayed reply. Python strings are immutable so any function thatchanges then has to make a copy. As I understand it, passing a string to a function is by reference (the string is an object) but that still may require a copy if the function is going to change the string. Passing a constant or numeric variable doesn't require a copy. There may also be some gain using IS rather than == when comparing objects (like strings)