I have been using office 2010 for about 4 months now and recently (2 weeks ago) re-installed my pc which means I’ve reverted to office 2003…

Well at first I didn’t like office 2010; it was quite a leap from 2003. The new ribbon bar took quite some getting used to, but now that I’ve reverted to 2003, I want it (2010) back!

The thing I probably used most from all the installed office apps was Word 2010. It enabled me to convert over 200 documents to WordPress using the post to blog feature. That feature wasn’t without its down sides though. Over half of the documents had to be manually edited and each would take around 30 minutes. You can see that I lost a few weeks to all that work… But without the help of word, it would have taken a few months, or I would have never done it. I’d even started to write a small app that would remove the horrid formatting that word creates when you save to Microsoft’s version of HTML. But it was a long way off being usable by anyone except me.

I tried using OpenOffice’s alternate solution, but it just isn’t as easy to use. It also errored out when I tried to post…

So, until I get a job, I shall just have to type posts in manually…

So yesterday was the big day and we were sort of ready for it.

We’d prepared the bikes the day before and put the main part of the carrier on the car the day before. At 6am the next morning we all got up, but ended up being slightly late leaving due to the carrier not being quite as easy to complete as expected.

It turned out that even though we had a 7.30am start, there was no rush. In fact it was a case of hand over your start card, get a map, queue at the traffic lights and go. We started at about 8am.

The ride didn’t start too well. There were lots of cyclists everywhere and a lot of traffic. Because we usually cycle countryside roads, London cycling is a little intimidating! One driver (red car) was very angry at me (I think) for overtaking some of the slower cyclists (was no where near the centre line) and tried to knock us off and others down the road.

The first section of the route is through outer London, followed by a hilly section. We arrived at the first stop about an hour after starting. My left shoulder was absolutely killing me – think I jarred it when lifting one of the bikes to the carrier in the morning. Stopped and asked one of the medics if there was anything I could do to stop the pain. He wasn’t too useful – told me to find a chemist and get some ibuprofen… Anyway, the stop alone seemed to cure the problem; didn’t have any more pain from then on.

The rest of the ride from then on was mostly lovely countryside with a couple of very large hills.

We took jelly babies, peanuts and chocolate raisins with us and that combination seemed to work very well. We were going fine until about the 40 mile mark and then we started to feel the pain and got slower. At about 10 miles to go it was a case of, I have to finish this, rather than I’m enjoying this. Once we got to the edge of Cambridge though, we both picked up a bit and arrived across the finish line at 2pm!

So in total it took us 6 hours including all the stops we made, which we were both very proud of! We have so far raised over £600 between the two of us:
http://www.justgiving.com/sylviascales
http://www.justgiving.com/victoriascales
Not to mention all the people that sponsored us (offline), which was handed to Breakthrough Breast Cancer at the finish line. And thank you to Les at Pedals in Biggleswade.

Thank you sponsors!

Would we do it again? No!

I would also like to say a big thank you to all the cyclists and the police officers that would come past, read our names and cheer us on! If it wasn’t for all those people, the ride wouldn’t have been as interesting and we needed the morale boost near the end. So it was well worth getting the personalised T-shirts!

I would also like to thank my mum and apologise for putting her through that ordeal (she might hate me now, but I think she will agree it was worth it!).

London to Cambridge 1 London to Cambridge 2 London to Cambridge 3
     
London to Cambridge 4 London to Cambridge 5 London to Cambridge 6
     
London to Cambridge 7 London to Cambridge 8 London to Cambridge 9
     
London to Cambridge 10 London to Cambridge 11 London to Cambridge 12
     
London to Cambridge 13 London to Cambridge 14 London to Cambridge 15

Why use CS?

This was my first question when one of my former colleagues decided that our project needed CS. His answer to me was something along the lines of, if everyone codes using CS then there will be more consistency and better code will be produced. Now at first I thought that that response was BS. But after using it for 3 months, I wouldn’t like to go back! It does make code more consistent (when combined with auto formatting) and in it provides many pointers on producing better code.

 

How to set up CS

Go to the Eclipse CS website and click on the “Download & Installation” button. Follow the instructions for adding in the CS plug-in to Eclipse. Once you’ve restarted Eclipse there will at first be no differences. CS by default is not enabled on a project as it will add many warnings when enabled.

Now, the best case is that you have a brand new project and no code, but chances are you have an established project and you’d like to see what CS looks like to decide whether to use it from now on. If you have the latter, you’re going to find that once you apply CS to your project, you’ll likely have hundreds (if not thousands) or warnings. Don’t be put off though. This is quite normal. We got round this by agreeing with every member of the team that if they edit a file, clean up the CS warnings and eventually you’ll find only a few hundred warnings left.

To enable CS, right click on your project, select properties and the properties box will pop up. Now, you might well notice two CS place holders, not sure why, but always use the top one. In the Main tab, tick “Checkstyle active for this project.” You have two options here, use the Sun default styles or create your own.

 
Use Sun Styles

Drop down “Simple – use the following check configuration for all files” and select the Sun style you’d like to see. Click ok, accept the rebuild of the project. You should notice that there are now lots of CS warnings.

 
Use Own Styles

Select the Local Check Configurations tab, click New, select you’re preferred type, I use Project Relative Configuration, give it a name, in location, type “/{name of project}/{src or other}/{name of file}” so in my case “/testproject/src/testcs.” You will probably get a pop up dialogue saying “The selected configuration file does not exist. Should an empty configuration file be created?”, press yes. Click ok. Select the Main tab again. Drop down “Simple – use the following check configuration for all files” and select the new file you just created. Agree to the project being rebuilt. You should now have a file in the src folder and if you open that file, you’ll notice its an XML file. You should also have realised that CS has not reported anything. That’s because we haven’t told it what we’re interested in.

Right click on the project again. Select properties. Select Checkstyle. Select the Local Check Configurations tab. Double click on your CS file. Now for every (and there are loads..) option on the left hand side, double click on the option, read it, see whether you’d like that style checked for and if so alter it if needed and then click ok, otherwise cancel. You should notice that in the “Configured modules for group “X”” you should see the ones you’ve chosen to be checked. E.g.

When done, click ok and click ok again on the properties window. Accept the rebuild of the project.

 

What does it look like when CS is applied?

Well that depends on whether you’ve chosen you’re own styles or selected the Sun styles. I would go for my own styles I have certain preferences that Sun thinks are wrong, like opening curly braces on a new line!

Here is what Sun CS styles look like on my very simple class:

As you can see, it’s complaining about a lot of things I wouldn’t agree with. So here is an image of my own style in use:

Please note that both images show custom check style warning colourings. Please see Configuring Eclipse Preferences

A lot better! The errors that are present are that the main method should be commented (fair) and that both int arrays should be declared final (fair). So I’d have to clean those up.

In case you’re interested, that CS rules file is available from here. It should have an MD5 sum of bc6869b2d2ab5143b5fc6c4cfd6d0edb.

 

How do I configure CS to work with auto formatting?

Click Window → Preferences, which will open the preferences window. Drop down Java → Code Style and select Clean Up. Create a new profile, E.g. mines called Victoria and this will pop up a new window where you can edit all the settings. Tick Format source code, Remove trailing whitespace, Correct indentation and Organise imports as a bare minimum. You can then go through all the tabs and apply anything else you’d like applied. When done click ok.

Next select Java → Code Syle → Formatter and again create a new profile and edit the settings when the window appears.

Next select Java → Editor → Save Actions and tick Perform the selected actions on save, tick Format source code and click apply.

In theory, all you need to do now is go to a java file, edit it very slightly, like insert a space and click save. The formatter will then kick in and remove half of the CS warnings as formatted code should adhere to the CS styles.

Amazon.co.uk

© 2010 Victoria's Blog Suffusion WordPress theme by Sayontan Sinha