The illness tracker - finally a good use for AI

 Hi all, so as you may have noticed, there is a new section on the upper nav bar called "Projects". There is only one project righ...

Saturday, August 15, 2026

The illness tracker - finally a good use for AI

 Hi all, so as you may have noticed, there is a new section on the upper nav bar called "Projects". There is only one project right now, but anyone that knows me knows it will probably be littered with dozens of half finished or barely started ones by years end haha. This one is actually pretty useful and I hope useful to others. We have a daughter who was born very early (25 weeks) and as such is susceptible to a lot of common illnesses more so than other kids. Bad illnesses such as COVID or RSV land her in the hospital for weeks. We asked the school "Hey can you let us know when anything bad is going around so we can have her not catch it?" but it falls on deaf ears. I know some people who we work with on a daily basis really want to, but the ones who would be able to support us in that endeavor cant or wont do it.  There may be rules or laws in place, especially considering that a gentleman responsible for dozens if not hundreds of childrens death both here and in Samoa is currently in charge of the nations health system.  How we got to this state is a whole other discussion, mostly related to herd mentality, information bubbles, inherited fears, and lack of critical thinking. So, me being me and unwilling to just accept it, I did my part to do something about it.

These kinds of illnesses are serious. They arent a "rite of passage", and need to be taken seriously. Much as it pains me to say that parents who truly believe their children need to suffer for their parents "beliefs", it is not my place to try to change their behavior or said beliefs.  I dont agree with that thought process, and I will never condone it, I will never even attempt to see the value or good side of people willing to hurt their own children because they hate science or authority or whatever their problem is. But the strong dividing line between people like me and them, is I dont force my beliefs on others. I provide knowledge and resources, they do their best to make sure others have to act like they do. My refusal to "just take it and deal with it" has led me to be successful in some ways, not so in others. And I've come to accept that and deal with that instead what others try to force on me.

So, that being said, it was my goal to do just what I asked my daughters teachers and school administrators to do. I did not have the advantage of seeing real students and hearing real parents talk about their children's illnesses like they do, but we do have a state, county, and national health authority (kind of, its been gutted from what it once had). They do measure and try to inform the public about VPDs and common but serious illnesses like COVID and RSV based on things like ED admissions, wastewater detection, and mandated reported positive tests. They do not put this data out in an easily "scrapeable" format, but a generated page using what AI calls a "Power BI dashboard".

Speaking of AI, what I did was I do have my own Claude account, it has helped me put web content up quickly and by and large it does a good job. I have to clean some stuff up behind it now and then, but it does a lot of the grunt work beautifully. So I have a nightly task to go out to these various sites and look at them and aggregate their data into a summary and overall report. This report hopefully will help make informed decisions about if it is an unsafe time to send my child to school. Or maybe other parents in Colorado Springs too. 

Check it out at https://www.beneschtech.com/projects/colorado-springs-school-illness-watch

Coming next week and opt-in and most of all, easy opt-out email list. No I will never sell my subscriber list, but I will publish any offers I get for it for public amusement. The goal is you get a simple email at 5am with any relevant data I have found about circulating health issues so you can make a decision about school if it looks too risky. I want to thank Anthropic for not only their wonderful Claude AI product, but their refusal to bow to this administration. It cost them DOD contracts, but they gained the ability to look themselves in the mirror in the morning. Thats worth $20 a month in tokens from me for sure. 

Sunday, August 2, 2026

Launch of beneschtech.com site!

 The website is up!

 

Finally after many, many years, I finally have a decent website. Electronics and futurism reading, and some minor sales of electronic devices, and some stuff related to mycology, my new hobby since Prop 122 passed in Colorado. Lets see how this goes :)

Friday, June 12, 2020

Disassembling C++ Part 2 -- Objects

What is an object?


This article is part two of my Disassembling C++ series.  The first one was here about overloaded functions, and mangling.  Some of what we are going to discuss is built on that.  An object programmatically is basically a collection of data and functions that serve a similar purpose.  For example, you can have a bicycle object that you can call a function to rotate the wheels, and get the wheel count (2) from a variable or an accessor function.  There are entire books written on object inheritance, polymorphism, reflection, and other nuances of the object oriented methodology and I really don't want to rehash all of that in a five to ten minute article.  I assume that if you are here reading this, you know what an object is and all of the fun things you can do with them. I’m going to make a bold statement about objects in general from the compilers perspective though: Classes are just fancy structs.  In fact, starting with C++11 you can have a struct with functions. The only difference is that structs have everything by default public whereas a class is by default private. We are going to do some more C/C++ namespace hacking in this article too, so if you enjoyed that in the last one, more is coming.

Objects only hold data


I know that most of us are used to the idea of a class (or object) as being a mysterious collection of data and functions that we can create, copy, destroy, extend, or use in a polymorphic fashion.  The truth is that the functions inside a class are just regular functions mangled by the compiler, and the class is only a pointer to the data inside of it. Let’s take this simple object here:


Now, if we compile this and look at the symbols exported, we see the function and a reference to printf in C linkage.

Notice that the function, even though private is still defined in the file.  That is all that it is, a function, and as such can be called from regular old C.  So, would this work?

Let's find out:

Kablammo!  But there is a very good reason for that.  Remember how I said an object is just a pointer to some data?  One thing the compiler does under the hood is for every object function call, there is a hidden first parameter that is the object's address to represent “this”.  Now our example object here has two ints as it data elements. So let's try an experiment.


Here since we know what the object’s data looks like, we create a C struct that is identical.  We also pass the address of the struct as the sole parameter to a function declared inside of an object to have none.

This really works!  Try it yourself. Also notice that I never linked against the libstdc++ library, it’s all just the standard C library using gcc.  From C, we were able to create a faux object, and call a real objects functions against it. Also, remember the definition of our function here?  Its private. All of that stuff is just for us, as people to help organize data. We could also create an inherited class from this one and it would still work, that is a compiler feature too.

Next up, language features we take for granted that are part of the c++ library itself.  These cool hacks which show how data is organized work best on simple objects. When you get into more complex situations, things get bigger and more complicated.  However, it all boils down to the simple things. You are calling a function with a hidden first parameter as a pointer to the objects “this” parameter for regular functions, and for static functions, you are literally just calling a function.  The rest of object oriented methodology is simply determining what function to call and the appropriate address to pass to it.  The bottom line, your class can be as complex as you want, but it will still only use up as much data as you have defined.  A class with two ints in it will use up 8 bytes of memory whether it has 2 functions or 200.

Saturday, March 21, 2020

Mac N Cheese Chicken Casserole

As we all hunker down to let the Corona Virus passover us (spelling intentional), a lot of us are used to eating out, ordering pickup food, or otherwise and find our culinary skills are lacking.  I figured I would share some very simple, but nutritious recipes when we want to eat in.

Supplies needed:

1 Box Kraft (or other brand) Mac N Cheese mix
2 Large cans of canned chicken (10 oz per can)
1/4 cup of butter (1/2 full stick)
1/4 cup of shredded sharp cheddar cheese (optional, or about 1 good sized handful out of a bag)
1 Can opener
1 metal fork (for stirring)
2 Microwave safe bowls, glass or hard plastic (tupperware wont do)
2 sheets of full size paper towels connected

Now I know the serving size on these makes it seem like you could feed a party out of it, but I'm a big boy and most people are too, so its basically 2-3 people.

Est Time to prepare - 10 minutes

Open chicken cans one at a time, by puncturing then on opposite sides of the can with the can opener and then drain water into the sink.  If you have cats they will come running probably.  Once drained open the rest of the way up.

Dump both cans of chicken into microwave safe bowl #1, and wrap in paper towels (it will pop and try to blow out all over your microwave, this stops that and keeps the moisture in)

Microwave for approx 2 minutes.  Retain paper towels and set cooked chicken aside.

Pour noodles from Mac N Cheese box into bowl #2, and cover noodles with water plus about 3/8 inch.  Stir pretty well until water is cloudy.

Microwave for 2:30 with paper towels saved from before underneath bowl.  (it very likely will boil over and the towels will help avoid making your microwave wet)

Stir noodles again

Microwave an additional 2 - 3 minutes until boiling water subsides under rim of bowl.

While noodles are being heated, take your 1/4 cup of butter and chop into pieces about 1/2 inch wide.

Add cheese powder packet, chicken from earlier, chopped up butter and cheese into noodles and stir.  Stir until butter pieces are completely melted and everything is an even yellow color.  Dont worry about the little amount of water in the bowl, it will harden with the noodle coating and cheese poweder into a snot like consistency.  Dont stir too hard or else the chicken pieces will fragment into little tiny pieces, you want to be semi gentle to get the large chicken pieces still preserved.

You can also add spices such as pepper, or jalapeno slices.  You can also give the cheese a nice mix with parmesan, or if you like it extra "stringy" a slice or two of meunster.  There are a lot of add ons to make this better to suit your taste, but here are some things to avoid (tried and ewwwwwed):

Garlic
Seafood (shrimp, lobster, crab, etc..) instead of chicken
Excessive salt, the butter has some, and so does the cheese powder
Carrots
Cauliflower

Thursday, November 28, 2019

Disassembling C++ - Part 1 (Intro, overloads)

  Disassembling C++

Introduction


In this next series of articles, I will delve into the inner workings of the C++ and how it accomplishes its object oriented behavior.  It was after all, one of the first object oriented languages, and is one of the most evolved.  It was first released in 1985, but was actually designed in 1979 by Bjarne Stroustrup as a next generation of the popular C programming language developed by Bell Labs.  But enough history, you can look it up yourself on wikipedia or go to Bjarne's home page at http://www.stroustrup.com .  The purpose of this isnt to show you how to program in C++, but more how it works.  This is targeted for old timers like me who have used C most of their career and have gone kicking and screaming into object oriented land, or just the intellectually curious. The first thing is that C++ is C under the hood.  Its dressed up nicely and does some fancy object oriented tricks, but when it starts generating machine code, its more or less C.

 

Compile time or run time behavior


One of the biggest advantages to knowing how all of this works under the hood is that you can implement more compile time features and less run time ones.  If accessing an object takes a standard library to sort through a list of strings, it will be much slower than just taking a pointer the compiler passed in. It is not all compile time magic, some of it is handled in the low level libstdc++ library.  I like everyone else always assumed it was all just compiler tricks and never thought about it.  Then one day came as a hobbyist OS developer that I wanted to explore the APCI tables, and C++ looked like an obvious choice.  Thats where I not only learned how a lot of this works under the hood, but developed an appreciation for the tight integration of the library and compiler.

 

Overloads


One very useful feature is overloading.  You can use the same function name with different parameters.  For example:
int add(int n1,int n2)
double add(double n1,double n2)
In fact, you may have been bitten by it during compile time, especially with math functions.  The way that it accomplishes it is through a process called mangling.  The function is renamed according to its parameters and is the one used instead.  In the example two functions above those are two distinct functions.  This is a compile time feature and will have no effect on run speed, so overload away.  Lets show an example, take the following simple program:



To ensure that the correct function gets called, it translates return_value to two different function names based on the parameters.



Now wait a minute, why is main() named exactly like it is named? That is because it was declared as having "C" linkage.  To define a function as having C linkage, you just surround it with extern "C".  For example:



Notice that I declared the function extern "C" in its definition and not in the code of the function itself.  That way the compiler knows this function needs to be in the regular C namespace.  And consequently:


Mixed C and C++ namespaces can cause a lot of headaches.  nm is a wonderful tool to show you exactly what is going on in there.  To de-mangle the names, use the tool c++filt, or sometimes called cxxfilt on older systems.


c++filt can take text either through standard input as shown above, or as a command line argument.  The man page can explain it all.  Notice how the return values are not shown?  That is because you can only overload a function based on the parameters  and not the return value, evn though the mangled name includes the return value.
Remember how earlier I said that its all C under the hood?  Consider the following two files:



Notice we defined the external C++ function under its mangled name to be called from main inside the C namespace.  And sure enough:



You can call C++ code from within a purely C context if you know the overloaded function name.  Obviously there are much better ways to do this, but for our purposes it illustrates an important point.  Although you can think semantically that a function just operates two different ways, you are in fact calling two completely different and distinct functions.  This concept applies to classes too.  More to come in succeeding articles, we have barely scratched the surface.

Monday, May 28, 2018

Tips For Creating C++ Classes

When creating new C++ classes, especially as a beginning programmer, you can end up with a mess that is barely more than a bunch of functions that you have to qualify with a class name. Before designing and writing a new class, keep the following ideals with OOP in mind.

  1.  This new class should be able to be used by any other program.  It should serve a useful purpose that someone besides yourself should find useful.
  2.  If your new class is going to be nothing but functions and hold very little or no data, consider a namespace instead.
  3. If your new class has more than two static functions, consider moving them into a namespace as well.
  4. If your application has more than two singleton objects, consolidate if possible.

Now when starting to code, start from the ground up.
  1. Start with the data.  The variables that this class will hold.  All of them *should* be private, unless there is a good reason not to for one or two.  Unless there is a reason, do not use unsigned variables.  -1 is awfully handy to indicate an error condition.
  2. Constructors... How will people most commonly use your class?  How can you make it as convenient as possible either inside your own application or someone else using it.
  3. Declare the functions you want public to do things with the data other than get/set it.
  4. Inside the header file write a set of generic get/set functions to access every member of data earlier declared private.  The reasons are varied and complex, but trust me in the long run its worth it.  Make them all quick little one line functions unless you need locking or something more complex.  This frees up your source file for the meat of the class's logic.
  5. And finally, the complex or working parts of the class, write in the source file.