Ranting on Relation
2007-12-08
Relational database have some serious advantages. They are relatively (pun intended) easy to design and understand, don’t require you to know exactly how your data will be accessed after it is designed and implemented, don’t enforce single points of entry to your data, and lend them selves well to declarative languages like SQL allowing them to be heavily optimized without the end user caring much about the optimizations.
Unfortunately they are not perfect. When paths of access are well known they tend to be slower than other storage methods like object oriented databases or hierarchical databases. But there biggest problem is that they can only store data. Relational database don’t store behavior with any sense of ease or finesse. I wonder of self’s idea of slots could be applied. If a column could store a value or the result of some behavior with out the end user knowing or caring it might solve some of the problems I have with relational databases.
A Buisy Little Duck
2007-12-07
I have not posted in a while. I have been a busy little duck; working at a new job with great people who insist in keeping me occupied.
I would like to take a, somewhat drunken, moment to ponder duck typing. Can you have object oriented programming with out it? One of the core foundations of OOP is encapsulation. If the user of the object needs knowledge of the object they are using doesn’t that break the sprit of encapsulation? Clearly it breaks polymorphism.
Oh well. Off to bed this little duck goes.
The Power of Semantics
2007-11-08
Most programming languages suck! It’s true. The designers of most languages can’t get there heads stuck out of the procedural sands. They still think in terms of functions and structures. The power, and the problem, is in the semantics. There are numerous examples of how language semantics, or the absence of them, can cripple a programers productivity and mind. The lack of a cascade operator in most (so called) object oriented programming languages is one of the.
A cascade operator is a operator that allows you to group numerous actions to a single item while only addressing that item once. The lack of such a simple operator in most languages means you must individually address an item each time you want to perform a single action. This encourages some bad practices. For example in Smalltalk “;” is the cascade operator. You will frequently use the cascade operator when initializing an object and giving the object what it needs to be useful.
SomeObject new
firstValue: aNotherObject ;
secondValue: somethingImportant;
thirdValue: iNeedThisToo.
In PHP, a language that does not have a cascade operator, you might do the following …
$someObject = new SomeObject();
$someObject->firstValue($aNotherObject);
$someObject->secondValue($somethingImportant);
$someObject->thirdValue($iNeedThisToo);
Or you might do …
$someObject = new SomeObject($iNeedThisToo,$somethingImportant);
$someObject->firstValue($aNotherObject);
$someObject->secondValue($somethingImportant);
The Smalltalk example encourages a programmer to think of objects as discrete encapsulated units while the PHP example encouraged programmers to think of object as a series of necessary steps.
Of course there are other examples in which I would love to harp on (classes are objects too, message passing, duck typing, minimal language constructs, private members!) but bed is calling. I will leave you with this. If you ever get the opportunity to design and create a new object oriented programming language don’t, under any circumstances, create language semantics to appease existing languages. They will ultimately cripple anyone who uses your creation.
Change is in the Air (and So Is My Friend)
2007-10-23
Rachel, in less than a year you have made a tremendous impact on our lives. You have more honesty and integrity than anyone I have ever met. Amidst all the misplaced priorities of the world you always seamed to focus on what was important, your friends and enjoying this life while you have it. You are the standard in which all new friends will be judged and I am afraid none of them will rise to it.
You will be missed more than you know. We will love you always.
The Smell of Aldehyde
2007-10-15
I used to love doing my own chemical color development and enlargement. There was something peaceful about the dark. Just me alone with, smell of chemicals in the air, the glow of an enlarger, the sound of the drum rolling, and the excitement of pulling the wet enlargement out of the drum, it seeing light for the first time.
But than is became a chore. I had to do it. It was no longer peaceful but a smelly rushed obligation to achieve a product. So I gave up entirely. I stopped taking pictures. I let one of the most enjoyable things in my life disappear because an aspect of it became unpleasant.
I evenly bought a digital camera. After years of spouting pro-chem propaganda I gave in and acquired a camera with a screen. It’s sad that I left behind a dyeing craft but my life is better because of it.
I still miss the smell of aldehyde.
Phaux has vanished.
2007-10-11
So I did a search for Phaux today on Goolge and discoverd that Phaux is no longer listed in any search results. I can’t find it no matter what the search string.
Oh well, Phaux needs a website so maybe this is the kick in the butt I needed.
Method Categories In TextMate
2007-10-09
One of the things I miss most about Smalltalk is method categories. For those who don’t know method categories are a way to organize methods in a named category (just as it sounds). TextMate supports function folding. It allows you to click on the gutter next to your method and the contents of that method fold up staying out of sight. You can leverage this behavior and fool TextMate into categorizing methods. Create a comment before the group of methods that looks like
// Render Methods {
Than after the group of methods you want in a category add
/* } */
Now you can fold up that group of methods as one unit.
Would DOM Manipulation Spell Doom?
2007-10-02
Currently Phaux follows the same pattern that Seaside follows when it comes to rendering output. The HTML is not persisted on the server. The entire view is re-rendered after each request. AJAX is implemented by telling an element, in the render step, that it needs to call a specific render method. The render method can be triggered and replaces some content on the page. The callback pass can not directly manipulate the view because it has not been generated yet. Even though the “controller” and the “view” are in the same class they are abstracted because of this. It has some advantages because view state must be kept in some intermediate place like an instance var and not directly in the view.
What if the view was stateful as well? If the controller could and did update the view directly? What if all rendering was done with DOM compliant calls on the view and after each pass the programmer could decide if they wanted to re-render the entire page or just make the needed AJAX calls (or even just update the page with JS DOM calls). I can’t see a way to do this with out greatly hindering reusability but there should be a way to make AJAX and client side DOM seam a little more natural.
Keep Your Beaker Away From My Kitchen
2007-10-02
Cooking is not science!
Ok there I said it (well wrote it). It’s not entirely true. Yes cooking is about discovery of flavors and a lesser number of techniques. But it is not testable, verifiable, systematic, nor can you have all but a cursory knowledge of it by reading a text book. Just because you can make a foam from whirled peas does not mean you should. That is not cooking that is pretension on white porcelain.
Cooking is about the love for food, flavors, smells, shopping, and tasting everything. It’s about the pleasure you get from eating a meal you took hours or even minutes to prepare. The fact that you gathered the ingredients, prepared, tasted, and loved it from start to finish make it taste even better than if someone else had made the exact same thing.
So please, do your self a favor, touch, taste, smell, and put away that cookbook.
Phaux is Phreaking Phat
2007-10-01
Phaux has matured to the point where the core functionally is all there. That means I have been able to spend my time adding features that make you go “neat”. The development inspector get a Smalltalk style workspace. Allowing you to input arbitrary php code and have it run in your object’s context (at least it makes you think that is what it is doing). This should improve the process of debugging, allowing you to easily manipulate your components in an active session.
Phaux also got a Lightbox style dialog. Any dialog can be called with a model decoration and it gets the lightbox style. Because it’s implemented as a decoration fancy AJAX is simple too. It was amazingly simple to implement.


