Jump to content

JackDunaway

Members
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    39

Posts posted by JackDunaway

  1. I just noticed this this morning, but in Windows 7(x64) running in bootcamp (LabVIEW 2014).

     

    My problem seems related to the input-locale, or more specifically, which keyboard-type that were used.

     

    I’m using an external keyboard but windows defaults to the “Swedish (Apple)†keyboard, and for some reason that keyboard doesn’t forward multiple modifiers to LabVIEW (all keyboards work in MS Word). In this little test VI; pressing shift-a, ctrl-a and shift-ctrl-a should all give me the scan code 30 on my keyboard.

    attachicon.gifModifierTest.vi

    But the Apple keyboard doesn't react when both modifiers are used. By switching keyboard layout during the VI execution the ctrl-shift-a functionality comes and goes.

     

    So, my solution was to go to the control panel and change the default input to use the external keyboard layout instead of the apple-type. I also explicitly changed keyboard type when LabVIEW was open.

     

     

    Solved. Sincerely -- thank you! I will report this back via support channels to NI on this issue.

  2. Food for thought:

    If huge amounts of analysis and tribal knowledge is required to not write bloated, unscalable and buggy code with a certain tool. Is it not a better strategy to just not use that tool?

     

    To carefully dereference "certain tool", if that refers to LVLIB, yes -- it's worth considering whether this tool belongs in our toolbox.

     

    If "certain tool" dereferences to LabVIEW -- LabVIEW as a language is excellent and certainly not worth abandoning. Conversely, it's worth considering if you're not already using it. LabVIEW has rooms for significant improvement, but its syntax is currently unparalleled in programming, period.

    • Like 1
  3. You are skirting around a couple of fundamental issues, not directly to do with LVLibs but with LVPOOP and are the reasons why LVLIbs fall short of expectations. I think you have seen and hinted at, but not articulated, though.

     

    1. it is impossible to create LVPOOP components with zero static linking (this is trivial with an open VI and a LLB full of functions which can be loaded and unloaded dynamically).

     

    It's tenable at worst, desirable at best, for an LVCLASS and its members to be statically-linked. Any desire otherwise could be an indicator of class design or object model that could use refactoring, or a desire for more appropriate language facilities (more on that later).

     

    For an illustrated example, here's one annotated section of the diagram above:

     

    post-17237-0-81410800-1417186519.png

     

    The top arrow shows methods from a third-party hardware driver that are required by the application, the middle arrow is very likely an LVCLASS or LVLIB, and the bottom arrow shows unreachable, unused dependencies -- portions of the hardware API that bloat the application.

     

    Although not ideal, this scenario of roughly ~30 unused source files may not be measurably bad. The birds-eye view of this application indicates ROI of refactoring this class probably isn't justified. Though, used in another application, that exact same library could cause problems (such as even further unwanted linkages, perhaps even some that break the application with unsatisfied dependencies such as uninstalled packages or platform-specificity).

     

    Different application space yields different polarizing filters through which we choose tradeoffs. As library designers, it's worthwhile to consider our responsibility to enable our developer-end-users, and explicitly avoiding designs which cause them heartache.

     

    --

     

    I wasn't going to bring up Inheritance as another type of static linkage best cut with our figurative link scissors, but it's now relevant in the context of LVOOP. Inheritance, in and of itself in any language, represents a code smell worth investigating.

     

    But... Inheritance! Dynamic Dispatch! This example demonstrates precisely the value of traits/mixins in an OOP language. With traits/mixins, we can achieve all desirable outcomes discussed above in terms of higher cohesion and looser coupling (and re-use!), by eschewing 1) suboptimal/incorrect inheritance hierarchies, and 2) classes that do too much, even if there appears "good reason" for the monolithic library (Hardware APIs for LabVIEW are notorious for wrapping serial protocols as one-command-per-VI in monolithic libraries. There are thoughts/considerations of dynamic versus static programming as another solution, but that's another thread).

     

    Lacking Mixins in LVOOP, Inheritance sometimes is workably sufficient to describe and implement the real-world, but oftentimes it can't. Again, to be fair, it's healthier to focus on measurable negative value than pedantry, and oftentimes it's workable to incur these tradeoffs introduced by inheritance.

     

    @ShaunR, for this reason, I don't think LVCLASSes fall short in the way you might be describing. (Except for one debatable behavior in the IDE, where all classes in a hierarchy are broken if one is, and where the explanation as to why in that link is tenuous, where the more desirable behavior is to throw run-time exception in the scenario presented in that link) The way that LVCLASSes fall short is by lacking Mixins, which provide targeted and precise linkages to atomic units of relevant code.

     

    (for clarity, regardless whether industry is landing on the term Trait or Mixin, I support the construct that also provides extension of mutable state, not just method implementations, and certainly not just interfaces with no implementations. I think "Mixin" is most appropriate, its distinction from "Trait" being "Trait" might not connote further extension of state)

     

     

    it is impossible to create LVPOOP components with zero static linking

     

    tl;dr The design goal when designing an LVOOP object model is not necessarily to avoid all static links, but rather to intentionally design dependency vectors, especially recognizing and avoiding anomalies and incidental linkages that have detectable negative value. And, LVOOP needs Mixins.

    • Like 1
  4. So, should I ditch the use of LVLIBs altogether as a hopelessly-flawed tool?

     

    I did.

     

    (That is, after years and N00's hours investigating LVLIBs in the context of namespacing/distribution/building/linking/encapsulation/scoping/reuse/load time/dependency management and so forth. James, I am not surprised if you independently draw the same conclusion, and I'm interested to hear if you conclude otherwise.)

    • Like 2
  5. Greetings, wireworkers! Join us this week -- Wednesday, 24 September 2014, 12:00noon CDT (17:00GMT) for Episode 045: The Next Chapter.


     


    Michael and I will host previous guests Brian Powell, Justin Goeres, and Christopher G. Relf. Continuing our ongoing VI Shots Live theme of careers in LabVIEW, the conversation this episode focuses on transitions and step changes in your own individual business of software.


     


    Tune in Live at vishots.com/live, and come prepared to Ask Us Anything in the live chat!


  6. To enable private context tracing in Desktop Execution Trace Toolkit, in the file %LocalAppData%\National Instruments\Desktop Execution Trace Toolkit\DETT.ini place the following:

     

    [Preference]
    ShowPrivateContext="True"
    

    It's important to ensure DETT is closed down when you change the file; on exit, DETT flushes to file it's currently loaded settings.

     

     

    (Placing this info here with some searchable terms, to save my future self that infrequent 20-minute spelunking exercise of finding it again)

    • Like 1
  7. Greetings, wireworkers -- new VI Shots Live Episode airing soon!

     

    Join us this upcoming week -- Wednesday, 30 July 2014, 12:00noon CDT (17:00GMT) for VI Shots Live: Top Things to Do at NIWeek 2014

     

    Michael and I are joined by special guests and long-time NIWeek-goers Becky Linton and Darren Nattinger. We'll share our personal recommendations for sessions and tips on getting the best experience possible at NIWeek.

     

    Viewers of the live show can ask questions and share your own tips using the chat window. Visit vishots.com/live to join live next Wednesday and also to watch recordings of previous shows.

     

     

     

    Errr, Jack, that's not me  :) ! This is me.... (how sad am I for checking the LinkedIn profile....)

     

    Indeed!  :wacko:  Apologies on my transcription error, and thank you for the correction; it's now fixed in the original link. 

  8. [Re: LVClass Property Nodes]

     

    Performance aside -- if we agree that our codebases are liabilities, not assets -- in what universe does 16kB file per accessor make sense?*

     

    A long time ago in a galaxy far away, I agreed spiritually with the decision behind the design to require explicit UDClass methods for accessors (quote: "These are major advantages of class data encapsulation, and we want to encourage people to design software that naturally has this advantage. By not supporting public or protected data, we eliminate a potentially confusing computer science concept from the language (at the very least, we cut out one more thing that needs explanation) and drive people toward a better architecture.") Four years ago, after a year of novice learning, I questioned the design in the form of a feature request. A year and a half ago, I confirmed that was not just a naïve opinion that should have fizzled with experience. Today: confident enough to call LVOOP Property Accessors an incorrect language feature, and substantially painful enough to warrant redesign.

     

    A correct, desirable solution facilitates and promotes painless, seamless, intelligent design of class member scope. The design below, currently implemented and shipping for years now, needs to be removed. It's a clunky method of spewing liability and naïvete all over yourself and your project:

     

    post-17237-0-24588400-1406079699.png

     

    So, this weird-ass helpful-looking scripty-thing in the IDE is a "facility" to the uninitiated and eager, an "exsanguinator" to the initiated and burned,  and it provides a UI affordance that pointedly enables and encourages the precise opposite of the decisions behind the design. To sum up, we LabVIEW users are given 1) a document that posits we Picture-Programming Mouth Breathers don't need and can't be trusted with sharp instruments, and 2) a sharp instrument only good for cutting ourselves and nothing else. Wut? The self-fulfilling prophecy of ignorant software design given poor language facilities is publicly frustrating to me.

     

    As a side-topic, I strongly desire opening the conversation about unifying the type system of LabVIEW, this being one topic of usability-versus-problems with accessors, and as a case study comparing accessor syntax of typedefs to the other walled-garden composite types. (To expand, it's worthwhile to unify by-ref built-in classes like FileIO/VIServer/VISA/DAQ; STL-like reference designs such as Queue/Event; type definitions; .NET objects; and then our only "officially supported" integration point for types, the neglected bastard UDClass). New keywords for classes that guarantee immutability would be cool, providing safe read-only access for object members (e.g., the ctor is the only setter allowed by the compiler). A sane ontological relationship, such as a Trait would be phenomenal (when, neither inheritance nor composition fit; which is, like, a lot. nailing the object model itself resolves some data access deficiencies at the root!). Let's pick up stone and throw it in any direction to pick a conversation about how to improve LVClasses, except in the direction of UDAccessors. Those categorically remain 16-thousand byte liabilities, and let's just put to bed the syntax burden ought to belong in language-land, not user-land.

     

    Yes, got sidetracked onto LVOOP generally rather than staying on the LVOOP Property Node topic, but for an important reason. I'm not riled up here because LVOOP Property Nodes ended up as a bad idea with an imperfect execution. Like, whatever, k? We can fix that, a bit inconvenient, but no prob, we can work together. The fundamental source of angst is that LVOOP is not appreciably better than when it first debuted nearly a decade ago. And maybe, in some existential and puny way, if we declare a cease and desist on LVOOP Property Accessors, LVOOP gets better? I dunno man. Seems tenuous.

     

    Let's close out here. Remember kids -- friends don't let friends use LVOOP Property Accessors.

     

     

    Next week's topic: namespacing and source file formats (generally, linker questions like "who relates to who, how?", which makes this accessor conversation look like polite chatter in the grocery line)

     

     

    * To you -- yes you, with the $/GB or €/TB figure on your Casio solar-power display -- you're handy at maths, help me with this. What are the opportunity and actual costs of maintaining one LVOOP Property Accessor? Does that scale linearly with multiple accessors?  Multiple classes? Number of collaborators? How much time does it add to the build, type-propping and compiling, opening the LVProj, closing the LVProj, committing to SCC, diffing or merging on conflict, run-time performance (before it's loaded into memory, not after), debugging, when spanning across multiple targets, when spanning multiple release versions, when developing subclasses, when refactoring to add superclasses, when moving some data from sub- and some to super-classes, when explaining to your colleagues how "it must have been labview fault I just effed up the build" (punch line: you're right), when explaining that to your boss (who is sometimes the customer), when coming home late and explaining to your family (punch line: being right doesn't matter here; being good matters), when inheriting code from some trigger-happy accessor-scripting-chump, when you unknowingly run into one at least a few known vectors for insidious corruptions and bad behaviors with LVOOP property nodes? Cost certainly does not have "bytes" in the units, but certainly does have units of $$ and faith and morale. My experience, including many reboots of faith and second-third-fourth chances with LVOOP property nodes, is now converged to categorically default them as "too costly". You: "but..." Me: "Have at it; go crazy."

  9. Calling the this VI in a loop 1,000,000 times takes about 2ms.

     

    There's the red flag; that's a couple order magnitudes lower from gut instinct. I suspect one of two compiler optimizations due to the benchmark harness: 1) loop invariance that's applied on inlined but not detected for non-inlined VIs, or 2) dead code elimination, from not accessing the contents of the attribute

     

     

    I tried the reverse, and made my normal VI not inlined and it now takes 200ms.

     

    I hear this as excellent news, that your the XNode is just as performant as a "regular" VI!

     

     

    To substantiate, here's a harness that shows 1,000,000 accesses in a loop that exhibits no potential loop invariance or dead code -- on my machine, it takes roughly ~900msec:

     

    post-17237-0-45454000-1405862933_thumb.p

    • Like 1
  10. I've been hunting for an explicit answer to this question but can't find anything. The question in a nut shell is:

     

    Is it good practise to place potentially "big" (footprint wise) indicators such as graphs and charts in an event structure and update them via dynamic event?

     

     

    Briefly, the LabVIEW Event API is incredibly performant, and even provides optimizations for sharing references to published events for multiple subscribers. This Github repo shows 13 separate demonstrations and benchmarks of the Events API. Performance is relative, but my instinct is that your throughput described above is well-within the LabVIEW Events capabilities as a transport mechanism.

     

    If your application never needs to scale beyond a single LabVIEW application instance/context, the Events API will work well for all but the most extreme performance requirements; else, consider ØMQ or nanomsg or similar for more features and interoperability.

  11. Join us this week -- Wednesday, 24 June 2014, 12:00noon CDT (17:00GMT) for Episode 006: XNodes (Part 1).

     

    Michael and I are excited to host Gavin Burnell and Jonathan Kokott who have both used XNodes to redefine what �reusable code� means in LabVIEW. Even though the creation of XNodes is not officially supported, they power some important shipping abilities such as Timed Loops and the Error Ring Node, and we'll dive into benefits and caveats of using and creating XNodes.

     

    This will be our first show with technical screensharing demos!

     

    As a viewer, come prepared with questions, and we look forward to having you join this month at vishots.com/live.

  12. Greetings Friends of LAVA, colleagues, cohorts, and Wireworkers Extraordinaire -- it's LAVA BBQ time!

     

    click here >> LAVA BBQ 2014 Event Page: Register and purchase tickets today

     

    Date: Tuesday, 05 August 2014

    Time: 7:00-10:00pm CDT (after the NIWeek Block Diagram Party)

    Timestamp for your ISO-8601-compliant robots: {"BBQBeginTimestamp":"2014-08-06T00:00:00.000Z"} (API note: we have switched from XML to JSON since last year)

    Location: Scholz Garten, 1607 San Jacinto Blvd, Austin, TX 78701 (1 mile from Convention Center)

    Meal Options: standard meal is your choice of brisket, ribs, or chicken, with sides of beans, cole slaw, and potato salad. A vegetarian option is available to select during registration on the event page. Cash bar.

    Cost:

    • $30 Early Bird (until July 11th)
    • $35 Regular Admission (Until Aug 4th)
    • $40 At the door

    Who: Everyone is welcome, including spouses traveling to Austin with you. Even if it�s your first time, expect to recognize many faces/names from the forums and NI R&D

    What to wear: Informal attire, but come as you are. (We'll see everything from suits to flip-flops, though consider changing at the hotel to clothes suited for the 1mile 95�F 7pm walk or bike ride.)

    Reimbursements/Expensing: If you need a receipt to turn in to your employer, request a receipt by sending a private message to Hooovahh.  We are using a new system and may have difficulty getting receipts so please be patient. 

     

    If you plan to sponsor a Door Prize, specify this during registration on the event page, and also optionally reply to this thread to announce the door prize. Example door prize announcements from last year: "Be creative! By donating a prize you and your company will receive free advertising in this thread and bragging rights on the night, so what are you waiting for? Check out the cool prizes below (knowing there will be more added to this thread as NIWeek approaches), and try to top them. If you would like to donate (please do, we really appreciate the LAVA-love) feel free to add a prize below with the details." We'll touch base with you later to collect "blurbs" to be read aloud.

     

    Hope to see you there! Chime in on this thread (and the comments section of the Event Page) once you buy tickets to let everyone know you're coming.

     

     

     

    post-17237-0-84220200-1370539248_thumb.j

    LAVA BBQ 2012 in the Scholz Garten Biergarten (Photo by Norm Kirchner)

    • Like 1
  13. Are you using URI filenames?

     

    Try that, with the most conservative flagset of SQLITE_OPEN_URI | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_PRIVATECACHE and also the most permissive permissions SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE then deprivileging with the "mode" parameter on the URI. You'll also need to call sqlite3_open_v2 rather than sqlite3_open

     

    My hunch is that these settings could be sufficient without recompiling SQLite.

  14. Join us this upcoming week -- at a special time, Wednesday, 21 May 2014, 4:00PM CDT (21:00GMT, and 07:00 on Thursday in Sydney) -- for Episode 006: NI GOOP Development Suite Overview. (Many thanks to those involved and to viewers for accommodating this special international time)

     

    Michael and I are excited to host Mikael Holmström and Stephen Loftus-Mercer on the topic of GDS. We'll hear the story behind the product acquisition, and share some tips and tricks on using NI-GDS for object-oriented system design in LabVIEW.

     

    As a viewer, come prepared with questions, and we look forward to having you join next week at vishots.com/live.

    • Like 1
×
×
  • Create New...

Important Information

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