Life

Name that Computer!

I just took the BBC’s “Name that old computer” quiz (http://news.bbc.co.uk/1/hi/magazine/7671677.stm), and scored a mediocure 5/10. I’d be interested to hear what anyone else gets. I was mostly let down by not knowing any of the consoles (in my defence I have never owned any games consoles, so I would not have expected to recall the name).

Games
Life
Technology
Web links

Comments (1)

Permalink

Happy birthday to me!

See title.

Life

Comments (1)

Permalink

About time for another post.

Having written nothing on my blog since the 1st of September I feel it’s about time to flex my inability to spell (made worse by the fact that my sister has stolen“borrowed” the dictionary I keep by my computer) again and write something.

Since my last post:

  • I have quit my job.
  • I have started a new job (“IT Services Specialist”) at Loughborough University, part time.
  • I have returned to my job at Startin Tractors for the other half of the week.
  • my sister has been moved to a more secure secure ward – she’s now locked up with the likes of mentally ill prisoners.

Still it’s all good.

I only wish I had something interesting to put here, but I can not think of anything so instead I’m just going to provide a link to http://bash.org, to annoy anyone trying to work at this point.

Blog
Life
Work

Comments (1)

Permalink

…and then there were two (posts)

Having survived another day at work, I’ve now gotten round to writing the final few things I missed off this mornings blog post.

One thing I forgot to mention this morning was that, although MSSQL deleted over 1,000 records from a table by a cascaded delete, the output says “4 rows affected” as only four were deleted from the first table. If a higher number had been reported anywhere in the output it might have allerted to us that there was a problem earlier than the customer calling support because their site no longer functioned correctly.

Rant aside, since my last blog post (in May, this is just an extension of this morning’s) my Grandfather, who was formerly a Commando and then a coal miner, died. He’d been ill for sometime but we did not expect him to die quite so suddenly. Fortunately he died peacfully, in A&E where he’d been taken after coughing up some blood at home.

Yesterday Pete wrote about a document on maintainable code he found at work. The document makes some very good points for writing “maintainable code”. However I would dispute the suggestion that “Every function should be most 20 lines of code”. The rule where I work is that a function should be the length necessary to perform its given task, no more and no less. Usually this means that the function will fall well within the 20 line limit suggested, however it is not uncommon for a complex function which performs a very specific task (such as manipulating the contents of a particular input file, from a manufacturer, to fit the database schema)  to be 100 or more lines in length. Setting a hard and fast limit on the length of a region of code, be it an if block, a function/method, a class, etc. is not, in my opinion, conducive to maintainable code.

Another interesting item I saw noted on Planet Compsoc was this BBC article about Lenovo (who made my wonderful T60) preparing to sell laptops with Linux pre-installed on them. At the bottom of the article it says “Analysts believe that approximately 6% of computers users run Linux, similar to the numbers choosing Apple Macs”. I find this fact extreemly interesting as the company I previously worked for, in the holidays, had a statistics analyiser (which I installed) for their web logs, which showed approximately 6% of visitors to the site used Linux. The Mac quotient of Visitors was significantly less than that, however, and a full 90% of Visitors used Windows XP. Another random fact I found interesting was that use of IE 7 and IE 6 to visit the site was evenly split at 45% each. It makes me wonder how many of those have IE 7 simply because Windows Automatic Updates have installed it for them, and how many of the IE 6 users only have that because they never run the Automatic Updates.

Finally; At christmas I undetook the task of re-writing the stock management system I had previously written for my then employer. The re-write was necessary as the system had started out as a very small and simple thing, which had then had bits and pieces botched onto it as and when my boss decided that it would be nifty to have feature X (or Y or, more commonly, X, Y and Z. By lunchtime.). The result, as always with projects which develop like this, was a hideous mess with, for some reason, worked. Until it stopped working. And then something would hit the fan and land on my desk.

As a result I decided to dump the hacked-to-death php code, and re-write it using an MVC framework. I settled on Rails as it promised great productivity and allowing the developer to concentrate on writing functionality while it worried about the nittity-gritty, such as interfacing with the database. I completely re-wrote a system which had taken over 2 years to develop in 3 months, and Rails did deliver on its promises. Since I’ve stuck to the (somewhat enforced) MVC seperation of the Rails framework adding functionality is a doddle, as is maintaining the code. I have, however, found a small flaw in my approach.

The rails URL scheme opperates on the theme of ‘[controller]/[action]/[id]‘, where the controller is the name of the controller (duh!), action is the method within that controller which is being called (and is also the name of the view) and id is an identifier (intended for identifing a db record, for example). I am aware this can be hacked somewhat with the Rails cofiguration, but deviating from the intended path for such frameworks often leads to problems down the line when the framework developers decide to fundamentally change the framework such that these hacks no longer work as intended. Anyway, back to the URL scheme. This is all fine and dandy when I have a stock management system with a ‘browse’ controller, which has such actions as ‘list’, ‘view’, ‘pdflist’ and so on, and an ‘edit’ controller which (also) has a ‘list’, ‘edit’, ‘uploadimages’, ‘uploadpdf’ etc. . (I know it looks like the two list actions violated the DRY (Don’t repeat yourself) philosophy, but they operate in fundamentally different ways, the browse one only operates on a specific subset of the database limited, among other things, to just what is in stock.)

My problem is that, although this is fine for a stock management system, I also need to integrate the old parts management system in as well (on the old system this was a HORRIFIC kludge). There are two obvious solutions, neither of which I’m keen on. One is to create a ‘parts’ controller in the existing app, which contains ’editlist’, ‘viewlist’, ‘edit’, ‘view’, ‘uploadphotos’ etc. . This could possibly extended to move all of the stock stuff into a ’stock’ controller. I do not like this as it a) feels too much like bolting the thing on, like the old mess which I’m obviously keen to avoid recreating, and b) the controllers would then get very large and the maintainability provided by seperating out these systems will vanish. The second alternative is to create a seperate rails app to do the parts management. As I mentioned I’m trying to integrate these systems, so creating a seperate app for it seems like a bad move towards that end. It would also mean hacking the Rails config to not assume it is at the root url, and setting up the webserver to rewrite urls. It is all hassle I’d like to avoid.

I’m now wondering if I should have use Django instead, where a project (or site) is supposed to be a collection of apps and I suspect that, as a result, the integrated stock and parts management system would be a lot easier to realise. I’m now back into the realm of trying to justify, either way, another rewrite of the system. I will add that Rails has given me some major performance headaches, and I’ve had to re-write portions of my code to not use the Rails helper functions, which I view as bad, as my code now relies of certain aspects of the Rails framerwork not changing, where as the helper functions should (I would hope) be updated to reflect changes made in the future, in order to achieve something of the order of an acceptable performance.

Life
Linux
Rants
Technology
Web development
Web links
Work

Comments (0)

Permalink

It’s been a while…

I’ve not posted to my blog since the end of May, so after two-and-a-bit months it’s high time wrote something.

Whilst I’ve not been writing, I’ve also not been checking the comments. Due to the amount of spam, I require all comments to be approved by me before appearing on the site, so appologies to all the people who had comments stuck in moderation.

I’ve now been working in my new job for 2 months and it is generally okay. Windows, VisualStudio (2003) and Sourcesafe are all colluding to slowly drive me insane but for the time being I’m keeping the urge to take a Linux LiveCD into work at bay with healthy doses of Ruby and Debian in the evenings.

The one major cock-up I’ve made at work was a MS-SQL script to delete four rows from a table. Another, related, table had been corrupted and every row had been altered to point to the same (one) record in the first table. I had written a script to delete four faulty record and then fix the data in the associated table. Since I was deleting data I, as I make a point to always do, only used the primary key column of the table I was deleting from to ensure only the specific record which needed deleting was dropped. Unfortunately I was not aware of SQLServers ability to cascade delete record, nor was I aware that this feature was in use of the tabels in question. As a result the related table ended up with nothing in it. Whoops! We are waiting for the backup tape to be sent from Derby to Nottingham in order to restore the data to a point before the script was run. Fortunately all scripts which are run on live database servers have to be peer-reviewed, both for syntactic correctness and that they perform the task intended, before they are run so I have someone to share the blame with. I am, as the script writer, ultimately responsible for this mistake (through my own ignorance) however my colleague who reviewed the script should have been aware of the cascade delete and he did not spot the potential problem either. Nevermind.

For the past week I have also been shadowing another colleague who is left the company yesterday to learn about the systems where he was the only person with any knowledge. Last night hosting services, in their infinite wisdom, decided to move all of the servers involved in these systems from one location to an entirely different part of the country. The one thing that could possibly break everything should have now been performed the very night after the last day of the only person who knew these systems! Go go gadget forward planning.
I have a number of other things to write about, but I have to go to work early today in order to be there should the server move cause any problems. Maybe I’ll find time to write some more tonight (I wouldn’t hold your breath, though).

Blog
Debian
Life
Technology
Windows
Work

Comments (1)

Permalink

“Life is just one damned thing after another.” (Elbert Hubbard)

Since my last post I have received, filled in and returned all of the paperwork required for my job, which I am now starting on June 10th, one week after my exams finish.

My first exam, neural computing, went well – I had little problem completing the required number of questions without struggling for content, in the case of the essay portions, or forgetting the required equations in the case of the maths. I was quite encouraged by how the exam went, having had severe doubts about my ability to complete the exams satisfactorially in the weeks leading up to it.

My sister, who is still in a secure mental health unit in hospital, now seems to be moving from one crisis to another. In the past few weeks, she had taken a potentially fatal overdose (despite being in a ’secure’ unit) and has been unable to eat properly until recently as a result. My mother, one of my other sisters and I went to visit her today (my parents have been visiting her almost daily since she was first taken to the unit) where we took her to a bookshop and bought her some hot chocolate in Sinsbury’s cafe. Since leaving her at the unit this afternoon, she has apparently tried to force her way out and has now been sectioned under the mental health act to prevent her from leaving (presumably due to the threat she poses to herself outside of the unit).

The ongoing situation is putting massive stress on the family at home to the extent that my mother now feels unable to go to work and I eventually fled back to Coventry last week (I felt unable to leave earlier in the week because of the state of my mother) as I could no longer cope, despite the fact that it ment leaving my mother sobbing on the doorstep. I feel terrible as a result.

At Church this morning we also found out that the husband of one of the members of the clergy team died suddenly yesterday afternoon, with no apparent cause or warning. As a result the entire service was very subdued and we are all thinking of his wife and children at the moment.

Life

Comments (0)

Permalink

“Life is like an onion: You peel it off one layer at a time, and sometimes you weep.” (Carl Sandburg)

A lot has happened to me recently, so this is going to be a long post mostly about my miserable life – hence the quote.

The third year project report was completed and handed in on time (after much blood, sweat and tears) as was the neural computing coursework.

During the holiday three members of my family ended up in hospital with various ailments, and I am still receiving ongoing treatment for my missing teeth. One of the implants I had failed quite soon after it was inserted, however when the consultant came to fit the false teeth on the other one it too came loose. It has now been removed and the consultant has decided that I am to have bridgework done instead (I was offered the alternative of being refered elsewhere for a more substantial bone graft than was done the first time around followed by a repeat attempt at the implants).

My grandfather ended up in hospital after coughing up blood, has been diagnosed with lung cancer and is shortly to begin radiotherapy. My father has been in hospital to investigate if he has bowel cancer (fortunately the samples which were taked showed he did not) and my sister is in a secure mental unit after attempting suicide at home.

On Tuesday, during the evening, I was returning home (from hospital) when my car was hit from behind by a 4×4 whilst I was waiting to pull onto a round-a-bout. At the time the damage seemed minimal, just a broken tail light (the 4×4 got off without a single scratch to the paintwork!). Further examination at home revealed a dent to the corner of the boot, multiple broken bulbs and a significant bulge to the inside of the boot where, presumably, the bumper on my car has been pushed in. Life’s a bitch. The driver of said 4×4 has admitted liability for the accident so his insurance is paying and Endsleigh (who my car is insured with) have been fantastic. I’m going to be sorry when I have to return the 07-reg courtesy car and get my little P-reg Peugeot 106 back.

On the plus side, I had a phone call at 17:20 on Tuesday asking if I could be in Birmingham the following day for a job interview. I quickly changed my plans and made the necessary arrangements to attend. Following an unexpected test (all programming related questions – what does this code do, what’s the output of this, etc.) I was invited to another room for the interview. At the beginning of the interview the panel of three explained their normal recruitment process, with a first inverview followed by a second interview for candidates they think are suitable possibly followed by a job offer. I proceded to have the interview, in which I discussed the system I have been developing for my holiday job as well as explaining the concept of ‘LAN Parties’. Following the interview I was led to another room whilst the panel chatted among themselves and was then led upstairs to a side room where they proceded to offer me a job on the spot! :)

I am yet to see any paperwork for this job, but it is entirely possible that I may be working straight after my exams. Yay!

Life
Uni of Warwick

Comments (3)

Permalink

People suck…

About two months ago a coworker of mine suggested that I implement a Palm-based data entry program for our stock database system (which I wrote). As I had no experience at all of writing applications for anything more (physically) portable than a laptop I was not overly keen on the idea, and a few hours of me being less than enthusiastic seemed to have kept him quiet. At least until a few weeks later when I was presented with a brand new palm (the company’s (of course!), and now in the less than safe hands of one of my other coworkers) and told to write said application.

Last week I had finished implementing a storage and retrieval system and was just starting work on the facility to edit stored data (a fairly trivial task once it was possible to save a new record and view existing ones). The coworker who initially requested the system duely demanded a progress report, which I gave. I was promptly told that editing existing data was not needed, so I deployed the application. Fast forward to yesterday, when another coworker (the one who actually uses the shiney new palm, and my app) says, “You know what’d be really useful? The facility to store part of the data and to come back and edit it and fill in the blanks later, without returning to the office to use the PC-based frontend.” (or words to that effect). People suck, in this case because they don’t know what they want (or, rather, they think they know what they want and then demand that you provide what you thought they wanted after they told you they did not want that (still with me?)).

On a completely unrelated topic, Vista is still going strong on my laptop with only 2 major gripes at the moment. The first is that it uses well over 1.5GB of memory (of which less than half seems to be accounted for by Task Manager’s process list – and yes that is running with administrator rights, my user alone seems to only be using ~200MB although IE7 doubles that when running) which means doing anything (from loading an application to compiling a test build of a program) involves waiting about 3 minutes for Vista to swap enough stuff to disk(the laptop has 1GB physical RAM) to perform the task it was asked to do. The second is that I can not seem to lay my hands on a decent free archiver which works with Vista, my usual choice (IZarc) has major issues, as does 7Zip and several other ones I’ve never heard of before but tried. At the moment I’m using the WinRAR trial and hopefully IZarc’s issues will be resolved before the trial expires. I have not yet had chance to play about with getting WMP11 or MPC to play my music collection due to work, coursework, a sister in hospital and other bits and pieces I have to do to survive and pass my degree. I will probably have to activate Vista soon too, hopefully it will require less effort than the 5 calls to Microsoft it took to activate (pre-installed!) XP on my old laptop.

Life
Rants
Windows

Comments (0)

Permalink

Doom, gloom and failure.

Since it is now 3 to 6 months since the implants were placed in my jaw, I went yesterday for them to cut open a portion of my gum again (albeit a significantly smaller bit than last time) to expose the implants. Unfortunately when the consultant came to unscrew the cap which covers the top it became apparent that one of the implants had not “taken” and was just spinning in the socket they had drilled for it. As a result the implant had to be removed, and I’m now left with a hole which has been packed by some crazy medical material.

The other implant is fine and exposing that one went to plan. I’m now left considering whether to re-try the implant route (which will now involve referal to yet another hospital and a bone-graft operation) or to have a “reversible bridge” (which can be removed if I later decide to retry the implants). Having spent the best part of 5 years undergoing this treatment I am very disappointed it failed like this. I am now leaning to the bridge option as it will most likely take a month rather than another year, or more, of treatment although it will probably be less robust and may fall off in years to come.

I saw my third year project tutor this morning and had a productive discussion with him about the likely technical difficulties which may arise giving my presentation. As a result I went to see one of the system programmers who suggested that I e-mail the unix help address and requested a project account which can be allocate a small port range I can use to run my projects listening server on the undergraduate server and connect to it from both my Laptop (which will be running Windows, for the purposes of the presentation) and the provided Red Hat system. This sounds really promissing.

Development as always is progressing, but perhaps not quite as quickly as I would like. As I am now pouring almost all of my free time into the project there is not much I can do to speed things up. That said, I am more-or-less on my (revised) schedule for implimentation and am confident about having it complete in time for the presentation.

3rd Yr Project
Life

Comments (0)

Permalink

Life, The Universe, CompSoc and third year projects

It’s been quite a while since I’ve written anything on my blog. To a great extent I’ve just been far too busy (this hasn’t changed, but being back at Uni there is noone watching me from behind to see if I’m not working) and during the holidays I do not get the oportunity to use a computer much outside of work due to a lack of time.

Three important things have happened since my last blog entry;

Firstly, I’ve had surgery on my mouth to remove two of my existing teeth and have implants placed into my jaw which will, when healed in 3 to 6months time will support four false teeth in their place. I am missing a significant number of teeth (which I’ve never had) and the problem seems to be genetic – my mother has a large number of teeth missing as did her father. The ongoing appointments for this are proving quite disruptive and I an ending up missing lectures quite regularly at the moment (co-incidentally the lectures always seem to be for the ‘Compiler Design’ course, dispite me missing them on different days and at different times.

Secondly, The deadline for handing in my third year project specification was last Thurday. While I managed to hand in the required work before the deadline, the work I handed in contained a number of errors which I should have spotted. The main reason for this was that I made a mistake and overwrote the latest version of the specification with an older version which ment I then had to waste a lot of time recovering the newer copy. Had this not happened I would probably have had an extra 3-4hours to spend on getting it right and would not have rushed and handed in an erroneous version.

Finally, Over the holiday I have reached the conclusion that CompSoc, as a group of people, suck. The ideas on which CompSoc is founded, as an academic society who provide support, guest lectures and tutorials for people who like computers are great and like a number of people in CompSoc I simply love computers, however CompSoc is increasingly being taken over by two types of people. One of these is the gaming types, whose sole interest is playing games at every opportunity and are of the opinion that anyone who doesn’t want to play games all the time is not worthy of being in the society. The other group are the type who simply moan all the time about everything. They seem to complain for the sake of complaining and are completely unwilling to do anything productive to fix the problems they moan about.

I for one am sick to the back teeth(well, sick to what back teeth I have) of people moaning and bitching at people needlessly. This is the reason I have left, and do not intend to return to, the #compsoc irc channel on their irc network which is where all of the active members tend to spend their time. Since leaving #compsoc I have noticed no unjustified moaning occuring in any of the other 13 channels I am in on CompSoc’s IRC network. The thing that really gets to me is people bitching non-stop about things which other members have put a significant amount of their time and effort into and get nothing in return. Members have no obligation to take part and do stuff for CompSoc, like the website, the IRC bot, helping manage the servers and setup LANs the least they could expect is not to be bitched at constantly for something they have given time and effort for, entirely volunterially.

There was a suggestion that the Warwick Linux User’s Group could part from CompSoc and form its own society. This idea was quickly shouted down as, among other things, it might spell the end for CompSoc. I’m not sure that this would have been a bad idea. If the LUG had left, at least CompSoc might have been forced to get its arse in gear and stop being the ‘gamers and bitchers’ society.

If it weren’t for my multiple obligations to the society and the fact that I know a grand total of about 0 people outside of CompSoc I would seriously consider having nothing more to do with them. Thankfully the LUG, which has not had any of these issues, is continuing to move in the direction it was 2 years ago with semi-regular tutorials planned and maintaining the social atmosphere of their meetings. Had the LUG left CompSoc, it would have been a much better society than that which CompSoc has become.

3rd Yr Project
Blog
Life
Rants
UoW CompSoc

Comments (1)

Permalink