This past Friday I received a new feature request for our core business application. There's a report which nearly everyone on staff uses; it shows Mission Trips for a given set of dates. Most often, our staff will simply show all current and future Trips (and there's a one-click pathway for that common case). Each Trip gets its own row on the report, and each Trip has its own ID number printed on that row. The request I received was to make each printed ID a hyperlink to the data-entry page for the Trip.
Generally, people like to believe that "you get out what you put in"; that is, that the more effort you expend, the greater the reward. Baloney. I received more praise for implementing the hyperlinks than I have for any other feature in many moons. I spent months porting the app from VB4 to Python. In the process, I wrote an entire Object-Relational Mapper, including a DSL for processing data Sets, a mechanism for creating portable, early-bound Expression objects, and built-in analysis tools. I also wrote a web application framework, and an abstract Business Objects model independent of our specific business process. From the point-of-view of my users, all of that is par for the course—either completely expected, or completely obscured from their understanding. The response is decidedly underwhelming.
Total effort to implement the hyperlinks: open HTML file #1, select text, copy, open HTML file #2, paste. No reboots, not even a reloaded module. Perhaps 3 minutes if I throw in a test on the development platform before it goes "live".
The issue, of course, comes down to pleasing your audience. There's a meme among working software developers like myself that you should write code worthy of the giants of computing. Larry Wall's quote ("The three chief virtues of a programmer are: Laziness, Impatience and Hubris") is often interpreted to mean "write code you want to show to your friends", meaning other developers. But let's face it: very few developers are going to be looking at my code, one or two of them are going to have any response to it, and 10% of them will be in a position to affect my life based on their opinion of my code. The return-on-investment vanishes rapidly.
Does this mean I should stop writing software which pleases gurus and concentrate solely on my users? No, because I fibbed a bit. There is at least one developer whose favors I want to court: my future self. So I do what I need to do to keep myself and my team happy. The true role of a software architect is learning how to please your developers (even if it's only you), your users, and management. Do that well, and the rest follows, often with a simple cut and paste. And if you're a solo developer, learn how to reward yourself for the Herculean code nobody but you will ever appreciate.
via Ned Batchelder
The New York Public Library has made their digital collection publically available.
I can't believe I'm the first staff member to blog about this--you all were at the party!
We headed off to Anthony's Fish Grotto at lunchtime today to celebrate the 25th anniversary of Amor Ministries! Our staff, some old friends, and several board members were present to tell some great stories about the early days, and to give congratulations to Scott and Gayla Congdon, our founders, in particular. We also heard a great report from Scott about the last board meeting in El Paso, and how thrilled they were when they recounted all of the milestones we attained this past year:
...and many more.
I want to take this opportunity again to thank Scott and Gayla for their years of dedication--to those about whom nobody else cared--this manifests the love of Christ more powerfully than any speech or sermon. Thank you for modeling Christ for me directly. And a big thanks to all who have lived, worked, and donated time, energy, money and labor to the building up of the church in Mexico. You are part of something great!
Sites I want to look at in more detail when I have time:
http://agiletesting.blogspot.com/2005/02/performance-vs-load-vs-stress-testing.html http://openload.sourceforge.net/ http://grinder.sourceforge.net/faq.html#g2vsg3 http://sourceforge.net/projects/deluge/ http://deluge.sourceforge.net/ideaforest_stress.pdf
It had to happen sooner or later: I've been singing the praises of Firefox for quite a while now, and eventually I had to come across something that Internet Explorer does "better". [Update: it doesn't really, if you tweak Firefox. See last paragraph.]
It turns out that IE and Firefox time quite differently. For most IIS pages, IE takes 10 or 20 milliseconds to fetch a minimal page, while Firefox takes 40 to 60 ms fetching the same page. With larger pages, the difference continues to be about 40ms per page. I can only assume at this point that the difference lies in the external objects used to make the requests: my IE uses the Msxml2.XMLHTTP ActiveX object, while Firefox uses the XMLHttpRequest builtin. Now the interesting part is that the gap between Firefox and IE narrows when I serve the same pages via Apache2 on Windows, instead of using IIS. IE takes an average of 7ms for the minimal page, and Firefox takes 16ms. For another, larger page, IE takes an average 227ms, while Firefox takes 233 (a difference of about 6ms, not the 40ms we had previously).
Hmmm. More tests to come...
Update: Okay, after making the pipelining tweaks described here, Firefox gets down to a more reasonable 20ms per minimal page on IIS; the Apache speeds are unchanged. Somebody should make those tweaks the default, given the buzz around Ajax these days.
I've got to add access control to "Mission Control" (our main business application), and I cannot decide where to do it.
There are two main components: a UI (built on a UI framework, Cation), and a Model layer full of business objects (built on an Object-Relational Mapper, Dejavu).
Part of me wants to build the controls into the business objects themselves, since that's really what needs to be protected. I don't care if someone can access a page if they can't see any data on it (or add any data through it). It wouldn't be difficult to enforce, because all the business objects already subclass
dejavu.Unit, the base class for the ORM. The downside is that Dejavu doesn't currently have any concept of users or access controls. Any user context, therefore, would have to be passed into Dejavu from outside. This wouldn't be too hard, since every Dejavu session checks out its own
Sandbox object--I could just stick a reference to the access-control library into the Sandbox. I'd probably end up leaving the default Sandbox as is, and write a new SecureSandbox class, then decide between the two via a config parameter.
Writing the locks into the Model would be nice, because, in general, those change less often than the View. When new features are added, having the locks in the View code means a higher probability of forgetting to test for permission.
It would also be nice for management by end-user admins--they tend to understand "you can see Mission Trips but not Projects" better than long lists of event descriptions like "Show the Zip Code of the Primary Addressee on a Group Scheduling Report (but not a Group Scheduling Calendar)".
But another part of me wants to put the locks in the View. It would allow finer-grained permissions, and allow locks on behaviors which don't involve persisted business objects. It would also be better-integrated, since the View layer already interacts with authentication code in the webserver. There's also a lot of precedent, in that most ORM's don't manage permissions.
Things I want to remember:
I don't get it. I keep seeing people try to help software developers by telling them to stop trying (not trying to pick on you, John). There is a consistent trend to answer tough questions with, "someone has already written that, go use theirs". When did that start, and why do I keep seeing it?
I should probably explain why I find it a hard pill to swallow. Quite simply, I have strong recent experiences where I learned far more about a technology by building it than by using someone else's. This is certainly the case with my two "main" frameworks right now, Cation and Dejavu. Cation is a web application framework, and Dejavu is an object-relational mapper. In both cases, there are already many Python implementations, each with their own quirks and design decisions. Part of what drove me to write my own was that, given a choice between a dozen or more viable Python web app frameworks, I didn't have enough information to decide between them. Writing my own gave me that knowledge. I now feel I have the ability to judge which one I would go with in a new project, because I've hit the roadblocks myself and overcome them. Just as importantly, I know my own data better and can better match up the feature set that supports our requirements.
I'm the only programmer here at Amor, so I have to write a little bit of everything. I have to say that in those cases where I do go with someone else's code, I almost always learn it and live with it, for good or ill. Nothing ever gets fixed, it only gets worked around. Real fixes have a much higher cost--when it's Someone Else's Code, it's Somebody Else's Problem.
If software development is a craft, then we have to allow the apprentices to try things out. Maybe you, dear reader, got all the training you'll ever need in college, where you were forced to write compilers and parsers, full UI's and databases. But I didn't. I'd still like to learn more.
Fu's First Law: Everything's hard 'til you've done it once.
...if you do want great software, you have to let the developers own what they're building.
The converse is also true for me: if you want great software, you have to let the developers build what they're owning.
Do I think this is always true? Of course not. I'm not advocating a glorified "Not Invented Here" syndrome. There's no need for me to write Python all over again (however, I needed to hack bytecode for Dejavu). I don't need to write mod_python all over again (however, I needed to inspect its source code on more than one occasion for Cation). My point is that context is all-important, and recommending to someone that they skip the learning process strikes me as irresponsible, if you do not first inquire about that person's context.
Update: and now I read Jeffrey Shell: "But in my experience, the work required to do a good integration in a lot of these systems seems to be about equal to writing one from scratch."
|<< <||> >>|