Clearly, something is wrong with Daypop.
I knew something was amiss when yesterday my four year old WFC vs. JFC article rose up into the Daypop 15 Top News Stories. My day-popularity is still going strong today. At this moment, 4 of the 15 Top Posts on Daypop point to my weblog entries. Clearly, something is wrong with Daypop.
What's the problem? The other day I tweaked the layout of my site the other day and,apparently, the changes that I made sent irritating ripples through Daypop. Daypop tracks the most popular news stories and weblog posts by counting the number of weblogs that link to those news stories and weblog posts. By changing my site layout, I effectively changed the contents of hundreds of web pages on my site. Daypop's flawed top post algorithm saw this as a giant burst of day-popularity for the various links that decorate the right hand side of my weblog.
Why doesn't Daypop account for this type of site-layout change, I mean, don't layout changes like this happen all the time in the world of weblogs? I wonder: is there something that I could have done to keep my changes from driving Daypop bonkers?
JSP-based tree controls?
If you search for HTML tree control on google, you'll find lots of links for JavaScript-based tree controls. To allow tree expansion/collapse without going server-side, these components require that all tree data is downloaded to the browser. This approach is not suitable for situations where your tree has thousands of items. What I'd like to see is a tree control that keeps the tree data on the server-side and allows you to "page next" and "page prev" paging through multiple pages of tree data for tree nodes that have more than a page-full of children.
Searching for JSP tree control, I happened upon the BEA Weblogic Workshop's JSP tree control tag <a href=
"http://edocs.bea.com/workshop/docs81/doc/en/workshop/taglib/www.bea.com/workshop/netui-tags-html-1.0/tree.html">
<netui:tree>. The BEA tree control uses an MVC approach where tree data is held in a server-side model baed on a TreeNode
interface; close, but not exactly what I want. The BEA control does not seem to support paging. Are there any open source components similar to the BEA tree control?
Software is never perfect.
James Robertson of the Cincom Smalltalk blog picked up on my post about the final keyword and one of his readers, Blaine Buxton, made an interesting comment on the topic. Software is never perfect, as Blaine says, and I agree, but if you allow your users to customize your software by extending classes and overriding methods, you can get yourself into trouble very quickly. When you deliver a new version of your software to them, you might find that you have broken many of their customizations and enhancements. It takes some thought to write a class that is truly safe for users to extend. An typical object is like a state machine and by calling methods in the wrong order or incorrectly overriding a method, your users can easily put that state machine in a bad state. Open source helps, of course, because users of an open source application or class library can see the internals of the classes and, one hopes, understand how to correctly extend them.
I'm not saying you should never allow users of your class libraries or applications to extend your classes and override your methods, but I think, in general, it is better to provide them with extension points in the form of interfaces that they can implement to extend and customize the behaviour of your library.
Blaine Buxton In this context, it would be more natural thought for a Schemer/Functional programmer. Functional languages frown upon mutable variables because they make "proving the correctness of the code" more difficult. They see variables as you would in mathematics, they never change. Personnally, I forbid the use of final on methods in any projects that I have anything to do with because of the exact problem you explained. Software is never perfect. But, I do advocate using final on variables for constants and that's it. I think trying to turn Java into a functional language (in the sense of Scheme and Haskell) is like trying to make pigs fly. Now, just don't even get me started on the use of the private keyword on methods! My hatred for it is the same as final on methods and you should NEVER do it.
Wiki asshole on the attack.
The past couple of days, I have noticed that some little twerp has been changing random words in the Roller wiki. I'm getting tired of making little corrections to the wiki, so I've turned security back on. The Roller developers have user name and passwords for the wiki. If you want one too, let me know. I might grant you one. I know, I know! it's not the wiki way. It's my way - or the highway! Mama Musings was right all along. Foo!
Testing 123...
This site is again running the latest from Roller's CVS. Everything looks good, but OSCache 2.0-beta2 isn't writing to the disk cache on this site either. I'm not sure this is a bug (but I filed one anyway), perhaps OSCache 2.0-beta2 no longer needs to write to disk when cache.memory
and the cache.entries
is set to a low value.
UPDATE: It is an OSCache bug and a fix is forthcoming (thanks OSCache crew), the recommended work-around is to add the following to oscache.properties
cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
Best practice or final fetish.
I work with a couple of Programming Languages geeks who are, it seems, always Scheme-ing and Smalltalking behind Java's back. One of these guys has a thing about the final key word. He believes that all fields, variables, classes, arguments, etc. should be final be default and that, instead of having a final
keyword to declare immutables, Java should have a mutable keyword to declare those that may be mutated.
He argues that, wherever possible, fields, variables, classes, arguments, etc. should be declared final. Since Java does not default to final, you should default to final. Here are some advantages to this:
- If you declare and initialize a variable final, you never have to worry about it being null later. Nobody can change it, so it will never be null.
- Extending classes that are not carefully designed for extension, and let's face it most are not, is problematic. By mentally defaulting to final classes, you prevent potential problems.
- If you need to declare an anonymous class, you don't need to wory about redeclaring your variables as final because you already declared them that way.
- Other reasons? ...
WellformedWeb(TM) Services
Most folks out there in corporate IT land believe that webServices == wsdl + soap
. Joe is fighting that notion. BTW, I don't think Joe means to imply that SOAP and WDSL are not well-formed.
Joe Gregorio: Barring any rename, which in all honesty I know won't happen, I'll just have to start referring to non-SOAP based services as Well-Formed Web Services.
Inspiration for a sniper.
I love the way that James Robertson of the Cincom Smalltalk Blog monitors my weblog for material to use against Java, J2EE, and static typing. I'm serious. I learn something everytime he fires a shot from the tower. You can learn a lot from a Smalltalker with an I-told-you-so attitude.
FreeRoller OSCache misconfiguration.
I logged into the FreeRoller server for the first time in long time and, on a hunch, I started investigating the OSCache configuration. Turned out, the disk cache directory did not exist. I created the directory and gave it the right write permissions, but OSCache is still not using the disk cache. I'm not sure why. I turned on DEBUG logging for OSCache and I saw the message below, so OSCache clearly knows the location of the cache directory. These settings were good enough for OSCache 1.7.5. What's the deal with 2.0?
INFO HttpProcessor[80][2] com.opensymphony.oscache.base.Config - Properties { cache.debug=false, cache.path=/sites/hosted/freeroller/cache, cache.unlimited_disk=false, cache.capacity=600, cache.memory=true }
I'd like to set cache.unlimited_disk=true
and then use a cron job to clear the cache every night, but right now I just want to get the disk cache working. Any ideas?
Struts Validator and java.math.BigDecimal.
I've been working feverishly against a Friday deadline, having lots of fun, and learning more than I ever wanted to know about Struts, Hibernate, XDoclet, etc. I'm the closest thing that we have on the project to a Struts expert, so I've had to come up to speed fast on Struts Tiles, Struts Validator, and XDoclet's Struts support. So far, so good, but now I've hit a snag. I've run up against what appears to be a serious Struts Validator limitation: no support for java.math.BigDecimal
.
I tried using the double validator, but when I apply the XDoclet tag for the double validator to a field that is a BigDecimal, XDoclet does not generate an entry for the field in validation.xml
. Maybe, if I can fix this I can get away with using the double validator. Hmmm...
To resolve this problem the right way, it seems that I'll need to write my own validator. No problem right? I think this involves four steps:
- Provide a class with a
validateBigDecimal()
method for server-side validation. - Write the JavaScript for client-side validation.
- Write the XML for my validator and put it in
validator-rules.xml
. - Fetch XDoclet from CVS and hack the Struts Validator support to handle my new validator.
That last step is a doozy. There's got to be an easier way, but googling turns up nothing. I guess I have figured out how I will spend my evening.
Redhat to bundle JOnAS.
InfoWorld: Red Hat to ship JOnAS J2EE software - The key question now is whether or not the JOnAS software will become the first open source application server to receive J2EE certification, an expensive process whose price tag has thus far helped prevent the JBoss application server from being certified by Sun.Wow. First Apache with Geronimo, now Redhat with JOnAS. Whatever happened to The End of Free? I wonder why Redhat chose JOnAS. Did the Fleury vs. Sun antics scare them away from JBoss or was it the LGPL?
Code generation rules.
Norman Richard:Words to live by. I like to generate code right into the build directory, somewhere like
- Never check generated files into the repository
- Never generate code using a tool that can't be automated
./build/src.gen
, to ensure it gets blown away
by a build clean
and to ensure that everybody knows it.
Geronimo!
Geronimo proposal: There are two main aspects to this Apache project:Very cool.
- a complete J2EE certified server which is fully ASF/BSD licensed and backed by a healthy open source community.
- to create a fully modular J2EE stack so that the Apache community can use whichever parts of the J2EE stack they require separate from the J2EE server project.
I'm in InfoWorld!
John Udell, InfoWorld: Programmer and author Dave Johnson shared an anecdote on his Weblog last year about what happened when his 5-year-old son walked up behind him while he was coding. "He saw the JUnit green bar on the screen," Johnson reports, "and said 'Dad, you did good.'" There's more to this touching father-and-son moment than meets the eye.
Usability reading.
I've started to enjoy the java.net blogs and I'm not ashamed to admit that I read them almost daily. I'll be visiting more often as Simon Brown and Alan Williamson have taken up residence there.
Today, I was happy to see Jonathan Simon's list of usability books and websites. My new title is Senior GUI Developer, so I'm getting my re-aquainted with UI design and usability. In fact, my copy of Don't Make Me Think: A Common Sense Approach to Web Usability just arrived today. For some odd reason Jonathan did not make the links clickable. That is not very usable now is it? I've taken Jonathan's list and make it clickable for your easy reference:
Jonathon Simon: Here is a list of books that I have found useful.And some good links:
- Tog on Interface - Bruce Tognazzini
- About Face 2.0: The Essentials of Interaction Design - Alan Cooper
- The Inmates Are Running the Asylum - Alan Cooper
- Design of Everyday Things - Don Norman
- Emotional Design - Don Norman
- The Humane Interface - Jeff Raskin
- Gui Bloopers - Jeff Johnson
- Microsoft Windows User Experience - Microsoft
- Macintosh Human Interface Guidelines - Apple Computer
- Anything by Edward Tufte
- Tognozzini's web site. Great articles.
- Nielsen Norman Group - A top notch consulting firm with some of the best guys around
- Interface Hall of Shame - Great mistakes to show your colleagues about how not to design interfaces.
- ACM UI SIG
- Usability Professionals Assoc. - A great organization for usability professionals
HAHT news.
Congratulations to Michael Kelley, who is leaving his position as VP of Development for HAHT Commerce, Inc. and moving to Redmond to join Microsoft. Before joining HAHT in 1996, Michael directed the development of DG/UX Unix at Data General. Rumor has it that he is back in the OS game and will be working on Windows Server. What a catch for Microsoft!
Michael is certainly not the first former HAHT employee to join Microsoft. Many of the original HAHT developers now work for Microsoft, but most are working on webapp testing, next-generation source code control (look out SourceGear), and bug tracking products here in Microsoft's new RTP development center.
Congrats
Congratulations to Matt Raible, who has been blogging for over a year now, and to Simon Brown, who has been asked to blog for java.net.
OSCache 2.0 is quite an improvement.
I just tried the new OSCache 2.0-beta2 release and it is quite an improvement over the 1.7.5 release. Wow. Look at these numbers:
Testing Roller 0.9.7.5 with the old OSCache and the new:
Test | Cache-TO | Threads | Loops | Max-Delay | Avg | Med | Dev | T-Put |
OSCache175 | 5/5 | 20 | 10 | 1000ms | 4684 | 1382 | 8012 | 138.7/min. |
OSCache200 | 5/5 | 20 | 10 | 1000ms | 2237 | 821 | 6624 | 201.4/min. |
OSCache175 | 60/120 | 20 | 10 | 1000ms | 2601 | 1382 | 3136 | 186.9/min. |
OSCache200 | 60/120 | 20 | 10 | 1000ms | 1680 | 731 | 2113 | 242.9/min. |
OSCache200 | 60/120 | 20 | 1000 | 1000ms | 2248 | 1603 | 2079 | 271.5/min. |
See Roller0975Throughput for more information on the tests.
Software success.
Joel Spolsky: no software company can succeed unless there is a programmer at the helm
...and free M&M's on Wednesdays ;-)
« Previous page | Main | Next page »