Recent blog entries by huge

Weird: On Monday, I posted my entry on Meerkat. Then, at the end of the day, it seems that the source code was not available so Meerkat was a lot less interesting. So I tried to update my diary entry, and do a preview. It take so long to preview that I finally gave up. Then, today, I log in to post a comment on one interesting thing I saw in the newspaper (see below) and when I log in, I was redirected on the entry I was editing with all my modifications available !! Groovy !!! But ... when I posted the edited comment, it appears as a new comment ! Is there a bug ?

info vs. man: No opinion. I use lots of man because I'm used to and don't use info because I don't know the keystrokes :-). Uh, and I like the search in man because you can search on the entire man page at a time. Other than that, I don't know enough man and info to have an opinion on them.

Rulez !!! I think I just found the RSS reader I was waiting for : Web-based, open-source, perl based if possible (don't know PHP, Python or Ruby) and ... read the news by date : last posted articles/blog entries. This was the killer feat I couldn't find on most of the RSS reader and which (IMHO) is the one reason you would use a RSS reader : to save time.

I was thinking about this : why most of RSS readers/aggregators don't allow you to read the feeds by date ? And I think this is because some RSS version (0.9 and 0.91 and maybe 1.0) don't have date/time on entries. And so, the only way to have date/time on entries when you don't have them is to poll the RSS frequently (< each hour) and fetch the new entries on a database, add the date/time of the fetch and sort them after that. Which means a pretty heavy system. I eventually came to the conclusion that I need to build one by scratch with all this overweight. Now I think I will try Meerkat before ...

I don't have a O'Reilly Account now so I don't know if I will create one or install a copy of Meerkat on my PC but I think I will use it.

This is very cool because I just solved my bug on my HTML/CSV/Excel library on IIS/ASP at work. The aim of this library is to output 2-dimensions data in HTML file (table), CSV file or Excel file (with the Spreadsheet::WriteExcel library). You feed in the formats of the columns (name of the column, size, data type for Excel pretty formatting, etc) and the data and automagically you got the file with the right format. This is useful when you have a listing to display to the user on a Website and want her/him to be able to download it in CSV and/or Excel. You just have to build the format, write the subroutine which will output the data and plug it in the library, and voila.

The library is able to write the data to a file. It can also send the file to the user on a website with Content-Disposition: attachment; filename= ... It can handle CGI (with "print" statement to output the header and then the content) or Win32::ASP (with $Response -> AddHeader ).

Here was the bug:

Everything was working fine on CGI/Apache/Linux. CSV and HTML were OK for ASP/IIS/Windows. But it was not working for Excel files on ASP. No error message, just an empty file. I guess it was a binary/text problem because CSV/HTML worked and a quick test show me that local file writing on the server worked.

Here is the solution:

I began to search on the
Perl Script Introduction and see this useful code snippet on BinaryWrite. Not bad but this is useful when you had your data in a scalar. Unfortunaly, Spreadsheet::WriteExcel just write to files or "-" to output on STDOUT. The "new" method help had some useful information on CGI interfacing or mod_perl but nothing on ASP. But the answer was in "filehandle.pl", in the example 4. In this example, you can map a scalar to a file handle.

So, if I can get the output of Spreadsheet::WriteExcel in a string, turn binary mode on and output it to the browser, I'm in. Should work, in theory.