Object Database In Python - Day 2

16 Aug 2008 16:12

Hello again,

as pointed in the previous day comment, there is another IDE for developing in Python, which is BoaConstructor. As a matter of fact, I haven't taken that into consideration, because it was told it is a IDE for GUI development. As I was not about creating a GUI, this was completely skipped.

My impressions of the IDEs:

  • pida, geany, drpython — interesting, but not worth a try for me
  • eric — good overall, but raises many dialog boxes with information of exceptions. These are fatal and are about the GUI, so you have to click OK and continue working

I tried the Eric first, because it was written as a really good program. I like it, but it is not polished and would never be bought (if commercial) by anyone:

  • the support for SVN is really tricky
  • the GUI is really not intuitive — no "delete a file" or "new file (here)" in the navigator context menu
  • the code completion is there, but not really so clever

for example, having the following code:

class aClass:
    def method(self, param):
        assert isinstance(param, list)
        param.

the IDE should know, that the param is a list and complete the list methods! I believe the PyDev plugin for Eclipse already did it when I last used it.

After trying all the listed IDEs I got back to Eric as one of two best Python IDEs tried by me (the second is PyDev).

Happy Pythoning
Your Piotr

Comments: 1

Starting Work On Object Database In Python

15 Aug 2008 10:08

Good morning everyone,

today I start working on object database to be implemented in Python. This is my individual project for my classes.

During the study-year I was taught how to parse sophisticated grammar with PLY (Python Lex and Yacc library). I've then learned how to then process the parsed queries, to get the results.

The database query language is similar to the SQL language. The difference is, we don't have definitions of tables and fields. Any object (row in table) can have fields other that other objects with the same name (of the same table).

This seems quite hard, but it has its pros.

Moreover we've analyzed the following query using the simple parsing and processing:

SELECT employee.salary WHERE employee.salary > AVG(employee.salary);

now, having as much as 10000 employees, using the standard processing, this would mean calculating the average (AVG) from ALL salaries for EACH of the 10000 employees.

So the teacher proposed to use tree decoration, to mark the branches of the query syntax tree, that can be run once (i.e. their value does not depend on the rest of the query).

I proposed to do it other way: to don't analyze the tree to much, but instead implement a sort of caching. Each time we try to get the AVG(employee.salary) we check whether this was already calculated, if not (only the first time we get the AVG), we calculate this and populates the cache with the value.

This has the following pros:

  • we can use the cache in successive queries
  • we don't have to decorate query trees — it's not Christmas here

Today work I start with selecting a Python IDE to work with. During the classes I used PyDev — the Python plugin for Eclipse IDE, but I believe there any many new choices out there now — after a few months:

  • eric
  • pida
  • geany
  • drpython

(all from Ubuntu default repository)

More IDEs I found with Google:

Comments: 2

More Juice

07 Aug 2008 14:12

Hi, today we've put more juice to Wikidot.

Here is automatic reflection generation:

wikidot-grass.png

Wonder how?

[[embed]]
<script type="text/javascript" src="http://static.wikidot.com/common--misc/reflection.js"></script>
[[/embed]]
[[div style="background: #444; padding: 20px; overflow: auto"]]
[[div style="margin: 0 auto; width: 400px"]]
[[image http://qn.lastlook.pl/~quake/wikidot-grass.png class="reflect rheight32 ropacity40"]]
[[/div]]
[[/div]]

We've also added many new video services to Wikidot (through [[embed]] tag) and more…

Comments: 3

Why Wikidot Rulez

04 Aug 2008 14:39

Have you ever wondered why Wikidot rulez?

You could say, "hey, there is much more other wiki hosts out there, why should I use Wikidot?"

Wetpaint look quite nice, but has anoying Google Ads everywhere. (I've read, they have $40 million capital).

Wikia has the strange permission thing — if you post anything, it becomes their property.

PbWiki didn't allowed me to upload HTML file like this:

<html>
<head>
<title></title>
</head>
<body>
abc bac
</body>
</html>

It claimed, that this is a spam and disabled file upload for 15 minutes for all pbwiki sites!

In the contrary Wikidot has many friendly features1 and have a totally different ads policy. Actually, they let YOU earn with their service. If you wish to display ads on your wiki, you get as much as 80% of what Google pays for them.

Wikidot rules, and has everyday-growing community, with their masterpiece wiki at http://community.wikidot.com/.

Comments: 0

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License