Wednesday, November 30, 2005

Pat 0.4.1 Released

Twenty minutes ago, I realized I forgot to update Pat today. So, I fixed a small bug, and released a minor update that allows column-column comparison clauses. I added unittests, made sure it all worked right. It does. Another day, another release. At least until Pat reaches maturity for my purposes, I'll keep this up.

Tuesday, November 29, 2005

Pat 0.4 Released

Following my "at least one release a day" pattern with Pat, I've released yet another version. Version 0.4, which supports multiple chained select calls, easier selecting by passing multiple Clause and Column objects in any order, and more, is now available at the cheeseshop.

Monday, November 28, 2005

Pat 0.3 Released

What a busy weekend. I wonder if it was worth it. I spent most of the actual weekend working on my sub-project, Pat. It works very well now, and with only a single more release, I'll move back to Involgo, which will be using Pat to manage its SQL more cleanly.

Three releases in just over thirty hours. That's a record for me, but I may have wasted my weekend. A few hours after releases Pat 0.3, I caught a blog entry by titus mentioning something called SQLAlchemy. It seems to be pretty much what Pat would become, if I put a lot more work into it. It includes things like joins and seems a mix of my model and the basic Python dbapi, with execute() and fetchone() methods.

It makes me question things. Have I broken the TOOWTDI rule? Did I waste those thirty hours? Should I continue with Pat or put her to rest in favor of a more complete solution?

If I had spent the same amount of time learning SQLAlchemy, would I have gotten to the point with it that I am now with Pat? Also, I don't know if it uses pysqlite2 or the sqlite module, where I requre the prior. I will have to look into this other contender and decide my course of action. For now, I should probably sleep. I should have done that hours ago.

Sunday, November 27, 2005

Pat 0.2 Released

A very busy day I've had. Started on Pat, my little database module, and I've made two releases already. It can now generate table creation queries, can select individual column names, define tables by subclasses Table, do updates and more. It still has some major limitations, like it only can match columns by equality.

The next release should move from the keyword interface to passing things like UserTable.username=="Bob" or CustomerTbl.customerForYears>10. It will also support deletion of rows (which I just forgot for this one, oops) and default column values and specified text lengths.

As it is, it should prove useful. It can already do enough for my current purposes. Hopefully, someone else will find it useful. Let me know if you do. If not, let me know why!

Pat 0.2 Release at the Cheeseshop

Saturday, November 26, 2005

PAT, Python's Easy Tables

I started to get a little tired with SQLObject. Although it is nice for most uses, it can be overkill and can be difficult when you dont actually want an ORM, but just a better way than writing all of your own queries. So, I looked around, couldn't find a simple table wrapping module, and wrote my own. The result is Pat, which stands for "Python's Easy Tables".

Pat is very easy to use, but still pretty rough around the edges. It is very much a prototype, but as they say, "Release Early, Release Often", so I'm doing that. I've registered the project at the cheeseshop.

What it Doesn't Do:
  • Create tables
  • Verify integrity
  • Bake cookies like Grandma makes
  • A lot of things
What it Does Do:
  • Represent named tables with python objects
  • Allow you to table.where(id=5) to select rows
  • Allow you to T.where(id=1).update(name="One")
  • You can string multiple where calls and end with an update and only trigger a single query, as all the where clauses are combined. No query is done on a select until you actually iterate over the returned Results object.
Project Page
Pat 0.1 (source)

Please, send me any bug reports, comments, complaints, etc.

Friday, November 18, 2005

Move away from Blogger and Blogspot?

I've settled in nicely to this blog. I disliked Blogger at first, as it seemed oddly limited, but I dealt with those limitations and I hadn't cared about them for a while. Now I do, again.

I've been messing around with an account on blogsome.com, which uses the popular WordPress blog system. I like it. It seems a little less intuitive than Blogger sometimes, like not being able to explicity order links, or edit my templates directly. But, it does allow for catagories, which is the big thing I don't like missing from Blogger.

I have a meager, if existing at all, group of readers. So I guess I'm not abandoning much. I'll give this some thought and do some more testing with blogsome. If I make the move, I'll probably run my own WordPress server from home. We'll see...

Thursday, November 17, 2005

Improving the Self in a Structured Manner

Self, version 2.0
The Multiple Self
The Refactored Self (part 1)

These three posts are wonderful. The ideas are solid, and I've found most of them to be true on my own before finding them put to such great description and clearity. Moving in the direction of being more agressive with this would be a good thing for most of us.

About Me

My name is Calvin Spealman, and I am known in online forums as "ironfroggy" and in gaming circles as "NeverDead". I am an amature programmer, trying to get my foot in the door of the industry with my own start-up. This blog is largely a journal of that quest, and other tech-related postings.

I develope primarily in the Python programming language. My work is database and web related. I also do some minor work with Visual Basic and Microsoft Access and Excel, to make my "real job" easier.

Aside from the technical side, I also have an artistic flare. You can see some of my art on my DeviantArt page. I also have a second blog for political commentary, media reviews and quips, and things that just don't belong elsewhere.

Wednesday, November 16, 2005

People are Security Flaw of the Network

Today I grabbed some papers from the printer at work, looking for something I was waiting on. There were only papers for a co-worker, so I took them to her (as is customary at work). The first thing I saw when I looked to see if it was mine, is that the e-mail contained a username and password for a user on the corporate network. The user wasn't even one that seemed to be included in the e-mail. Even worse, it was a multi-recipient mail to many clerks from a supervisor. The SAs would have a damn fit if they saw that. No matter what security measurements they might take, people will still e-mail other people's passwords, which they shouldn't even have.

Selfish Sharing

Robert Kieffer and Ned Batchelder sparked a discussion that has interested a good many people. They were discussing the sharing of information we work to provide and the selfishness of keeping one's self as the only source and control of information that we share to everyone. Selfishly sharing information: what does it mean?

A good example is that I'm posting this article instead of just commenting on the page like everyone else. Of course, those comments aren't this long. So, I'll convince myself I have some justification. Why do I need to justify these actions to myself?

Many of us have websites. They are a bit of a status symbol these days, and something anyone can create. But, a site that is important can not be created by anyone, it can only be created by everyone. Only in the value of the audience do we feel a real value for our own websites and the information we provide within them.

So, although we want to give the content away, we want to keep close hold on the credit. We want everyone to value the content and to know that we were responsible for its creation and for its continued availability to them. As long as the content remains on our websites, we have value in the value the audience holds in our website.

Where does this leave projects like Wikipedia and more focused efforts like the Python Wiki? Although the spirit of sharing urges us to combine our collective content where everything can be found together, we are greedy for self value. We may even make such meager claims such as, "Google pulls the information together as well as a wiki", in order to justify our actions of keeping our content out of the wikies.

(what is the plural of "wiki"?)

The first thing that springs to my mind when pondering it, and the first thing that I thought of when reading the post on Ned's blog, is, "why do we need to make this distinction and this discission at all?". Content may be served from multiple physical servers, and available from multiple logical URIs, but why does this entail that it must be acredited to one person or organization for each source we can obtain it from? Why do we have to have such a hard line between our site and World Wide Web? The WWW was meant to be a sharing of information, and many people say that the Wiki is the heart of the spirit of the web. But people need some value in both the obtaining of information and the free distribution of information to others. It has to work both ways, and as we know, what each is giving must be worth less to that individual than what they get in return.

What I am getting at, is why can't Ned's Python Parsers page exist as both a page on his website and as a page on the wiki simultaniously? I won't go into implementation details, but he should be able to write the page on his website, and then submit it as a page on the wiki. If anyone wants to make changes to the wiki, they can. If we wants to merge changes in from the wiki, he should be able to. If he makes changes while his and the wiki-version are synced, they should show up on both, otherwise he or someone else might merge them in some semi-manual manner.

In any case, this would all be through good standards. There would not be any central servers involved. Neither individual or organization would have to do anything manual unless they themselves are changing something.

If we want to truely share, why do we have to give it away? Is it really sharing if we ourselves can not share in all of the value. Sharing by putting the content into something like a wiki allows everyone to share in the value of obtaining the content, but there is a lack of balance in the value of providing that content to those who would wish to obtain it.

We must share both the value of the content and the credit for that content.

Monday, November 14, 2005

Decoupled Designs and Modularity: Do they get in the way of the job?

So, I've been hacking away at Involgo as regularly as I can manage. During this prototyping phase, I'm just implementing everything in pure python objects and using the cPickle module for persistance of the database (or store as I call them in Involgo). I'm reaching the point where I want to move from this to a more robust backend, most likely using SQLite to store all the data.

This leads me to two related issues: I don't want to break the pickle code, because it may still be useful, mostly for in-memory, never-persisted stores that could be useful. And, I may at some point move to something other than SQLite. So, it seems I should decouple the backend that stores the data from the interface to the store, and everything else in the project, as much as possible. This is taking some time, both in design and implementation.

I just begin to wonder, when am I spending to much on good design and not enough on actually getting the work done, because I want to make sure its done right? What good is it to plan how to do it just right, if the work isn't getting done?

Sunday, November 13, 2005

Pandora Impresses Me Again

Pandora, which I have written about before, does not cease to impress. Aside from an ever enjoyable experience, they really seem to listen to their users. I was thrilled to have the first comment on my blog be from none other than Pandora CTO, Tom Conrad. Nice way to make those early adoptors feel welcome.

I was even more impressed when I received an e-mail from Tim Westergren, Founder of Pandora, announcing the new Pandora 2.0, which is very nice, and has a lot of great improvements over an already wonderful system. What impressed me was the generous upgrade of my three month subscription to an annual one, free of charge. Wow. I only did a quarterly subscription because my trial ran out, I hungered for more, and I don't like to spend too much money without saying something to my wife.

My only fear is that as Pandora grows, this kind of personal touch will be lost. It is nearly inevitable, but how can any growing company continue to live small to the people?

Now, if only my speakers hadn't broken.

Wednesday, November 09, 2005

Linux Driver ABI Stability

There has been a spark unleashing flames across many blogs, slashdot comments, mailing lists, and forums. Everyone is abuzz over the issue of the Linux kernel's ABI for device drivers.

The current Linux kernels do not define a stable ABI. Between releases, small tweaks to drivers are often necessary to keep up with little changes in the interface between those drivers and the kernel core. This means that every driver must be compiled for exactly the same version of Linux, and it makes for a difficult situation for hardware developers, who want to support Linux.

Now, everyone has something to say about it and no one seems pleased. Either you're outraged at the very suggestion of allow binary drivers to work reliably without releasing source code so customers can recompile their drivers with every kernel upgrade, or you can't possibly comprehend how anyone finds it a bad idea for manufacturers to be able to develop one binary driver they can release with their product and know that it will work when the user plugs in the card and copies the driver over.

Well, there are some points on both sides. While it is true that it violates the GPL to distribute binary only drivers with the Linux kernel, we don't have to distribute the drivers with the kernel. When you pick up a cheap Ethernet card and open the box, do you know what's on that little disc thingy? Drivers. We don't have to distribute drivers for every known hardware with every release of the kernel. Besides, I'm tired of downloaded ham radio drivers over and over. I never use them.

What baffles me is how no one seems to grasp the simple concept that if it is illegal to distribute them so, they won't (successfully) do so, without a battle they'll loose. That leaves the only benefits all for the users and kernel developers. The users will have better hardware support, and be able to get cousin Mindy to try Linux, finally. The developers can stop redeveloping drivers for devices that already have drivers, but for whatever reason do not have (good) Linux drivers, and they can then focus on the kernel itself.

Everyone wins with binary ABI stability. While we're at it, maybe we can get the ABI implemented in Vista and OS X, but with the best native implementation in Linux, of course.

A key thing to remember here is this: users do not want to recompile anything. Period. Source is nice to be available, and I think it should be, but source should be the option, not the necessity.

Tuesday, November 08, 2005

Second Blog

I and a friend have started a new blog, Mental Outlash. This is where I'll be posting non-tech stuff, such as my political commentaries, media reviews, and anything else along those lines.

Python Equality, Comparison, and Hashing

There has been a lot of talk on python-dev about the behavior of the default __eq__ and __hash__ and the comparison of objects, specifically with the concepts of "Identity Objects" and "Value Objects".

This brings me to think about something I've pondered, and I'm sure has been discussed before: does a programming langauge have to compare apples and oranges? Perhaps it is a historical artifact that everything can be compared. When everything is just a representation of byte patterns, everything can be compared numerically, but this doesn't always make sense for what is being compared. Boolean logic is tied into nearly every computer langauge, so that everything can be considered true or false. Well, what about raising an exception on 1=="1" instead of just resolving to False? How about denying a conversion of an object to true or false, where it has no logical boolean equivalent?

Why does everything have to boil down to black or white?

Monday, November 07, 2005

Repetitive Information Injury

I read, tagged, and blogged about RII, a restult of NADD.

I quickly realized that I am a sufferer of this condition. I waste many nights that could have been spent working on something, because I do just what this article describes. I don't have much to say about it, just read it, please.

Friday, November 04, 2005

GPL 3.0 Will Highlight the FSF's Misdirection

The drafting of the GNU General Public License's second major revision is to begin in the near future. This third version will be good for solidifying what the GNU Project, the Free Software Foundation, and Richard Stallman, the man behind it all, truely stand for in the area of software users' rights. The next revision will be good for the FSF, but bad for nearly everyone who uses their license.

The GNU GPL has four main clauses, if you look at it in a simplified manner.
  1. The right to use the software for any reason
  2. The right to my copies of the software
  3. The right to modify the software
  4. The right to redistribute the original or modified versions of the software
Number four is pretty much the gotcha for most people. It is what keeps many companies, who are interested in open source and free software, away from using the GNU GPL, and sometimes for releasing source code at all. Who wants to release code to a community who think they should have the right to pass it along to those who did not pay for it?

This last clause is the one I've always had trouble agreeing with. I think I should be able to make copies of software, if I have a desktop and a laptop, for example. I should be able to use it for anything, because if I bought it, that copy is mine. If they want to limit the warranty to certain uses, that's OK, but they shouldn't limit me to certain uses. There may be something I don't like about the software, or maybe I don't entirely trust it. In either case, I should have the option to see and modify the source code, to ensure I know what it is doing, or that it is doing what they say it is. But, they worked hard making that software and need to make a living to feed their families and pay off that house, so what right do I or should I have to say to my pal, who wants a copy of the software, "Sure, I'll send you a copy. Don't worry about buying it for yourself!".

I believe the forth clause is a mistake, not only in that Richard Stallman keeps it in there, but that he brought it into the license in the first place. There is some history behind this opinion that is very important to the issue at hand.

When the GNU General Public License was first created, and back in the days when Richard Stallman was jumpstarting the Free Software movement and founding the Free Software Foundation, the software and technology world was a very different picture. When the first users of Stallman's Emacs wanted to acquire a copy, they didn't download the source or prepackaged RPMs from the FSF website, or their distributions automatic package manager. They wrote him a letter, including a blank data tape and money to return it through post, and Stallman would copy the source code onto the tape and mail it back to them. Those days, I don't think there had to be much worry if someone redistributed your software, because distributing it was so difficult for both you and for them.

What this begs us to ask, however, is, "why is this still a GPL clause and why does anyone think its essential?" All of the other clauses of the GPL are enough. That last clause brings about all the problems. User's should have every right to make their own personal copies, to modify source code, and to use the software in any way. But copyright law is there for a reason, and I want to pay of that new car. Redistribute patches, if you'd like, but developers who can't or won't do it all for free, deserve to be compensated for their work.

And, yes, I know there are ways to make money on GPL software, but it much more difficult and risky. Developers deserve the same kind of per-consumer compensation as creators in any other medium.

The problem with the GPL's new version is that the changes will only strengthen this problem's hold on the GPL. More provisions will be put in place to ensure the users' rights of redistribution and the circumvention of the developers' rights to control the distribution of their own intellectual property.

I know what you're saying, "So, don't use the GPL!" And, I won't. My problem with all this is that many do and will continue to use the GPL misguidedly, and that the GPL symbollically stands for the concept of free software and open source licenses, so this huge error just reflects badly upon the whole community. Stallman may have started it, but at this rate he'll lead the movement to its end in his blindness and inability to admit that, though he had a good idea, he made one or two mistakes in the initial executions of that idea. Idealism is nice when you're ideals are grounded, but dangerous when you follow them simply because they are your ideals.

Rethink what your thought, and always make sure you still know what you're doing.