Why I Created DBRows

by Szymon Lipiński tags: programming python

Some time ago I was using the Records library. When I searched for some comments, I noticed only good reviews. The main goal of this library to simplify things. It’s a proxy to the SqlAlchemy library.

The only thing I was no impressed with was the library interface.

After some time of using it, I got the feeling that the interface is not good enough. It looked rather like some random ad hoc bunch of functions put into classes.

So I have decided to implement my own version. Mainly to find out if it is possible to create the kind of interface I described here.

That’s why the DBRows Project has been born.


Good Python Interface

by Szymon Lipiński tags: programming python java

In the previous blog post I wrote about changing interfaces using a Java class as an example.

The public interface of the final implementation was:


    (int, int)

    getWidth() -> int
    getHeight() -> int
    getArea() -> int

There were no public fields, all were accessible with the setters and getters.

There was also a C# example with the properties. This way I had the public interface like:


    (int, int)


    int width
    int height

Because of the properties those fields were also writable.


Good Naming Things Is Hard

by Szymon Lipiński tags: programming python java

Naming things is hard.

Usually when we are going to have a brand new kid, naming her/him takes a couple of months. The endless discussions, the sleepless nights, all the lists of possible combinations of letters (just assume only letters for now). And all the effort just to achieve something that would sound nice to us. And only to us, as usually the grandparents of that brand new family member will not be happy with our choice.

The normal baby delivery date is quite far in the future, so usually we have lots of time to think about the name and the possible problems the kid will have when naming like Donald Trump Otieno or like this:

delete from users