While working on my projects ...

2009 | 2008 | 2007 Archive
Newest to Older

2008-12-08

Been highly distracted lately by my business. However, last week I managed to push out a release of Autoform. It is averaging about 2 releases per year and I think that's a good number.

Pretty sure there are a few changes in dbFacile and ORMer that merit a release, but I haven't got around to packaging them up. I tend to have pretty long dog food eating periods after I implement some new bit of code and before I push out another version.

I've also been feeling lots of conviction about the state of documentation within my projects. Maybe this is because I'm faced with the big challenge of creating great docs for my storefront software so developers know where to begin when customizing. For my open source projects I've tried to have really thorough example code, but I'm not sure whether it's a substitute for documentation. Maybe I'll put up a poll.

Comments

2008-11-14

Autoform is about to get a slight update. Of course, I'm using it to build my Storefront Software, and since the software is multi-lingual I need to ensure that form validation messages are displayed in the appropriate language. This is a pain to do with the current way of modifying validation patterns and messages, so I'm splitting out the validation logic into an autoformValidator class. I'll be creating a static autoformValidator::$patterns variable to hold the regular expression patterns and error messages. Autoform needs to know which validator to use, so I'll probably have to make a static autoform::$validator variable as well. That way you can point it to your overloaded class if you'd like.

It's not the prettiest way of doing things, but flexibility sometimes isn't too attractive -- just think of a person crumpled up in a pretzel-like yoga pose. This also means that you can extend the base validator class and encapsulate custom logic inside methods when you need more than simple pattern matching.

Comments

2008-11-08

Windowing systems. There's a new one called wayland. The problem is, it appears to be targeting Linux heavily. The good news is that the author is someone that actually has significant experience in the space, given that he's contributed much to Xorg. Much of the projects I've followed in the past (Y-windows, dsy-windows, Xynth) ... well I'm not sure of each author's background. In software, having a great idea and being able to execute on it properly seem to require much prior experience in whatever space you're working in.

Comments

2008-11-04

Someone please create a PHP project that generates XHTML markup using something like s-expressions. I mention it at the bottom of my Wish List. Seems like a better alternative to echoing HTML markup on projects where you don't have the ability to go all the way to a templating system.

Comments

2008-10-31

Thirty minutes ago I read about ZedShaw's love for commandline tools that don't distract, here. It got me thinking about Knox. Zed mentions Newsbeuter (as the Mutt of RSS Readers) and also how he'd believe in God if he found out that God made GNU screen. While I'm not so sure that'd be evidence enough for me, the mention of screen also reminded me of Knox, and how I wanted something a little more, and a little less, than GNU screen. So do I work on Knox, or storefront software? Neither. I'm at the day-job.

Comments

2008-10-22

Five years is enough.

A few years ago I swore I was done with being a PHP developer (for money). It no longer made me happy and I wasn't being challenged enough. I was doing HTML, CSS, JavaScript, implementing site designs in PHP, tweaking existing PHP code, fixing bugs ... very few interesting/worthwhile problems to solve that hadn't been solved a million times before (another CMS implementation?!). It was custom development, not product development. With product development there's more room for long-term quality, so one gets to feel more attached to the work; it can be more fulfilling.

I felt I was at a dead end with that career path. I decided to quit working part-time in order to focus on school. Then I decided to move to a better city and finish college at Florida State. The decision to move came only a few months after I had quit my job. While telling my old boss of my plans he said he'd pay me $30 an hour to work for him again, this time remotely, since the guy that had replaced me didn't quite work out. I needed the money and wanted to have something solid lined up, so I took it. So much for focusing on school or switching career paths.

So as I see it I actually was at a dead-end with that career path, and still mostly am. Since then, I've started a few more of my own PHP projects (to explore more technical topics than what I was paid for), but I'm not satisfied. It's been two years, I've graduated from college, and I still haven't written any multi-threaded code, nor any drivers, nor code that interacts with hardware in some non-trivial way, nor have I poked at alternative OSes. Those were all things I was contemplating a few years ago when I was "done with PHP". I really wanted to work on something low-level, with less UI work and more difficult algorithms to design.

I can't stand having 60% of the work day tied up with: copy-and-paste chunk of code, then tweak for new field names, then make sure to update the correct database fields, add validation, ad nauseum. I now understand 100% why people might say that web development isn't programming, or how PHP has facilitated their decline as a programmer.

But it's not PHP's fault. It's just that line of work. Web programming is mostly the blue collar work of software development. If you're drunk or high, or whatever, it doesn't matter, you can still do your job because you won't be operating any heavy machinery.

So now I'm shakingly anxious to move to another town with like-minded people, sane recycling practices, respect and love for greenspace, and more opportunities. But I'm getting worried. I'm seeing several job listings that want Windows multi-threaded programming experience in C++ and am more-or-less kicking myself for not picking up similar experience along the way.

And now I'm presented with another choice:

Do I jump over to something more technical that I see showing up on job listings, just so I can get a job in Seattle and move?

Maybe. Maybe not. I don't particularly want to code in C++. It's not a language I can be happy with; I've done enough in C++ to know this. Do I write something kickass in Ruby on Rails? Probably not, RoR work isn't much different than PHP work. Plus, I'm trying to ditch the "web programmer only" label, right?

What about saying "fuck you" to the half-step and going straight for something I can really buy into for years to come? Yikes. That's risky. I'm not seeing any job listings for "niche operating system, compiler, driver and language tinkerer with a keen desire and not much real experience". Aye.

I need to clarify some things. I'm not saying I don't ever want to write PHP code again. Nor am I saying I don't want to do web programming at all. However, PHP and web programming should never again be the only thing that I'm qualified to do for money, so I need to broaden my experience. I'll never be a "one language, one technology" programmer. I'm incapable of being that loyal to one thing because I always find room for improvement and always hope for something better.

I just want to:

  • Make things better
  • Make better things
  • Have a personal interest in what I'm working on
  • Use tools with an aesthetic quality I can get behind
  • Use tools that help more than hurt (otherwise I'll spend three years writing better tools)
  • Be around developers that fancy working on OSes or developing their own language one day, rather than the simpletons that want to create a website and make some money off advertisements
  • Do something I enjoy at a company I care about

It's time to try something new (that I love, and be really damn good at it).

(This was also published on my blog ... comment there if you wish)

Comments

2008-10-17

Since TESI still has several more unsolved problems, I got an itch to work on it again last night. I went back on a previous assumption that a terminal emulator shouldn't be in charge of scrolling the screen if the output from a child process pushes past the bottom line. After reading through the terminfo man page, and seeing some of the capabilities that define this functionality I was convinced otherwise. I'm pretty certain the unix cat program doesn't care about the dimensions of its output device, it simply dumps what it is fed. Of course, the shell cat is running in could be keeping tabs, but that doesn't seen quite right either. Again, all assumptions.

And yes, the proper thing to do is review the source code for a shell, for cat, and some other apps. But sometimes you just want to do (mostly) mindless trial and error on something. And it paid off because top now runs mostly flawlessly under a TESI terminal. The only odd bit of behavior occurs when I "quit" top. The screen scrolls up two lines, so an extra blank line appears before the shell prompt. Odd.

Comments

2008-10-16

Thought about Python again today, so articles related to it will probably become part of my regular reading. I'm a stickler for aesthetics, including aesthetics in language design, so it just makes sense to branch out more and really see first-hand what all the cool kids are up to. Luckily Google has App Engine, which seems like the perfect place to play around.

In other news, Dillo has been thawed and released. A few years ago Dillo was my browser of choice on an old 266Mhz machine with 64MB of RAM that ran Crux linux. None of you kids remember what it was like back then ... It was only four years ago, so it's really quite a mystery why I still had such a machine, but I was messing around more with hardware back then and wanted a separate PHP development machine. Oh, and I couldn't afford a web hosting account. Either way, I like feats of programming greatness where developers squeeze great things into small packages.

Comments

2008-10-14

Moved two more projects (PHP Call Center and Nesbit) to the "inactive" area of the projects page. Trying to assist my brain with the task of clearing my plate. There's no sense in giving things above-the-fold priority that aren't useful to anyone.

Perhaps I should create an RSS feed for this page to assist those that make regular use of an RSS reader. I don't, but maybe I should try that too.

Comments

2008-10-13

I'm thinking of venturing further into Python territory, mainly as a way to better acquaint myself with a "real language", at least compared to PHP. (The last time I touched Python was about 4 years ago to create a clone of Cymbaline, a great console audio player I used to use.) It's one of those situations where I have a project idea that I shouldn't begin (given the fact that I have so many things on the stove) but if I roll it into a chance to add another skill to my resume it becomes more acceptable.

In ORM territory, I came across the Pork.dbObject project. It's related to my ORMer project, seems cleaner than the other projects I'm differentiating ORMer from, so it needs more investigation. Maybe it merits a reverse fork. Gotta contact the developer.

Comments

2008-10-01

Half-thought-out tweaks always seem to make it into my projects, only to be filtered out again in the name of purity. dbFacile is the big culprit at the moment:

Caching Last Query

Cache last query (caches last query string and the result handle of that query). If the next query is the same query string, it works off the last result handle rather than running the query again.

Why would this ever be necessary? When using ORMer you sometimes write code like this:

if(sizeof($user->addresses)) {
// output start of HTML container
foreach($user->addresses as $address) {
     ....
    }
    // output end of HTML container
}

ORMer isn't smart enough yet, so it'd run the query to pull a user's addresses twice, since there are two references to $user->addresses.

Caching in dbFacile is not the right solution to the problem. Caching should happen within ORMer instead.

Remove Invalid Fields from insert()/update()

It's nice to have dbFacile only construct insert/update queries using data for fields that actually exist in the target table, but I don't want this to be an excuse for laziness. Plus, if I'm going for speed, then I don't want extra stuff going on behind the scenes that I've already taken care of. If I'm careful to only send fields that exist in the table, I don't need dbFacile to check another time. This is leading to the ability to turn this feature on or off as needed.

Don't Escape

Sometimes you want to use a mysql function when inserting or updating a record. But if you use dbFacile, which automatically escapes and quotes all data passed into insert() and update(), what do you do? So I had to provide some way to tell dbFacile, don't escape this value.

$data = array('name' => 'Tim', 'pass=' => 'md5("testing")');
$db->insert($data, 'users');

The above was the old way -- append an equal sign to the end of the key for the value you want left alone. This is weird. So now I've arrived at

$data = array('name' => 'Tim', 'pass' => array('md5("testing")') );
$db->insert($data, 'users');

Wrap the value in an array. Slightly better. I think. Give me a month and I'll change my mind.

Comments

Older to Oldest

2008-09-17

Until now, I failed to clarify why the placeholder parameter in dbFacile must be an array.

$db->update('users', array('name' => 'Susan'), 'id=? and name=?', array(4, 'Sarah') );

The fourth parameter is the array of data used to replace the query placeholders. In older versions, placeholder parameters were specified this way:

$db->update('users', array('name' => 'Susan'), 'id=? and name=?', 4, 'Sarah' );

But the old method was less automatable. If, for some reason, you generated the 3rd parameter on the fly, you'd have to use call_user_func_array to pass in the additional placeholder parameters. See the difficulty?

Comments

2008-08-27

I think it's time for me to say that the Zend Framework is too tall. It feels like someone from the Java camp went API-happy in PHP. Definitely not worth taking the time to learn, considering I have considerably simpler, more flexible tools of my own making. However, a client has a project written in it, so I must press on.

Comments

2008-08-08

A rundown of what's been going on lately:

Been using ORMer, dbFacile, Wikivert and Autoform actively in my projects. This means continuous refinements, so keep checking in.

I said quite a few months ago that an Autoform release was imminent, pending documentation updates. But in all honesty, nobody reads documentation, so I'd be simply wasting my time. Providing great example code is so much more valuable to users (and much easier to deliver). Hopefully users feel the same way.

And of course, if I had more time I'd probably mess around with:

  • Rewrite of the http:www.overset.com/2008/05/12/multiday-calendar-datepicker-jquery-plugin/(jCal) http:jquery.com(jQuery) plugin to clean up the code and eliminate the bug I found on IE7
  • Start collaborating with friends and others on my ideas for a fully anonymous, secure, wireless mesh system
  • An online community for high school drumlines (I was once a high school drummer with web development skills, but not every drumline has one of those). Say no to MySpace?
  • A way to match up people that share the same set of interests. Meetup only covers 1 interest at a time. I want to find friends with a similar overlap to mine.
  • Some way to provide direction to Open Source projects: consolidate duplicate efforts across OSS projects, coordinate teams for future direction, help with code re-use

Some are small tasks, others daunting. Like I said: if I had the time.

Comments

2008-06-09

Almost two months have passed since I seriously worked on my PHP projects. The second week in April I said new commits to the repositories were imminent, but I think I'm burned out on PHP. Instead, I've made some progress on Knox, having finally nailed down the tricky logic centered around strtok_r() that parses commands.

Honestly, I'm almost happy with ORMer as a project that can only read relation data. The time and effort needed for writing ability just doesn't seem worth it at the moment, especially since using dbFacile alone for inserts/updates is immensely better than doing those by hand. Damn. From the looks of things ORMer has only been publicly released for three months! I thought it had been longer.

Comments

2008-05-23

I must be attracted to jobs where past coders weren't experienced enough with the concept of abstraction. It must take a few years before a programmer's ego gives way to laziness, and only then does he begin to look for existing code to lighten his load.

If programmers don't make use of better and better abstractions we'll be eternally bogged down by the same old piddly, tedious shit. This very thing has been ailing me for the past 4 years and I need to draw a line somewhere. I tire of dealing with "from scratch" code where the problem doesn't merit it being "from scratch", especially when I'm expected to continue the trend. I absolutely must find a place where everyone is constantly looking for more shoulders to stand upon.

More specifically: I don't care how easy it is to write a session-based login system and an article manager for a website. Nor do I feel compelled to continue writing every SQL insert and update query by hand. They aren't worthwhile enough problems to solve. Yet they continue to waste too much of my mental energy as well as the time required to type them out from memory. Are employees allowed to choose what they will and will not do?

Comments

2008-05-17

Been thinking about wireless mesh networks again. I'm thinking we're going to need the capacity for hybrid approaches at first. People are already building devices that support multiple essids, use multiple channels and use multiple frequencies. But what about devices that support multiple protocols? We'd need bridge nodes to translate from one protocol to another. This would allow special protocols to be in place for special scenarios, and data could still pass between these special networks if need be.

Mention the idea of mesh networks to anyone that's actually been educated on networking technology (I haven't) and you'll soon find out there are huge roadblocks to actual, usable, efficient, scalable mesh network deployments. I definitely need to take a crash course in networking, OSI model and all. But really, I'm thinking mesh could be a chance design away things from the OSI model that we just don't need in wireless mesh networks. Then again, I don't know enough to know what I don't know, so it's possible every single piece is necessary. Who knows. If I had a company with a budget for R&D it'd surely be on the agenda. We'd come at the problem with fresh eyes and all the naivete necessary to tackle something others write off as having no further room for innovation or improvement.

Comments

2008-04-15

Progress is being made on the relation modifying functionality of ORMer. Modifying a related object and unsetting an object (deleting) are easy. Appending a object onto a relation (like adding a new order to a user's orders) is more difficult. The main reason is that the foreign key might lie at either end of the relation. When adding a new order to a user's orders, the foreign key lies in the order table and points back to the user table. When changing the user associated with an order, the foreign key lies on the near side of the relation, in the order table. ORMer must be smart enough to detect and work with both cases.

Comments

2008-04-11

Trying to make visible progress each month. Mercurial commits for Autoform, dbFacile and ORMer are still imminent. However, there's always a constant need for additional housekeeping in the way of better documentation and more thorough examples.

The next major piece of ORMer will be the ability to modify relations. It's essential functionality and absolutely non-trivial to implement.

Comments

2008-03-15

While adding Mercurial repositories for my more frequently updated projects I realized Knox could use one as well. Sadly, that'll have to wait until I get this other stuff squared away. I consider Knox a potentially higher-profile project than Wikivert or Vemplator, but ORMer is definitely the most impressive thing I have going, so (too) much of my focus has been on that lately.

Speaking of ORMer, I decided to make it more official and started a project page on Google Code. This should help build a community by making the project more visible and allowing users to submit bugs to the issue tracker. A mailing list will come soon; hopefully there will arise the need. On Google Code I found mention of the junction project (from a search for "php orm") ... it still looks like ORMer's API is the most elegant of the PHP ORM projects.

Comments

2008-03-10

My take on ORM has been released. It's usable, but mainly for reading relations. Modifying them and additional kick-ass features will come later.

Comments

2008-03-06

The pressure is building in the ORM kettle. Been squaring away the project page, and other things necessary for public release. You can see the draft page here and the repository here. Shhh!

Comments

2008-02-18

I personally find it sad that a 1Ghz machine isn't fast enough to handle YouTube videos. I think it says something negative about how badly we write efficient software. In other words, we're wasting tons of money throwing hardware at our problems. There was once a time when 600Mhz was the minimum requirement for watching a DVD.

This rant is not unfounded, but it's still a rant.

Comments

2008-02-07

Finally got the Mercurial repositories working after some tricky lighttpd rewrite rules. They'll be up shortly. Occasionally I realize how long it has been since I've updated my more prominent projects: Autoform and dbFacile. It's been a year for Autoform and six months for dbFacile. Since their last update they've not gone a month without at least some thought and/or tweaking, but it hasn't resulted in finished work yet. Trying to only release quality code without half-finished ideas. Once the repositories are up you'll be able to at least browse the newer code before the release.

But of course, the work I'm most excited about, and the work I've been alluding to for half a year, is also almost finished. I'm talking about my take on PHP Object-Relational Mapping. It'd be great to release all three projects at once. We'll see.

Comments

2008-02-04

I've been working on setting up public mercurial (version control) repositories for all of my projects. That way interested parties can participate in and contribute to my dictatorship.

The sad thing is, this is yet another detour I've taken over the past few months. Tasks left pending are:

  • Autoform 0.7 (Updating documentation is the last piece)
  • Next version of dbFacile
  • Initial version of my take on ORM

A while ago I told myself I'd wrap things up with my PHP projects and venture on to more diverse things. That hasn't happened yet. There's still so much to do to make coding in PHP better/faster.

Comments

2008-01-09

Vemplator uses Regular Expressions to compile its template syntax. These patterns usually look for start and end characters to ensure the correct transformation takes place. Let's start with this example of Vemplator syntax:

{formatMoney(order.total)}

It gets transformed into something like:

<?php echo formatMoney($this->order->total); ?>

One pattern within Vemplator looks for an alphabetical string surrounded by "{" and "(" to denote that it's looking at a function call. Another pattern looks for an alphabetical string surrounded by "(" and "." to denote an object reference that's the first parameter inside a function. Simple enough, right? Not until you run the two patterns in a row on the same input. The second pattern won't be matched.

The problem is the overlap between the end symbol match of pattern 1 and the start symbol match of pattern 2. The first pattern will find "{formatMoney(" and process it accordingly. But the second pattern won't find "(order." because the opening parenthesis was already matched in first pattern. The string pointer is sitting at the "o" in "order".

To remedy this, I simply ran another pass through the patterns. The opening parenthesis is left in-tact during the first pass and the 2nd pattern finds a match during the second pass.

Comments


 

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.