Vanity Foul
Dedicated to the wanderings of an egotistical mind.


20030125
Saturday January 25, 2003

Re: Entry permalinks in Roller Andy is complaining that Roller won't generate permalinks for his entries (well, actually it is, but the link isn't going to the right place). The problem is that he has left out the anchor macro: <a name="\$entry.anchor" id="\$entry.id"></a>

Next, he has a problem with Velocity tags: this is a tricky one, as the view of the entry in the "edit" page doesn't pass through Velocity but the actual display does, so he calls this one right. I think this is a spot where we'll need to look at fixing Roller's behaviour (make the edit page use the macros). I've been working on "fixing" Roller's use of Velocity, so I'll look at straightening this out as well: basically I need to make EditWeblogEntriesTag.java use Velocity in its presentation (that last is mostly a note to myself). ( Jan 25 2003, 04:15:58 PM ) Roller Permalink Comments [3] [Trackback] [Link]



20030123
Thursday January 23, 2003

Re: American Idle

Well, it finally happened. My former employer has decided to make like a protein and fold. So I'm unemployed, on the dole, no longer a productive member of society, an American Idle.

This blog is part of my attempt to demonstrate that, while I am rather content spending many boring hours doing nothing, I'd rather be spending many hours writing boring content about doing something. Exactly what that something will be has yet to be determined...[demitasse]

Do what I did (if you're not already) and pick up a piece of OpenSource software that interests you, and get to work on it. That's how I got started working on Roller, something to keep me busy and to keep my skills up. Hell, I learned a lot (mostly about MySQL and Velocity) from the experience. And I met Dave & Matt, and a bunch of other fine folks.

Followup: just read Andy saying much the same thing. ( Jan 23 2003, 01:41:37 PM ) Technology Permalink [Trackback] [Link]



20030121
Tuesday January 21, 2003

Of Forests and Fields

While Mark is always a good read, some days are just better than others. I read this one as a foreshadowing of what I have to look forward to:

Our home (built circa 1955) stands just more than a block from old National Guard Reserve land. Since we are relatively new to the area (going on 3 years) I'm not sure of the history, but this land covers enough acreage to hold a medium-sized town and surrounding neighborhoods. The land has been "decomissioned", but the ground contains contaminates and is 5 years into a cleaning process. All the surroundnig communities, several big businesses, and local Native Americans are all fighting for possesion of this land.

Currently about 98% of the land is given over to hills, big and small, and forest with some swamp thrown in here and there. Beautiful. And some day in the not too distant future, it's going to be "developed". What that looks like, I shudder to think. Every day as I drive along this stretch, I yearn to go for a walk in those woods, to climb those hills, to spend a little nature time. But it is still National Guard Reserve land, protected by chain-link, razor-wire, and armed patrols.

I hope I get to stroll those fields at least once before they are plowed and paved.
( Jan 21 2003, 01:40:29 PM ) Entertainment Permalink [Trackback]

Free Pippa!

Pippa is being repressed by her husband's employer. As she says, she has been very careful never to name herself, her husband, nor his employer. Just because some of us know who they are, the employer wants to gag her? I wonder if Grendel's boss (who I once knew) can bring any sanity to the upper management. Probabaly not without putting himself at risk. ( Jan 21 2003, 09:53:58 AM ) News Permalink [Trackback]



20030120
Monday January 20, 2003

Velocity Rocks

It's the greatest thing since sliced cheese. Or sliced bread (mmmmm, toasted cheese sandwiches...). Okay, maybe that'll balance out my Velocity Sucks post. Jon's subtle prod to keep looking inspired me to checkout the Velocity-tools project, where I found the VelocityViewServlet, which gave me the hint to my solution: the WebappResourceLoader. Additionally this requires the "Velocity Servlet" to set the ServletContext during it's init() or initVelocity(). You can see the PageServlet to see an example of this and other fun manipulating the init parameters. ( Jan 20 2003, 06:25:27 PM ) Technology Permalink [Trackback] [Link]

For further reading on today's posts:



20030119
Sunday January 19, 2003

Bad JSP, Naughty JSP

So now Andy is knocking JSP:

In order to include content from a JSP you must use a dispatcher include. This turns control of the output stream over to the JSP for a turn. There appears to be no way to get the content of the result of a JSP request without actually connecting and submitting a request via HTTPClient or something like this.[Hacking Log 2.0]

I've developed JSP for over 4 years, and I've never run into this need to "go outside" to get the results of a JSP. So far as I've witnessed any dispatcher includes all happen within the servlet container (but I've never used Tomcat 3.x). Andy, can you clarify? (Btw, I can't wait for FreeRoller to get comments so I can just ask you in your own blogspace)
( Jan 19 2003, 02:34:16 PM ) Technology Permalink Comments [5] [Trackback]

On Email Integration

In planning features for Geekblog, Ted raises good issues on the difficulties of implementing "Post via Email". This feature has been requested for Roller as well, and I've put some thought into from time to time, coming to much the same points as Ted. One point I'm not sure he covers clearly is authentication; making sure that the email is genuinely from the owner of the blog. Since email headers are easy enough to fake, going off the From: address isn' enough. But putting a password in the email exposes it in many ways, and increases the complexity of the API: now the user has to put password=mypassword in the body somewhere, and specify the body of the post seperately (entry=blah blah blah). Starting down this slipperly slope leads to all sorts of things that could be specified: post-time(future/past), public/private, category.... For now I'm punting on the whole idea, sadly. ( Jan 19 2003, 09:55:49 AM ) Technology Permalink Comments [2] [Trackback] [Link]



20030118
Saturday January 18, 2003

Velocity sucks

I've been trying for days to get it working as advertised, see Velocity help sought. Of course it doesn't actually suck, but it has been quite frustrating, and I'm surprised at its shortcomings given the adoption it has received from people whose technical skills I've come to respect.

Velocity doesn't allow for overloading macros (more than one macro with the same name but different arguments), and it throws parse exceptions if a macro calls another macro that hasn't been declared yet at parse time. In the latter case it still works, but you'll see errors in the log. Finally, if I try to load a macro library using \#parse("lib.vm") the macros in that file are not visible to the calling template. I've been all through the documentation, many times, but haven't found a setting to fix this (in fact, found some text that implies this is forbidden). I think I understand the technical implications, but damn, this seems like an important bit of functionality.

My particular problem has been getting macros read in at servlet startup time. I've followed the directions, Googled, read the mailing lists, queried the mailing lists, and experimented extensively. No good. The macros themselves are fine, because if I \#parse("roller.vm") in a page Velocity finds and parses it just fine. So it isn't finding the file on startup, but it throws a NullPointerException rather than a ResourceNotFoundException, which is odd. There appears to be no way to get a stacktrace of the error so that I can be sure, and the ResourceManager.getResource() has the exact same exception message in two places so that I can't tell which one is throwing the error (without a stacktrace).

So I'm frustrated. I'm sure Velocity is a fine piece of engineering, but it won't work for me. Argh. It occurred to me in the middle of the night that perhaps bad-mouthing Velocity would get me more help than my (so far) polite requests for assistance.
( Jan 18 2003, 08:28:19 AM ) Technology Permalink Comments [11] [Trackback]

For further reading on today's posts:




archives
links