Wednesday, March 28, 2012

One thing a day: programming in Ruby

These past two days saw me programming in Ruby on the BASIC-1965 project. I added functionality to the program and added tests. The tests were the more useful of the two; they verified functionality that I had added for IF/THEN statements. (And revealed some defects.)

The functionality that I added was the ability to use text constants in PRINT statements. They seem simple, yet they require some thought for the program. Ruby made the addition easy -- easier that I expected -- and I am happy with the result.

The "one thing a day" idea seems to be working. With it, I can commit to one simple idea per day, one limited task that I can accomplish as an "extra" to the day's work.

Sunday, March 25, 2012

Ubuntu Server

I installed Ubuntu Server on an old Dell PC this week-end. (This was Saturday's "One Thing a Day" task.)

My first attempt, using a CD burned last year, failed due to errors in the on-disc packages. Writable CDs have a finite shelf life, and my combination of CD burner and CD media (and CD storage techniques) sets that life to something less than a year. I will have to remember that when I use CDs as back-up media.

My second attempt was successful.

I'm pleased that the install CD has the logic to check the integrity of each and every package that it installs. Not only does the install program check as it installs, the main menu has an option to check the entire disc in advance. This is a nice feature and shows the commitment of the Ubuntu team to a quality experience.

The installation of Ubuntu ran pretty much on its own, with a few questions for me: my full name, my account name, and the host name. (And a few questions about keyboard type and timezone.)

After the install, I had more work. I wanted to assign the PC a static IP address; the Ubuntu install configures it for DHCP (easy enough to change in /etc/network/interfaces). I installed the rsync program and configured it to be a server (some research as I am new to rsync and new to xinetd). I still have tests with rsync to run. Yet in the end, it was a good experience.

I now have a PC running Ubuntu server; I plan to server storage from it and keep back-up copies of files.

Wednesday, March 21, 2012

Postgres

Today's one big thing a day: Attend PHP meetup. (Includes presentation on Postgres and conversation with like-minded geeks.) Quite a good "thing of the day". Side conversations included area conferences, job opportunities, and projects with old tech.

Tuesday, March 20, 2012

One big thing a day

With a full-time job, I have little time to work on the career. What to do? I try and complete one big thing each day.

Yesterday I signed up with dropbox.com and installed the synchronization software on all (except two) computers. The sign-up was easier than I expected. Using the software is easier than I expected. All in all, a win!

Today I changed the scripts for BASIC-1965. I now have a 'master' script that runs all tests, and tests scripts for specific cases. I have one test case. It is a small accomplishment, but getting the 'master' script in place is an accomplishment: I can easily extend it with more test cases.

Thursday, March 15, 2012

App Engine and goals for BASIC-1965

I attended the Capital Cloud user group meeting tonight. The talk was on Google's App Engine, and it was a decent talk. But as usual, the best part of the meeting was talking with other folks. I chatted with a few and had the opportunity to explain cloud computing (at least my "take" on it) to some non-developers.

In other news, I have a specific goal for the BASIC-1965 interpreter. I've been working on this interpreter for several weeks now, on and off. (Mostly off.) My general goal is to implement an interpreter that will conform to the description in Kemeny and Kurtz's book "BASIC PROGRAMMING" from 1967. But better than a general goal, I thought of a specific goal. A specific goal is a good thing for me; it gives me a definite target.

My specific goal: write a program (in BASIC) that will print a Fahrenheit-to-Celcius conversion chart.

The goal may sound trivial, yet I find it appropriate. Such an exercise was common in the early BASIC texts, and it is within the capabilities of the (quite limited) language of BASIC-1965.

So now all I need is some time!

Monday, March 12, 2012

Ruby vs. C#

I've been working with C# on the day job and Ruby on a side project. Shifting between the two has been enlightening.

C# is a statically typed language; Ruby is dynamically typed. I have come to rely on statically typed definitions, so I am a decent coder in C#.

I find that the coding experience in Ruby is quite different. I cannot rely on the IDE to tell me when I have assigned an improper value - in Ruby one can assign anything to any variable. It is easy to forget the type of variable and assign the wrong thing; I find out only at runtime, usually with an error of "undefined  method (methodname) for (classname)".

To get things right in Ruby, I must be more disciplined in my thoughts and in my programming. I'm not sure that this is a bad thing... I'm also not sure that this is a good thing. At the moment, I know only that it is a different way to program.

Friday, March 9, 2012

.NET and Ruby

This week I attended the local CMAP meeting, with its presentation on SQL in Azure. I learned a lot; SQL in Azure is different from SQL in the server room due to the "can move at any time" aspect of cloud computing. The differences are not particularly large, but can be significant (especially if you have built your system around one of the server room idiosyncrasies).

The CMAP meetings are consistently good for networking. They draw a sizable collection of people, and the attendees have varied projects and talent. I always have interesting conversations at them, and this month's meeting was no exception.

Later in the week I worked on my side project of BASIC-1965, an interpreter for BASIC written in Ruby. It's a fun project and a learning experience. Ruby has a different approach to programming, and my Java- and C#-trained brain is making mistakes as a learn "the Ruby way".