Ahh yes, I forgot about Simon Sinek’s great talk - and naturally he has the http://www.startwithwhy.com/ domain.
But it fits so well if Ford had said it]]>
Love the article
Understanding why is essential. Check out Simon Sinek take on this:
Also, apperently there is no evidence existing Henry Ford ever said the “faster horse” quote, check out:
All the best]]>
This is actually far better feedback than I imagined.
As I wrote - it was not to bash dotCMS, I’ve seen similar code elsewhere, I’ve written similar code. I simply think that the code depicts a common issue in the programming world - especially the incremental deterioration of an 8 year old code base. Well, deterioration may be the wrong terms.
I looked briefly at the Eclipse source code - they too have some less than optimal convoluted classes.
Previous blog posts call out Martin Fowler’s code as the start of big balls of mud.]]>
Great post and you are absolutly correct regarding proper delegation vs procedural code. dotCMS is a huge project and if you dig you will find many warts - the UtilMethods you mention is from 2002 (uggh). That said, we happy that you can examine the code and as an open source project welcome the visibility that comes along with that.
Our newer classes are implementing a better pattern - see the WorkflowFactoryImpl. This code does a getInstance() that returns a different class based on the DB type running. This is a much cleaner pattern than a bunch of IF statements.
Let us know what else you find,
the method getStatusIcons has some html tags inside the strings. it looks like you didn’t quote them here in your post. So they seems to only add empty strings.
For the rest I see your point here. It would be interesting to have te resources to rewrite our legacy of 8 years of code so we don’t have different patterns arround.
We have been trying to fight with that db pattern. See for example a recent rewritten part (workflows). We started creating a class with all the querys and then subclasses for every db that can modify the base querys where needed. See
So, we agree with you and we’re working hard everyday to make the right patterns in the code. Still there is a ton of old code hard and expensive to rewrite. Hope we will do it before we need to support another DB manager]]>
Thanks for buying and reading the book. As for your conclusion that it’s just not enough, I am going to have to agree with you! That’s why Matthew and I are hard at work on the sequel, tentatively called Programming Gradle. There’s a lot more you’ll have to know to be a Gradle power user that just couldn’t fit into the first book, given the desire to keep it small. (This lets us favor electronic distributionâ€”which the community is already doingâ€”and lets us get a book out to the community faster, rather than making everyone wait for us to write a longer book.)
I can’t thank you enough for publishing a review. Keep using Gradle, and email the user list or contact us if you have questions.