Wednesday, August 26, 2009

Dell 1, me 0

The replacement part for the Dell Dimension 4600 computer arrived today, just when Dell said it would.

I need the on-off switch and the cable that connects it to the motherboard.

I opened the box... and the part is the wrong part.

Dell shipped me the front panel USB port cage and the cable that connects them to the motherboard.

This is the part I ordered. That is, it is the part number I specified. I got that from the Dell technical support line.

The Dell web site was not helpful in locating this part. (If you have a part number, you can order it. If you don't know the part number, there is no way to find it.)

I could fight Dell and demand my money back. But I just don't have the energy for that debate. Instead, I will simply drop Dell down in the supplier list and consider someone like Asus for the next PC purchase.

In the meantime, I must re-consider my plan for running Windows. The idea was to install Windows on the Dell Dimension 4600. I hoped that the power switch would arrive today. I could order memory and a hard drive tonight and have them ready for me when I returned from a family visit this week-end.

Bother.

A fast moving company

Some companies move faster than others.

Most of the recruiters that I deal with work at a certain pace. I've gotten used to this pace. When they have an opportunity, they send an e-mail. I respond with an e-mail. The next day, they might call and we talk about the position. They then contact the hiring company and schedule a phone-screen interview, usually for the next week.

Within the past twenty-four hours, a company has: found my resume, sent me an e-mail (to which I responded), sent a follow-up e-mail, talked with me on the phone, and run through a technical screening interview. They move quickly.

The position sounds challenging, with some work in C++ and C# and some work in web technologies. (They list both ASP.NET and PHP; they may be using different technologies on different projects.) The location is a bit far of a commute (probably at the eighty-minute range) but can be made by train and subway.

I am excited about this opportunity. I may not get it -- they have other candidates -- but I have a chance at it.

Tuesday, August 25, 2009

Yet another schema, and results from interview

I worked on the news aggregation web site today. I added advertisements, or rather made changes to the database to support advertisements. I think we're on schema revision 6 now. I should probably stop counting. It's not the number of revisions, it's the end results than count.

Tomorrow I can revise the HTML and PHP to display ads. My idea is to pull them from the database at random, matching advertisement image size.

In other news, I heard from the recruiter about Becton Dickinson. They are going with another candidate, one with more experience in C#. Given their needs, I can understand. The recruiter said that they were willing to bring me on in a later position. I'm not sure if they are sincere or just being nice.

I talked with another staffing company about a position in West Chester PA. The hiring company (ING) wants a person to reverse engineer their annuities modelling sofwtware and remove the third-party library. They want someone who knows C++, annuities, and UML. (And the staffing company is willing to pay a glorious $48/hr on a 1099 basis.) I'm not sure that they will find someone with those skills at that price.

And in other other news, I met some folks at the pool today (of all places) and gave them some business cards. One is in the hotel industry, the other is a waiter here in Baltimore. I gave the waiter a copy of Ubuntu; he said that his Windows had BSOD problems. (And I have the copies of Ubuntu to give away to people!)

Monday, August 24, 2009

Network admin work

A little bit of network administration this morning.

Over the week-end, I picked up two monitors and a Linksys router. This morning I tested them.

The monitors were easy: plug them in, attach to a working computer, and verify the display. Both are working and will be good monitors for servers on Ben's project.

The router was a little more work. You can attach a router to a computer but you must know its IP address. And to change anything, you must know the password. I knew neither.

The router is a Linksys BEFSR41 4-port WAN/LAN router, suitable for home use with a broadband feed. I use the wireless sibling of this router for my home network.

A little bit of research on the internet provided the instructions for a complete reset of the BEFSR41. (Power on, press and hold the reset button until the red lights come on and go out.) It also provided the default password ('admin') and the default IP address (192.168.1.1). I reset the router on a completely separate network, to avoid conflicts on my home network.

Once reset, I was able to configure the router and I am confident that we can use it for a small network.

OK, that's enough hardware fun for today!

Friday, August 21, 2009

An hour with Dell

After my last post I felt rather silly about the Dell 4600 and not using it because of the power switch. Or rather, I felt that it was blocking me, preventing me from moving forward.

So during my lunch hour, I visited the Dell web site and hunted down the part. My search included various web sites (courtesy of altavista.com), dell.com, the Dell on-line chat service, and Dell phone support. The on-line chat was helpful in that it provided me with a part number. Dell's phone support was not particularly helpful. The dell.com web site was helpful -- once I supplied the part number. The web site did not help me find the part number for the power switch.

The switch assembly (its the switch, a mounting bracket, and a cable) should arrive next week. (Probably Wednesday.) When it arrives, I will verify that it is the right component. If it is, I will order memory and a hard drive for the computer. (Those will take another few days.) By early September, I should have the PC working.

This PC will be the Windows computer. My plan is to install Windows 7 and as many free Microsoft packages as I can. I'm thinking of Visual Studio Express, SQL Server Express, IIS, and... um... that's all I can think of for now.

I may want two PCs running Windows: one server and one client.

I'm avoiding virtual PCs for now. My hardware can support Windows, but not virtual PCs running Windows.

Possible job -- oops, no

Accomplished two things this morning: some web site stuff and some recruiter stuff.

I took some screen-shots of the news aggregator web site and sent them off to Ben, my partner-in-crime. I think that the web site is now 'portable', meaning that I can take the laptop computer and bring it to others for a demonstration.

On the recruiting side, I spoke with Lynn E about a position here in town. Lots of skill matches but apparently they insist on Microsoft SQL Server experience. (Possibly for admin or reporting tools.) That's a hole in my skillset and I have no simple way to gain that experience. I have one computer that is capable of running Windows Vista (or Windows 7) but it needs memory, a disk, and most importantly an on-off switch. I can get all of those but I need the on-off switch. I even have the Windows 7 preview disks, so I could install it.

This afternoon I will start reading Understanding the Linux Kernel. It's an O'Reilly book, and I think it will help me on the Linux side of things.

Thursday, August 20, 2009

Web site progress

I made a bit of progress with the news web site today.

First, I added a separate page for displaying a news story. I don't want the news story on the front page, just the headlines and teaser. Adding a new page was easy, linking to it was easy, and changing the query to retreive a specific story... was hard.

I needed a way to specify a story; the database had no unique key for stories. It was a minor change to add the column and make it auto-increment in SQL. (I dropped the table, changed the 'create' scripts, and re-added the table and data.)

For a while, PHP was having problems. I thought it was an SQL error, but it turns out to have been a PHP syntax problem. I had changed "$q" to "q" in my code, and PHP did not like it. The errors from PHP were not very helpful, and in fact lead me down the wrong path. I had to get up and walk around for a bit, and then come back to the code with "fresh eyes". Once I did, the problem was obvious.

Once that problem was solved, I then had two web pages with a fair amount of identical HTML code. I learned a bit about PHP's "include" capabilities and used them to combine the common HTML into a single module. The result was a cleaner set of web pages.

I still have a bit of clean-up to perform. But that can wait until tomorrow. I want to absorb what I learned with my adventures today.

Wednesday, August 19, 2009

Success with characters

I've solved the "question mark" problem with my web site! After careful testing and experiments (with some help from web pages), I found the problem was in my implementation of Gettext(). I needed one additional call to bind_textdomain_codeset () and now the web site displays the expected characters. Yay!

This was an interesting problem. My early analysis of the problem led me down the wrong path. I had used PHP in command-line mode, and those tests produced the proper characters on the console. (I'm still not sure how that happened.) Since PHP and Gettext() were giving me the correct results, I thought the problem was in Apache.

Later tests with other text in the web page showed me that I was wrong -- Apache was providing characters just fine. I narrowed the problem to Gettext(), and then it was an easy fix.

During these tests, I put the project under version control. It's now important enough to keep older versions. And I can use the experience with Subversion -- I still have problems  getting the right directory names when importing projects. (I had difficulties in this area with PVCS and SourceSafe too. Since it affects every version control system that I have used, maybe it is in how I think about version control systems.)

Friday, August 14, 2009

More progress with web server

I've made a little more progress with my web server project today. I have successfully added text into the MySQL database and used PHP to read that text when building web pages. This is another step (or maybe set of steps) towards a dynamic web page.

What's interesting is that the text is displayed with all non-US characters. I've been having problems with non-US characters on the items that are supplied by gettext(). I thought the problem was in Apache, but that doesn't seem to be the case. Perhaps the problem is in gettext -- but then PHP and gettext() do the right thing in command-line mode.

This problem is proving to be an interesting puzzle. But I'm not letting it stop me. I can make progress in other areas and keep working on the problem.

Next steps will be to add more data to my database, remove the constant (phony) text in the web page, and demo the results to the client.

Thursday, August 13, 2009

Success with Apache, PHP, and MySQL

I have successfully configured //patricia to use Apache, PHP, and MySQL. (And all in console mode -- no GUI!)

The database will hold news articles. I'm thinking of storing text in the MySQL database as HTML, and simply pulling the text and dropping it into the web page. I wrote a small Ruby program to convert plain text into HTML. Right now, it assumes that each line is a paragraph. I think a better arrangement would be to convert blank lines into paragraph breaks.

More progress with Debian Linux

I installed MySQL on Debian Linux, created a database, and re-configured things to allow for remote access. (Out of the box, MySQL allows connections from the local host and no others.) It meant assigning //patricia (the host running Debian, Apache, PHP, and now MySQL) a static IP address. That went easier than I expected. It was the first time I configured a Linux host via console mode and text files; my previous experience has been with GUI programs like YaST.

Now I need to verify that PHP can talk to MySQL. (Do I have all of the right packages? Do the package installs do the right thing to configuration files?)

After that, I need a way to insert news stories into the MySQL database. Should I do something with newline characters? (I suppose that I should, as MySQL considers them significant in its scripts.)

Tuesday, August 11, 2009

Progress with Debian Linux

Debian Linux 5 seems to be happy on the IBM T21 Thinkpad. I installed it with the "web server" configuration, so there is no GUI desktop. Linux runs in "plain text" mode, with a simple terminal console and no graphics except for what can be displayed with ncurses.

The web server is working and I used the 'aptitude' package to install the PHP modules. Next I will copy over my web site files from //grendel and try them first with just PHP and then with PHP inside Apache.

Monday, August 10, 2009

Setting up a Linux server

The IBM T21 Thinkpad has decided to power-up again. It has Ubuntu Linux 5.10 on it; later versions will not install. I need a configuration with Apache and PHP and that means a later version of Linux. I tried Puppy Linux 4.1.1 which runs (nicely too) but it seems geared for the desktop and not a server. (There's no package to install Apache, much less PHP.)

My next choice is Debian 5. It seems to be installing. (Puppy Linux ran live off the CD-ROM; Debian wants to live on the hard drive.)

Friday, August 7, 2009

Interview - BD

I interviewed Becton Dickinson today. It was a three-hour process! Various folks talked with me, and asked questions. Some questions were technical, some focussed on people issues. They seemed to have a lot of questions about presenting ideas and persuading others -- that may be a bad sign.

I won't know what they think until next week. They have at least one other candidate to interview.

If I time the job offer (from anyone) right, I could have a few days to visit my parents. That might be a good thing.

Thursday, August 6, 2009

Interview with OMB

I interviewed the folks at OMB today. It went well; we both learned a lot during the meeting. ("An interview is a meeting with a purpose", as the HR director at MCSB used to say.)

They have some C++ systems that need maintenance. And possibly some improvement. They want to move across platofrms (Windows today and Linux in the future) so they are thinking about staying with C++. They also have constraints (deliverables, deadlines, audits, and communications retention) that limit the options for a development project. The project is not impossible, but a bit harder than an environment without the constraints.

During the interview I mentioned my work with the Paranoid build system at UPS. That system built Worldship every night and reported problems. I think that they found the idea of nightly builds appealing. Maybe this will work in my favor.

The interview lasted an hour. We covered the systems, the technology, the major tasks, where they wanted to go, and some side issues such as commuting and work hours.

Tuesday, August 4, 2009

Lambdas for LINQ

I went to the monthly CMAP meeting tonight. I didn't want to -- I had been working on a problem with PHP and translated text. But I'm glad that I did go.

Tonight's meeting had free pizza, a long-ish advertisement for Telerik (one of their sponsors), and a presentation about LINQ. The latter was the most interesting.

Microsoft added LINQ to the .NET framework and its languages a few years ago, in release 3.0. The advertised reason was for easy connection to databases and web services. I must admit it does deliver on that promise. In .NET 2.0, queries required quite a bit of ceremony; in .NET 3.0 and LINQ, queries are brief and to the point.

But the changes for LINQ were not simply new classes in the .NET framework. Microsoft changed the compilers (for C# and Visual Basic at least) to allow the new syntax for easy queries. They changed they was code is generated and possibly the CLR run-time engine to allow for new code constructs such as lambda expressions.

These changes are significant and keep Microsoft competitive with other technologies. Cloud computing needs the ability to create lambda expressions, if you want to use it effectively.

What bothers me is that Microsoft has hidden these changes. They have not advertised them; while LINQ uses them it does make them obvious. The magazine articles I have read laud LINQ and explain its neat-o capabilities for queries but don't explain the underlying changes. Is Microsoft ashamed of them? Afraid of them? Fearful that their average developers will be unable to understand or use the advanced concepts? I don't know.

As a bonus, I won a book at the group's end-of-meeting raffle. It is the Visual Studio 2008 Unleashed tome. Rather heavy. Not sure that I want to read it.

Modest success with translations

I have convinced gettext() to work with my web pages!

At least in my development environment. The development environment is SuSE 11.1; my production web server runs on Ubuntu 8.10. I'll have to check the production environment and make sure that it has support for the expected locales.

Gettext is very picky about the locale specification. I was using 'fr' for my locale... since that was listed in the example. But that text does not match any of the available locales on my computer. Since gettext() found no exact match, it fell back to the default message, which is the ID you provided. Instead of 'fr' I must specify 'fr_FR' for the locale. (And 'UTF-8' for the encoding.)

Solving this problem took longer than I expected. (Problems often do.) I learned a few other things about PHP while I was struggling with this problem:

1) Debugging PHP is difficult. Or maybe I need to learn more debugging skills for PHP.

2) Using PHP in script mode is a quick way to test files. It's much easier than editing a file, FTP'ing it to the server, moving it to the proper directory, and then calling up the web page.

3) I can use better search techniques for documentation on the web. My initial searches kept pointing me to the PHP documentation. The GNU documentation (although lengthy) had the information that I needed.

4) I can use more patience reading long documents.

5) Sometimes one has to think, run  tests, think again, and run more tests. Thinking alone does not solve the problem, nor does running random tests.

Monday, August 3, 2009

Web sites in multiple languages

After neeting with Ben last week, I started thinking about his idea. He wants a web site that provides news and serves people in several different countries. This means web pages in different languages.

My experience on the Worldship project at UPS is helpful here. I understand the general process of "translating" a web site (or application) into multiple languages.

Some quick searches on the web show that the gettext toolset will do the job nicely. As a bonus, gettext plugs in to PHP! (It's callable from Java and other languages too.)

After some reading of web sites, some consulting with the books I have on hand, and a little bit of thinking, I was ready. I took the static web page, pulled out some text strings, processed the string file with the gettext tools, added the logic in the web page to call gettext, and tried it.

It doesn't work.

I've checked that files are present in the proper directories, and contain the correct (or so I think) PHP commands. It seems to fail to find the messages.mo file.

Blah!