Saturday, November 28, 2015

Microsoft Access - From Data Entry Temp to Database Developer

In 1996 I was working for a temporary agency and I took a short term data entry assignment for a trust company that does retirement plan recordkeeping. I think it was just supposed to be a 6 week assignment, but today, almost 20 years later, I am still there. The reason for that is mainly because, while I was brought in just to enter data in a Microsoft Access database, a program I hadn't used before, I started teaching myself Access programming and I was soon making enhancements to the database.


I started with the main entry form. Because it had several entry fields and a lot of the fields didn't apply to all the clients I was entering data for, I made it easy to select which fields the cursor should stop on while tabbing from one to the next. I also made some shortcuts for finding the client you were looking for. Doing data entry was a good thing because it made me see the need for some time saving improvements and I soon found great joy in making those improvements and sharing them with those I worked with.

Fifteen Years of Enhancements


I went on to enhance that same database for the next 15 years, along with creating several other databases. The main database was for doing compliance testing on the retirement plans, assuring that each plan stayed in line with government regulations. Each time a new test was required or an alternate set of data needed to be taken into consideration, I added new fields to the many tables, added new queries, forms and reports. I created helpful macros and modules. One of the biggest tasks was making a report that summarized the results for each plan. This report had many optional sub-reports that expanded when included, based on entries on a multi-tabbed entry form.

In time very little data was being entered by hand anymore. I exported the plan participants we had in the database to Excel spreadsheets and the clients would enter data for each, along with adding other employees, to the file and return it to us for me to import. Through this process I learned lots of tricks for manipulating data and dealing with some Excel/Access interaction quirks.

And since the employees in our department spent many stressful hours looking at this database, I lightened things up and made it more fun by adding images to the forms, changing them each year to keep things fresh.

I learned that Microsoft Access was a very powerful and customizable tool.


i++

Sunday, November 22, 2015

MS-DOS Batch Files

After my experience with BASIC on the TI-99/4A in Jr. High, I lost touch with the advances in personal computers for my high school years. That helps to explain why I didn’t consider computer science when considering possible careers. If I hadn’t gone into ministry I would have likely done something in math or science, but somehow programming just wasn’t on my radar at that time.

It was a college roommate that got me back in touch with computers. He was from Switzerland and he had a laptop, something which wasn’t extremely common in 1990. This laptop ran MS-DOS and, to make it a little more user friendly, he had created an AUTOEXEC.BAT batch file that served as a menu for selecting and launching programs.

So while it would be a stretch to call it programming, I learned how to write batch files from my roommate. Batch files are just a sequence of commands, stored in plain text, to be interpreted by the command line interpreter. This was a very useful thing for a PC running DOS, like the Intel 386 computer I later got while still in college. But even after I upgraded to the impressive Windows 3.1, I still used the command prompt and batch files to accomplish some common tasks.

I even used batch files at my job, on Windows XP, a decade later to make daily backup copies of the Access database we were doing heavy daily work on. Of course we could get backup files restored by the IT department, but that would take the greater portion of a day and  by then hours of productivity could be lost. So I wrote a batch file that I ran each morning that made local backup copies of the database from the last two days. It would delete copy 2 (from two days ago), rename copy 1 (from the day before) as copy 2 and then make a fresh copy 1 from the current version. So if something went wrong, we could instantly get back to the copy from that morning or the morning before.

When I see a need, I've always enjoyed finding a time saving solution, either from something I've used before or, these days, Googling something new. Today I might come up with a better solution, but at that time a batch file met the need with little effort and it was fun to use something that brought back memories of an earlier time in my journey.

i++

Saturday, November 14, 2015

My Introduction to Programming - BASIC on the TI-99/4A



My first step into the world of computer programming was with my first computer, the Texas Instruments TI-99/4A when I was 11 or 12 years old in the early 1980s. It didn’t have a monitor, it was just hooked up to a small TV in my bedroom. While I did have a few of the game cartridges, like TI Invaders and Parsec, the cartridge that was most often plugged in was the TI Extended BASIC cartridge. Extended BASIC enhanced the functionality of TI BASIC.



I have my Uncle Marty Samuelson to thank as the one who first got me into programming. He’s the one who encouraged my parents to get me this first computer and he showed me how to write my own programs instead of just playing the game cartridges. He gave me issues of computer magazines like, COMPUTE!, that had whole programs listed out in them, numbered line by numbered line. These programs were usually games and I would slowly type them in. I just found PDFs of some issues of COMPUTE! online and I was surprised that just seeing them instantly brought back the smell of those printed pages. Typing in one program could take multiple days and so, in between, I would save my partial programs on the attached cassette tape recorder. I didn’t have the 5 ¼ inch floppy drive so I saved them on tape. I remember listening to several minutes of “ch-con ch-con ch-con” sounds each time I saved or reloaded programs into memory. After days of typing in the whole program I would run it and hope it would work. Almost always I learned that I had made a typo or two somewhere and I would have to find and fix the errors.

I didn’t understand all the code I was typing in but I learned from it and could soon write my own basic programs. When I had a computer class in junior high, in the 7th grade I think, we used BASIC on the TI so I already knew most of what was being taught and I enjoyed helping out other students. One of the funnest things we did was to program and use the speech synthesizer. The voice was pretty robotic but you could make it say whatever you wanted. I know I made a few prank phone calls with that from home. I always wished that I had a modem, like Matthew Broderick’s character in the movie War Games, so I could have done and learned more but it was a good start for my journey in programming.

Type In Program in TI BASICfrom COMPUTE!


i++





Sunday, November 8, 2015

My Journey in Learning Programming as a Second Career

Welcome to my new blog recounting my journey in learning computer programming as a second career. I’m having a great time at it. What I’ve been learning has been a lot of fun and I’d like to share it with anyone who might be interested.

Why for i equals one?


Programmers can skip to the next heading as I’ll just be explaining a basic for loop here.

In programming you often want to repeat a bit of code (a set of instructions for the computer) a certain number of times. Maybe you have data in a list (an array), say a list of five names, and you want to print each of them to the screen. To do that easily, you create a for loop.  In simple terms, you tell the computer where to start, where to finish, and how to get from one step to the next. So in English you’d maybe write, “Start at 1 and go to 5, increasing the count by 1 each time.” In programming, though, you’d usually say, “Start and 0 and go to 4.” I won’t explain why programmers start counting at 0 right now.

So in some common programming languages, like C and Java, you’d write
for (int i=0; i<5; i++)

The above code is very common. i is the counter variable, possibly coming from “index” or “integer” (the int declaration states that i is an integer). So i starts at 0 (i=0). It will continue to execute the code as long as i is less than 5 (i<5) and each time the code is executed, i is increased by 1 (i++ is shorthand for i=i+1).  So the code will execute 5 times, when i=0, i=1, i=2, i=3, and i=4, but once i=5, it will stop because i is no longer less than 5.

Why i=1?


Since programmers usually start counting at 0, why does my for loop start at 1 and why is that the title for this blog? Because sometimes it does make sense to start at 1. The usual way a programmer would start their career in programming is by getting a computer science degree in college. In my analogy that would be starting at 0.

I didn’t start there. I actually got a degree in Pastoral Studies and served as a pastor for 15 years. But then I felt like it was time to do something different. Thankfully, all the while I was pastoring I had a part-time job where, after being hired for data entry, I ended up programming Microsoft Access. That job has transitioned to where I am full-time and writing in OmniScript, a proprietary script language. I’m enjoying that and am very thankful to have a job in programming in my forties without any formal training, however, I want to learn more. And so for the past year I have been learning more about more popular programming languages. I’m doing that on my own through several great online resources. So this is my i=1.


for (int i=1; i<finished; i++) 

This is where I’m starting. I didn’t start at 0 but it’s not too late, i<finished (I am less than finished). i++, I keep learning more every day and am having a lot of fun at it.

What will this blog be like?


First I’m going to recount the various steps in my non-formal programming background, how I got to the point where I was able to get a full-time job in programming in my forties.. Then I’ll be writing about all that I’ve learned this past year about programming methodology and various languages, which has been a lot. Then I’ll just keep on writing as I continue to learn more in this fun journey. If this is of any interest to you, I hope you’ll come back and join me.

i++