Session “Flash” in PHP
December 7th, 2005Doing some PHP hacking tonight, I was missing Rails’ “flash”. So I coded up a quick and dirty implementation of the read-once session status notification pattern. The code
June 11, 2008
⇒ Yuiblog: Patterns for Designing a Reputation System.Excellent, pragmatic, Christopher Alexander style patterns for building online community. With really cute graphic.
September 10, 2007
⇒ r0ml.net: History teaches us ….r0ml explores the secret Catholic bias present in Java enterprise development. (in case the hair shirts weren’t a dead giveaway)
March 9, 2006
⇒ Shirky: A Pattern Language for Moderation Strategies.I love pattern languages, and this is an excellent start. E.g. main problems with community can be addressed by MakeIdentityValuable
January 26, 2006
⇒ Fowler adds “rought cut” patterns on event collaboration and accounting to PoEAA.See also Pattern Oriented Softare Arch., vol 2 for good enterprise event patterns
Doing some PHP hacking tonight, I was missing Rails’ “flash”. So I coded up a quick and dirty implementation of the read-once session status notification pattern. The code
my eastern reversible destiny; ebullient barnacle turkey y propitious zeiss novice, coverlet upsilon mausoleum remiss optoelectronic emblematic irritant sesame morphology. ambrosia shim grunt switchblade filigree gait amino caleb duration budge embargoes allied
Random gibberish, and yet 100,000 years of pattern matching expertise refuses to let it go that easily, finding primordial poetry, and humor.
Has anyone wondered what the extreme, cut throat Darwinian pressure of the spam wars might be evolving?
And what kind of AI could such a crucible produce I wonder? Vicious and deceptive? Slippery, polymorphic and rentless? Recent samples seem to suggest a cryptic, Delphian source of Zen koans.
November 25, 2005
⇒ Runt – Ruby Temporal Expressions.an implementation of select temporal patterns by Martin Fowler
March 15, 2005
⇒ Lay out of a PHP application.Solid advice. I do it a little differently (more structure), but following this advice will make your app better, and make you a better programmer
February 15, 2005
⇒ Rafe recommends “Head First Design Patterns”.I’ve been boycotting it due to the cover
September 20, 2004
⇒ UI Patterns and Techniques.Its all about patterns
August 25, 2004
⇒ Resign Patterns – Ailments of Unsuitable Project-Disoriented Software.I’m using the Brig pattern right now.
At work we’re using Class Table Inheritance to model the core data structures of our as yet nameless open source CRM. (actually it has a code name, but I don’t like it, so we’ll pretend it’s nameless)
This week as I learned both the name of this pattern, and the SQL to implement it efficiently in MySQL I thought I’d share some notes on what we’ve come up with.
Read the rest of this entry »August 7, 2004
⇒ Single Table Inheritance.The power of naming, transmuting bad relational design into a legitimate enterprise pattern.
April 15, 2004
⇒ class HelloWorldEmphasizer extends HelloWorldDecorator.Hello world in Patterns, a cautionary tale
I finally made it a SeaJUG meeting last night, Ted Leung speaking on Groovy proved to be an irresistible draw (and I was in town for once). This was also my first venture across the 520 bridge, into deepest, darkest suburbia (Bellevue). Wilhelm and Ted took pity on my carless state, and were great company
SeaJUG is a great group; smart, friendly, and intellectually curious. There are several vibrant subgroups including a Scheme group, a GoF study group, a regular language agnostic pair programming night, and a new Eclipse group (first meeting is first Tuesday in April, and I’ll be out of town, bah). I can also see that it would be an intimidating group to present to, especially bullshit, and this was confirmed by quiet evil laughter describing their last vendor visit.
Groovy has fascinated me since I first heard of it. I’m a dedicated “scripting” language hacker. Life is too short, and there are too many interesting problems to solve to slave away in the service of the compiler. And yet I’ve definitely felt the pull for more rigor and structure at times (generally when I was having to work with someone else’s code). Much of Perl works by consensus, I agree to call a method just so, and you agree not to muck with my internal variables (or the symbol table). Java works by locks (and shotguns, according to Larry Wall). Groovy provides a gradient, I can be as dynamic, and loose, and experimental as I want, or as locked down and precise, and I can change my mind, over time, about which way to go.
Groovy is a Java compatible, dynamic language, built on the JVM. You can pare it down to something it will make a Perl programmer pause (no classes, no methods, objects defined at runtime as closures, no semicolons), or add structure, type declarations, and all sorts of baggage all the way up to Java itself. Code can be run interactively, or can be compiled to Java bytecode. (one wag even suggested you could write Groovy, compile, and then use a decompiler to get your Java code. This is not recommended)
The Groovy developers have done a lot of work adding the syntactic sugar which makes scripting languages fun. Primitives are auto-boxed, and collections have been instrumented with a variety of useful methods that will make your functional programmers feel right at home. They’ve also been building some powerful domain specific constructs for operating on tree structures (XML/Ant/GUI widgets), building web pages (as ugly as PHP on a bad day, should make it popular!), and marshalling data into and out a relational DB. And lastly they address the other thing life is too short for, reinventing the wheel (especially as they seem to get more square each time). Because Groovy is compiling down to Java bytecode you have total, native access to many many high quality Java libraries.
See Ted’s slides. (understanding of closures is highly recommended)
Not this month. Not next month either. The syntax is still somewhat influx (if you’re a language hacker, that makes now a great time to get involved), and there were part which seemed either undefined or ambigous never a good thing in a programming language. There also feels like there has been a lack of discipline, too many special cases in the syntax, and a sense that the designers are kids in a candy shop running amok borrowing syntax from all their favorite languages. Still I’m excited about it. Its about 6 months old. I think 6 more months will tell us how successful its going to be.
Ted is as smart, interesting, and informed as you would expect him to be reading his blog. He kept his cool in the face of hardware trouble, and a large contingent of the audience who weren’t buying it. As Ted said, “to fully buy into Groovy, you have to buy into some assumptions about how software should be developed, which is philosophical bordering on religious.” He is talking about agile software development, which I occasionally forget still has its detractors, and its unintiated.
He ended by addressing the fact that much of programming is mechanical, and that far from happening accidentally, or improving over time this trend is getting worse. With top heavy, byzantine architectures like EJB, or the ever deepening W3C XML stack, you see the work of the large technology vendors who are interested in keeping entry difficult, work rote (and therefore cheaply offshore-able), and profits up. As he ended with “the big corporations are going to solve this for you, we need to solve this for ourselves” I had a brief moment of cognitive dissonance as my worlds collided and I couldn’t remember if I was at an anti-globalization meeting, or a software users group. This is the sort of stuff people should at least bring up at the next CATS meeting.
It was fascinating to get an inside update on Chandler, a project I’ve watched with fascination since its early days. (Thankfully I’ve got a job I’m very happy with, and so I didn’t have to embarrass myself by pumping him for contacts as the OSAF.) I’m looking forward to Mitch Kapor’s keynote at next week’s PyCon (not that I’ll be attending)
And he addressed the problem I’ve always had with mixins. (recently reinvented by the AOP crowd apparently as “static cross cutting”) You see when I hear mixins the first thing I think about (or the second, after I think about too many late nights struggling with Mailman) is ice cream from Herrell’s. Herrell’s is a Boston (and Northampton) ice cream shop that will pound your ice cream out flat, mix all sorts of wonderful things into it, and roll it up again. Turns out that that is the origin of the term. Back when it was Steve’s and the MIT hackers were working on the original Lisp machine. Wow.
In preparation for doing the Protest.net re-write I’m doing some research on web frameworks. I find myself rewriting the same central dispatcher code, adding refinements, like a redirect method (similiar to the forward() method in servlets) and in general missing some of the refinements of Java’s web environments (servlets, Struts, bundles for i18n) while refusing to give up Perl, CPAN, and Template Toolkit.
This is my brain dump so far. Lots of questions, a few answers. The next step will be firing up the text editor and looking under the hood.
UPDATE: After looking at the available options, and at Struts 1.1, I would go with Java if I didn’t know I would have an insurrection on my hands.