Jump to content

todd

Members
  • Posts

    335
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by todd

  1. Thank you for this. Since I'm working on template projects, I used your code firstly to improve my understanding of top-level actor launching and of Actor Core.vi.

     

    When the Event Structure's while loop ends, Actor Core's parent might still be running (if the developer makes a mistake and does something other than sending messages to self - see image below). This prevents Last Ack, which hangs the app launcher. Is it "clean" to fix this by sending Stop after the while loop?

     

    post-107-0-68627300-1365036582_thumb.png

  2. I studied hardware, not software, so take this with salt. If you make a toolkit, users with your abilities (meaning high-level) will be able to use it despite the lack of perfection. Users at my end of the skill range will find a way to mess up our code no matter how much you club us over the keyboard and mouse with contracts. What about including a lint-type script in a dashboard that searches for the non-implemented must-implements?

  3. I've been packaging up all my reuse libraries with VIPM (Free). I want to avoid accidentally modifying those libraries while using them in another project. In a Post-Install VI, I iterate through the list of "Files Installed" and lock then save all .vi, .lvclass and .lvlib files. An up-side is that when I open a reuse VI or class, I know right away by its appearance. What are the down-sides?

  4. I agree with hooovahh (including the "doing well" statement.

     

    In addition:

     

    Avoid duplicating code. In both VIs, there are case statements where both True and False cases write a string to a terminal (or its local). Move the terminal outide the case. I know it's a little thing, but being careful about it now will avoid trouble later. This also applies to creating two "This VI" references, and closing both.

    Turn off labels for VIs that are obvious, and turn on labels for constants (instead of free labels) like row and column in the event structure.

    Speaking of the event structure, you could turn those nine cases into one if you present the enums in a cluster, and use cluster-to-array for a 1d solution. Or use a cluster of 9 pic rings for the display, and convert it to enums in the code.

  5. "Spec? This unit IS the spec!"

     

    Hardware prototypes, iterating all the way to post-production tweaks of previous widgets. Com pipes can change. Byte format can change. And I need backwards compatibility - old hardware, kind-of-recent firmware, latest LV app test suite, add a new instrument to take the raw temperature instead of using the on-widget processor, ...  Every app has a pop-up parameter list with enums so users can choose versions for everything (or INI files for silent selection). Poster-child for DD, in my hardware-based mind.

  6. Add another vote for more code*. I have communications classes (actors, actually), that allow Byte or string messages to happen over a few different kinds of pipes. These get used in more than one project. Instrument-specific command-to-useful-string conversions are performed in their own classes. Yes, lots of code - but extremely useful, in my case.

     

    * Actually, I start with the simplest possible architecture for initial learning, then bring up the "better" code on the side.

  7. I worked with a smart guy who, when asked a question, would immediately give the answer. It motivated some people to work a lot more before asking him a question. "It was so easy for him! Maybe I can figure it out, this time." The people who came back to him with more questions tended to be either technicians or soon-to-switch-to-management-or-marketing types. (Hey, some of my best friends are managers and marketers.)

    I worked with another smart guy who, when asked a question, would answer the question that should have been asked - but without telling the asker the difference. It motivated some people to never ask him a question again. Those who came back to him with more questions tended to be curious perfectionists - always searching for practical knowledge.

    Forums have all types, so I vote with all those above who said, "give them both answers".

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.