Extreme Tips for Unmaintainable MIDlets
I stumbled on a blog post containing “Extreme Tips for Lightning-Fast MIDlets“. Let’s look at some of these programming gems:
Avoid synchronization when possible
Mmm, okay. Don’t know about you, but I synchronize code only when I need it. Perhaps the author of this article likes to synchronize on a whim? Not me…
Array-spreading
Example:
// Before int[][] table; // a 4×4 table // After int[] table; // a 1×16 table
WTF?! Let’s look at the pros and cons of this:
Pros:
- marginally quicker
Cons:
- extra computation needed to find the correct array element, if the data structure is supposed to model multi-dimensional data. Espcially relevant if the number of the items in the first dimension isn’t fixed at compile-time
- yields code which is more difficult to maintain. Associated risk of introducing bugs
Tags: antipatterns, j2me
Filed under tech :
Comments (0) :
Aug 5th, 2008
Another letter from East Midlands Trains
Dear Sir,
Our records show that you have contacted the East Midlands Trains Customer Relations team during the last three months.
In order for us to measure how happy our customers are with the way we deal with their feedback, please take a few moments to answer the following questions…
My pleasure! Apparently, I’ll be entered into a draw to win a pair of First Class tickets for travel on East Midlands Trains. Cool… the wife and I would like to go from Nottingham to Aslockton in December please. Oh, hang on…
Tags: east midlands train, humour
Filed under transport :
Comments (0) :
Jul 29th, 2008
Survey / petition results
Let’s cut to the chase - the results of the survey and petition at Aslockton station on an ordinary wet Thursday in July:
- 21 trains were observed
- 92 people were counted (boarding and alighting)
- which means 4.3 people per train
- 74 people signed the petition, which will be sent to East Midlands Trains and the Department for Transport
4.3 people per train is slightly higher than I’d expected, given the official figures at the Office of Rail Regulation. This may be due to one or more of the following reasons:
- this is just one weekday, and the passenger numbers for weekends may be less - lowering the average (likely)
- guards on the trains are still lax in collecting fares, so some passengers aren’t counted in the official figures (likely)
- the upwards trend in passenger numbers is continuing, since the latest published figures from the ORR (possible)
- it might be “International Let’s Travel To Aslockton Day” and no-one’s told me (unlikely)
Finally, some trivia:
- I left the house this morning at 05:15
- today I met three people who are physically incapable of driving, all of whom would be severely inconvenienced if these cuts are made…
- … including one chaplain at HMP Whatton
- at least ten commuters, when describing the draft timetable, used language which would make the aforementioned chaplain blush
- one pristine Bic Biro was chewed by ‘passenger unknown’
- six pints of delicious Tim Taylor’s Golden Best were sunk (it’s been a long day - I’m allowed)
- I’m signing off at 22:59, tired to the point of delerium
Tags: east midlands trains, petition, survey
Filed under transport :
Comments (0) :
Jul 10th, 2008
Proposed “Poacher Line” timetables for December 2008 - download here
East Midlands Trains, bless ‘em, seem to be giving out the draft timetables (for the Poacher Line from December 2008) to anyone who asks. So I thought I’d relieve some of the burden, and reproduce them here.
Note that these are DRAFT timetables - the final timetables will not be available until the end of July.
We have just 2 weeks left to campaign against the service cuts.
poacher-line-weekdays-december-2008.pdf (PDF, 78k)
poacher-line-saturday-december-2008.pdf (PDF, 81k)
poacher-line-sunday-december-2008.pdf (PDF, 52k)
(You’ll need Adobe Acrobat Reader to read these draft timetables)
Tags: east midlands trains, poacher line, timetable
Filed under transport :
Comments (0) :
Jul 9th, 2008
Survey and petition - tomorrow
Tomorrow morning, I’ll be at Aslockton station before 5.30am, and will be there til the last train at 10.11pm - counting people and collecting signatures on a petition.
The Office of Rail Regulation says that there are “3 Aslockton passengers per train”, so I’d be happy to count 60 people and collect 30 signatures.
Now, 30 signatures doesn’t sound much, I grant you, but those 30 people will be putting around £100,000 into East Midlands Trains‘ coffers annually. So I don’t think we deserve to be treated with such contempt.
Tags: east midlands trains, petition, survey
Filed under transport :
Comments (0) :
Jul 9th, 2008
Aslockton has more passengers, per train, than Bingham
Ah, train station usage figures. Not usually the stuff of wild excitement, but bear with me.
Figures are collated by the Office of Rail Regulation, and are available on their website.
So what for Aslockton?
The total number of entries and exits (ie, the number of people boarding and and alighting) at Aslockton for financial year 2006/07 was 21363. Given that there are (roughly) 6812 trains stopping at Aslockton each year, that would be 3.14 people per train - and there’s consistent year-on-year growth too:
ALK BIN RDF
Year 2006/07 21363 25181 9326
Year 2005/06 18538 26134 10892
Year 2004/05 16064 28053 9565
Year 2003/04
Year 2002/03 15991 41038 13220
(There are no figures for the year 2003/04)
So, headline figures:
- Consistent year-on-year growth for Aslockton
- At the current rate of growth (and decline at Bingham), Alsockton would overtake Bingham this year
Average numbers of passengers per service
6812 trains call each year at Aslockton and Radcliffe, and 8112 at Bingham. This means the average passengers-per-service for the three ALK, BIN and RDF would be 3.14, 3.1 and 1.37.
Let’s compare this with East Midlands Trains’ official line:
“At Radcliffe and Aslockton … our data shows the average number of people joining/alighting at Radcliffe (the busier of the two) to be only 1.3 per train compared to 3 at Bingham.”
1.3 people per train at Radcliffe? Yes
3 at Bingham? Yes
Radcliffe busier than Aslockton? NO!
Indeed, if the figures from the Office of Rail Regulation are to be believed (and who wouldn’t?)… then Aslockton is a busier station than Bingham.
Tags: east midlands trains, office of rail regulation, orr, passengers, train
Filed under transport :
Comments (0) :
Jul 4th, 2008
26 People
This morning, I watched as a total of 26 people made use of Aslockton railway station at 06:27, 07:27 and 08:17, most of whom I recognised as people who make return journeys every day. So that’s approximately 50 journeys.
50 journeys witnessed, 21 trains calling at Aslockton per day. I make that an average of 2.3 people per train, and that’s assuming that no-one uses any trains during the day. The true figure will certainly be more than 2.3.
“Less than 1.3″ my arse.
Makes me wonder what East Midland Trains base these assertions on. Surely it can’t be based on revenues, because their ability to collect fares isn’t great (but better than Central Trains before them). How often is my ticket checked? At most, 75% of the time.
Tags: east midlands trains, survey
Filed under transport :
Comments (0) :
Jul 1st, 2008
A reply from East Midlands Trains!
Just 24 hours after accusing East Midlands Trains of not replying to my letters, I received a reply. I feel I should apologise to East Midlands Trains, and Tim Shoveller in particular.
In his reply, Tim (Managing Director of EMT) asserts:
On average, fewer than 1.3 people join or alight each train calling at Aslockton
(I paraphrase slightly)
1.3 people eh? There are 21 trains which call at Aslockton every day, so you reckon that there are no more than 38 journeys in to or out of Aslockton every day? That’s just 19 people making a return trip?
Riiight. We’ll see.
Tags: commuting, east midlands trains, train, transport
Filed under transport :
Comments (0) :
Jun 30th, 2008
East Midlands Trains: proposed timetable changes, December 2008
East Midlands Trains run regular services between Nottingham and Skegness, which stop at many smaller stations en-route. These commuter services to and from small stations are used by many dozens of people every day. EMT propose to make significant changes to these services.
Headline changes:
- More services to run from Nottingham to Skegness via Grantham
- Fewer services to stop at small stations
- 50% cut in weekday services at smaller stations (Netherfield, Radcliffe on Trent, Aslockton, Elton and Orston and Bottesford - to name but five)
- 75% cut in Sunday services at smaller stations
For me, this would be a disaster, and would leave just two trains out of Nottingham on a weekday evening: the first would leave at 17:34, which is too early for people who finish work at 17:30. The other train leaves at 20:45. (No, that’s not a typo - it would mean a three-hour wait every evening to get the train home).
Commuters in Aslockton, Elton and Orston and Bottesford would be most affected, as the last bus service from Nottingham to Aslockton is at 17:32, and there are no bus services at all to Elton, Orston or Bottesford. Significantly, residents of Bingham would be affected too, as the town is already suffering from an on-going parking problem - which would surely increase if commuters would be forced to catch the train from Bingham instead.
Are you affected?
You’re directly affected if you commute to or from:
- Netherfield
- Radcliffe on Trent
- Aslockton
- Bottesford
- Elton and Orston
- small stations east of Grantham, such as Ancaster
You’ll be indirectly affected if:
- You drive along the A52 (east of Nottingham) at peak time - rail cuts will certainly mean increased road traffic
- You visit Bingham and need to park in the town centre - commuters from surrounding villages such as Aslockton will have little choice but to park at Bingham and take the train from there
- You live in Bingham - especially near Bingham station - and would like to be able to park in front of your home!
I’m affected! What now?
If you’re affected by these proposed changes, you need to make your feelings known. The following people may be able to convince EMT to keep services running as-is.
- Your Member of Parliament (probably Ken Clarke or Alan Duncan)
- East Midlands Trains (Tim Shoveller, Managing Director or Jake Kelly, Customer Service Director)
- The Department for Transport (Margaret Lanyon is Franchise Manager for the affected area)
- Your County Councillor (Nottinghamshire, Leicestershire, Lincolnshire)
Is this letter-writing making progress?
Firstly, my local MP and County Councillor are both on-side and share our concerns.
Margaret Lanyon from the Department for Transport described the proposed timetable changes as “providing improvements”, and said that they would give “a performance gain which will improve robustness”.
East Midlands Trains hasn’t responded to any letters.
The Nottinghamshire Campaign for Better Transport are supportive, as are the people at Railfuture.
And what next?
I’ve no idea. After handing out leaflets on trains, and putting up notices at stations, I’m starting to feel we’re losing momentum. We must keep petitioning East Midlands Trains and the Department for Transport, but I fear that it’s all falling on deaf (or closed) ears.
The Department for Transport seem to want to wash their hands of the whole situation. Describing the proposals as “providing improvements” is utter bollocks. East Midlands Trains aren’t replying to letters.
Tags: commuting, east midlands trains, train, transport
Filed under transport :
Comments (8) :
Jun 29th, 2008
Voyager 2110 router / Plus.net / disconnects / firmware
(Not the most imaginitive post title, but…!)
I stupidly upgraded the firmware in my BT Voyager 2110 router to the latest version, 3.03c. Stupid, stupid, stupid. “If it ain’t broke…”, etc.
The 3.03c firmware has fails to automatically reconnect whenever the line drops, as it does regularly around these parts. So I had three options:
- Whinge, moan, drink whisky, kick the cat
- Write a script which automatically hits the [Connect] button in the web interface every minute
- Find some firmware which doesn’t have the problem
Given that I have no cat, and absolutely no desire to write a shitty script to fix a stupid problem, it ended in a firmware hunt.
Turns out that the nice folk at Andrews and Arnold have seen this problem before. And they’ve got the GPL’d sources from BT and fixed the problem too. Nice work chaps! (Now all you need to do is fix the crufty rebranding exercise in the admin web pages of the router - which looks like it was done by a 5 year-old)
Tags: bt voyager 2110, firmware, router
Filed under tech :
Comments (0) :
Jun 24th, 2008