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!

Thursday, July 30, 2009

Start-up opportunity

I met with Ben A. and discussed his start-up opportunity. He has an interesting idea and I need a little time to get things sorted out in my head. (I won't discuss details here.)

We talked for about two hours, reviewing his plan and some of the technology that is necessary to make it happen. It is certainly reachable with technology; for me the question is will it succeed in the marketplace?