Tuesday 25 August 2009

Waste

This is one thing that has really started to get on my nerves recentley, waste!!! People waste time energy and food and it really annoys me. Food! My number 1 pet hate that people waste, and the wasteful habits that are activley encouraged by super markets. My wife buys strawberries, she likes strawberries, yet she has a small appetite. She knows I don't eat them and she also knows that she won't eat more than 1 punnet in the time it takes for them to go off, and yet if there is a buy-one-get-one-free offer on she will walk away with 2 punnets. 1 will get eaten and the other will simply go off and be dumped straight into the compost bin. I've confronted her on this before as to why she is getting 2 punnets when 1 will more than suffice and the answer is she's getting more without spending anymore which you can't argue with. So the farmer that sells his fruit at a lower and lower price because supermarkets are giving them away only suffices to increase the material in my compost bin and reduce the amount of money the farmer gets for his fruit. This lays the blame squarely at the feet of supermarkets...I wonder what true, real and bonefide advantage this gets them?? Another one is food that does simply get thrown away, if you find yourself repeatedly having to throw food away as it has gone over then you are simply overestimating how much you need, or taking advantage of all of those BOGOF offers needlessly. The other thing is when you finish a meal and there is plenty left over is your first response to bin it, or to store it with the intention of turning it into something the following day. I must admit I am a bit of a dustbin for food but some of the best flavoured food I've had has been meals made the day before that have been aloud to marinade in the sauces for a full day strange but true :) Energy Energy being wasted is another bad one, this one carries a more hidden cost not just the environmental one but the fact that most energy is coming from fossil fuels that are for the most part controlled by some rather unsavoury characters and giving them more power is never a good plan. Take new televisions the bigger they are the more energy they tend to require some of the larger plasma tv's draw phenominal amounts of electricity. But there is a simpler energy wasting thing that gets on my nerves and that is this. I recentley bought a new tv, not massive as I live in a small house and big tv's in little houses look shit quite frankly. Anyway I set it up watched it for a bit then, when it came to switch it off realised there was ONLY a stand-by off pressing the button on the tv had the same effect as pressing the power button on the remote, it always used to be in times gone by that you could stand-by with the remote but you could actually switch the thing off as well therefore stopping it from drawing any stand-by current from the wall socket. This means the only way to switch it off properly is to switch it off at the wall which is less than convenient or else get another gadget to switch the plug off remotley but why should I when it was perfectly fine for tv manufacturers give proper power switches!! Time Here is a neat one, people waste so much time it is inconceivable, especially when using computers it would seem. I have heard of people ignoring a faster way of doing a task ( in Word especially ) because they (a) don't know (or want to know) about it (b) don't have "time" to investigate it or (c) their just too plain dumb and stuck in their ways to alter the process that they currently use. Well heres my answers to (a) if you use a tool for X hours a day wouldn't you want to be able to impress someone with just how quickly you can use it, (b) looking into something for an hour that will cut a repeated job down by 10 minutes will have repaid the initial investigation cost in just 6 repetitions (7 if you include the initial learning cycle) and (c) where do you start with someone who lacks the enthusiasm or ambition to better ones self?

Sunday 28 June 2009

Brighton

When your in Brighton in the sunshine you realise just what a bipolar place it really is. The main shopping areas are full of pretentious idiots using the days shopping excursion as a cat walk procession. Whilst the little known out of the way places tend to be full of friendly free thinking individuals the likes of which I am pleased to meet. I had a strange experience in a restaurant in Brighton called Havana I spent my honeymoon in Cuba so was expecting the restaurant to have some sort of Cuban cuisine....bizarrely the decor consisted of white stone walls adorned with French photographs, the menu was bog standard Italian pasta, lasagne and gnocci and the staff were quite clearly from hell!! My wife and I walked in around lunch time and asked for a table for two the waitress pointed us to a table and walked off without showing us to it, strange but Ok I can live with that. We sat down and about 10 minutes later were asked if we're ready to order which we did, making sure to mind our p's and q's. The waitress came back and pretty much threw the cutlery on the table, must be having a bad day I thought. I had a cup of tea which consisted of a nice little pot a cup and a tiny jug of milk, the only thing is there was no milk in the jug and the cup and pot were dirty. I sort of expect this from the likes of a roadside cafe, but not a pratentious restaurant in Brighton. The meal came and to be honest it was nothing special, it wasn't bad but it wasn't anything noteworthy (I have had better meals at pizza express). After we finished and the plates were taken away we were not offered a look at the deserts menu or coffee or anything, no worse, a staggering 20 minutes of sitting there the waitress visited other tables and scooted off I tried to catch her attention but she either didn't notice or intentionally ignored me. So 25 minutes later I went to the bar paid the bill and for the first time ever I didn't leave a tip. The morale of this story is never visit the places in the centre that look the part because you'll only dissapointed, instead seek out the "off the beaten track" places where you will find nicer people and a better quality all round. Speaking of which I stumbled upon a wonderful little pub on the street parallel to gloucester road and there is always the basketmakers arms too :)

Saturday 6 June 2009

PM...should he stay or should he go

This is a no brainer, at a time like this we should not throw the government into disarray by asking for a new PM and instead stick with the man that did pull the country out of decades of 'boom-bust' brought to us by a certain party that sold off all of the countries assets. The country is or should be run like it is a company, and one very successful business man ( Alan Sugar ) has spoken out in support of the current PM not on a personal level but from a business point of view. I still don't understand why the current government is getting such flak for rules that were created 200 years+ ago, most of the population are incapable of free thought and just go with whatever is written in the Sun. Rich people will vote Tory, why, because the Conservatives look after the mid/upper classes and the mid/upper wannabes, at the expense of the working classes and the working classes are incapable of realising this to a large extent. This all makes me angry not with the government but with the public. By members of parliament leaving at such a time I don't see it as a protest against the PM but I see it for what it is, an MP trying to further their own career at the expense of their constituency. By leaving rather than fighting for their constituency shows this person has more interest in their own career than helping the people. Remember the MP's are put in power to serve the people they are not elected so that the people can serve them

Monday 18 May 2009

Politicians...can't live with 'em can't sell newspapers without 'em

I had an interesting conversation with someone, the only person I've found, that actually condones the behavior saying "I don't see what the problem is they did it within the rules. Thats the point, you can still do WRONG whilst remaining within the rules. Take tax dodgers for example, billions are lost each year through large corporations moving money about, all within the law but its still not right. In my mind these large countries are more or less taking money from hospitals and people that need it. Which leads me straight back to the expense claims of politicians, how does a politician getting a surround sound system benefit his/her constituency. Or a moat or a chandelier, just how out of touch with the common man are these people. A staggering percentage of people in the uk struggle to pay the mortgage and are more likely to know the characters of Eastenders than the front row in the house of lords. Sometimes I think the best thing to happen would be a revolution, then I am reminded of the absolute stupidity of the common man/woman and realise that it would spell disaster. Most people don't know what is good for them and would destroy themselves and those around them if they were to get into power!!!!!

Saturday 11 April 2009

concurrency

Just read an interesting post about processors, which ones are better. The scary thing is someone had written "if you have a task to run on a single core, when you run it on a dual core it will complete twice as fast, FACT" well despite the fact this person has written FACT at the end it is totally untrue. Not only can the task not finish twice as fast, it may not complete any faster than a single core machine. This got me thinking, if this is a common misconception even in well regarded tech circles then maybe this explains why very little progress ( at least from what I've seen ) has been made into purposely writing programs to run on multiple cores. Presumably threads of operation are assigned to a particular processor already, this would help to load balance a system and yes vastly improve multithreading i.e. when we use several applications at the same time, however the programs themselves are not written for multiple cores, as far as I am aware. I might write an article about this at some point in the future, just as soon as I have more than a simple netbook to write with. Having said that, this netbook is fantastic, it still manages over 6 hours ( did 7.5 when it was new and running windows not linux ) of continuous use, building apps in netbeans whilst listening to music online e.t.c. very impressive. It's the Samsung NC10 if anyone is interested. Having said that I am seriously looking forward to what netbook offerings come off the back of nVidias ION, now that is a serious pico-ITX board. Whilst researching this I read an article stating that pico-ITX is currently the smallest ITX form factor after the nanao and micro, but I could have sworn the clever guys at VIA had announced a mobile-ITX form factor which was as small as a motorola V3 phone, could be wrong though so I'll have another look. Whilst on the subject of concurrency, does anyone have any metrics for using activeMQ topics as the broadcast bus in a distributed node concurrent system, the system I am looking into doesn't require so much speed to use a shared access memory model type design so I was curious about anyone elses finidings doing things this way.

Friday 10 April 2009

interesting thought

just watching the tv and an advert popped up. "dettol kills 99.9% of bacteria" seems good, but I was thinking if dettol kills 99.9% of bacteria doesn't that mean dettol prevents your body from getting the opportunity to create 99.9% of antibodies for said bacteria. the old saying holds true, "what doesn't kill you makes you stronger". Obviously within reason.

Tuesday 7 April 2009

got bored

I got bored so messed up my blog, don't really like it but hey I am in a bad place right now...only kidding :)

insurance are skum

I was burgled on the 4th of January, and to this day I am still having to ask my useless insurance company Marks and Spencer ( M&S ) for items. What on Earth do I pay them for when they take this long. I found out today that vouchers that have been given in order to pay for certain electrical items can only be used in a single store and can't be used online. No self respecting IT worker buys computer hardware from PC World or Currys, they are over priced and usually outdated. The only machines that come close to suiting my needs are web only offers, oh and by the way they only come close to serving me when I add an extra £50 of my hard earned savings into the mix. iVal the people responsible for aquiring items and sorting out compensation have so far not once called me about the electrical items, not a single time in their process have they been pro active. Credit where credit is due though the staff are nice when you speak to them on the phone, however I am beginning to feel they just tell you what you want to hear to get rid of you as several times messages weren't carried across. This whole fiasco makes me angry, now is not the time to be getting stressed out with all this stuff. To make matters just that little bit worse than they already are, I read an article in the paper that said even the police know who is behind our robbery and others in the area but are unable to prosecute as they haven't located where the goods are stashed. I've never wanted to crush someones larynx with my boot more than I do right now.

Friday 13 March 2009

Amazing

I was playing with Ubuntu a bit more today, the bits that I don't really play with often are the very windowsy-nicey-nice bits, like the applications it gives you...and, well I really should they are of a much higher standard that the Microshaft windows offerings. For example I started Rhythmbox, its a sort of music library application that lets you listen to stuff in your library in much the same was as wmplayer does. In the past this has sprung into life when I plug my mp3 player in and I just shut it as I know I just want to transfer some files. The reason I am so excited by it is I wanted some background noise whilst I work on my code as music tends to keep me focused ( go figure ). So I clicked the radio button and after listening to Virgin Rock for a while it got a bit dull so I clicked the Last.fm icon not expecting much, I was wrong ( again!! ). If you ever used Pandora and were a little upset when it was suddenly no longer free then Last.fm is for you. Looking at the website they have gone through a lot of trouble making a clean simple intuative interface that actually took me by the hand and led me to exactly where I wanted to go. So the site is amazing and the selection of music it gave me was spot on too

Wednesday 11 March 2009

my ordinary day

few things that people should know 1. Writing procedural code in an object oriented langauge does not make it an object oriented program magically. 2. coding progress is not measured by the number of lines written, nor is it inversely related to the number of lines written. With more lines code is bloated and specific purpose of routines/methods is blurred or multitudineous. With less lines but still no division of responsibilities the code is difficult to read and maintain. 3. fixing a bug with no investigation into the cause is the same as applying a plaster to something, yes it stops the bleeding for now but whatever was causing it may lead to death in the mean time. 4. when using an api I should not need to know the inner workings of its implementation, it should be as a simple box that answers my questions. 5. there is good laziness and bad laziness. Good laziness leads to automation and tools being created to make work easier. Bad laziness leads to no units tests, sloppy code and having to repeatedly perform the same operation time after time when it could be automated. 6. situations don't just improve, without someone willing to fix problems they will exist forever. 7. knowing a language syntax does not mean you are a good developer. You can be a good developer, able to see what conditions should exist, what things should be checked for and how something should work without even knowing a programming language UML is often enough. 8. experience teaches a developer, regardless of academic qualifications, experience is what truly matters.

Thursday 12 February 2009

my god I am really a geek

I never thought I was a trekie, I hate Voyager and the Bill Shatner originals, I have never watched Enterprise and yet today I had a room of IT people calling me a trek nerd!! It all started when discussing a personal HUD as a pair of glassed that made you look like data, I corrected this statement by saying Jordy was the one with the glasses, it was played by Levar Burton. Strike 1, knowing the difference between data and jordy I then went on to say yes data was the android played by Brent Spiner Strike 2, knowing what Data was and who played him I followed this up with, you know the doctor from Independance day Strike 3, the nail in the coffin, knowing another sci-fi film that a guy from Star Trek was in. D'oh! Note to self: must remember when to stop talking :)

Friday 6 February 2009

The typical UK drivers guide to driving in the snow

1. when driving in heavy snow make sure you leave no more than 2 inches between you and the car in front, because remember it'll only get you there quicker. 2. When moving away from stationary always rev the crap out of your engine before popping the clutch up, if you don't get grip straight away simply rev more the wheel is spinning so at some point you should start moving. 3. When turning corners ALWAYS whack the steering wheel to hard lock as fast as you possibly can, if you notice the car isn't turning in the desired direction be sure to once again rev the fuck out of the engine. 4. When you need to stop make sure you slam on those breaks as hard as possible, after all whats the point in having abs then not using it! 5. Before setting off remember that it doesn't matter that the MET office has said don't travel unless its a necessity you want to drive and your damned if your gonna let 'The Man' tell YOU what to do. You must have a f**king big exhause a f**king loud stereo and virtually black tinted windows. 6. To defrost the car its simpl, boil the kettle and pour all over the windscreen, ignore that creaking cracking sound it just means the snow is being scared away! 7. Never drive slowly in the snow it'll only make your tires cool down and they may become frozen to the floor. If some other guy is driving slowly, especially if they are doing 28mph in a 30mph zone, overtake them as no one tells YOU how fast to drive. 8. When its snowing always chose the most out of the way routes with plenty of hills. 9. If you are fortunate enough to enter a spin the only way to stop is to turn out of the skid, if it doesn't work first of all turn faster and harder its the only way. 10. The most important thing is, if you see anyone in trouble, especially if its a woman with small children in a ditch, wind down the window laugh, shout, turn the radio up and maybe even flip them off for being lame and not having a car with twice the amount of bhp as your IQ points!

Thursday 5 February 2009

half arsed and happy

I have recently decided to have a crack at making some sort of editor, there are several formats of documents that I would like represented in a specific way and have been as yet unable to find any editors that meet my needs. Plus it would be a great opportunity to learn some of the finer points of Swing or whatever I eventually decide to use. As a side note: it may suit my purposes to make the editor using GTK since it is looking more and more like this is the best solution to the interface for my media centre. For the Swing MVC ( well in the style of mvc but more like message-delegate, I think ) you get a series of interfaces I'll add to this blog as time goes on but for now it looks like this A JEditorPane is an uneditable representation of some styled document, it editable subclass is the JTextPane - to be honest I would have named these the other way round to avoid confusion but thats me. a JEditorPane displays a StyledDocument, this is an extended version of the Document class which consists of lots of Elements that are held in a tree like structure, all of which makes sense. Each Element can have Attributes ( for example bold, italic, size... ), these attributes are what are translated to the visible difference in text and other objects. The Document itself does not carry state, so we don't know where any caret may be or anything that is selected, it is just the data that forms the Document. In order to have state and hence to be able to 'View' the data the Document is added to the JEditorPane inside an EditorKit, this kit is then responsible for displaying the styling defined in the Document as represented by the Style interface. After looking at all this it does kinda make your head ache but it does make sense after a while...as you may have noticed I haven't looked into the Styleing of the Document much yet I have only got as far as the Pane and Document stuff. Therefore I shall add to this blog as the murky waters begin to clear

Monday 2 February 2009

Wiki - what a great tool

I have been on projects that have used a wiki and even more that have not. The difference tends to be that projects that have taken to using a wiki for the most part have far more valuable documentation. It won't be the best presented documentation but it will exist, and it will convey exactly what the author wanted it to. By using a wiki it makes creating and maintaining system documentation so simple and easy that it no longer becomes a chore, in fact by using a wiki developers keen to get one over their colleagues tend to try and make their pages look better than the next guys thus improving the documentation effort. The alternative is to have lots of versioned documents that have standard styling and corrected SPG (spelling, punctuation and grammar) and this makes the task long, tedious and sometimes daunting which normally means its the task that gets put off till the last minute, and as every developer knows the last minute tends to be where frantic dev work goes on to squeeze that extra feature in. So heres to the wiki, I salute you :)

Code Practice

Are public variables bad? Simple answer YES, of course their bad! How on Earth can a class maintain control of its inner working if there are parts that can be set without it knowing, this is like puling the carpet out from under an object. In java there is a very simple specification for how simple data should be accessed within a class, the bean specification says provide a series of getters for items that are externally readable, a series of setters for items that are writable. The simple caveat to this is that items of type boolean have an 'is' method instead of get.

Tuesday 27 January 2009

Iam fed up with making do!

One thing that really irritates me is the whole idea of making do when it comes to code. I quite often hear "oh that error, yeah, it sometimes happens we just restart and hope it goes away". Normally these errors are an indication that something is amis somewhere hence they are "errors". Find out what is causing the error and fix it, this does of course take time up front but in the long run its a much better option that building an app only to find out that the foundation it was built on was not very stable after all and the whole thing will either come crashing down or need a whole new rewrite which will cost a lot more than devoting a few days to tracking the original bug/bad design. Deployment is a big bug bear of mine too, something should be as easy to build and deploy as running an ant task, not several ant tasks, a few scripts and changing some properties on the system, it should be one task. Maven has this idea right out of the box and once configured correctly Maven has proved to be an immense time saver when it comes to the code/review/deploy/test cycle. Increased productivity is where the money is saved, not cutting corners this just hides the development costs. Patching over redesigning is a right pain too, imagine a method is required to do more and more over time, and rather than redesign the area of concern so that small objects that can be easily tested are created, instead the method is just allowed to grow to epic proportions. This is the cause of very long bug fixing as the method does far more than it should do, its responsibilities are not well defined and usually with these things because the code has not been reviewed it is mostly superfluous.

Monday 26 January 2009

best things come in small packages

So its been a month and the insurance company still haven't got back to us with a decision GRRrrr but as I didn't want to put my life on hold I decided to buy myself a new toy. A long time ago I wanted to get an EeePC but couldn't find stock anywhere, this was the time I lost patience with dabs.com they are without shadow of a doubt, rubbish. Anyway I have saved up some money to get a netbook, but unlike earlier when there was only really one netbook to get now there are shed loads. After doing a bit of research I decided to get the samsung nc10, as I had used eeepc and aspire 1 in the past and didn't like the keyboard. I read a nice review that said how nice it was to have a large shift key on the right of the keyboard, which I prefer too. Anyway I got one and guess what, the idiots at samsung have given the European market a small right shift key grrrr have to say its the ONLY thing wrong with this tasty bit of kit though. Iam going to install linux on its massive hdd as a dual boot with the windows that comes with it. anyway loving the netbook back soon

Wednesday 7 January 2009

I was so very wrong

In my last blog I was very cavalier about the whole economic crisis, thats because in economic turmoil I personally decide to cut back on luxuries and prevent spending more money. However I have been hit by the other side of the social spectrum, thats right I have been burgled by some ignorant scavangers after whatever they can get. About 30 minutes is probably all it took, in 30 minutes my entire life has been brought to a halt. They only stole "stuff" I am sure they justify this theft with "what do they care its insured" well no you fucking prick it isn't all insured, the fact that I haven't been able to sleep properly for over 80 hours, the fact that every loud noise I hear makes my heart race, the fact that I view everyone in my estate with suspicion and contempt is not all covered by fucking insurance is it you skagged up wanker. My home used to be my safe haven the place I could run to in times of pressure and now no longer, I feel weak and unable to protect that which I hold most dear, my wife!!! Stealing stuff is just stuff, its what is stolen without even realising it that hurts the most. I try to be a nice person and generous, if these people had asked for assistance I probably would have helped them without any expectations but now I am a changed person, my ideals are not what they were, my generosity almost non existent now. I spent many hours out of my house today at work and after meetinf friends, and where I used to be the one to call it a night I found myself trying to convince everyone to stay for just one more round, one more round so that I would not have to go home and open the front door again, one more round so that I could at least pretend that it hadn't happened. People who will have been burgled before are probably wondering why I have taken it so hard and can't get over it, I don't know is the simple answer, many things I can get over but this has hit me hard and I don't know why. All I can say is that I hope not to see a rise in this sort of behaviour as the economy tries its hardest to tear itself apart at the seams!! Having insurance does not mean that hard workers don't have to pay for the things that they lose, it is totally wrong to think otherwise I used to love my home and the area that I lived in now I can't wait to move out! Life is like a box of chocolates...eventually it all rots down to shit!
 
Stack Overflow profile for Richard Johnson at Stack Overflow, Q&A for professional and enthusiast programmers