Scott's Recipes Logo

PHPLarge -- FuzzyOffice -- 001 - Constraints

PHPLarge :: FuzzyOffice :: 001 - Constraints
Last updated: 8/15/2002; 6:20:28 AM
 
The FuzzyBlog!

Marketing 101. Consulting 101. PHP Consulting. Random geeky stuff. I Blog Therefore I Am.

PHPLarge :: FuzzyOffice :: 001 - Constraints

To: Interested, Geeky Parties
From: A Geeky Scott
Re1: Engineering a Large Scale Application in PHP
Re2: System Constraints
Date: Sometime in August, 2002 (see the blog entry date since I don’t know when this will be posted)
Where: Starbucks

NOTE: I hope this will be the last FuzzyOffice without at least _some_ code for a while.  That probably won’t be the case but I hope so.

Constraints, constraints, constraints. This is the set of initial decisions that you make – with terror, fear and loathing – that ultimately come to define your system.  Now the single best lesson I learned while studing engineering (before I became a management droid) was that you need to clearly define constraints up front.  And, in my fairly typical overachieving fashion, I’ve carried it into lots of different areas.  For example – whenever I’m working at someone else’s home, the first question I ask, usually within 15 minutes of arrival, is “How long are we working?”  That’s a constraint.  That way I can figure out what needs to get done within that time period. 

Now the hardest part here is that you always, always make wrong choices when you choose constraints.  We all know that we’re going to make the wrong choices when we decide on constraints, so we don’t want to do it and then the overall system design suffers.  And this project is even more terrifying since it’s being engineered in the open and publicly.  This means that when I screw up, and I will, people will call me on it.  Ah well… That’s just plain life in the blogosphere.

Here then are the constraints that I am making for FuzzyOffice:

NOTE: Sharing without passwords will be handled by the creation of unique, unguessable urls with a time expiration

As I write this, I realize that there is another constraint on FuzzyOffice.  A significant constraint: Time.  Right now there is exactly one developer on FuzzyOffice (and I’m not asking for more; just stating a fact).  There are a lot of implications of time being a constraint.  You’ll see me make decisions that, perhaps, defy normal logic.  Here’s an example – I will probably just dump all development files and images into 1 honkingly large directory.  Why?  It makes the installation process just plain easy.  There are less settings for inexperienced people to screw up and that means less technical support email.

Here’s another constraint: We’re already using it and extending it daily.  This means that things like the data models we’re using are going to be very, very rough initially and that we’ll fine tune them over time.   When you look at my table structures, you may well laugh.  Perhaps even laugh a lot.  Bear in mind that we’re whipping this out and will go back and normalize stuff later.  And if you think that this doesn’t happen in real companies all the time then you’ve never worked on a deadline in a software development company.  It happens all the time.  We all design stuff and then start working and, ahem, flexibility happens.

Here’s another constraint: Readable Code.  I am far, far, far more concerned that the code be readable and extensible by non-experts than I am about perfect, optimized code.  For example – if there is an if statement that could be handled by a single negative test, I’m likely to write that as an if statement with nothing in the body of the if and then an else statement where the logic exists.  Why?  Because negative logic can be difficult to follow.

Here’s another constraint: Practicality.  My ultimate goal is a system where the HTML and ALL STRINGS AND OTHER TEXT MESSAGES are cleanly isolated from the source code.  This will take time.  It will not be done initially.  What will happen is that we’ll build the application and then do it over time.  This means that there will be working code significantly sooner but we will be doing “refits” along the way.  So be it.

NOTE: As you can get tell from the writing in this section, it evolved over a period of days with constraints continually being added as I sought to explain (or justify) my approach.

 
Copyright 2002 © The FuzzyStuff