Thursday, August 07, 2008
Design Patterns
We have a very nice bookcase in our headquarter in Lawrenceville, NJ. It holds a few shelves of old books written five, ten, some even twenty years ago - all about writing software or using a particular software package or product. It really serves a purpose of a wall paper:) but I sometimes stop by and randomly pick a book and flick thru the pages reading paragraphs here and there. It either fills a little break that we all sometimes need to keep ourselves concentrated and focused, or just a spare minute when I'm waiting for someone to have a meeting and don't want to go back to my office when I know it's really a minute or two I have at my disposal so cannot really do any concentrated thinking.
Today I picked the "Pattern Hatching: Design Patterns Applied" by John Vlissides (1998) and here's a quote of the day:
------
"Misconception 5: Patterns guarantee reusable software, higher productivity, world peace, etc.
This one's easy because patterns don't guarantee anything. They don't even make benefit likely. Patterns do nothing to remove the human from the creative process. They merely bring hope of empowerment to a possibly inexperienced, perhaps just uninitiated, but otherwise capable and creative person.
...
Patterns are just another weapon in the developer's arsenal. To ascribe much more to them is counterproductive. Underpromise and overdeliver - that's the best defense against hype and backlash."
------
It's well applicable to nowadays' "patterns" too. SOA "pattern" was the one I thought of immediately after I read this.
Wednesday, June 18, 2008
Syntaxhighlighter
In April 2007 I blogged on the way to colorize source code postings.
...I was thinking how great it would be to have a CSS-based solution so you can put your source code into HTML element, define a few style attributes, and let it automagically colorize everything. wow...
I explored an idea (rather as a fun experiment) of building a DHTML behavior that talks to a server application, passes the code fragment, and replaces the page content with a formatted HTML fragment upon response from the code formatter application.
Today I ran into a Google Syntaxhighlighter that seems to do exactly what I dreamed of and as I can see is available since almost exactly back then, just one month later. It explores a different and a much more "down to earth" idea of parsing the code with regexps. Nice isn't it?
Subscribe to:
Posts (Atom)