I've always thought, and this project only assures me of it, that to really learn to do something, you have to put the skill into use - really use it. If you want to learn Japanese, you can read all the grammar and look at all the anime you can, but you can't be fluent until you get yourself to Japan and really talk (and perhaps write) the language with the natives for, say, a year. The same applies to skills like driving a car, playing instruments, cooking, warfare (yes, conducting warfare truly is a skill), ...everything. Not that that dry theory has hurt anyone, but it's only complementary.
Well, thanks to LightFrame and stubbornness, I've got a really big portion of serious usage of PHP, object oriented programming and SQL. I've already commented on the SQL standard and its reality and also shared my opinions of OOP design. Well, after further hacking and stretching the original use intentions of certain features, I've crossed another gripe. I'm not sure if it's again one of those "but it's not OOP", of just a PHP deficiency, but I can't self-destruct objects. No, unset($this) doesn't do anything, doing $this = null gives an error and $this->__destruct() doesn't work that way. I always thought $this was a pointer to the current object, but apparently it isn't... perhaps it's one of those language constructs (i.e. "hard coded features").
"But why on earth would you want to do that?" I hear you asking. The reason is that I want an explicit destructor that doesn't operate through __destruct(). "Ergh... but wh-" ...because I don't want it to happen every time the object is destroyed, only when it's explicitly triggered, and also unset($foo) isn't suitably aesthetic for the context. "So put a property that disables the object, once the object should be unusable, then." I know I write ugly code, but that would hardly help the matter.
Friday, February 29, 2008
Thursday, February 28, 2008
...It Still Seems to be Fun
Ok, for some strange reason, I got a freak puff of inspiration and also got past some hurdles. I guess a breather was required.
I'm not making any promises. An active sidekick is still not frowned upon...
Update 02:36: I think I've earned myself a good night's sleep (but not before some Picross DS!) - I've got database insertions to work. Progress, indeed!
I'm not making any promises. An active sidekick is still not frowned upon...
Update 02:36: I think I've earned myself a good night's sleep (but not before some Picross DS!) - I've got database insertions to work. Progress, indeed!
Tuesday, February 26, 2008
It Was Fun While it Lasted
Sadly, I'm going to put LightFrame to bed for now. The models really hit a brick wall and I lost momentum because I had no other party to throw ideas off. I guess it wouldn't be impossible to get it working, but, as said, the momentum is gone and therefore the motivation. Documentation isn't really that fun.
Hopefully I get someone aboard to continue this with me, but until then, the project lies in a standstill.
If you feel up to it, do contact me at henrik dot paul at gmail.
Hopefully I get someone aboard to continue this with me, but until then, the project lies in a standstill.
If you feel up to it, do contact me at henrik dot paul at gmail.
Sunday, February 24, 2008
When Everything Else Fails, Document!
As code development has ground to a frustrating halt, I turned over to the documentation. I realized that even though I seem to have a good lot of things jotted down, not everything I've envisioned is black-on-white.
One question that I always get, when I try to get people excited of LightFrame (and people indeed seem interested - once it's ready, that is), is: "How does it differ from the rest of them out there?" Usually I mention the compatibility of virtually any Apache-enabled hosting, MCV-like operation, the ubiquitous PHP, etc...
But one feature that I'm sort of excited about is the native support of internationalization (i18n), both in templates and models. That's one thing that I actually felt missing in Django. Sure, Django seems to have some kind of i18n for models, but from what I can gather, the translations are located in a static file, which needs to be updated manually (do tell me if I'm wrong). LightFrame will incorporate them directly to SQL, natively, intuitively and with great scalability.
More about the i18n plans at the dev wiki
One question that I always get, when I try to get people excited of LightFrame (and people indeed seem interested - once it's ready, that is), is: "How does it differ from the rest of them out there?" Usually I mention the compatibility of virtually any Apache-enabled hosting, MCV-like operation, the ubiquitous PHP, etc...
But one feature that I'm sort of excited about is the native support of internationalization (i18n), both in templates and models. That's one thing that I actually felt missing in Django. Sure, Django seems to have some kind of i18n for models, but from what I can gather, the translations are located in a static file, which needs to be updated manually (do tell me if I'm wrong). LightFrame will incorporate them directly to SQL, natively, intuitively and with great scalability.
More about the i18n plans at the dev wiki
Wednesday, February 20, 2008
Can't... Lose... Momentum!
Argh, it's so frustrating! I'm not getting the advancement in the project I'd like. I keep hitting walls, and find myself more or less writing around those obstacles. Like putting out small fires popping out here and there.
What I need, is someone to throw around thoughts and ideas with. But I guess it's somewhat unfair to assume that someone would be as committed to another person's project. Truth to be told, I could well imagine myself not being all to ecstatic about working with someone (and I do think this is a "with"-relationship, not a "for" one) and not getting paid for it. And even if I would get someone to work with me on this one, there's practically nothing I can demand from them, just for that no-pay reason.
Although, it is consolidating to hear the "sounds good! tell me when it's done" from people. That's one of the only things that keep me still going. Perhaps I'm banging on the wrong doors... Should I go in to the Django-crowd and start asking from help there? In other words, do I want to get myself, as a PHP programmer copycatting their holy grail sort-of-thing, lynched?
Yeah. I'm losing momentum. I'm out of ideas.
What I need, is someone to throw around thoughts and ideas with. But I guess it's somewhat unfair to assume that someone would be as committed to another person's project. Truth to be told, I could well imagine myself not being all to ecstatic about working with someone (and I do think this is a "with"-relationship, not a "for" one) and not getting paid for it. And even if I would get someone to work with me on this one, there's practically nothing I can demand from them, just for that no-pay reason.
Although, it is consolidating to hear the "sounds good! tell me when it's done" from people. That's one of the only things that keep me still going. Perhaps I'm banging on the wrong doors... Should I go in to the Django-crowd and start asking from help there? In other words, do I want to get myself, as a PHP programmer copycatting their holy grail sort-of-thing, lynched?
Yeah. I'm losing momentum. I'm out of ideas.
Friday, February 15, 2008
Late Night Update
Models is going to get many rewrites, that's for sure.
I'm doing kind of get-it-working-now-and-get-it-good-later type of coding right now, as I'm the kind of guy who wants to see progress or else I lose interest. This is a bit of a juxtaposition, for I also am generally a perfectionist when it comes to programming; I want it to be working just as I intended it. This kind of counter-acts the first part.
Anyhow. So I've got some momentum in this model/field thing, but the code is butt ugly right now, and it's going probably to be left like that on the first go. Naturally, these will be revisited, when the core functions are implemented. I'm just ecstatic that I've got this far, and evaded any dead stops yet. Hopefully Joona gets his code reviewed soon enough, so I could hurl this task over to him, and I could get on with the setup script, for example.
But now for some late night studies. Talk about student syndrome...
I'm doing kind of get-it-working-now-and-get-it-good-later type of coding right now, as I'm the kind of guy who wants to see progress or else I lose interest. This is a bit of a juxtaposition, for I also am generally a perfectionist when it comes to programming; I want it to be working just as I intended it. This kind of counter-acts the first part.
Anyhow. So I've got some momentum in this model/field thing, but the code is butt ugly right now, and it's going probably to be left like that on the first go. Naturally, these will be revisited, when the core functions are implemented. I'm just ecstatic that I've got this far, and evaded any dead stops yet. Hopefully Joona gets his code reviewed soon enough, so I could hurl this task over to him, and I could get on with the setup script, for example.
But now for some late night studies. Talk about student syndrome...
Tuesday, February 12, 2008
Welcome, Joona!
My first 'recruit' has been given his first debrief. Joona has promised to take a look at the code in general, and I've asked him to check out a few messy parts of the code, and give general comments/suggestions concerning the code.
I'm very glad that I have got another person working with this, even if he doesn't have all too much extra time on his hands. Even so, any and all input I get is a plus. I'm too blind for my own code, and frankly too busy getting working code, as I originally planned to clean up and optimize once i get the core functions implemented. For now, the final function of the core functions is actually models (and forms, which are intimately intertwined).
Hopefully this is a growing trend...
Btw, the repository now includes an incomplete version of models, forms and the SQL abstraction classes.
I'm very glad that I have got another person working with this, even if he doesn't have all too much extra time on his hands. Even so, any and all input I get is a plus. I'm too blind for my own code, and frankly too busy getting working code, as I originally planned to clean up and optimize once i get the core functions implemented. For now, the final function of the core functions is actually models (and forms, which are intimately intertwined).
Hopefully this is a growing trend...
Btw, the repository now includes an incomplete version of models, forms and the SQL abstraction classes.
SQL Hell
The contents of this post hardly comes as a surprise to anyone who has done any extensive web developing (that would include me), but venting ensues:
One would imagine that standards are made to, say, standardize stuff. Well, HTML4 and CSS2 are standards, but look at how much of a consolidation it is to the plethora of web developers that have to juggle code so that layouts look similar between IE and, um, all other browsers.
Would you be surprised that SQL's first standardized version is years older than HTML's first one? Would you be even more surprised that SQL's most recent version is years younger than (X)HTML's latest one? Seems like SQL has a longer and more rigorous history, but still it seems like no two SQL implementations are compatible with each other. If you feed a SQL statement that's over five words long, the chances are that no two RDBMS work identically (should they not return errors, which is a feat on its own). At least HTML works with incompatible browsers - SQL just spits out errors and pouts. And I'm getting the impression, that MySQL is the IE of RDBMS:es, when it comes to standard behavior...
Having done smaller scripts previously, with the Hack, Test, Look What's Happened Once The Smoke Has Set Aside -way of working, I have never got into the vast and exciting (not!) depths of per-engine work-arounds. I would have no idea what performance differences there are between MyISAM and InnoDB. I've written bits of SQL, seen that they work as expected, and moved on. But now, with this, there's not really anything concrete to test the models on. Models could be thought of abstract data types that the end user defines into something intuitive. Therefore, Models have to work for anything, with anything, anyplace, anywhere, anytime.
I've planned to have support for MySQL, PostgreSQL and SQLite (to start with). I have to generalize whatever table constructions into something that would work with all and any SQL engine. Oh, how convenient it would've been, if I could just write one standard SQL query, and never think of it again. But no! Now I'm practically forced to write one SQL statement for each supported engine. The modifications required for the query depends really on the context. Sometimes a simple rewording is enough. Other times, one keyword must be replaced by separate queries. Unnecessary to say, the SQL queries are, and will be, far from optimal on a per-engine basis.
Wouldn't it be nice, if standards were holy scriptures, where developers could take a look and see how stuff would work, instead of being forced to read each implementations' documentations of "how we do stuff around here"?
Obviously, LightFrame would do good with a SQL guru mucking about... *nudge*
One would imagine that standards are made to, say, standardize stuff. Well, HTML4 and CSS2 are standards, but look at how much of a consolidation it is to the plethora of web developers that have to juggle code so that layouts look similar between IE and, um, all other browsers.
Would you be surprised that SQL's first standardized version is years older than HTML's first one? Would you be even more surprised that SQL's most recent version is years younger than (X)HTML's latest one? Seems like SQL has a longer and more rigorous history, but still it seems like no two SQL implementations are compatible with each other. If you feed a SQL statement that's over five words long, the chances are that no two RDBMS work identically (should they not return errors, which is a feat on its own). At least HTML works with incompatible browsers - SQL just spits out errors and pouts. And I'm getting the impression, that MySQL is the IE of RDBMS:es, when it comes to standard behavior...
Having done smaller scripts previously, with the Hack, Test, Look What's Happened Once The Smoke Has Set Aside -way of working, I have never got into the vast and exciting (not!) depths of per-engine work-arounds. I would have no idea what performance differences there are between MyISAM and InnoDB. I've written bits of SQL, seen that they work as expected, and moved on. But now, with this, there's not really anything concrete to test the models on. Models could be thought of abstract data types that the end user defines into something intuitive. Therefore, Models have to work for anything, with anything, anyplace, anywhere, anytime.
I've planned to have support for MySQL, PostgreSQL and SQLite (to start with). I have to generalize whatever table constructions into something that would work with all and any SQL engine. Oh, how convenient it would've been, if I could just write one standard SQL query, and never think of it again. But no! Now I'm practically forced to write one SQL statement for each supported engine. The modifications required for the query depends really on the context. Sometimes a simple rewording is enough. Other times, one keyword must be replaced by separate queries. Unnecessary to say, the SQL queries are, and will be, far from optimal on a per-engine basis.
Wouldn't it be nice, if standards were holy scriptures, where developers could take a look and see how stuff would work, instead of being forced to read each implementations' documentations of "how we do stuff around here"?
Obviously, LightFrame would do good with a SQL guru mucking about... *nudge*
Saturday, February 9, 2008
Alternative Software
Urgh. While Eclipse undoubtedly has its strong points and is quite affordable, as in gratis, it's starting to feel like a huge pile of glued-on-Java (which isn't all that far from the truth).
Because I'm using mainly OS X for the development, Smultron is a good contester. The pricepoint remains the same, it recognizes PHP syntax, it's lightweight and very responsive. The main problem with it is, however, the lack of hierarchical projects. You can have a collection of files, but they're organized just in a mess. Additionally, the fact that it doesn't support SVN natively just makes it unfeasible. It's awesome for quick hacks for individual text files, but it's unfortunately no good for larger projects, like LightFrame.
Then there's another contender, TextMate. Every programming-related screencast I have seen, that has been presented on a Mac, is shown with TextMate. It seems very nifty, supports SVN, hierarchical and complicated project structures, PHP syntax recognition, the works. The only thing is, that it costs a bit shy of 50 euros. It's not a daylight robbery, but it's plenty for a sole student with nearly no surplus monetary assets.
I have previously used VIM when programming on my Linux server over SSH, but that doesn't scale to these proportions, either. Not that it would have built-in SVN... EMACS on a command line interface is out of the question. What I might be willing to do, would be hunting down a GUI-version of EMACS for OSX, and see what that has to offer. But somehow, that's going to be even more painful than Eclipse.
If someone has any other good ideas of what would work, other than me putting up a skirt and strolling along dark alleyways in high heels to earn that extra money, do let me know.
On the code side of things, models and fields have got their fair share of design juggling, but things are coming together. I can't take a cheat peek at my code at the moment, because Eclipse is taking its fair amount of time showing me "Update Manager: (2%)", meanwhile locking the whole interface. *sigh*
Because I'm using mainly OS X for the development, Smultron is a good contester. The pricepoint remains the same, it recognizes PHP syntax, it's lightweight and very responsive. The main problem with it is, however, the lack of hierarchical projects. You can have a collection of files, but they're organized just in a mess. Additionally, the fact that it doesn't support SVN natively just makes it unfeasible. It's awesome for quick hacks for individual text files, but it's unfortunately no good for larger projects, like LightFrame.
Then there's another contender, TextMate. Every programming-related screencast I have seen, that has been presented on a Mac, is shown with TextMate. It seems very nifty, supports SVN, hierarchical and complicated project structures, PHP syntax recognition, the works. The only thing is, that it costs a bit shy of 50 euros. It's not a daylight robbery, but it's plenty for a sole student with nearly no surplus monetary assets.
I have previously used VIM when programming on my Linux server over SSH, but that doesn't scale to these proportions, either. Not that it would have built-in SVN... EMACS on a command line interface is out of the question. What I might be willing to do, would be hunting down a GUI-version of EMACS for OSX, and see what that has to offer. But somehow, that's going to be even more painful than Eclipse.
If someone has any other good ideas of what would work, other than me putting up a skirt and strolling along dark alleyways in high heels to earn that extra money, do let me know.
On the code side of things, models and fields have got their fair share of design juggling, but things are coming together. I can't take a cheat peek at my code at the moment, because Eclipse is taking its fair amount of time showing me "Update Manager: (2%)", meanwhile locking the whole interface. *sigh*
Friday, February 8, 2008
Futuring the Model
Models and fields are, surprisingly enough, underway. A lot of work is to be done, but at least I'm gaining momentum, and that's the most important part. The rest is just perspiration and bug hunting. model.php has grown to nearly 2KB in size, and a sql.php has been fed in its 6KB's. Yeah, Eclipse can't express itself in lines of total code
On the note of line numbering, I could look at the line numbers, would phpeclipse.de's plugin not have messed up my Ecplise! I'm not sure what I or it did, but I can't get line numbers to show anymore, autofill of braces and brackets is fubar and PHPDoc automation doesn't work either. Among other problems, that is. LightFrame's official recommendation: don't install phpeclipse if you already have PHP Developer Tools working in Eclipse. Since Eclipse doesn't have an uninstall feature, I have to manually remove all files that were installed. Luckily, it's not that big a chore.
On the note of line numbering, I could look at the line numbers, would phpeclipse.de's plugin not have messed up my Ecplise! I'm not sure what I or it did, but I can't get line numbers to show anymore, autofill of braces and brackets is fubar and PHPDoc automation doesn't work either. Among other problems, that is. LightFrame's official recommendation: don't install phpeclipse if you already have PHP Developer Tools working in Eclipse. Since Eclipse doesn't have an uninstall feature, I have to manually remove all files that were installed. Luckily, it's not that big a chore.
Thursday, February 7, 2008
Selfdoubt
Here I am, trying to implement models and fields (I think I'm getting some progress), and I think I have found a feature deficiency in object oriented programming. I'm trying to do something, and I can't, because OO doesn't allow me. No, it's not PHP, but the OO paradigm itself that's limiting me.
When asking around about this, I'm getting more and more the impression that I can't "write in OO". Ok, that's not very far from the truth and I accept that argument - my previous projects really haven't required extensive use of objects. I'm going out on a limb here, but is it possible that because a way of thinking prevents me doing something, that way of thinking is not perfect?
Today, it seems, you can't call yourself a programmer, if you can't grasp the correct philosophy of Object Oriented Programming. I've never grasped the correct philosophy of Object Oriented Programming, because plain functions have served me fine in the past, so I must not be a programmer. But I'll be damned if I get ridiculed just because I want to use the class name of a subclass as a value for further processing. "No, you can't do that! You must do a method in the subclass that returns __CLASS__."
Fuck that. OOP makes some things just unnecessarily complicated.
When asking around about this, I'm getting more and more the impression that I can't "write in OO". Ok, that's not very far from the truth and I accept that argument - my previous projects really haven't required extensive use of objects. I'm going out on a limb here, but is it possible that because a way of thinking prevents me doing something, that way of thinking is not perfect?
Today, it seems, you can't call yourself a programmer, if you can't grasp the correct philosophy of Object Oriented Programming. I've never grasped the correct philosophy of Object Oriented Programming, because plain functions have served me fine in the past, so I must not be a programmer. But I'll be damned if I get ridiculed just because I want to use the class name of a subclass as a value for further processing. "No, you can't do that! You must do a method in the subclass that returns __CLASS__."
Fuck that. OOP makes some things just unnecessarily complicated.
AdSense is Funny
Hopping on the Completely Off-Topic Train, AdSense works in mysterious ways. As you might notice, there's a banner on the right there. This is the first time I try any advertising syndication thingy, so if the following is obvious to you, excuse me.
Anyhow. I noticed that for the two first posts, there's one ad for Professional Ventilation. Sure. That makes sense - i mentioned the word "ventilation". So Google would naturally think that whould be a damn good idea to put an ad there. Then there was another business-related ad. But the two remaining were porn ads. I mean, come on. Porn?! I refreshed my page, for science, and what I got was two ads for mature porn, one for vanilla porn (or so it seemed) and one for Professional Ventilation.
Who would've thought that Google, out of all companies, would use the "I don't know what to do, so I'll just put a porn ad here" type of company. I wonder if I have missed a setting toggle somewhere...
Anyhow. I noticed that for the two first posts, there's one ad for Professional Ventilation. Sure. That makes sense - i mentioned the word "ventilation". So Google would naturally think that whould be a damn good idea to put an ad there. Then there was another business-related ad. But the two remaining were porn ads. I mean, come on. Porn?! I refreshed my page, for science, and what I got was two ads for mature porn, one for vanilla porn (or so it seemed) and one for Professional Ventilation.
Who would've thought that Google, out of all companies, would use the "I don't know what to do, so I'll just put a porn ad here" type of company. I wonder if I have missed a setting toggle somewhere...
Wednesday, February 6, 2008
Frustration!
Being all pumped up from the success of last night, I gathered all the courage I could muster and decided to tackle the Model/Field area. As I already had something that should work on the SQL abstraction side, it should've been a walk in the park.
Naturally, what I ended up with was a brick wall, that was conveniently placed between me and my goal. I can't even get started! It's always like this when I try to get somewhere with this part. I think I have a clear image in my mind how the models would be implemented, but as soon as I sit in front of Eclipse, I get very much corrected on that part. So, more caffeine and screen staring for me.
Naturally, what I ended up with was a brick wall, that was conveniently placed between me and my goal. I can't even get started! It's always like this when I try to get somewhere with this part. I think I have a clear image in my mind how the models would be implemented, but as soon as I sit in front of Eclipse, I get very much corrected on that part. So, more caffeine and screen staring for me.
Tuesday, February 5, 2008
Progress!
This is the first post of the LightFrame DevBlog. Why a blog? I don't know. Everyone has one, including the neighbor's cat. So I pretend that I think it's a good reason. If that fails, I'll use this as a venting channel. A man has to vent every once in a while. A large-scale open-source project as a reason is not one of the worst ones.
Oh, the blog's "temporary" means that as soon as the framework is usable enough, I plan to get a dedicated website done in LightFrame, and that includes a home-baked blog.
I accomplished a major breakthrough today. I got the elseif template tag working! That might seem something minor to some, and I admit, it should've been something minor, but the way the code is constructed, I assure you, it's not.
The #lightframe IRC channel is growing nicely, put in perspective. Very silent, but at least people are there! That means interest! What it doesn't mean, however, is developers. I'm still alone doing this thing - not that I blame anyone. PHP isn't sexy, see.
Anyhow. Let's see what time brings us. Perhaps I stop blogging as soon as I started, for one.
Oh, the blog's "temporary" means that as soon as the framework is usable enough, I plan to get a dedicated website done in LightFrame, and that includes a home-baked blog.
I accomplished a major breakthrough today. I got the elseif template tag working! That might seem something minor to some, and I admit, it should've been something minor, but the way the code is constructed, I assure you, it's not.
The #lightframe IRC channel is growing nicely, put in perspective. Very silent, but at least people are there! That means interest! What it doesn't mean, however, is developers. I'm still alone doing this thing - not that I blame anyone. PHP isn't sexy, see.
Anyhow. Let's see what time brings us. Perhaps I stop blogging as soon as I started, for one.
Subscribe to:
Posts (Atom)