Archive for the ‘Uncategorized’ Category

highlighting in the console

Thursday, February 8th, 2007

One of the unit testing tools (Testeez, to be more precise) is a bit too verbose. It displays not only the failed tests, but also the passed tests. When the number of the tests is big, it’s hard to find the failed one. Therefore, I decided to highlight them in red.

(more…)

mysql statistics

Saturday, January 27th, 2007

Found an useful command: “SHOW STATUS” or, depending on the mysql version, “SHOW GLOBAL STATUS“. Of some interest also “SHOW VARIABLES” (or, correspondingly, “SHOW GLOBAL VARIABLES“).

(more…)

the essence of functional programming

Wednesday, January 24th, 2007

I’ve transcripted the code examples from the paper “The essence of functional programming” by Philip Wadler.

(more…)

Learning Haskell

Wednesday, January 17th, 2007

The main problem of learning Haskell is the very beginning, the first step: to write a working program, which
* as small as possible, and
* more than just print “Hello, World!”
(more…)

Lexmark isn’t printing

Tuesday, January 16th, 2007

After returning from holidays, I found that printer doesn’t print anymore. After some investigation, I found that dmesg contains:

usb 2-1: new full speed USB device using uhci_hcd and address 7
usb 2-1: device not accepting address 7, error -71
usb 2-1: new full speed USB device using uhci_hcd and address 8
usb 2-1: device descriptor read/64, error -71

(more…)

Saint-Peterburg. No bears, just beauties

Wednesday, December 27th, 2006

In streets of Paris, Amsterdam and London have appeared billbordy with an inscription “No Bears, just Beauties”, advertising St.-Petersburg as a tourist direction. I like the screenshots: 1, 2, 3, 4.

xslt 1.0 code isn’t reusable

Wednesday, December 13th, 2006

I’m building an XML site. One of the common tasks is to get a book by isbn. I needed 4(!) attempts to get it working!

(more…)

terminology

Saturday, December 9th, 2006

I can’t remember what is what, so writing it down:
* orphan: line at the bottom, the rest on the next page
* widow: the last line at the top, the beginning on the previous page

Word to HTML

Friday, November 24th, 2006

I got an HTML export from Word. The HTML code was very ugly and, what’s worse, confused the site where I wanted to submit the text. I failed to refine the code with tidy, therefore wrote a quick Perl hack.

(more…)

Consodoc is released!

Wednesday, November 8th, 2006

Hard to believe, but I forget to release Consodoc after the two-week beta period. Yesterday I read the announce of the new version of SCons, 0.96.93, and decided to close the task as soon as possible. Today I’ve tested Consodoc with the new SCons and announced the software.

(more…)

Google Co-op and windows-1251

Friday, November 3rd, 2006

Google Co-op is a service that allows to create custom search engines. At the moment, it officially supports only English, but it seems other languages work as well.

(more…)

messy Perl code

Tuesday, October 17th, 2006

I download my mail using fetchmail. During the process, “tail -f” shows the subjects of the incoming letters. Unfortunately, most of them are unreadable, something like “=?windows-1251?B?0e/g7CDt4CBwaHBCQg==?=“. Finally, I tired of it and decided to make life better.

(more…)

use “perl -w”!

Saturday, October 14th, 2006

I thought “use strict” is enough and didn’t try to run an application with the “-w” flag. (Don’t blame me, it was under Windows.) As result, I played ping-pong with an user trying to identify an error instead of preventing the error.

(more…)

joining entities

Wednesday, October 11th, 2006

XML tools are good when the input data is XML. And they are awful when the data is XML-like. As result, instead of using “xmllint –noent“, I had to write my own entity substitutor “entity.py”.

(more…)

XString: XML as String

Sunday, October 8th, 2006

In xml-dev mailing list, William Gilreath posted an preview announce of XString, an XML technology “XML as a String”. I found time to look at the paper and write comments.

(more…)

RentACoder conditions

Thursday, September 28th, 2006

A copy of RentACoder terms of work between the buyer and the coder.

(more…)

printing batch of source code

Sunday, September 17th, 2006

I want to analyze an open source application by reading its source code. I don’t like reading from the screen. Instead, I’d like to print the code and read offline.

(more…)

recursive sync of only html files

Sunday, September 17th, 2006

I’ve figured out how to combine include/exclude options of rsync to upload only HTML files:

rsync -n -a -v --exclude '.svn/' --include '*/' \
--include '*.html' --exclude '*' src_path dest_path

scons bug

Wednesday, September 13th, 2006

After the libxml/libxslt bug session, now it’s time of SCons: dots in file name, then suffix rules failure.

libxml/libxslt bug session

Monday, September 11th, 2006