Thursday, April 30, 2009

I stayed with Perl today and developed a bit more of my little data-table access program. I call it 'dbase' in tribute to the old dBase II package that ran in CP/M and later MS-DOS.

I thought a bit about web sites, and realized that there are only a few pieces and few technology sets needed. The pieces are: web server, static content (includes text, graphics, and photos), dynamic content, and database. I guess one could add things like scripts and active things for the client side, but those are the main pieces. For technology, the choices are pretty limited (but perhaps not simple): Apache or IIS for web server; HTML, GIF, PNG, and JPEG files for static content; ASP, JSP, or PHP for dynamic content scripts; and MySQL, Microsoft SQL Server, or other database. Client-side active things can be Javascript, Flash, or Silverlight.

While the number of pieces is small, generating content is not trivial. I played with the Quanta and Kompozer HTML editors today. Quanta is very much like Allaire/Macromedia/Adobe Homesite, and I was comfortable with it. But it has a few bugs (such as the "add an image tag" dialog collects the information but then adds no tag). Kompozer was worse -- it crashed several times. I can make it crash by running it and displaying the "File / Recent Files" list. It also crashes for other reasons.

I used GIMP to create some graphics for my phony web site. GIMP worked fairly well, and I need to learn more about its editing capabilities. I used the images it created and I have the beginnings of a web page. Now to learn how to have two sections under the navigation bar. I want one with text and another one with an image. I think this calls for frames.

Lunch was spent with former co-workers and a recruiter. It was a good lunch with some interesting discussions. I'm going to revise my resume, to indicate that I want to move out of C++ and C# development and into web development.

Wednesday, April 29, 2009

For want of a nail

I've been making good progress with PHP these past few days. I did some work with cookies and then moved on to session variables, only to find... that my copy of PHP doesn't support session variables. It's an option that must be selected when you build PHP.

I'm using PHP as installed by the SuSE 9.2 Linux distro. That version, out of the box, does not support session variables. Apparently, an update changed PHP and enabled the session variables. But SuSE stopped supporting version 9.2 a while ago, and the updates are not available.

I *could* re-build PHP myself. That's work that takes me away from my goal (learning to build applications in PHP).

Another option is to upgrade the SuSE Linux distro on //grendel, the computer hosting Apache and PHP. When SuSE/Novell don't offer online updates for version 9.2, I have the CDs for later versions (10.0, 10.1, and 11.0). But that update is not so easy; it requires more memory than //grendel currently has. (The PC has 128MB RAM, and SuSE 10.0 wants 256MB.)

Adding memory is possible: Memory is available and //grendel has two open RAM slots. All I have to do is buy the memory stick.

But I promised myself that I would refrain from spending money on my home PCs until I can fund the expenditure, that is, until I have some income. Not just as a way of conserving resources, but as an incentive to secure income. I'm not sure that I want to break that promise.

So I put PHP aside today and went back to Perl and my 'dbase' utility, which performs simple data table operations. One version of 'dbase' uses plain text files; another version will use Perl's DBI module to talk to MySQL databases. I have completed about a third of the text-only version, with simple script processing and the ability to append a complete record to a table. The 'update' and 'select' functions are next.

The dbase program will give me experience with Perl's DBI module, MySQL, and simple SQL. It is also a useful program; I will track program size with it. I want to measure the size of programs that I write, and see how they grow over their life. The dbase program will be a convenient way to store lines of code counts.

Monday, April 27, 2009

Am I an architect?

I had lunch with friends today. I mentioned was my enjoyment of system administration tasks, and my difficulties in listing them on my resume. For example, I managed a small virtualization environment (ten hosts and twenty virtual machines). As virtual machines grew I moved them from one host to another, keeping certain virtual machines on separate hosts for performance or recovery reasons. Virtual machines grew due to growth in the source code size (they built the system and updated their copy of source code daily), compiler updates, Microsoft security updates, and new general-release software like the .NET 3.5 framework.

Moving the virtual machines was a lot like playing 'Tetris' - I could see the open slots, and I could tell when virtual machines were outgrowing their hosts. (I had constructed early-warning systems.) But listing "played Tetris with virtual machines" is not really feasible on a resume, nor is explaining the details.

My friend Larry suggested I use the phrase "managed virtualization environment" which makes sense.

He also suggested that I list the phrase "architect for virtualization environment", since I was the architect for that environment. It was a non-trivial environment and I did pull it together.

It is clear that I had three different roles: developer, system administrator, and architect. Here's what I did for each:

- Developer: I wrote and tested code. Some of this was on the large (2,000,000 LOC) Worldship system but most of it was utilities in the Unix style: small and connectable, useful in shell scripts or DOS batch files.

- System administrator: I installed Windows and Linux, monitored and estimated disk space on servers, managed VMware, installed network equipment, configured Windows and Linux for network access, audited server/directory access, granted and revoked rights for PVCS Version Manager access

- Architect: I designed and implemented the VMware environment. I designed and implemented the job control system which let me run jobs overnight and coordinate dependent jobs across multiple PCs.

The notion of architect is one that I had not thought of. But it makes sense.

It's good to have friends.

Friday, April 24, 2009

Reviewing experience

I just spoke (well, e-mailed) with a recruiter who asked for more details about my experience with .NET. She needed information to present to a client. I had to provide the details to her. To do that, I had to have the details, which are not on my resume. Nor were they written down anywhere.

The exercise forced me to think, to remember the projects that I had worked on. I wrote a short list, and my immediate thought was "Oh this is not enough". My second thought was "Didn't I work on more than this?". Well, I had worked on more, but I did not have the list immediately available.

Writing the list was a good start. As I wrote the list, I remembered additional items and details. Then I typed the list into an e-mail. This also helped me remember.

In the end, I came up with a good (as in accurate) list. I don't know that it will be enough to impress the client, but it has given me a good list of my accomplishments (in .NET -- I should do the same exercise for Perl and system administration tasks).

Wednesday, April 22, 2009

Apache, PHP, and MySQL

I have the trio of Apache, PHP, and MySQL working. My problem was my SQL query. (Amazing what the right syntax will do!) Once corrected the web page came up as expected.

I also set up PHP to run in stand-alone mode (that is, without a web server) on my development computer. An interesting arrangement that gave me insight into the design of PHP and the interface from Apache. PHP is just another scripting language, like Perl or Ruby, and uses the same (or a very similar) object model as Perl and Ruby. That view gives me a better understanding of the workings of PHP, which builds my confidence.

Using PHP in stand-alone mode allows for easier debugging of scripts, too. If one is careful in designing the PHP scripts and puts the major functions in common modules, one should be able to test a majority of an application before installing it on a web server. Testing web applications in the browser is possible, but more work.

In other areas, I found a major grammatical goof in my latest resume. I fixed it immediately, but I had sent that revision to a few prospects. If they notice the goof they will probably think poorly of me. Well, so be it. I'm not perfect; I try to recover with grace.

Tuesday, April 21, 2009

PHP and MySQL (part 1)

I have PHP and MySQL talking. It took a bit more than I expected; most of the work was in the installation and set-up of files for PHP. I had to install the DB and PEAR packages and then modify the PHP.ini file to specify an include path. I also modified some web pages to use PHP commands to access a database and created a MySQL database with some tables and some test data. Not quite as easy as MS-Access, but not too hard either.

I was assisted by the detailed error messages from PHP. (And also from MySQL, for earlier configuration problems.) The designers of both packages followed the rule "complain early and noisily", and it helped me solve the problems.

Most Windows programs, in my experience, do not follow this rule. They write errors to logs in obscure places and the messages are detailed but not useful. A typical log entry might be "call to SqlProcessor(...) returned code 0x800503ad" or some such jargon. I'm guessing that the message is useful to a Microsoft developer, one who is familiar with the internals of the components, but it is quite opaque to me. I have no idea what 0x800503ad means, and Google searches usually reveal a multitude of causes.

My experiments with PHP and MySQL are not completely successful. The example I used from the book Programming PHP fails with the message "undefined fonction 'fetchinto' ". I'm not sure if this is a PHP version problem (I'm using version 4, the older version) or something else. But all is not lost, as I can look inside the DB.php module and see the code. That's a task for tomorrow.

In other work today, I turned on my resume on monster.com. I have been somewhat reluctant to do this; the last time I made a resume public I was flooded with lots of requests that were only remotely connected to my objective. Most recruiters saw "C++" on my resume and immediately offered a position with C++. They made the assumption that since I had C++ experience I desired another position with C++. This is not the case, as I want to move to web technologies (PHP, JSP, and possibly ASP.NET) and other new technologies (Ruby, Ruby on Rails). Well, my resume is public. Let's see what happens.

I also spent some time out in the sun, reading in the local park. The reading was all non-PHP and non-MySQL. I read some chapters in Language by Bloomfield, Sagan's The Dragons of Eden, and a short story by Lester del Rey. I think the sun and the reading were both theraputic.

One step at a time

I continue to work with Linux, Apache, MySQL, and PHP. Yesterday Apache and PHP played nicely. I didn't make any change to the configuration, things started working "by themselves". The true reason may be that I had shut down Linux over the week-end and started everything up again yesterday morning. Why that would cause the change and not the shut-down and re-start of the Apache server (which I did on Friday) is beyond me.

Now Apache recognizes PHP. I've tested it with a simple PHP page. (Very simple. It is HTML with a single PHP ECHO command in it.)

My next goal is to query a database and retrieve data from MySQL while inside of PHP. To do that I will need a database, and for that I need MySQL running. I set up MySQL yesterday. The installation went smoothly, with a few problems that were easily solved. (Mostly file owner/group settings.)

Today's plans are: add a user to MySQL for the PHP processor, create a database with some data (probably users, user profiles, and favorite music), and change the static content HTML pages to use PHP and retreive data from the database. If I am really ambitious I may try storing photographs in the database.

Friday, April 17, 2009

Open source or Windows?

It seems that one of the great decisions before me is the choice of technologies. Microsoft or open source? Microsoft has the complete stack: operating system, development tools, web server, application server, and office programs. Open source has counter offers: operating system, web server, application servers, and office programs. Microsoft is by far the more popular stack, especially among companies. (On the other hand, defense agencies have a lot of positions for opern source technologies including PHP and Ruby on Rails.)

None of my current computers will support Windows Vista. If we assume that Windows XP is gone (not necessarily true) and that one must either run Windows Vista or Windows Server 2003 (or Windows Server 2008) then I need a more powerful computer. Possibly a computer that can support multiple virtual PC guests, although I am not sure that the Microsoft licenses allow Windows to run as a guest virtual OS under a non-Microsoft OS like Linux.

If I had to, I could purchase a new computer (probably from TigerDirect) and put Windows on it. I would probably purchase the Microsoft MSDN package -- it uses a subscription model of $1200 for the first year and $800 for successive years -- to get the Windows license and the other licenses that I need for the Microsoft stack. Those licenses would include Windows, SQL Server, Sharepoint, APS.NET, IIS, Visual Studio, C#, and MS-Office.

The Microsoft route is expensive. I am considering the open source route. Linux instead of Windows. MySQL instead of SQL Server. Apache instead of IIS. PHP instead of ASP.NET.

I have a computer here that can run Linux (it does now) with Apache. I have installed PHP but Apache is not recognizing it; I have to adjust the configuration. In time, I am sure I can find the problem, correct it, and get PHP running. That opens the door for CMS systems like Joomla and Drupal.

A good chunk of today was spent with Apache, PHP, and configuration files. I made some progress but not enough; Apache serves static pages but does not recognize PHP. More work for me this week-end!

Wednesday, April 15, 2009

I went to both interviews -- the recruiter and the hiring company -- and both were good experiences. The recruiter is a decent chap and gave me honest feedback and good advice. He will keep me in his list but does not have anything that is a good match at the moment.

The interview with the hiring company (Quotient) also went well. This was the first interview in which I was excited about the opportunity! They have a lot of technologies and a dynamic environment. The latter can be a good thing or a bad thing -- it means that their plans change as conditions around them change. Changes could be caused by a new contract, a change to requirements for an existing contract, or maybe something else. It won't be the stodgy "arrive at 8:00, sit at your desk and perform the planned tasks, and leave at 5:00" work of the nineteen-fifties.

Quotient builds a lot of web applications and uses various content management systems. Many of their technology choices are dictated by their clients; clients hire them to modify or expand existing systems, and Quotient works within the existing set of tools and technologies. Which means that one client may be using the Microsoft stack (Windows, IIS, ASP.NET, and SQL Server), another client may be using an open-source stack (Linux, Apache, JSP, and MySQL), and a third client may be using a hybrid stack (Windows, Apache, PHP, and SQL Server). Flexibility is important for them.

Today I will invest some time in Perl and the database manipulation script. I'm working with text files first; later I will use Perl/DBI and talk to a MySQL database.

Monday, April 13, 2009

Sharepoint analysis

I've been busy these past few days.

I met with a former co-worker who was gracious enough to give me some advice and some listening time. He is working as an independent contractor and doing a lot of work with Sharepoint. He recommended that I build skills for it. It is a reasonable course, and one I had not considered. Sharepoint is rather popular and I had used it at UPS. Learning Sharepoint will be a challenge: it runs only on Microsoft Windows, and you need at least two computers: one for the server and the second for the client. The server piece runs on Windows Server, so you must have the "server" flavor of Windows: Windows Server 2003 for now, although Windows Server 2008 is out. (But does Sharepoint run on it?)

Configuring an environment for Sharepoint would require, at minimum: A PC running Windows Server, the Sharepoint server, MS SQL Server, and MS IIS; and another PC running Windows (probably Windows Vista) and Windows Internet Explorer. Even with the magic of virtual machines I would need to acquire hardware and software. At least one PC to host the virtual machines, the virtual PC software (probably VMware), and the licenses for Windows Server, Windows Vista, Sharepoint, and MS SQL Server. (IIS and IE are available at no charge.) Not a small outlay. It could probably be reduced by purchasing an MSDN subscription; the individual pieces are probably more expensive. Will think about this before jumping into it.

In other news, I have two interviews this week: one today and one tomorrow. The former is with a staffing company; they have a position in mind. The second is with a hiring company in Columbia. The second position sounds more challenging, the first has the better commute. But I won't worry about that choice until I pass the interviews.

Tuesday, April 7, 2009

Time-boxing and interactions

I'm following the advice of several people. That advice is: limit time spent on job-search activities (that is, don't let it take over my entire day) and get out and meet people. I think these are both good ideas, and to some extent complementary.

It is all too easy to spend the entire day looking at job boards, adjusting my resume, and updating the social network sites (such as LinkedIn). But I can do only so much in a given day before the tasks become trivial: re-scanning the same job board to see if something new has arrived, or pressing the refresh button to see if someone has accepted an invitation to join my network. Some work is necessary, but it should be *effective* work.

Getting out and going among people is also important. Sitting at home at the computer and phone does not keep my interpersonal skills fresh. Interaction with other people does. They don't have to be job search meetings or "network" meetings - they can be any interaction from a discussion with a friend to a conversation with the pharmacist. They can be long and cover many topics or short and only one topic. There is probably something wired into our brains that requires us to interact with other people. (And there is probably room for several doctoral theses on this subject.)

Yesterday I responded to an ad on craigslist, today I had a brief conversation with the recruiter for the position. It seems a decent match, and the position is closer than last week's, which is good. It also seems within the "transit circle", which is also good.

Friday, April 3, 2009

Sushi

I met my friend and former co-worker, and we did indeed have sushi this evening. And a good conversation about the economy, technology, and life in general.

Earlier today, I worked with Subversion. I successfully moved a repository from one computer to another. It was a small repository, which made the job easier. The process is the same for small and large repositories: disable access, dump the repository to a single file, move the file to the new server, load the repository from the file, and enable access. Then, on all client PCs, do either a "switch" command or a new "checkout". It took a little while to get the exact right "checkout" command, but things are working again. I can now take the repository off the first PC and free that space.

No contact from Dynasplint today, which is a little disappointing. I would have expected a thank you from them, to at least acknowledge my time and effort for the interview. Hmph.

Looking forward, I think I can start some efforts with Ruby and the measurement and analysis of source code. I am going to start with the rudimentary items: lines of source code and then non-comment lines of source code. The non-comment lines of code will be interesting. It is easy to remove comments for older languages such as FORTRAN, C, and C++. Java and C# aren't too bad, but C# has some interesting aspects such as attributes that can make line counting difficult. (Should an attribute line be counted as a source line? And how does it count towards complexity?)

Languages such as Perl and Ruby offer more challenges to identify comments. Lines that begin with the hash character ('#') are comments, and lines that have a hash in them are partially comments, but some lines can contain hash characters in string literals and those hashes do not demark comments.  And hashes in regular expressions do not demark comments. And regular expressions are hard to identify: they can begin with any character, not just the slash character.

I would like to use a modular approach, one in which I use separate programs to perform distinct functions. That may be difficult; I may have to parse (not just text-hack) Perl programs. Well, let me start and see how things turn out. I'm not going to design everything up front and then find that the design fails.

Interview - Dynasplint

I interviewed Dynasplint yesterday. They are a mid-sized company here in Maryland. I met with the director of IT, a programmer, and the director of HR. They asked several questions about SQL but not about C++ or X++.

They seem a decent set of folks, and I think that I could work with them. The biggest problem would be the commute: about an hour, driving. Transit is a possibility but that pushes the commute time to 1 hour 45 minutes.

The interview lasted two and a half hours, which is a good sign. I sent a thank-you e-mail yesterday and have heard nothing back, which is also good -- they haven't said "no".

Today I meet with a former co-worker for a light dinner. It might be sushi!

Wednesday, April 1, 2009

Interview

My work on job boards has begun to yield results. I have an interview tomorrow with a company in the area. They use C# and X++ (that's a new one to me). The have a very small IT shop and I spoke with the directory today. This may be an interesting opportunity.

In other areas, I had a breakthrough on the LDAP project. I now understand quite a bit more about LDAP and how it is used for authentication. I needed a better understanding of the authentication mechanisms in Linux. The LDAP book did not cover those, and shouldn't, since it focusses on LDAP. I don't have the complete set of answers, but I feel that I made progress today.