"In the world ye shall have tribulation: but be of good cheer; I have overcome the world." –John 16:33

San Pedro Garza Garcia

Category: Software Page 3 of 5

Pushback on Christian’s latest blog post

Christian recently wrote a technical post on his blog about demosaicing of images captured with Fujifilms new X-trans sensor. He tested some methods to perform the demosaicing, wrote a first pass of his own demosaicing code and then posted about it all on the blog. That kind of thing is pretty interesting to guys who work in that area and/or have cameras. He got a couple of nice comments on the blog post itself, but what boggled my mind was that some guy wrote this over on Hacker News where his article got some coverage:

[sic] someone is wasting a [sic] phd scholarship to solve a problem that only [sic] exist because people keep dumping money on a company that damages their own product by now releasing source or specs?

What a tool. That is like saying people are wasting McDonald’s, Amazon’s or the local donut shop’s money to solve a problem just because the guy solving the problem happens to work for that company. PhD scholarship students are not slaves. Some of their time is their own. Beside that, Christian is not on scholarship. He is a Research Fellow and A Dean’s Fellow, so he is an employee, just like if he were working at McDonald’s, Amazon or the local donut shop. And who cares how the problem was caused. People have the problem and it an interesting problem. Why not solve it? What kind of a waste of oxygen writes a comment like that?

CoffeeSig web GUI

CoffeeSig single camera GUI startI spent much of the day today trying to figure out how to use CSS to control the way the web pages look in the Wt application I am writing. This is the one I hope to use to learn how to capture images from 1-n cameras to the web with analysis in real-time. It is fun, interesting and frustrating all at the same time. The funny deal is the frustrating part is that it is difficult to get all browser types to behave the same way. I have decided I will just aim at Firefox and Chrome because they are the most ubiquitous in my little world. The companies that make those browsers have, in my humble opinion, very sketchy reputations, but that is another story for another time.

The next step will be to start hooking up the camera. I think I might go back to the license plate reader as my first application for this thing, but I am not sure yet. When I get a camera hooked up that is controllable from my local network with a browser, I will port it over to the little BeagleBone Black I have been running as a web server that does not do much from the apartment for quite awhile now. My buddy John H. from Arizona is helping with this whole thing. He will be a big help because we will be getting into some pretty serious 3d/time domain image processing here as we get past the one camera application.

Machine learning

Professionally, I have to make a (semi) dramatic change in direction to learn some new stuff so I can do my job. I have to drop my work on my EKG project and GaugeCam for the next few months because I need to learn more about machine learning. I have done a little of it with R, Weka and OpenCV, but I have a need to delve into it more deeply to build a product that is commercially viable now so I am going to chose between learning more about R or learn about scikit-learn with Python. I am leaning toward scikit-learn because they say it is easier to learn for someone who is used to procedural languages like C/C++/Python/etc. I am actually kind of excited. I actually have real data with which I can get started and real problems I can try to solve that might be a help both commercially and altruistically. I will try to put some of my results up here as I go along.

Video of the EKG running with my own software


My hard work paid off this weekend. I am working with my long-time friend and colleague, Frank, to develop some EKG software for our $27 EKG’s. Actually, the EKG part has gone up now to $51 and the Arduino needed to run it costs another $20. At any rate, the software shown here accommodates six channels (even though that has not yet been tested because I only have one channel). It needs some cleanup, but it works great.

Strip charts for the EKG

When I started building my $27 EKG, I just assumed there would be an excellent library to chart the output to the screen in a compelling and useful way. There are a couple of libraries that are pretty good, but they are either really old, have bad open source licenses, are not fast enough (we need to eat a lot of data in real time) or they do not do exactly what we want. It is a little bit of a hassle to write something like this when in a rush, but it could not be helped. That is what I did most of the day yesterday. I hope to have the thing all up and running in the next few days. It will be useful to have an unencumbered library for a lot of the things we want to do with this little project and probably for future projects, too, so it is not a loss.

Endianness “bytes” me one more time.

I had a little bit of a breakthrough on my EKG project last night. I actually had the idea when I was completely away from the project for a few days. It caused me to re-read the manual where it said the readings from the EKG are sent down the serial cable in big endian order. Each value for a 10-bit number takes up two bytes. The high order byte can either be first or last. The receiving computer expected little endian order. I now swap the bytes before they are plotted or recorded and we get the beautiful plot above. You can barely see four little lines below the left side of the signal plot. Those lines make up the legend for the electrode channels. The system can handle six channels, but we are going to try to do just four on this setup. The next step is to get the graph to be a moving strip chart. The graph, as it is right now, just writes over itself.

I completely duplicated my current setup for a friend, Frank who is joining this project. He is way more skilled than I in a lot of this stuff–especially the electrical engineering parts. I need to order myself an additional three channels of electronics, but that is on its way to Frank right now.

P.S. We are thinking of cross platforming (Windows/Linux) and open sourcing (free as in both freedom and beer) the software and writing a user guide/tutorial on how to set the thing up if anyone shows any interests because there does not seem to be anything out there that is really hobby friendly. If I am wrong, maybe someone can correct me. Because of our day jobs we are still months away from that.

Sometimes a lot of work does not manifest much

One of the most painful aspects of the work I do is that I need to learn to work with new software libraries on a regular basis. The pain is associated with learning new syntax, parameters, and usages. One generally knows what the libraries are supposed to do, but cannot get them to work until all of the nuances, idiosyncrasies and minutiae are well understood. For extensive libraries, that just takes a lot of time–at least for me. There are some libraries I have used for so long (OpenCV, Boost, Qt, etc.) that I can rapidly do the vast bulk of what needs to be done in a new application because I am intimate with the minutiae. But there is always something that changes and requires the use of new libraries–obsolescence, license changes, functionality changes and that sort of thing that require the adoption of new libraries. I actually kind of enjoy learning new stuff, but it is a lot more fun when there is no schedule or budget to create stress.

What was that all about? I have found some libraries I want to use to plot my EKG. They look great and I wish I would have started working with them sooner. I am confident now (well, not 100%, but very confident) they will be an excellent fit for this and future projects so I am starting to use them. Last night I spend three hours to get from the top images to the bottom image, then discovered I was probably using the wrong chart type for the thing I wanted to do, so I spent another hour to start getting the new graph type in place, but never got it quite working. This kind of thing is normal for me. Maybe I am just slow, but perseverance counts both in software development and in learning. Maybe I will be able to get the chart going tonight.

Technology caught up with us (that is a good thing)

I have had little time to work on the GaugeCam project due to other responsibilities. We got a helping hand with this product when we found that there are now cameras available that do precisely the part of the product we did not want to do and at which we were not that good. The camera in this post is an example of that. Before, we had to put together a cellphone enabled remote camera with mounting systems, batteries, a solar setup, etc. Now, you can just buy it and install it yourself. So now I think we will be able to concentrate on the software and the water level data that is accumulated from the product which is really our strong point anyway.

Now I will be able to concentrate on my EKG project a little more before I go back to GaugeCam. Also, I will be able to use the BeagleBone Black I purchased on the EKG if I want. I am hoping to communicate between the Arduino/EKG electronics and the mothership computer via Bluetooth, but I am not sure I can get it to go fast enough. The Bluetooth will handle it, but I do not know if the Arduino can shovel the bits fast enough for the EKG sample rate I need (1K Hz). We shall see!

A robotics instructable

I have a new friend at work who does some very cool hobby projects. He is a homeschool dad with four girls and an amazing ability to teach. He created an Instructable with a video on how to control a disk drive stepper motor with a Raspberry Pi connected to a motor drive. You can find the instructable here. The video and descriptive material (complete with links to materials and ancillary information) speak for themselves.

Betty Blonde #472 – 05/05/2010
Betty Blonde #472
Click here or on the image to see full size strip.

Brave – Brendan Eich’s impressive response to his unconscionable treatment by Firefox

Brendan Eich got thrown out as CEO of Firefox because he gave $1000 to the Proposition 8 campaign to protect marriage in California. Rather than complain about it and under the radar (at least under my radar), he started his own browser company. Brave is the name of the browser and the company. The underlying goals of the browser are impressive. I just finished reading their About page which is titled How to Fix the Web and their FAQ.  Their concept, if implemented in a compelling way, could change the way ad money changes hands on the internet. User data is protected and the user has more control over what gets displayed. It apparently runs much more rapidly than any of the current popular browser. It could absolutely make ad block software obsolete. The browser is available for testing right now, but I plan to wait until it is closer to full release to give it a spin. The browser is based on Chromium.

The thing that is most impressive about this whole project is that I heard almost nothing from Brendan Eich when he was treated so shabbily by Firefox. I quit using Firefox when he was fired and they have been headed down hill ever since Eich left. This is the very best kind of response he could have given. I wish him well in this new enterprise and am looking forward to giving Brave a try.

Betty Blonde #468 – 04/27/2010
Betty Blonde #468
Click here or on the image to see full size strip.

Writing code

I have been writing code for most of the day. I have been learning to use some new libraries that are very well written. The program I am constructing is not one that requires rocket surgery, but it is extremely gratifying when stuff starts to work. I am using C++ to do something that is normally done in Java, Python or PHP. There are some fairly odd reasons for doing it that way, one of which is the skill set of the people doing the programming. The more I go along in the world of engineering, the more firmly the idea gets embedded that if someone knows they can get something done in a certain way using some method or process, the best thing to do is to have them just do it the way they know how if all things are equal. This is one of those time when time is off the essence and the learning of the fewest amount of new things possible will help the project go faster. Still, I am learning some new stuff and having fun. It does not get much better than that in the world of engineering.

Betty Blonde #458 – 04/13/2010
Betty Blonde #458
Click here or on the image to see full size strip.

A hard programming weekend, but I had help

Programming all weekend longThere are opportunities to learn everywhere. I look back at my somewhat misspent youth and realize that all of that time when I was an angry and miserable ingrate, I could have spent learning new stuff. The funny deal is that I enjoyed learning new stuff, even back then. I just did not understand that the confusion and frustration of learning hard stuff eventually translated in joy-filled understanding. And, just as important, it built on the stuff learned previously.

It is never a good thing to look backward and I am truly grateful my mind works well enough to learn some pretty hard stuff. I have lots of good help, too. Since the weather got bad, I have not been walking as much (Shame on me!) so I am getting that shelf just in the right place for Kiwi to sit comfortably while I program. That is not so bad either.

Betty Blonde #444 – 03/30/2010
Betty Blonde #444
Click here or on the image to see full size strip.

Wt programming

I spent most of this last weekend writing a web program with a new (to me) set of C++ libraries named Wt (pronounced witty, they say, but I am going to call it double-u tee–like calling Qt cute, it is just a bridge too far). Wittiness aside, after making my way up a relatively steep learning curve, I am very, very impressed. It is open source software that I am currently helping some friends investigate. I has a commercial license for commercial products so I hope to be able to buy that someday soon–or better yet, get it bought for me. I might try to put a thing or two up on this website as I figure it out.

Betty Blonde #439 – 03/23/2010
Betty Blonde #439
Click here or on the image to see full size strip.

Revisiting Xubuntu

XubuntuLast night, I spent a couple of hours replacing Windows 10 with Xubuntu 15.04 on my most powerful computer at home. I currently work on three projects where Xubuntu is just better for my development needs than Windows. I had changed my cheap/travel laptop to Xubuntu 14.04 and was happy enough with that, that I switched my server/archiving computer from Windows 8.1 to Xubuntu 15.04. There were no monster differences that I could tell between Xubuntu 14.04 and 15.04, neither of which is the latest version (15.10), but every time I try a new version it is incrementally better than the previous version. I am not sure whether the work that I do has morphed into stuff well suited to be done on Linux or the tools and quality of Xubuntu has gotten better, but the whole endeavor has now arrived at a threshold where the way I use the computer is better accommodated by Xubuntu than by Windows and profoundly better than a Mac. Everything just works.

The main tool I hear does not have an equivalent in Linux is Microsoft Project, but I never use that. In addition, I cannot use my browser of choice (Opera) to watch certain kinds of encrypted videos from on of the major video providers, but I could facilitate that by viewing them with the Chrome browser. I am sure it will be available in Opera soon, too. The only computer in the house now that runs Windows is the one Lorena uses for schoolwork. I think we will leave that one as it is.

P.S. Both my buddy John (serious developer of cross-platform, internet-centric code) and Christian (my Electrical Engineering PhD candidate and very math-centric son) both run Debian stable (the Linux distro that used to underlie Ubuntu) on their main computers. I was going to do that, too, but decided I better stick with what I know.

Betty Blonde #426 – 03/04/2010
Betty Blonde #426
Click here or on the image to see full size strip.

Windows 10 install after Xubuntu 14.04 install

Installing Xubuntu 14.04 and Windows
I installed Xubuntu Linux the day before yesterday on a brand new Windows 8.1 (dual boot). When I got home last night from our Bible study, I found a note on another computer telling me Windows 10 had downloaded and the computer was ready to be updated. I started the install, then went off and did something else for a bit. I think the whole process took my computer about half an hour. I tested a few things without any trouble–I will have to do that more extensively tonight, but it actually looks fine for my most important stuff. Neither of the installations were any trouble at all. They just worked.

What struck me as odd is that I can do just about everything I want to do on both the Linux box and Windows box without any trepidation or confusion. Both are intuitive and just do all the things I want to do. Even more odd, I do not care that much whether I am on one or the other. They really are just appliances to me. I do not know whether that is a good thing or a bad thing. The days of extreme enthusiasm for one OS over another appear to be over for me. The only time I notice is when the computer does not do something I think it should. Now, my only considerations are utility and cost, in that order. It is like when I go older, I quit buying cars because they were really fast and looked fancy and started buying them based on comfort, price and utility.

Found a great little article on what to do right after Windows 10 is installed for the first time. I hate it that all these guys spy on us. Also, go to this page and opt-out of the personalized ads for “this” browser and opt-out of the personalized adds from your Microsoft account. If you do not do that, Microsoft will track way more stuff than you want them to track.

Betty Blonde #389 – 01/12/2010
Betty Blonde #389
Click here or on the image to see full size strip.

Linux and civilization

Installing LinuxThe “scratch and dent” computer I bought from the Dell Outlet website with a discount coupon arrived today. I think I got a screamin’ deal. I bought it because I needed a Linux computer for some contract work I am doing in the evenings to get one of my old employers over the hump with a product they are trying to get out. So I spent most of yesterday evening loading all the tools I need to do the development onto the new computer. That included Xubuntu 14.04 LTS, Qt/Qt Creator, OpenCV (finally moving to version 3!), a subversion client, etc., etc. I needed to build OpenCV in a specific way required by the application so I did that, too.

The upshot to all this is that I needed to sit and wait for things to finish downloading, installing and building. During that time, I found a great article about three phases through which civilizations pass: Barbaric, Vigorous and Decadent. Here is the premise of the article titled A Tour of Our Decadent Civilization on the Sultan Knish blog:

It’s easy to find examples of barbaric and decadent civilizations. We can find all the barbaric civilizations to suit an entire faculty’s worth of anthropologists in the Middle East. And then back home we can see the decadent civilization that employs their kind to bemoan the West.

Vigorous is what America used to be when it was moving west, producing at record rates and becoming a world power. Decadent is what it is becoming.

Christian and I had an interesting talk about all this on the phone a couple of nights ago. The thing that amazes me is that the vast bulk of people in America do not get it. In our conversation we attributed it to the fact that most people under the age of 30 get their information from Reddit, Slashdot, Comedy Central and Huffington Post while people over 30 get their information from Facebook.

I think we are partially right. People buy into the pseudo-scholarship of Richard Dawkins, Bart Ehrman, Marcus Borg, Stephen Hawking, Lawrence Krauss, Sam Harris and the like who represent their false ideas based on personal agendas and/or ruminations way outside their fields of expertise. It makes its way into pop culture because it allows people license to live how they want in the moment rather than do the hard work and self denial based on morays driven by objective truth.

The conclusion of the matter is the same as it has always been. Our chunk of civilization in our time and place will wake up one way or the other. Unless there are changes, it will be a very rude awakening.

Betty Blonde #388 – 01/11/2010
Betty Blonde #388
Click here or on the image to see full size strip.

Project day – Embedded Ingenuity

Piece of trash Dell Vostro 220The picture to the right is of an old, piece of trash Dell Vostro 200 desktop computer that was cheap and incapable the day we got it. As can be well attested over the years of this blog, I have pieces of projects in various stages of completion and a ton of software to go with them. Now, I have a partner in crime. My buddy John, from my last job and I are embarking on a project that includes the new little BeagleBone Black computer we bought a couple of weeks ago. The idea is to develop some capability for embedded computers that will be both educational for John and I and to create something interesting.

So, for want of another idea and maybe because of our lack of creativity, we decided to start with something simple that might be a base for something bigger if we get this first thing to work. So, here is the plan. We want to put up a website that allows a user to click a button that takes a picture with a camera connected to the computer in the picture. Next, we want to get that same functionality running on the Beagle Bone at my buddies house in Arizona. A much more portable, cheaper computer makes the project much more interesting and a little bit more difficult. There are lots of ways of very simple ways to do precisely what we just said, but we want to put infrastructure in place to extend the ability of computers to do Machine Vision, sensor fusion and robotic control tasks.

When (and if) we get this done, we have an idea about what we want our webified cameras to do that is special. It is actually a little bit more ambitious than what I did for the GaugeCam project, but also a little bit more challenging. Truth be known, the GaugeCam project was very challenging because it had to be able to work 24/7 outdoors in any kind of weather or physical environment.

Betty Blonde #384 – 01/05/2010
Betty Blonde #384
Click here or on the image to see full size strip.

BeagleBone Black with Wifi and a camera

BeagleBone BlackMy buddy John from my last job in Prescott and I stay in pretty close touch. Neither of us are anywhere near retirement. He has kids still in school and I think of retirement as working when I want to work rather than actually quitting work. Are skills are complementary and we like to work together, so we decided we ought to do a demo project so that if, someday, we ever have enough money set aside we can consult. There is a good likelihood that will never happen, but it is always fun to take on side projects.

This side project involves a BeagleBone Black single board computer, a camera and a wifi link. We have a couple of great ideas about what to do with it, but want to put a ton of infrastructure in place so we can produce quality work quickly when we decide what we actually want to do. This morning, I bought a BeagleBone Black, a USB Wifi Adapter, and a 64 gigabyte microSD card on Amazon to get started. I already have a webcam we can hook up to it. I am setting up a Linux computer as a temporary server to use to archive our work–temporary because I do not have a whole lot of confidence in the computer nor the hard drive. As we start making some progress we will probably make some other arrangements.

As we make progress, I might describe some of what we are doing here so that we can have a record of what we might contribute as consultants if everything is not already completely obsolete by the time we get to doing that.

Betty Blonde #366 – 12/10/2009
Betty Blonde #366
Click here or on the image to see full size strip.

The Senior Developer

The guy who has been most responsible for the success of the company for which I currently work sent me an article titled The Role of a Senior Developer. In the world of factory automation, there is a phenomenon that repeats itself on all large projects no matter the company, client nor industry. The phenomenon is this: A finite, specific amount of time is negotiated to deliver the product, the mechanical engineers, electrical engineers and assemblers all use a little more time than they were allocated and the software engineers are expected to make up the time that was lost. A Senior Developer who has the ability and will to “own” the technical decisions and guide the more junior members of the team is essential.

Matt Briggs, the guy who wrote the article completely nails the situation with respect to the Senior Developer. It is not enough to be smart. A senior developer has to be able to work under the pressure of impossible deadlines with management and customers looking over his shoulder. He has to make judicious use of all the resources available to him. If he does not get it done, it will not get done at all. He has to have both the will and the knowledge to make the decisions about the technology and application of technical resources. It is not for the faint of heart. I love it that Briggs identifies one of the core qualities of a Senior Developer as the realization that he cannot do it all and his job is one of service and empowerment of others and (my word) humility. Here is the core truth of the whole matter as explained by Briggs:

A senior developer understands that you cannot do everything yourself, and that their primary role is to help their team get better, in many of the same ways they themselves strive for personal improvement.

A senior developer understands that leadership is not about power, it is about empowerment. It is not about direction, it is about serving.

Full disclosure: While I have worked as a developer, I in no way believe I am the kind of Senior Developer described in the article. Really, I am a Research Engineer and develop new technology so, while I have difficult deadlines sometimes. It is nothing like what is described above. All of us who work in the factory automation world depend on Senior Developers’ for our jobs.

Betty Blonde #347 – 11/13/2009
Betty Blonde #347
Click 
here or on the image to see full size strip.

Weekend learning (and setting up to learn)

This last weekend, I spent most of the weekend taking Grandpa Milo and Grandma Sarah around and working on the learning/development stuff I have described here over the last few weeks. It has felt like I have been trying to drink through the proverbial fire hose in an effort to learn too much stuff at once, so I have started to break it up into bite-size chunks. When I did that, I realized I needed to do some infrastructure work before I even started. So this weekend, I decided to spend most of my time getting set up to work rather than invest a lot of time in learning. I held to that for the most part; the exception being that I started in on a set of tutorials on how to use GIT.

So, here is what I did:

  • Decided to use DropBox as a way to back up and share a bunch of stuff (bought a tera-byte for a year).
  • Set up a web server with WAMP on the new (cheap) desktop computer we had Fry’s make for us (on a special).
  • Made it available from other places with the help of Duck DNS (awesome free service).
  • Added an ftp server to that.
  • Installed Ubuntu LAMP server on the old desktop (32-bit x386)
  • Set up a GIT repository on that.
  • Made it available in other places with Duck DNS
  • Installed R and RStudio on all the computers
  • Went through the first third of a GIT tutorial because I am so pathetic at that. It was great and I am up and going now.
  • Added Qt, Qt Creator and OpenCV to the Linux server
  • Added XMing to my laptop
  • Learned how to SSH to the Linux box to perform code testing remotely

Next, I am going to start working up the learning curve on Machine Learning with R and continue to code on my previous projects. All-in-all, it was a great weekend. Lorena and I even went out to eat a couple of times. Now, all I have to do is start working in a few walks and my life might arrive at a sense of normalcy again.

Betty Blonde #303 – 09/15/2009
Betty Blonde #303
Click 
here or on the image to see full size strip.

Page 3 of 5

Powered by WordPress & Theme by Anders Norén