In this 3rd episode of the VI Shots LabVIEW podcast. I sat down with Justin Goeres and we chatted about the NI 2011 CLA (Certified LabVIEW Architect) summit, we both attended, which happened in Austin March 7-8. Justin gives us a run down of all the reasons why you should be attending next year if you are a CLA. I also play a funny clip of Justin discovering an event structure “bug” that caught him and others at the CLA summit by surprise.
I ask Justin about how he got his start in LabVIEW and how he almost became a PLC programmer! We also find out what Popcorn, Twitter and LabVIEW have in common.
Here are links to items mentioned in this podcast episode:
- CLA Community on ni.com
- LAVA Discussion on Justin's Event Structure bug (video).
- Popcorn Tweets video
- JKI State Machine
As always, discussion is encouraged. Please leave a comment on our site or send an email to email@example.com
Michael: Hello everyone and welcome to this episode of VI Shots. My name is Michael Aivaliotis and this is the podcast devoted to the world of LabVIEW. With each episode, I bring you interviews, discussions, and share with you ideas for how you can take your LabVIEW development to the next level.
Well thank you all for joining me for this third episode of the VI Shots podcast. Today, I bring you an interview I did with Justin Goeres, who is a senior engineer and product marketing manager at JKI. But before we get into interview, I'd like to play for you an audio clip I recorded a few weeks ago at the National Instruments CLA Summit, which took place in Austin, Texas between March 7th and 8th. I was there with Justin attending this awesome event. Justin did a presentation where he shared how JKI does interprocess communication. So I’m playing this clip actually directly from my iPhone. This is actually an interesting, a cool idea I don’t know if anyone has thought about this but you can actually use the voice memo feature on your phone and just use that for recording audio at any conference or seminar you may attend. So a little bit of background, Justin had been battling some technical issues with the event structure and when I’ll interview Justin, he’ll go into more details about this. This is just right before Justin discovers at the CLA summit that why he’s having this problem and it’s actually someone from the audience that points that out. So let’s take a listen.
Justin: What this means or one other aspect of this is public events are inherently one to many, right? You can generate the event but anybody can register for those events, anybody can register for that event. And as I think it should be clear, the process VI doesn’t know who these guys are or how many of them they are or if they exist at all. One cool feature of the LabVIEW user event backend system is that basically when you pass that cluster of user event refnums into a user event registration node and then hook that into an event structure, any event refnums that don’t have a corresponding case in the user event are basically de-allocated in the background. So you can attach that wire for all of the event refnums and ones you don’t use, don’t create bloat or leaks or process overhead because they’re just not generated like magic.
Steen: You just have to understand that they reset the timeout.
Justin: They do what?
Steen: They reset the timeout you know even though they are not handling the instruction.
Justin: Is that why my event structure isn't timing out? They do? Say it again? Okay. What Steven suggested is that if you have an event structure that’s registered for, sorry, if you have a cluster of (we’ll do it with two) with two user events wired into an event structure and the event structure has a case to handle one of them but not the other. And then somewhere else, something else generates the other event, the one you’re not registered for that won’t be handled here but he’s saying it will reset the timeout counter on that user event.
Stephen Mercer: Yes
Stephen Mercer: Why did you register it for then? You’ve said register for it.
Justin: Oh my god. In all honesty, that might be my problem. Okay let’s move on anyway.
Stephen Mercer: What other behavior would you want, given that you did say register to hear about it?
Fabiola: But you’re not using it.
Justin: Actually I’ll tell you why I do. I do that because I thought, and have thought, that it was an awesome feature of LabVIEW that I could just only create a frame for the things I wanted to receive and that I thought something really cool was happening. Actually furthermore, I would suggest that that is a really hard behavior for me to figure out because all I have is an event structure in my code with a timeout value attached to it, but never times-out and I have no way of inspecting the State queue to find out what’s happening.
Michael: Okay so having played that I introduce to you Justin. Hello Justin.
Justin: Hey Michael.
Michael: So I hope you heard all that.
Justin: I did hear all that. I remember it as though it were two weeks ago and that’s why everyone should come to the CLA summit. Everyone who’s a CLA.
Michael: Case closed.
Justin: Case closed. That was a watershed moment in my LabVIEW career right there. It was a whole series of dominoes that fell just with that offhand comment that someone else made that just clicked.
Michael: I’d like to mention just for the record that it was Steen Schmidt from CIM Industrial System that was in the audience.
Justin: Yeah I called him Steven but I misread his name tag. Sorry Steen.
Michael: Basically Steen was nonchalantly you know just laying back and say yeah you can do that but you just have to understand that they reset the timeout and you’re like what?.
Justin: And now I do understand.
Michael: And then after that you know a whole slew of discussion ensued which it goes on and on and on, but actually that night and the next day as well.
Justin: Yeah it actually turned into a very interesting discussion that got into sort of language semantics and how the core of LabVIEW works and all kind of neat stuff and it turned out to be a pretty cool discussion on LAVA too. I no longer have an opinion on it. I’ve recused myself from what is right or wrong. I just wanted to have proper expectations.
Michael: I guess this is a good advertising for the CLA summit and I mean I guess you got a lot out of it.
Justin: I absolutely got a lot out of it. I wasted more hours dealing with that bug prior to the summit almost than I spent in the summit in its entirety. I lost a lot of, there was a lot of head scratching and several new dents in my forehead from hitting it on the desk dealing with that, but the CLA summit took care of it.
Michael: So you presented basically how JKI does interprocess communication. Can you I guess wrap that up in a nutshell as to what does entails?
Justin: Sure. The theme of the CLA summit this year was interprocess communication and the motivation for that was basically that we’re all CLAs and we all have these different templates that we’ve all developed for communicating information back and forth in a highly parallel, modular, large applications that we develop.
JKI has a set of templates. I didn’t develop them. They’ve sort of grown organically within the organization over the last several years for doing this and our design is based almost entirely on custom user events that are you know handled in the event structure and we use some neat aspect of the user event handling subsystem in LabVIEW to sort of wrap it all up in a nice API and pass information back and forth. And we think it’s a fairly unique design and so I was doing a presentation in the CLA summit about how JKI solves the interprocess communication problem. Other people use queues you know you could use local or global variables, you could use functional globals. There’s a thousand different ways to solve this problem. Ours uses user events so I was sort of presenting that to the community of CLAs.
Michael: The whole interprocess framework is based on the fact that you bundle into the event registration, several events but actually you’re not necessarily creating event cases for all those events and only for the ones you need, and therefore that’s what sort of brought out this bug, this issue.
Justin: Yeah exactly. There are lot of neat thing you can do. A lot of people have not experimented with user events and sort of the way to register for events now it works can be a little tricky and confusing. But it turns out that you can create you know custom user events using the create new user event reference primitive or whatever it’s called. And you can bundle those together and then wire the entire bundle into an event registration node so that you don’t have to wire in you know five or 10 or 30 individual event refnums. You can just wire in the whole bundle. We thought at JKI that that was a cool sort of shorthand way to get a lot of functionality in a small amount of code but it ended up having this consequence that we didn’t realize. But many people didn’t realize and we we’re among them.
Michael: Personally, I actually made the statement later coming back to JKI that you know I would even forego going to NIWeek if I could just go to CLA summit.
Justin: It was pretty valuable and it was fun because the thing about NIWeek is it’s so big and there are so many people there that you only get to see sort of online maybe in the forums or in the forum communities, LAVA and the NI forums, and things like that. But you only get to see them you know for two or three days a year in Austin in August and it’s so hectic and the crowds are so big and there’s so many presentations to go to.
One neat advantage of the CLA summit, I didn’t go last year, this is my first summit that I’ve gone to. One huge advantage is that it’s sort of slower and the crowd is a lot smaller.There are only maybe 50 people there, 50 CLAs, and maybe 10 or 15 NI people involved, but it was a lot slower and smaller and so there was a lot more opportunity to sort of connect with people; both personally and in a technical way.
Michael: You actually put a post on the JKI blog about this called “five reasons you shouldn’t miss the CLA summit next year”. I pulled it up here. It says other CLAs will explain LabVIEW bugs to you.
Justin: Bugs is in ironic quotes. Well that refers to the surprise event structure, non timeout issue. In the blog post there’s actually a link to the LAVA discussion. My initial take on it in the moment was it was a bug which is a reaction I would still stand by because the behavior clearly violated what I think were pretty reasonable expectations that I have developed but the way LabVIEW works is a language, but after a lot more discussion and some more explanations from different NI engineers, I’ve sort of tempered my opinion on that and so now I just put bugs in quotes because that was how it felt like to me at first.
Michael: Number two on your list you have NI will ask you what you think.
Justin: Yeah this one was one aspect of the summit that I really didn’t expect that was really cool. And I say in the blog post it’s no secret that sometimes CLAs feel like NI doesn’t get it with respect to advance developers and I don’t mean that as a dig at NI but the fact is that anyone out there who is a CLA or even a CLD and maybe some people who aren’t certified at all. Sometimes it’s hard to feel like the feedback or criticisms you have about LabVIEW or about NI’s products gets to the right people all the time and without taking the position or whether or not that’s true. I can tell you that at the CLA summit there were a lot of really interested LabVIEW R&D and LabVIEW product marketing, LabVIEW product management and even executive level individuals who where there specifically because they valued what’s going on and they wanted to get feedback. And that was a really cool thing to see.
Michael: Well I guess i’m going to jump to number five because it’s kind of related. You might get to give a presentation to Dr.T and Jeff K.
Justin: Yeah. Another extraordinarily surprising thing was that Dr. Truchard and Jeff Kodosky both spent a lot of time at the CLA summit and I was not surprised to see them show up but I was surprised that they spent as much time as they did and I had a nice conversation with Dr. T about some NI marketing data and market research that they’ve done and I did not get the chance to talk to Jeff. I don’t know if he sat in in my presentation. I don’t know what his opinion on the bug would be. In fact, he probably wasn’t there or we would’ve asked him. But in general, they were really there a lot of the time and it was really cool to see them engaging the CLA community like that.
Michael: Just so people who don’t know Dr. T is, he is president and CEO and co-founder of National Instruments and Jeff K has the title of being the father of LabVIEW because he basically invented LabVIEW which gives us our jobs, 9-5 jobs.
Justin: Gives us a podcast.
Michael: And the podcast. Let’s see going through your list, number three, you confirm that you’re not an idiot.
Justin: One common thing that I think everyone will relate to as a serious software developer is that you spend a lot of your life feeling like you’re not very good at what you do because the problems you’re solving are sort of by definition hard. If they weren’t hard, there will already be a library or you know a VI package or something out there to solve them already or your organization would already have a reuse library for them.
And so the fact that your job is hard just means that you’re solving hard problems and one of the really cool aspects of the CLA summit was that we were there to talk about this sort of very canonical issue of interprocess communication. I have two loops or three loops, or 10 loops. How do I pass information between them? It was really interesting to see all these other you know talented, very skilled people with very deep background in software engineering and LabVIEW and all kinds of disciplines, all struggling with exactly the same problems and solving them in very different ways. It sort of reflect their particular needs in whatever the work they do day to day is but it’s sort of edifying to see that because that means when I’m sitting at my desk banging my head on it because my event structure isn’t timing out. I’m probably not the only person in the world that’s confronting this issue and there isn’t sort of a cook book recipe to go to. It’s just that interprocess communication is kind of tricky and as a sort of ecosystem you know all the LabVIEW developers in the world haven’t settled on a good solution to it yet and so it’s nice to see that that other people struggle.
Michael: Finally, you have you’ll get to talk to people you normally only see.
Justin: This gets to what I mentioned earlier about the CLA summit being sort of a smaller, more intimate place. My little heading there is not perhaps the most clever thing I’ve ever written but what I wanted draw attention to was at NIWeek you say all these people and maybe you end up Facebook friends with them or you say let’s connect on Linkedin or you use your little Bump app on your iPhone to exchange mobile phone numbers so you can text each other snarchy comments during the NI week keynotes.
Michael: It’s that a sneak peek to what’s going on in NI week?
Justin: That’s completely hypothetical and I made it up. I have no further comment on the advice of my lawyer. But you know the CLA summit was really cool because I actually got to sit down with some of these CLAs that you normally meet in passing or maybe you know have a beer with at NI week but you don’t get to sit down and have a really technical talk, and it was nice to do that.
Michael: It seemed like even after the presentations were over, people just kept talking about the topics of the presentation and other architectural issues as well.
Michael: Is that you clicking over there?
Justin: Sorry that’s me. I had to let the cat out of the closet if you heard banging in the background in the last few minutes. In fact, go ahead and put this in the podcast. If you heard banging around in the background for the last couple of minutes, it’s because my cat was trapped in my office closet.
Michael: How far back does your career with LabVIEW go? When did you actually get started and how did you get started?
Justin: I got started with LabVIEW the same way a lot of people do I’ve found, which is that someone handed me with a box with the LabVIEW logo on it and said here figure this out.
Michael: You’ve been listening to Ben’s podcast.
Justin: I’ve had and actually that really resonated with me. Ben if you’re listening, you and I have sort of similar stories that way. I was in graduate school at Iowa State in the Mechatronics and Robotics laboratory there ran by Dr. Greg Luecke. I was actually I teaching assistant for a brand new and I think I have this right, I forget if it was this course or a different but I think it was this one; a brand new mechatronics course that they were rolling out. This would have been fall of either 1998 or 1999 and I was tapped to teach this lab and I was like okay that sounds good you know. What do I have to do? And it was something we were doing for the first time so the lab syllabus was pretty sketchy and not really complete. And we’re going to be doing some data acquisition and control, probably built some PID loops I don’t know write some numbers to a file or something. What are we going to do that with? Well he handed, as I remember he literally handed me the LabVIEW 4 box and said we’re using this and I said what’s this? He said something with the effect of I don’t know but I guess you’re going to have to figure it out.
Ben described in his podcast interview described a stack of you know 25 3 1/2 inch floppies, I actually don’t remember that. Maybe it was already in all of the machines because one of the techs had done it. I forget, but be that as it may, it was either a LabVIEW 4 or 4.1. I had to teach a lab course in it so one of the lab managers who apparently have done a little bit of LaBVIEW and so was sort of known as the guy who knew how to make the wires sat me down for a couple hours and sort of walk me through how to build a VI. I don’t remember a single specific thing that he taught me, nor do I exactly remember what we used LabVIEW for in the class; although, I remember working with some students who didn’t understand the while loop very well so I remembered teaching someone about that.
Michael: The fact that it always iterates at least once.
Justin: Yeah they probably. It might have been that. They probably had their indicators outside the loop or something and then we’re wondering why they didn’t update you know classic problems like that. And so I bumbled and muddled and stumbled through this class and came out of graduate school with a background in control theory. I thought I was going to be a PLC programmer and ended up getting a job with a company in California and later became a National Instruments alliance company that was doing custom automation system for the semiconductor industry particularly gas delivery. The plan was for me to become a PLC programmer but they had a LabVIEW project that needed to be worked on.
Michael: Ouch, PLCs!
Justin: I think all is well and ends well you know. So they hired me because I had a line at the bottom of my resume that said well I have a resume that said PLC, control theory, automation something. By the way LabVIEW, it was down there, it was in a paragraph with like computing proficiencies and it was like Microsoft Office and Math Lab, and Mathematica and Lotus notes and whatever I thought was, whatever program that I had touched that you stuff in your resume in grad school. And one of those was LabVIEW because I had touched LabVIEW at some point so that me an expert as far as someone reading my resume knew. And so they hired me to sort of clean up on this LabVIEW project that they we’re in the middle of and then maybe transition into PLC development and that was followed by another LabVIEW project and another LabVIEW project and another and after a little while, we just gave up looking for PLC projects and became a LabVIEW company. That’s how I ended up doing LabVIEW profesionally in an alliance company after that I consulted independently for a while and now I work for JKI.
Michael: You and I crossed paths as well along the way. This was before you started working for JKI and this is kind of how I met you. The fact that you were working on a project and you had to actually leave the company and do something else and then instead of leaving the customer hanging, you decided to do this transition with the project would be handed to JKI. When we did the handoff meeting, actually I wasn’t there to be fair it was Jim and Philippe from our company so and I guess they were doing the interview and understanding how the code works and they were several questions about you know where’s documentation in the code? What’s your exact response to that?
Justin: I have to say this specific moment that Philippe likes to bring up and anybody who goes to NI week can ask either of us for this story because we both like telling it but I don’t remember it exactly how everyone else does. But what I’m accused of saying is that I don’t comment my code because I think I write it so well that it documents itself. It’s something along those lines and what it amount to basically was I used Unbundle By Name and therefore I don’t need to comment my code. I honestly if I remembered saying that I would admit it, I may have said it. I don’t specifically remember it but that was pretty terrible code to be perfectly honest. Looking back now, that was pretty terrible code and actually maybe this would resonate with people too. That was a very long project. It was a situation which happens to a lot of developers, not just in LabVIEW. But where I was really thrown in over my head and had to make this, had to build this giant, not giant, but very large application, did automated testing of semiconductor gas delivery panels from scratch, and it was by far the largest application I’ve ever done. I was thrown into the deep end all by myself and I had no mentors or anything to sort of give me an architecture. And so you could see if you knew where to look in the code, you could see the evolution of my programming as I sort of dealt with a larger and larger problems like when the project first started I was in that phase of life when I was like in love with global variables and then at some point I discovered that I could build functional globals and so then I stopped using; so part of the program used globals and then a whole other part used functional globals. And then at some point, I discovered references.
Michael: Control references.
Justin: Control references. And so I started rather than using controls and indicators for everything, I started basically doing everything by reference and Michael you’ve seen the code I mean you could attest, I did everything by reference.
Michael: Why not?
Justin: Yeah exactly. Because it’s the classic you know wow this is a very pretty good hammer now everything looks like a nail. There were some other evolutions that took place too, I forget what they were but I used to have four or five phases in my head.
Michael: Well the interesting one was when you had control references inside of functional globals. That was kind of cool.
Justin: Did I do that? I don’t even remember that one.
Michael: I don’t know. I guess it was kind of to reuse the references or something.
Justin: Yeah I’m sure it was clever at that time and I’m sure it solved some local problems.
Michael: But in all honesty, I have to give you credit that that was a pretty complicated application for someone who’s new to LabVIEW because I believe at that time that was kind of, you were still learning and I mean you were still growing as a LabVIEW developer.
Justin: That was my second, no that was my third major project as a LabVIEW developer and it was by far the largest like major is kind of in quotes. It was probably the first truly major project. Everyone's got skeletons in their closet.
Michael: Yeah and that’s the one. But I mean it turned out fine. I mean there’s been some refactoring over the years but just to understand the enormity of the project. It’s just so enormous that we can’t get rid of your old code.
Justin: Exactly. We still haven’t refactored it all the way.
Michael: I know you worked on somehow combining LabVIEW and popcorn with Twitter and I know that sound kind of strange but considering that you created a video that went viral.
Justin: I did. I’m one of those people that has enjoyed 15 minutes of at least minor internet fame in my lifetime. This is a year ago now. A friend of mine and I here in North Carolina discovered an online contest from a gourmet popcorn company in Wisconsin and they were running this contest. Show us your most creative way to pop America’s favorite snack being popcorn and so the way the contest work was you’re supposed to make a video of some creative way to pop popcorn and post it on their Facebook page. And then whoever’s video got the most likes over the course of the contest would win popcorn, right? So my buddy Dave and I were skyping each other and we’re like how are you going to win this and we came up with this idea to pop popcorn using Twitter. Long story short, over the course of really about two days because I was on travel for work and we had trouble getting our schedules linked up and there wasn’t much time to finish the contest. We built a lego, mindstorms-powered robot that ran on LabVIEW and it listens on Twitter for tweets that have the word popcorn in them and everytime it discovers one it pops, it dispenses a little bit of popcorn into an air popper and when the popper’s full, it turns on the air and it pops popcorn. We thought this was pretty cool. We made a little video of it, threw it up on their Facebook page and we ended up winning the contest, which was kind of neat. Not only did we win the contest, the video got picked up by Mashable, one of the big social media networking sites, who else did it get picked up by? Mashable and Engadget. It got picked up by Engadget both on Superbowl Sunday actually. From there it went really big, tweets everywhere with the word popcorn in them. We didn’t do a million views. I think we did over 25,000, which is no slouch. The popcorn company saw a several percent increase in their sales that month that they’d attributed to the video. NI ended up inviting me to setup the machine on the floor at NIWeek in 2010 and to do a presentation about how I built it and how we made it a success and all that. So that was a really cool experience and it sort of continues to this day. People ask me about it. I’m sort of the popcorn guy.
Michael: Yeah so the cool thing about that is it kind of combined several different elements in one. For example, there’s sort of NXT mindstorm element of it. There also the fact that you’re using the JKI State Machine, which is promoting you know one of our toolkits. So there’s Twitter which is another anything with the word Twitter in it is really popular. So you combined all those things into one was I think kind of cool and helps sort of promote JKI and yourself and LabVIEW and a whole bunch of other things.
Justin: Right. It was a good illustration and this is something that I talk about in the presentation I do about it of really the benefit of being active and involved in online communities, for instance, the Twitter code that I used, I didn’t write it, I stole that off LAVA. Someone had posted an example there which was actually an evolution of an example posted on the NI forums by Christian Lowe and so I was able to incorporate that code into my program and within just minutes have the Twitter part working and then because I have the mindstorm set laying around which I won at NIWeek a few years ago, I knew that I’d be able to use that as motor controller and I absolutely i had absolute confidence that I’d be able to control that from LabVIEW so I have these things in my head right away and I knew that I could stitch them together. But the reason I knew that is sort of because I hang out in the forums and talk to people and read threads. So I knew a little bit about mindstorms event though I’m not a professional mindstorms guy and I knew that there were some Twitter codes out there and I knew I had the JKI State Machine templates, which you know it’s a coincidence that I happen to work for JKI. That could have been anybody’s state machine template and so we were able to stitch together really quickly. Make the video, upload it, and sort of get the word out to our friends on Twitter and LAVA and the NI forums, you know e-mail all our parents and grandparents and aunts and uncles and make them go vote for it. And really sort of stoked this network very quickly, which then is part of sort of the larger point that I like to make about how to use social media but more importantly how to sort of build potential in social media so that you can activate it when you need to if that doesn’t sound too exploitive.
Michael: You can call upon the masses.
Justin: Yeah exactly. You can marshall your personal army to go click a like button for you. You know VI Shots probably has that power, right? If you told people to go like something, you know you could probably move the needle.
Michael: Yeah. I don’t know if we have power yet. We have some followers. You know speaking of the JKI State Machine which you know you spoke of that you use it for the popcorn tweets. Why do you think that’s so useful?
Justin: The risk of making this sound of a commercial from JKI, I think quite the JKI State Machine has resonated with people is basically because there is a lack of good templates available sort of in the community for LabVIEW. But I think the thing that really resonates is that it’s a pretty good template. It’s very easy to use. It takes a couple approaches to things like using strings to drive the state machine rather than enums that are a little bit against the grain in terms of how things are traditionally done but turns out to have a lot of good advantages. And I guess I would say that it succeeds because it’s easy for people to try it out. It’s sort of seductive, once you start using it, you’ll find that it actually is kind of fun and easy to use and on top of that it’s free so you know you can feel free to spend you own time inventing your own wheel or you can just use ours for free.
Michael: I think that’s it for this interview. Justin I’d like to thank you for stopping by and visiting our VI Shots studios or actually you’re not in the studios.
Justin: I’m in my office in my home in Cary, North Carolina.
Michael: Again thank you Justin for visiting.
Justin: It has been my pleasure. Thank you.