New Perl module: CAM::PDFTaxforms Released to CPAN

Cam Newton laughing
Cam Newton laughing;  2016 Wikipedia.
Today I released a new Perl module to CPAN entitled CAM::PDFTaxforms.  This is the result of some hacking I had to do to an old module called CAM::PDF years ago for a job assignment.  The task involved generating a partially filled out tax form based on users’ inputs from a logistics company’s website and other database data.  I quickly stumbled upon CAM::PDF which handled filling in data fields on tax and other PDF forms, but could not check any of the checkboxes on such forms.  The easiest solution was to hack up a copy of CAM::PDF to fix it to do this, much easier than inventing new code!  This was back in 2010.  I submitted my patch to Chris Dolan, the author and maintainer of CAM::PDF, and then filed CPAN bug #61354 with the patch, and got no response back.  I then tarred up my hacked version and added it to my download site in case I needed it again at another office or for anyone else needing this feature.  I went back a couple of times to check the status of the request and found that new versions had been released since then and that the list of open issues was quite long (I try to respond to, address, and close issues filed against MY modules quickly).
The other day, I got an email requesting info and assistance with MY hacked version, for which I had to dust off the old code that I haven’t used in several years and make sure it still worked (it did), so I replied him with instructions.  I haven’t heard back, so I assume he’s a happy user now.  Anyway, being a bit bored lately and with no other programming projects (I’m retired from my full-time programming career but still work on my own stuff) it got me to thinking about that code again and I decided to see if I could repackage it into a new module.  Revisiting the code, I found that it had a single main program source file and a utility script that I had modified, but also a subdirectory of several other module source files that it depended on.  Having developed and worked on several Perl-Tk modules in more recent years, I realized that I could just create a “wrapper” module that would allow me to simply create a CAM::PDF object, inheriting all it’s methods, but seemlessly override the handful that contained my changes, and create a new module with a similar name, and release it with the same license (which is open-source, and allows derived works).  Then I had to uninstall my old, hacked version of CAM::PDF (1.52.1) and install their latest version 1.60.
I decided to name it CAM::PDFTaxforms, took the methods that needed changing copying them into my new module, and start testing some IRS forms.  I did run into some issues with their latest forms, particularly their use of high-ASCII (and some NULL) characters in their internal PDF field names causing the program to not work at all.  I studied it and was able to fix that issue with a couple lines of new code, and a couple of other minor issues by applying a few patches that others had submitted to the CPAN bug system (that were also still open).  I tested some other recent IRS tax forms and finally have it working fairly well.  In theory one could write an entire tax-filing application with it (if one has an army of developers, accountants, and tons of time of their hands), but would have to redo it each year due to many forms changing (adding and removing fields and checkboxes).  The next step was to modify the build files, documentation, test harness, etc. from CAM::PDF to fit our module.  I also added a couple of new tests (and example programs).  One takes a blank 2018 IRS form 1040-Schedule B and a little text file containing pairs of banks and mutual funds and dollar amounts, and creates a filled-in version of it, including calculating and filling in the total lines.  The other one then “reads” it and checks that the fields are filled in with the proper data and checkboxes checked. Anyway, I hope others will find it useful!
You can find more of my CPAN modules here.

Saving my Lawn Tractor with a Juryrigged Gascan

This spring I oiled up my 16 year old riding tractor mower, started it up and mowed my back pasture as I do every spring when the grass quickly starts to grow to knee-high in a span of about two weeks during the rainy season.  After getting everything mowed for the first of usually about three and a half times a season, I put the mower back into the barn and closed the door.  The next day I went out into the barn for something and noticed that the place smelled like the inside of a gas can.  I opened the doors and turned on the fan and started looking at the mower.  Sure enough, the sixteen year old plastic gas can had developed cracks around the opening and cap at the top.  I called my friendly local tractor-repair man to inquire about a new gas can for it.  He laughed and said that I would need to get a new mower as the gas cans in these models are embedded deep in the frame of the tractor, difficult to obtain (aftermarket), and would require $$$ of laaaabor to completely dissemble the tractor to get at and replace; and that, “Oh by the way, I have a great little used tractor that I can offer you a great deal on!”  Me:  Ooooee-kaaye, thanks, I’ll get back withya¡” (NOT! – I went and looked at it and it wasn’t big enough for my pasture).  I started googling and consulting with a general mechanic friend of mine about repairing the tank and for a second opinion.  I settled on some silicone-epoxy-based stuff and tried it.  It was messy, but seemed to work for the most part.  After draining and evaporating out all the remaining gas and doing all this, and adding some gas into the tank in preparation to resume mowing, I noticed the next morning that I was STILL smelling gas.  So, I got a flashlight and started examining as much of the rest of the tank as I could see through the holes and sides of all the sheets of metal surrounding it and, sure enough found at least one other leak that would be impossible to reach and repair.
RotopaX RX-1G Gas Can
RotopaX RX-1G Gas Can;  by (©) RotopaX(tm).
Ok, now what? I decided to sleep on it for awhile and then came up with the bright idea of seeing if I could make some kind of “auxiliary” tank for it that I could mount on the back.  So I decided to measure the back area and try to google and find a tank that would fit properly within the limited dimensions.  Google presented dozens of gas tanks in all different shapes and sizes, but I only found one that was even close to what I was envisioning:  A one-gallon mountable “ATV” tank from “RotopaX” via Amazon (link here).  A bit small, but it’d do.  the next size up was a 1.75 gallon version that would not fit.

Next step was to find a way to connect it to the tractor’s fuel line, along with a “straw” to reach the bottom of the tank to pull the gas.  I googled around some more for connectors.  This involved wading through dozens if not hundreds of different little doodad fittings.  Finally, I stumbled across something that might actually work:  a “Brass Hose Barb Bulkhead Union“.  This unique little fitting has just what I was looking for:  a screw-down bolt/nut to tightly affix to and seal with the wall of the gas tank, and two push-on fittings:  one to attach to the tractor’s fuel line and one to attach the internal extension, aka. “straw” part to reach the bottom of the tank!  I tried finding this part at the hardware stores, but no luck.  So, having planned out exactly how everything was going to work, I ordered both parts on Amazon.  The tank arrived literally the NEXT day!  Kudos to “Advanced Cycle Parts” for their lightning-FAST shipping!  The brass fitting, unbeknownst to me at the time of ordering, had to be shipped on a “Slow boat from China” and took over a MONTH to arrive at my doorstep.  Whilst waiting, I took the gas can and held it against the back of the tractor and contemplated possible ways to attach it and exactly how it should go on.  Connecting the tractor’s fuel line would be straight forward – it was just behind the back of the tractor connecting to the old gas can, removing it from the old can and turning it around to bend over the back meant it just perfectly reached over where it could connect to the top of the new can, provided I put the hole and the new brass fitting in just the right spot. 

Legines 6mm Brass Hose Barb FittingFortunately for me, we’ve been “blessed” this Summer with an extreme drought (literally no measurable rain in the month of June).  While all my Church brethren have been praying for rain every Sunday this Summer, I’ve been silently thanking the Lord for the drought as I had no way to mow the grass, which would quickly grow two feet within days of the next soaking rain!  When the brass fitting finally landed in my mailbox, I took it down to the auto parts store down the street and obtained a free foot-or-so long piece of matching rubber fuel line left over that was too short for them to sell, I guess, and quickly measured and drilled the requisite hole in the tank near the main opening and then realized another minor difficulty.  That was how to attach the aforementioned piece of hose internally and then attach the brass fitting onto the tank.  Both of these steps are easy-peasy themselves.  The “hard” part is that one must either attach the fitting first, then attach the hose inside where it’s difficult (impossible it turns out) to reach and get enough force on it to push it onto the fitting; or:  attach the hose first, then get it through the hole from underneath and hold it tight enough to twist down the nut properly (difficult, but doable, it turned out).  I ended up going he latter way, allowing me to also install a small hose-clamp over it, but first I had to run a long piece of tiny but reasonably rigid wire through the hose and make a small hook at the base, place that into the tank, then get the top end of the wire through the hole from inside to pull the bolt up through the hole and attach the nut to it.  Then I got my wife to firmly hold down the tank to the table while, with both hands twisting the nut on with pliers while straining to keep the bolt pulled through and perpendicular to the surface of the tank, which was unexpectedly difficult.  Once properly secure with a small O-ring washer under the nut, I pushed the wire with the hook on the bottom down and back up to remove it from the hose, closed up the tank and tried to blow into the brass end now protruding from the top to ensure it was air-tight, and it was ready to go!  Tools needed for all this: 2 small screw-on hose-clamps, one small rubber O-ring washer (to fit over the threaded part of the fitting), electric drill, pliers, flat-blade screwdriver, metal file, needle-nosed pliers, and box-blade (to cut rubber fuel-line “straw” to proper length).
My New Jury-rigged replacement Gas Can
“My New Jury-rigged replacement Gas Can”, by (© 2018) me.  (Click for larger image)
The one thing I had not thoroughly thought thru was exactly how to mount the tank to the tractor.  RotopaX sells some really nice metal brackets with twist-on handles just for this purpose, but they are expen$ive and must be bolted on, which I found was going to be a steep mountain to climb as 1) the metal plate on the back of the tractor between the original gas tank and the outside world was very heavy gauge, nearly 3/32″ thick steal, thicker I believe than some car bumpers these days.  2) there was no way to get behind it to attach any bolts!  Therefore, I was reduced to having to find a way to “strap” it on.  My thoughts had been using some sort of combination of bungee-cords, since there were numerous holes, brackets, gaps, etc. around the sides of the tractor body to attach them to, if I could find cords with the right lengths, which ended up not being difficult to do at all, at my local Wal-Mart!  So I obtained a “kit” composed of several cords of slightly-varying lengths and was able to quickly get it strapped on where it wouldn’t slide around in any direction or be jarred off.  I then, using another small hose clamp, attached the tractor’s fuel line to the protruding brass nipple I had created and filled her up with gas, sealed the lid and left it!  I sniffed around for fumes, closed the barn and left.  I came back next day and could not smell any fumes – SUCCESS!

The final step was to actually try it out.  I aired up the tires, charged the battery, and then opened up the cap slightly to allow air to come in but not enough to slosh out any gas.  This is easy to control because these new-fangled environmentally-correct eco-friendly gas cans have caps that lock into place and have gear-like teeth such that you can loosen it slightly and the teeth hold it exactly how much you loosened it and no more!  I expected the mower to require a lot of cranking in order to draw gas up into the now long-empty fuel line, but it fired right up almost as soon as I began cranking and ran perfectly!  I backed it out, got off, checked for leaks, drove out to the pasture and mowed one time around.  I then checked the bungee cords and made sure it was holding steady and snug, and again checked for any leaking or spilling gas – NONE!  I continued mowing without issue.  Now, I knew that this gas can was small (1 gal) and, due to the way it was mounted (horizontally), and with the intake diagonally on the corner, it would only hold about 3/4 gallon of fuel, so I knew I would have to gas up more frequently, but, after barely ten minutes (so it seemed) of mowing, I suddenly ran out of gas!  Sure enough, that was the case (no other problems), so I refilled and resumed.  NOTE:  Refilling is a bit tricky getting up under the back of the tractor-body to get to the opening, and being able to see when it’s almost full without overflowing it.  Fortunately for me, I have an old-style non eco-friendly gas can with a long, flexible snout that I can reach it with!  I managed to finish what little mowing that was needed and park it back in the barn before it ran out again though, as it STILL has NOT rained since this saga began in June, and it is now early August.  So, now I too, am praying for RAIN!


Austerity – What is it, Really?

Thousands of anti-austerity protesters are expected to march in London today - Reuters
Anti-austerity protesters in London (June 2015)
image courtesy (© 2015) Reuters, via EveningStandard, (story: June 20, 2015).
A word often heard in the media, particularly in regards to foreign countries and usually associated with massive and sometimes violent protests is “Austerity”.  The dictionary defines it as a “Severe and rigid economy” and most people associate it with lean times and tight fiscal policies by governments. Austerity is actually a politically-loaded term and keyword.  Whenever you hear the word associated with a nation (government) or other governmental entity, it should indicate to you that said government is a “socialist” (redistributionist) government (one that is in the business of stealing from it’s productive citizens and enterprises, and “redistributing” it to those less productive).  Such a government has legalized plunder!  You will almost never hear the term or see it protested in a free society, hence the reason you have not traditionally heard it in reference to the United States.  The (often violent) protests are by those on the receiving end of the legalized plunder and “redistribution”.  It begins with the emotional appeal by “progressives” for the government to create “entitlements” for certain “groups” of people (to achieve “social justice”), then either robs (taxes) people (directly) not in these groups, borrows fiat money from a (private) “central bank” (The “Federal Reserve” is NEITHER!) that is more than happy to create “money” out of thin air and “lend” it to said government (AT INTEREST), thus robbing the industrious “non-entitled” and “entitled” alike (indirectly) through currency “inflation”!  When taxes and / or inflation rise too rapidly, the “non-entitled” start to complain too much as “the economy” starts to stall under the (too rapidly) rising weight of debt, taxes and plunder.  The government will sometimes implement “austerity” measures in attempt to countermand these symptoms (but does nothing to fix the real disease).  What this often involves is a (usually temporary) reduction in the GROWTH of “entitlements” or restrictions on the eligibility to join the “entitled” groups.  This, of course leads naturally to the “entitled” groups and the wannabees now blocked screaming in protest like stuck pigs!  They do have a legitimate reason for their protests – their real physical LIVELIHOOD is truly threatened just as much as a farmer who’s lost his crop or a working class person who’s a sole breadwinner for his family and has suddenly lost his job!  They have indeed become DEPENDENT on the largesse from the plunder of their fellow citizens.  Usually, after a period of time, however, the government is once again able to come to some type of “compromize” with all it’s “stakeholders” (the “entitled”, the “taxpayers”, and the “central bankers” / IMF who are counting on the free interest on the ever-increasing “debt”) that appears to partially ease some of the “pain” for each group, the “austerity” is ended or reduced, and the economy “recovers”, rinse, spit, repeat.
I must emphasize that “Austerity” is only applicable to and enacted by SOCIALIST governments.  Again, this is why you hear of it in places like Europe, Latin America, and (despite state-control of media) Communist countries but NOT the U.S., though with ever-growing entitlement programs like Social(ist) (in)Security, and Obamacare (now wedged into and very entrenched), you may likely start hearing it more here too.  They haven’t used the word itself yet, but the howls by the Democrats AND “moderate” (liberal, RINO) “Republicans”, indicate the advancing spread of the disease of socialism here.  You can see the most vocal opponents in the states that foolishly expanded their “medicare” entitlements under Obamacare, whereas states that didn’t have nothing to fear as fewer of their citizens have become “dependent” on it.  The feds GIVE and (then) the feds TAKE AWAY!  It is much easier for a (once) free society’s government to create entitlements than it is to later have to remove them!  This is why a well-educated (morally, economically and politically) citizenry is absolutely NECESSARY to avoid these pitfalls and maintain a free society! Temptation resisted is evil and suffering avoided.
In a free society, the government maintains a stable and constant level of “austerity” (as viewed by socialists) as indeed it should.  A free society eschews the creation of “entitlements” based on envy and plunder and sticks to the actual duties of government:  the common defense, punishment of crimes, enforcement of contracts and the rule of law, a uniform system of weights, measures, and currency (backed by substance, ie. gold and silver), and equal protection of everyone under the laws from violence and plunder.  It is up to families, churches, charitable organizations, benevolent and prosperous citizens, and local governments to tend to the needs of their fellowmen who are unable to provide for themselves.  By not creating “entitlements” by “protected” groups of citizens by granting them a claim on the property and labor of others, dependency and societal volatility are avoided.  This, along with maintaining a stable currency based on real substance and value (ie. gold and silver) and the subsequent avoidance of debt allow for economic stability to be maintained with the highest level of prosperity for the highest percentage of people.  Simply put, if you don’t create “entitled” groups and dependence, you don’t ever have to “take anything away” (austerity) resulting in massive howls and violent protests!  Government can’t take away anything it doesn’t first steal and then give away!  This also reduces the need for government expansion, debt, constant lobbying of government, government interference in the economy, and the dividing of citizens into opposing groups promoting peace and harmony.

Beautiful Vintage ’70s-era Two-piece Nozzle Set by Nelson

Beautiful vintage 2-piece nozzle set by NelsonI purchased this beautiful two-piece nozzle set with S&H Greenstamps way back in the day (late 1970’s when I was a teen).  The one on the right is solid brass.  The other is only painted brass, but solid metal with a solid brass nozzle head.  Both are very well-made and lasted well over twenty years of frequent use before it began leaking.  When the brass one began leaking, I simply unscreawed it and replaced the single O-ring inside, which was a standard size included in a typical O-ring set I purchased for a couple of bucks at the big-box home improvement store.  I tried to fix the other one by attempting to unscrew the nozzle head.  Unfortunately it was NOT attached with threads but somehow pressed or glued on such that once it came off, it could not be securely reattached, but instead pops right off when water pressure is applied.  Despite this, I’ve never had another handled nozzle work as well nor last nearly as long as this little beauty!  I’ve actually never seen another one like it either.  It appears that the brass nozzle was made by Nelson based on the worn logo shown on the base, but the other one has no information written anywhere on it, so I assume it’s also Nelson.  I looked in Google images for vintage nozzles and found numerous photos of nozzles like the brass one, but nothing resembling the “golden gun”, which was always my favorate!  In the photos below, you can see the one plastic piece, along with the separated nozzle head in the “gun” nozzle along with the O-ring in the brass one.  I’m very OPEN to any comments / suggestions on how to properly reattach the nozzle head to the “gun” one and from anyone else who still has one of these sets!
Nozzle Parts 1 of 2 Nozzle Parts 2 of 2

Fauxdacious Version 3.83-Final Released

Fauxdacious Version 3.83-final Released for Linux and Windows: 

* FIXED filewriter plugin to “fail over” to “unknown” for the filename if the playing filename is too long or invalid (needed for youtube streams, etc.).  Also fixed a potential null-pointer reference.

* FIXED (rebuilt) FauxdaciousURLHelper.exe (Windows version binary) to add missing utf8_heavy module needed to fetch some IHeartRadio streams (Linux version not effected, which uses the Perl script).

* Added “close after song change.” checkbox for STDOUT output to “close” STDOUT when either song stops playing or record is toggled off in order to avoid errors in the created output stream.  Otherwise, output to STDOUT accumulates as a single long stream until recording stops.  This allows for combining multiple songs into a single output file, but can produces (somewhat harmless) errors at end of playback in such files.  The default is TRUE (checked) (properly close and prevent errors and only record the last song (overwrite).

* Added fixups for ugly but common stream title formats.

* Mandate SDL2 in Fauxdacious main, remove choice to use SDL1 in plugins.

* Merged all Fauxdacious commits through ace32cd; and plugin commits through: a666f70.

* Merged Audacious commits: 7886b7b; and plugin commits:  #9816dc6, 4f327c6, 10abf7d, 94d95fc, b13a35d.

%d bloggers like this: