Monday, October 20, 2014

Maybe this is why I am such a sloppy programmer....

C++ and MFC



“In 1989 C++ 2.0 was released followed by the updated second edition of The C++ Programming Language in 1991.[9] New features in 2.0 included multiple inheritance, abstract classes, static member functions, const member functions, and protected members. In 1990, The Annotated C++ Reference Manual was published. This work became the basis for the future standard. Late feature additions included templatesexceptionsnamespaces, new casts, and a boolean type.
In 2011, C++11 was released which added more features and enlarged the standard library further (compared to it in 1998), providing more facilities for C++ programmers to use, with more additions planned for 2014 and 2017.”

I remember taking a class on C++ using Bjarne Stroustrup’s book in 1992 or 1993. Since C++ was so new to industry, my professor didn't even really understand the class implementation of the language making the class quite nightmarish. This was also the last programming class I took in college. After graduating college, I didn't do any programming until coming to Corning in 1999, and that was just VBA.


'Windows Forms seemed to me what MFC should have been'
All the early books used C, but then Petzold shifted to writing about C# and .NET. Was he comfortable with such a high level of abstraction?
“I started out with machine code and assembly language. I took to C very well. I kind of skipped over C++ and MFC. C++ always looked like an extraordinarily ugly language to me, and MFC was not a very well-designed object-oriented wrapper around the API. I thought there should be something better. My first experience of .NET was with C# and Windows Forms, and was extremely favourable. [sic] I liked C# sharp as a programming language, I liked .NET as a sturdy, extensive, runtime library, and Windows Forms seemed to me what MFC should have been.”

This is interesting since LabVIEW (sorry, yes, everything right now relates back to LV, I should diversify) seems to rely so heavily on, but is quite hamstrung by it.

Thursday, September 11, 2014

Personal Blogs - Are there any EE guys out there???

Do a search for "Electrical Engineering Blogs"

Go ahead, do it, I'll wait. What do you see? Not much right?

It is curious that some of the top 100 engineering blogs include blogs from engineers that have jumped off the corporate band wagon and are either farming or exploring alternative energy projects. There are several student blogs that may or not be abandoned. You might even consider this blog abandoned, I don't know. Whatever, it is my personal space to rant and spit about the world around me. Maybe I will post more often if the mood hits. Maybe I will start blogging about jumping off the band wagon and becoming a farmer.

Saturday, January 4, 2014

Fail Faster - Profindity

I think I have found my new motto, "Fail faster." How can I find a solution to a problem? Find and try everything I can think of as quickly as possible. What ever does not work gets thrown out and the best of the solutions that work get kept and aired out.

I first heard this from a Vimeo post by during their ALS Summit a few months ago. I was put onto this by my son watching Steve Gleasons's Saints when he told me that Steve was answering and posting tweets during the game between the Saints and the Eagles in Philadelphia. Being the curious sort, and somewhat vaguely aware of ALS, especially knowing that Steven Hawking is disabled due to "something like" ALS. Yes, I am ignorant, Steven Hawking is, after some searching, also afflicted by ALS. I searched around for Steve Gleason and found his website along with his wife's PSA about him and the organization, I watched a bit of the summit's introductions and was immediately stuck by the profound statement of Walter O'Brien of Scorpion Computer Services. He explains that in computer science, the secret to success is to "fail faster" where he implies the two week "sprint" that you hear about in so many bleeding edge development strategies. I don't subscribe to any particular development strategy per se; however, I can agree completely with cutting you loses early and moving on.

Mr. O'Brien also talks about how anything he works on is new, because, "if it was already done, we would have used the previous system." This is the world I tend to live in with my work. Granted, I do work on projects which require me to maintain equipment to keep the process running; however, many of the things I do enable engineers to accomplish tasks and build things in a way that has never been done before. Now I do not profess to actually know anything; however, what I do have is a broad range experience. I draw on previous experience and build on that to accomplish great things. Which is pretty cool. My favorite projects to date involve working with glass. Whether that be in the form of optical fiber, or thin sheets of glass used in information displays.

Now, I have to admit that I have fallen into the rut of taking a part of a system that is not well suited to the application and working through the problems to "just make it work" without considering that there may be a better solution. Therefore, I am committing to work smarter and identify ways to "fail faster" and get to the best solution to the problem before me instead of wasting my and my customer's time in trying to make a sub-optimal solution work.

Fail Faster, indeed.

Thursday, February 2, 2012

LabVIEW Scalable Tabs to Control Separate Test Applications on the Same Interface

I was working on a new project this week and wanted to have a smart way to switch between the different tasks the application had to perform without having a side bar, or HMI style buttons. So here's what I came up with:

The buttons across the top are from a system tab control which is behind a single sub-panel container. When the user clicks on another tab, the application automatically switches between tasks by unloading and loading the tasks in the sub-panel.

Another feature I wanted was for the tabs to be justified across the user interface and for all the controls on the screen to be able to size with the window. The scaling of the controls is not very fluid, but when the user re-sizes the window, all the controls on the main screen scale. I will probably have to scale the sub-panel task controls as well, but that can be a function of the sub-panel task and the main application does not have to worry about what is going on in the sub-panel.
I can never remember how to set the position of the panel/pane, so I figured this was a good place to keep track of that as well. The block diagram above shows the reaction to scaling the window by the vi as well as the loading of the initial sub vi. I have seen various examples of sub-panels, but none with tabs like this.

A write-up with example code is here.

Wednesday, February 1, 2012

Ugh, not this again

Received an email yesterday from, a Steve Harris website about the Byron Electric generating plant going off line. Since this plant is a nuclear facility, I was mildly curious about what was happening.

So here's what happened, the plant went into automatic shutdown after an insulator in the switch yard failed and caused a short in the plant's power distribution system. As a result of the automatic shutdown, the plant's steam turbines are bypassed so that they don't make any power. This vents steam to the atmosphere. The steam that is released has some radioactive hydrogen isotopes in it because, well, hydrogen is hard to keep it from leaking through micro-cracks and such. Radioactive hydrogen isotopes have a very short life cycle, much less than the eight days from the stuff that Fukushima was and is spewing out. Normally, this steam is processed in a semi-closed system allowing the condensate to be reclaimed and reused to make more steam; however, this system is NOT tied directly to the reactor cooling systems, although the potential for cross-contamination exists, which is where the hydrogen isotope (tritium) comes from because the steam generation system and the reactor cooling system must interact with each other to produce steam through heat transfer.

As a child of the nuclear age, I know that most of the problems with nuclear power come from greedy operators and inept government regulations. If the operators of these plants would maintain them correctly and take them out of service or refurbish the plants properly, there is pretty low risk of any problems. However, those problems can be monumental if something goes wrong like Fukushima, or Chernobyl. There are still highly radioactive areas around Chernobyl after all these years, but plants and animal wildlife seems to manage just fine without our help in those "dangerous" areas.

What's the point?

HYPE, and lots of it, conjured up just to separate YOU from your sanity and your money. Steve Harris is a really smart guy and has some pretty cools ideas, but sending up the massive warnings about minimal problems has not been very good for the American population. Can you say Homeland (In)Security Administration?

Buyer beware is all I can say.

Friday, January 27, 2012

Preparing to Scatter

After reading Ol' Remus' opening volley this morning, I had an interesting thought. As a student of the Christian faith and the teachings of Christ and His disciples, I can not help but think about how after Christ's ascension into Heaven, the anointing that the 120 received, and their subsequent persecution drove them out of Jerusalem and into the gentile world. What if God himself is nudging American Christians out of their comfortable lifestyles to get really serious about making disciples in all parts of the world?

I also read a very interesting article about The Master's Mission in Kenya where the Teasdale family has been working for several generations spreading the Good News of the Gospel. It definitely peaked my interest in that my skill set is one of a very mixed bag, one that generally does not fit in with traditional missionary work.

This is the question --

How am I supposed to respond to this desire in me to "go out" into the world?

What am I supposed to do with my desire to see the United States fulfill its purpose of being a light on a hill, as Ronald Regan elaborated when justifying the tearing down of the Berlin wall?

I am a systems guy, I see how things work together. I want to help people who want to be helped or are in a situation where they cannot help themselves. How can I use my skills in Missions???

AttributionNoncommercialShare Alike Some rights reserved by ChuckHolton
How can I ignore this?

That's not to say that I believe this child should have a fancy house and a fancy car. I don't believe any of us needs what the prosperity gospel has to offer. These people do not know peace, spiritual peace nor real physical peace. They are living in constant fear of raids by bandits who's only purpose is to take from others what they to do not want to provide for themselves. How can I ignore those who would seek to do others harm? Don't they need inner peace as well? REAL inner peace?

To be continued____