We need a third app. While I thought it would be nice to use the other two by themselves, I got looking into the soon to be extinct Android platform and, we need something simpler to verify cross compilation works before jumping into either of those. Why? PostgreSQL only runs under this command line utility, going to jump through hoops trying to access it from a GUI app. The 2-in-1 doesn’t provide a serial port and I haven’t tested one of those wonky USB-to-Serial cables on it.
No, I’m not going to wus out and do a paint app like like those “authors” trying to crank out 10 programming books per year just to get the advances. You’ve all bought books from at least one of them, I don’t have to name them.
You see, I’ll never forget the very first “Visual C++ Unleashed” book, back when Microsoft and Windows might have still mattered. I think it had a red cover. Might have been for version 1.5. God knows I don’t have that book anymore. The author was busy ranting and touting his/her “The App That Ate Manhattan” because of all the stuff they managed to shove on a screen.
It didn’t store one byte of entered data anywhere.
People like that scarred me for life. I try very hard not to rectally violate my readers in such a manner, even those readers skimming this blog hoping to learn everything I know without having to buy any of my books I don’t think should be screwed in such a manner.
We are going to bring forth a version of my favorite learning tool, a lotto tracker. Most of you will remember the Mega Zillionare application I used over and over again in this book, as well as others. That was for a multi-state type lottery which had some kind of mega/power ball a player could choose themselves.
Why a lottery tracker? Quite simply because it encompasses most of what you need to know about any new tool set or platform.
- Menu
- Reporting
- Data Entry
- Bulk import
If you have a little test application which allows you to learn those bullet points about something, you are pretty much good for general business computing. Oh sure, some people want Web-this and Blah-that, but business computing revolves around bulk data processing, report generation and data entry. All of that stuff tends to get hung on a menu somewhere.
Do you honestly believe payroll happens for one employee at a time? No, there is a bulk process which happens and it spits off a print job to a queue.
Previously I was always writing a version for mega-pay games but, realistically, they suck. Yes, I used to work with someone who declared “A lottery is a tax on people who don’t understand statistics” and when it comes to the big payout games he was definitely correct. Let’s look at some pictures.
Take a good look at the payouts for everyone who isn’t the grand prize winner. Now take a look at what they lotto pays.
The $12 word is Pari-mutual. Basically a percentage of sales gets thrown into a big pot and divided as close to evenly as possible for each winner in the category. The only real stinker, now that I looked into how lotto is done, is that “extra shot.” You don’t get to pick that. You don’t get to have fun finding patterns and non-random randomness in the outcomes.
Oh, in case I lost you with the pari-mutual word, on the Mega game you get the same fixed amount even if the grand price is a billion dollars. On the lotto the percentage tossed into the bucket remains the same, but the number of winners and the grand prize jackpot fluctuate. Here is a recent roll over when the grand price was under $6 million (I think?)
So, I’m going to put together a small system using Qt and SQLite because SQLite is supposed to natively exist on the soon to be extinct Android platform. This will give us something to test any and all cross compile infrastructure prior tackling the added complexity of PostgreSQL or serial port access.
Before we go head long into the application you need to see something which is at the top of every source file.
/********************************************************************* * Copyright (c) 2017, Logikal Solutions All Rights Reserved. * * You may use or modify this source for your own personal entertainment. * By using this source or any binary it creates you agree to hold harmless * the author, copyright holder and all involved in the creation of this software. * * You MAY NOT redistribute a modified version of either source or binary. * You MAY NOT post this source whole or in part on any Web site without * express WRITTEN permission of the copyright holder. * You MAY NOT include this source or resulting binary in any product which * is sold, has support sold for it, wraps advertising around it or in any * way makes money. *********************************************************************/
Yes, after Google’s massive and deliberate case of copyright infringement so they could sell more advertising, I got fed up. It certainly feels like Al Gore and the Clintons run behind the scenes interference any time Google executives are about to go to prison. They should have all went to prison for what they did with Google Books.
Related Posts:
Where Did My QDebug Output Go?