Showing posts with label learning. Show all posts
Showing posts with label learning. Show all posts

Sunday, June 5, 2016

Stanford Programming Methodology (CS106A)

The Programming Methodology course is a part of Stanford University's Stanford Engineering Everywhere. Through this program, students and educators can access many of Stanford's courses online, free of charge. I was essentially able to audit this introductory, semester-long, computer science course for free. I watched the lectures, did the reading assignments and the programming assignments. I found it very interesting and learned a lot. You can find the course at https://see.stanford.edu/Course/CS106A. Here's some basic information about it.

Professor

The course was taught by Mehran Sahami. You can read his profile here. You can tell that Mehran enjoys teaching the course. I found his enthusiasm for the subject to be very engaging. He uses a lot of helpful illustrations for what could be complicated topics and even throws in some fun pop culture references that I could appreciate. Through his video lectures, I got a sense of what it would have been like had I pursued computer science in college.

Textbook

The course textbook is The Art and Science of Java by Eric Roberts. It is available for purchase and a free PDF version of an early draft is also available online. Just search for it and you should find it. I found the book to be informative and easy enough to follow. I even put up a quote from the book in my cube at work, his definition of software engineering - “the discipline of writing programs so that they can be understood and maintained by others”.

What's Covered

As one would expect from the course name, it provides an introduction to good programming methodology and uses Java as the language of choice to do this. It covers, among other things, Variables and Types; Expressions, Statements and Control Structures, Methods, Randomness and Events, Objects, Strings, Classes, Arrays and ArrayLists, HashMaps, Interactors, Collections, Debugging Strategies and Searching and Sorting.

Assignments included three games, Breakout, Hangman and Yahtzee; a data graphing program and a simple social networking program. I enjoyed working on these programs.Naturally it would be better to actually take the course and get feedback on your code but because so many people have taken the course, it's easy to find other people writing about the assignments online. I also created a Stack Overflow account and was able to get some help and feedback that way.

I do recommend the course to anyone looking for an introduction to programming in general and to Java in particular. I will get into some of the specific things I learned through this course in future posts.

i++

Sunday, April 24, 2016

What Other Languages to Learn?

I consider myself to be very blessed to have been able to start in a full-time programming job in my forties. This is especially true as I did not start with any formal computer science education. Because of what I was able to do for about 15 years, mainly with Microsoft Access and Excel, I was given a chance in my company to write OmniScript. This has shown me just how much I enjoy programming. Therefore I came to want to learn a lot more about it, especially learning some other programming languages.


Where to Start?

What other,  more common,  programming language would I start with?  A simple Google search yields a lot of blog posts and articles on this subject. There are many different opinions but one of the languages that was on the short list of most, if not all, was Java.  C and C++ were also near the top of most lists but I found that Java appealed to me the most.


Why Java? 


I decided to start with Java for a few reasons.

  • Though Java has been around for over 20 years now, it is still one of the most popular programming languages. 
  • Java is cross platform.  "Write once, run anywhere." 
  • Java is used in making Android apps, something I had an interest in doing.
  • Though I'm still interested in learning C and/or C++, Java seemed like an easier starting point. 
  • I liked what I was seeing for online resources to learn Java.

Regarding the last point, I found a Udemy course in Java that I was planning to start but then I came across the Stanford Programming Methodology course (CS106A) and decided that would be a great place to start. Not only would I be learning Java, I'd also be learning good programming principles. I'll write more about my experience with the Stanford course in my next post.

While to some extent this could be said of my introduction to OmniScript, in the words of Obi-Wan Kenobi, I felt like I was about to take my first step into a larger world, and I was quite excited.

i++

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++

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++