Where there's a Wills, there's a way!

Mike Wills

I have been a long-time geek playing with many things throughout the years. Thus stuff like my website is constantly changing so I can learn more.

This website was restarted resently from the ground up so many of my blog posts throughout the years haven't been migrated back to the site. I will (someday) get many of the good posts back on the site.

Here is my first installment of the Dog Days of Podcasting podcast (a little early). I am using Auphonic on my Android phone to record and upload. There is a bug right now on the Android that forces me to go to their website to apply the tags, but I hope that gets fixed soon. They have a cool interface that automatically tags your MP3 for you and uploads to your final hosting spot. I am using Amazon S3.

You have just received the Reneck Virus. Because we don't use electricity, we don't have any computers or programming experience, so this virus works on the honor system.

Please delete all the files from your hard drive and then manually forward this virus to everyone on your mailing list. Thank you for your cooperation and..... God bless you.

The Computer Engineering Department.

Do Not Use Comments

This came across my Hacker News feed the other day, "I've never seen a language's style guide recommend avoiding comments before." After reading the link it became clear that the HN title was link bait. What the Haskel documentation was stating is something any good programmer already knows. Don't document every line of code.

x = x + 1; // Increment x by 1

This comment is not required as it is obvious what it is doing. My rule of thumb for commenting is; if it's complicated or was problematic, it requires a comment explaining the why or why not. A good programmer should be able to read through the simple code and know what is going on. However, commenting on why you wrote something the way you did would help yourself or the next guy to know what you were thinking.

This comes to light not only when I am looking at code I wrote 5 years ago, but recently I had a co-worker leave. He didn't write many (read any) comments in his code. Now in some cases I am running debug just to see what the application is doing before I can think of fixing that bug or making that change.

So do your future self or co-worker a favor and comment... but not too much.

I used a previous version of this free monitoring tool, but I recently setup their new version. It is quite neat. Basically it uses Google's infrastructure to constantly hit your website and if it doesn't get a 200 status back, it will contact you via email or SMS saying your site is down. While this was nice, I really wanted to use Pushover more. So I looked through their API and discovered it is very easy to send messages. So I modified their script and now I get notifications via Pushover. Here are the changes that you need to perform.

Welcome to the New Site

Welcome to the new site. I migrated over what I felt was the key information from the old site. I'll eventually work on adding back more of the old content. Everything will break (as it does everytime I change everything).

I may add back some sort of comments in the future, until then use my contact infomation above to reach me.

This site is now 100% static html hosted on Amazon S3.

The past couple days I was on a mission to look for a way to replace our aging dot-matrix receipt printer. We got some new printers to go with our new credit card processor. These printers are Epson TM-T20 thermal printers. I had some problems finding the information to have the printer cut the paper and to get it to eject the cash drawer. I am documenting what I found here for people in the future to figure out.

You need these codes embedded in the spool file. The first hex character, 03, tells the OS we are sending ASCII characters. The second, 06, tells the OS that the next x characters are ASCII.

  • To cut the paper - X'03060D0A1D564220'
  • To eject the cash drawer 1 - X'03051B703040F0'
  • To eject the cash drawer 2 - X'03051B703140F0'

Ever find that you need to add a custom library list to a C# application that works with IBM i data? Here is what you need to do. Add LibraryList= to your connection string. So that would look like:

connectionString="DataSource=127.0.0.1;DefaultCollection=MYMAINLIB;Naming=sql;
UserID=USERNAME;Password=PASSWORD;LibraryList=MYMAINLIB,LIB2,LIB3;"

We had some... problems with our utility bill emails. They weren't worded clearly enough that some people were getting confused. See, when I wrote this, used the only approach I knew and manually assembled a string of text until the email was created (depended upon if they were auto-pay or not), but over all the emails were very similar. We like to be customer friendly, so we decided we better make the emails clearer.

After working with our communications department, they came up with a very good set of emails... that don't work well with how I am currently assembling the emails. Damn!

How to Debug a Batch Program

Via BVS/Tools - FAQ

How do I debug an RPG program in batch? Submit your program into batch and make sure it is held. Do this by either holding the job queue that you are submitting the job to, or use the HOLD(*YES) option on the SBMJOB command.

  • Use the WRKUSRJOB and display the job you with to debug with the display job option (5).
  • Write down the user name, job name and number.
  • Start a service job using STRSRVJOB entering the name, job name and number from the previous step.
  • STRDBG PGM(YOURPGM) - Press F12 to exit the source display (Sorry, can't enter breakpoints yet).
  • Release your submitted job by releasing the job queue or the job itself.
  • A display will appear asking you to press F10 function key. Press F10 and you will be brought to a command line.
  • Enter DSPMODSRC and enter your breakpoints.
  • Leave source display and command line by pressing F3 until you are back to the screen that asks you to press F10 to enter breakpoints.
  • Press Enter to start your job.
  • After that the job begins running and stops at the first breakpoint reached. Also, you can create a simple CL to combine the two commands to make it easier to use. I created a command STRBTCHDBG so it is really simple to use. I might post the source to that later.

© Copyright 2014. All Right Reserved.

Scroll to Top