The answer to “Why Not Python?”

Collin Park has written an article in four parts (one, two, three, and four) titled “Why Not Python?”. I’ve read through the first couple of parts and scrolled through the rest.

In all that text that passed in front of my eyes I haven’t found the answer to the question. I guess, it wasn’t actually the question after all then.

Well, in case you read asked yourself “Why Not Python?”, I’ll give one of the possible answers. Because it is too complicated. Python might do OK as the first progarmming language for those of you who want to learn programming concepts. But if you have a problem at hand that needs solving, Perl is the way to go in most of the cases.

Example. Collin Park uses the Sudoku game solver as one of the examples. Fine task. Nice one to learn how to program too. But if you just have a Sudoku game to solve (or a few for that matter), than it would be much faster to do it in Perl. Here is how.

  1. Navigate your browser to search.cpan.org.
  2. Type in “sudoku”, choose “Modules” and press “Search CPAN”.
  3. With this particular example, any module from the search result can be used. With other examples, you want really want to review the module description (one line that says what module does). So, this step is, choose the one module that seems to be appropriate for your problem.
  4. Install chosen module, by running cpan command from root shell and typing in install module::name (substitute “module::name” with the name of the module you chose in the previous step).
  5. Run perldoc module::name to see module documentation and example of used.
  6. Copy the code from SYNOPSIS are of documentation in your favourite editor.
  7. Save the file
  8. Run the script

Tada! You’re all done.

If it takes you more than 15 minutes, chances are – you are doing something wrong. Of course, your mileage may vary, but 15 minutes is somewhere near the lighthouse.

The Lockdown

Starting from today, we’ll be on permanent home lockdown. Gone are the times, when our front door was open day and night. Never did we lock it no matter where we were – inside or outside. But that is gone. At least for those times when we are inside the house.

Sound weird to you? Well, the reason is rather simple. Maxim learned how to open the door and how to walk of it. He did it by accident yesterday. Today though he does it with more comfort and confidence than Olga and I combined. It almost looks like he installed this door himself.

So we’ll have to lock the gate the outside world. He can still watch it through the windows. And he’ll figure out the computer is connected to a global network pretty soon. And when there is a world at your knees, who needs to go outside?

Managed dedicated hosting anyone?

If anyone of you guys knows of any good hosting company that offers managed dedicated servers, now is an excellent time to let me know via comments or the contact form. So far the best I’ve found is XLHost.com . I am also talking with Rackspace.com, but something tells me that they will be a bit too expensive – not that I am jumping to conclusions here though.

I’ll need two servers to start with. I might grow up to anywhere from 6 to 20 in the next 6-8 month. Servers should have fast processors (3.0 GHz is ideal). Better even if they will be duel CPUed. 2 GBytes of RAM should fit me fine. I am not yet sure about the storage. I know that it has to be SCSI and that there should be at least 40-60 GBytes of it. Maybe more. I’ll have better numbers later. I will also need a lot of bandwidth. Both incoming and outgoing. 20 GBytes per month is the red line minimum. 200 GBytes per month is something I feel more comfortable with. 2 TBytes will make me smile one extra time.

Software-wise, I’ll need a Linux-only setup. Fedora Core 4 is preferrable, but anything Red Hat labeled should do just fine. I’ll need MySQL 4 or above, perl 5.8 with A LOT of CPAN modules that I’ll need to install myself, python 2.4, and a Subversion client.

What do I want from the hosting company? Well, I want my servers to be available 24×7. That’s the main requirement. Then, I’ll need their help with backup configuration. I’ll have a large MySQL database to backup and a lot of small files (think mail spool and proxy cache scale). Also, I would expect them to manage security updates and fixes for all the servers – I’m really out of time to keep up with that right now.

An additional strong wishlist item would be a LAN interconnecting all my servers. I’ll have a lot of traffic between the servers and I don’t see any reason why I should pass it via a outside network, where it is slow and expensive.

That’s about it.

Oh, the budget line? Let’s say anything within $300 USD.

Are you still with me?