For me this is obvious. Perl programmers are usually using console a lot. Python programmers also. Java programmers at most not. Windows is lacking good console programs like for example grep (which I use a lot). Unix has a very good console software so in fact using Unixes helps a lot. Personally I use Ubuntu, maybe not exactly a kind of Unix, but Linux console is usefull too. Of course this just one of the reasons for using something other than Windows. For me this is also the quite nice lack of viruses. Continued…
SQLAlchemy Defines New SQL Standard
Dreaming About SQL
Well, I thought that I know the SQL standard a little bit. I also know that there is Limit/Offset Hell in the RDBMS world as each engine implements its own version of limiting records (yea, some brave programmers even implement their own version – getting all records from table and sort them in the application). Today story is a little bit frightening one. I thout that it is just a mistake, but isn’t. Now I don’t know what to think about it.
Posted in database, programming, wtf.
– April 22, 2010
Day Without Spam
Yesterday was the first day without any spam comments here. All blog counters were as usual, the same view count and so on. One day without spam comments, strange. Today everything got back to normal, unfortunately.
Posted in web.
– April 17, 2010
Testing Database – Small Reply
On Ovid’s blog I found lately this entry.
First of all: this is a quite nice writing of something called “modern perl”. Everybody who shouts that perl is a piece of shit should read it. YES, you can write nice looking code in perl. Code that is maintainable and is easy to read. And is objective (a kind of somewhat different langauge syntax but who cares. Each language is different and has different class definitions – consider Ada, Perl, C++ and Python). Perl is not so bad.
Some ideas about the testing solution. Of course this is PostgreSQL
.
Posted in database, programming.
– April 2, 2010
How to Allow For Max 4 Rows in Update (PostgreSQL)
The Problem
Question found on the net: how to restrict users to update only max 4 rows of a table in a transaction.
This looks like a solution to some artificial problem that doesn’t exist, but nevermind, any task should be solved.
The Solution
Solution is simple, there is a trigger on the table. First the table:
create table test (
id integer
);
and some data:
insert into test(id) select generate_series(1,100);
Now the trigger. It is quite simple:
Continued…
Posted in database, programming.
– April 1, 2010
I Hate April, 1
So finally the day came, the first of Aprli, the most f*** day you can imagine. There is no way to read news on the web or listen to the radio. Each news is infected with some jokes/fakes/whatever.
For me this is not funny, what do you think?
Posted in wtf.
– April 1, 2010
PostgreSQL Strange Timings
A very simple query. PostgreSQL 8.4. I have no idea why the simple query is 7 times faster than the EXPLAIN ANALYZE version. Any ideas? Anyone?
test_counters=# SELECT COUNT(*), xtype FROM test GROUP BY xtype ORDER BY xtype;
count | xtype
---------+-------
669000 | A
84000 | B
63000 | D
15000 | E
159000 | G
7866000 | H
1000000 | N
144000 | NI
(8 rows)
Time: 3366,822 ms
test_counters=# explain analyze SELECT COUNT(*), xtype FROM test GROUP BY xtype ORDER BY xtype;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------
Sort (cost=243136.22..243136.24 rows=8 width=2) (actual time=24544.883..24544.889 rows=8 loops=1)
Sort Key: xtype
Sort Method: quicksort Memory: 25kB
-> HashAggregate (cost=243136.00..243136.10 rows=8 width=2) (actual time=24544.838..24544.848 rows=8 loops=1)
-> Seq Scan on test (cost=0.00..193136.00 rows=10000000 width=2) (actual time=0.012..11501.738 rows=10000000 loops=1)
Total runtime: 24544.980 ms
(6 rows)
Posted in database.
– March 21, 2010
Python And Unicode… What a Crap
I was trying to implement something really simple in Python. I wrote a simple script… and there were some errors. Well, after a small research I found that simple len() function doesn’t count unicode characters but count bytes in unicode string. What a crap.
Posted in programming, wtf.
– February 26, 2010












