The Challenge: 1.5 stone heavier and 2.5 minutes faster

Last night I ran a pretty shonky 21:33 (~7m/mile) for the Bridge Inn 5km. I used to be faster but haven’t really been running since last year.

I also need to put on some weight because at 6 foot I’m pretty puny weighing in at 10st 9lb. According to the NHS weight calculator I should be over 12 Stone.

I’m setting myself the challenge of knocking 2.5 minutes off my 5km time (I’ve never run it under 19 minutes before) and reaching 12st 2lb before the Bridge Inn 5km summer series finishes on July 27th (the website hints there’s one in August but I’m pretty sure it’s wrong…).

I’m not sure how hard this challenge is going to be since I pretty much plucked the numbers out of the air. I also don’t know how to find out if I’m on track. Should I aim for linear gains and therefore expect to be half way to each of my targets halfway through the challenge? Or is there some kind of curved graph in which I get most the way very quickly but it soon flattens out?

Anyway, I’m sure it’s going to be tricky since they are both conflicting targets. The heavier I get, the harder it will be to run faster, but the more I train, the harder it’ll be to get heavier.

I’ll track my progress on here as often as possible. It should be an interesting experiment…

Listeners and Events

There are 8 Listeners to remember. We know there are attributes in 4 scopes because we know how to Pick the Right Scope Automatically, but you can’t listen to Page attributes, it doesn’t make sense, so that leaves us with RSA; Request, Session and Application. These tally with the objects:

  • ServletRequest
  • HttpSession
  • ServletContext
There is a Listener for each of these objects for lifecycle events, and for attribute events, so that gives us 6 of the Listener Interfaces:
  • ServletRequest[Attribute]Listener
  • HttpSession[Attribute]Listener
  • ServletContext[Attribute]Listener
HttpSession gets the 2 extra interfaces:
  • HttpSessionBindingListener – Attribute objects implement this if they themselves want to know whenthey are [un]bound
  • HttpSessionActivationListener – Listen here to have a nose when the session is gallivanting around


There are just 6 events, one for each lifecycle event:

  • ServletRequestEvent
  • HttpSessionEvent
  • ServletContextEvent
and one for each attribute-related event:
  • ServletRequestAttributeEvent
  • HttpSessionBindingEvent – (It’s easy to remember this black sheep because its initials rhyme with the worlds local bank HSBE)
  • ServletContextAttributeEvent

11 EL Implicit Variables

All the EL implicit variables are Maps except for pageContext.

To remember the attribute-holding scope objects, just remember to Pick the Right Scope Automatically and stick the word “Scope” on the end:

  • pageScope
  • requestScope
  • sessionScope
  • applicationScope

Then you have 4 param and header objects of the form : (param|header)[Values]

  • param
  • paramValues
  • header
  • headerValues
Then I just remember the last 3:
  • cookie
  • initParam
  • pageContext (not a Map, it’s the JavaBean)

Captain Pan PreVents Captain Hook

This is (a rubbish one) just to help me remember the DD tags:





Whereas Servlet params are “in-it”:







Direct a Film about Petal Ink

I’ve made a timelapse film of some daffodils blossoming but I really should do another one of a rose with its stem split into two different bottles of ink.

Not a very interesting post, it’s just another think I need top remember from this book for my exam.

Direct a film about PeTaL INk
Boils down to:
Jsp Directives are Page, Taglib and Include

Pick the Right Scope Automatically

As I previously metioned, I’m taking the SCWCD exam tomorrow. When trying to cram for any exam I like to make up short poems, acronyms or just random chains of though. For example, I know the difference between Mitosis and Meiosis because Meiosis begins with “Meow” which is what cats do and they have four legs… anyway…

My first thing to remember is that a JspContext has a findAttribute method that I can use to Pick the Right Scope Automatically.

The acroynym, PRSA, is the order scopes are searched for attributes: Page, Request, Session, Application. You know that the S stands for Session because you can’t put attributes in a servlet. This also allows you to remember which objects can have attributes.

Head First Servlets and JSP Errata

I’m sitting another Sun* Certification exam tomorrow to become a Sun Certified Web Component Developer (SCWCD). I’ve done a bit of revising but I’m writing this post mainly as a way to procrastinate. I should take more exams really if only as a way to get other things done. Procrastination during my final year of uni enabled me to learn how to speedsolve a Rubik’s Cube.

I’ve just read the study guide for the SCWCD exam; Head First Servlets and JSP.

It’s quite long, and pretty good at sending you to sleep in the evening, but as programming books go, it’s good in the sense you can just read it without being sat at a computer.

I made a list of mistakes I spotted whilst reading the book almost like a game that made sure I read it thoroughly. O’Reilly offer a page for people to submit errata for this book but to be honest, I can’t be bothered. They should give people free books as a reward. Maybe if I mention the name “Kathy Sierra” in this post, she’ll find this from Google and post me a book herself 😉

p140 – in bullet 6 it should be “mostly
p315 – It says only four attributes are on the exam, but if so, it’s not clear which four.
p555 – an design principle
p557 – the size attribute disappears
p580 – directional quote marks are a problem throughout the book but the sample code in question 3 tries to concatenate a String that contains un-escaped quotes that can only end in tears.
p587 – valid uses of these tags
p590 – answer E is ticked even though it is incorrect.
p598 – the reason for Q17 option D is just badly phrased.
p599 – I don’t remember reading anything about the “variable” directive, did I fall asleep at that bit or have a got a page missing?!
p654 – A Brew Master gets special descounts
p677 – Missing T – CLIENT-CERT
p694 – Q1, option C has a space in front of it. This isn’t the only example in the book either
p710 – The book randomly applies ligatures for adjacent F and I characters. Annoyingly however, it does this in the “courier new” code examples which is chosen because it is a fixed width font. Blending F and I into a single charater width looks really strange to me. I picked p710 as an example because the first line doesn’t use a ligature, but the first bullet point does.
p747 – other client components
p777 – in the bottom right, the sentence doesn’t count all 5 jars
p787 – I don’ remember there being any talk of the Composite Delegate pattern in this book

Well, that kept me busy for a few minutes, I better take the mock exam and see how badly I’m going to fail this exam…

*I’m sure the Sun certification exams will be deprecated by Friday by a bigwig in Oracle towers.