Nokia..... You Suck!!! written by: Lee Richmond posted on: 12 March 2010

Okay so I have yet to jump on the iPhone band wagon, but the main reason for this is because when my contract expired I was conned by my service provider, I told them I was going to discontinue service with them because I wanted an iPhone and they basically said to me that they could see why but would I be interested in trying out a new phone, They would give me a 14 day trial period and if I didnt like it at the end they would take the phone back and cancel my contract at no extra charge, this seemed like a good idea to me so I thought "why not?"

However I have since come to realise the following:

  • 1. 14 days is NOT a sufficient length of time to test a phone, whoever came up with this idea needs committing to the nearest nut house or sacking!
  • 2. Nokia..... you suck!!!

The phone in question is the Nokia 5800 XpressMusic, there are several problems with this phone, firstly they blatantly have not put enough R&D time into their touch screen technology as it is cheap, it gets dirty with the slightest touch from even the cleanest hands and once there is even the tiniest amount of grease on the screen you can forget being able to send a text or call the number you wanted. Secondly Nokia's "Communities" app, okay this isn't technically a phone issue but seeing as the phone came with this app and if you try to use Facebook on the phone it constantly prompts you to download and install it, I think it is, the app is slow, cumbersome and most annoyingly caches images from not only the pages you look at but also pages you don't and because either due to the apps shockingly bad build quality or the phone's built in software you end up with thousands and thousands of images popping up in your gallery making it a tedious and laborious task to find any of the photos you have taken using the phones built in camera. Finally you would think that after so many years of designing and building mobile phones they would have finally solved the loose battery issue that seems to be common in all Nokia phones but nope, in this phone it is ever more present, just on my way into work this morning the phone turned itself off 6 times!!! not only that but every time you turn the phone on the battery has less and less battery life to the point where mine is now saying it is nearly dead after less than a day's use, I'm sorry but how hard is it to add an extra piece of plastic on the inside of the battery cover which holds the battery firmly in place? a three year old could have identified and solved this problem.

All in all I am far less than impressed not only with my service provider for conning me into another 18 month contract, but also Nokia for still not being able to make what should be a good phone, I personally can't wait for the day I can afford to go out and buy an iPhone.

DRYer CSS with Less written by: Lee Richmond posted on: 22 February 2010

One thing I have disliked for a while about web development is CSS (Cascading Style Sheets). We all love to have web apps that look pretty but when it comes to writing CSS you tend to find that you end up repeating values and this is what I dislike about it.

There are various solutions to deal with this problem such as Sass but in most cases this means taking the time to get used to a new syntax. Luckily I found this Less, Less is a way of DRYing up your CSS using Variables and Mixins without taking the extra time to learn a whole new syntax.

Less is easy to install assuming you have RubyGems installed simply type:

1
2

sudo gem install less
then in your public/stylesheets directory create a file called style.less (don't worry about changing it in your layout as we still use style.css for this.) if you have an exsiting style sheet you can simply cut and paste the contents of this into your .less file and then from there you can start simplifying your CSS.

Nesting

Nesting with Less couldn't be simpler in your old CSS you may have something along the lines of:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

body{
  font-family: arial;
  font-size: 13px;
  color: #000000;
}
body #header{
  width: 960px;
  height: 100px;
  margin: 0 auto 0 auto;
}
body #header .navigation{
  width: 400px;
  height: 50px;
  float: left;
}
But if we want to write this using Less we do this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

body{
  font-family: arial;
  font-size: 13px;
  color: #00000;
  #header{
     width: 960px;
     height: 100px;
     margin: 0 auto 0 auto;
    .navigation{
       width: 400px;
       height: 50px;
       float: left;
     }
  }
}
so as you can see rather this has saved us having to repeat ourselves just by allowing us to nested one within the other.

Variables

Once again these help to tidy up your CSS by allowing you to declare elements such as colors etc. at the top of the file like so:

1
2
3
4
5
6
7
8

@main_color: #CC0000;
@header_margins: 0 0 0 10px;

h1{
  color: @main_color;
  margin: @header_margins;
}
as you can see by declaring anything we will be using over and over again at the top of the file we save ourselves the hassle of having to remember any colour hex's we use, and make our code much cleaner, this also saves any problems with for instance if you need to change your colour scheme, you only have to declare your colours once and its done.

Mixins

Say for instance you use rounded corners on various elements in your layout, mixins can be extremely helpful in making sure we not only cut down on the amount of code we have to write but keeping things consistent for example:

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

.rounded_corners (@radius: 5px) {
  -moz-border-radius: @radius;
  -webkit-border-radius: @radius;
 -khtml-border-radius: @radius;
 border-radius: @radius;
}

.article{
  .rounded_corners;
}

.submit_button{
  .rounded_corners(10px);
}
by doing this we have kept all the values for the rounded corners in one mixin and if we decide we want a larger radius on certain elements (in this case a submit button) we can do that without having to write out the whole thing again.

Finally to convert your .less file to a working .css file to be used on your application simply type the following in to the command line:

1
2

lessc public/stylesheets/style.less
the good thing about this is that if you have missed anything, for instance you have missed a closing } it will tell you.

I have only covered the basics of what you can do with Less hear but make sure you head over to http://lesscss.org and give it a try for yourself.

*UPDATE* For Textmate users there is a bundle you can install to make life even easier for yourselves http://github.com/appden/less.tmbundle

Jubilee now released written by: Lee Richmond posted on: 04 February 2010

Hey all, 

well it's finally here, what started out as an application purely for my own use, I've finally got it to a stage where I am happy to release it for general release so here she is, http://github.com/lrichmond/jubilee.

Sadly I am one of those developers who gives all their applications a working title based on a comic book character, but Jubilee is designed to be a simple blogging application in which the developer can either use it as it stands to start their own blog, or they can take it and use the application as a starting block to build something bigger.

Jubilee has a fully WYSIWYG editor courtesy of the wysihat-engine gem for writing your articles and creating the different categories within your blog, comment moderation to help avoid all those spammy comments you may encounter, and a basic configuration section where you can set things like the title of your blog, some basic meta data, as well as the default email address that will be used for your contact form and to notify you when a comment that requires moderation. All this is contained within a simple administration section.

Jubilee is far from complete but I felt it was at a stage where any Ruby on Rails developer whether a beginner or and advanced Ruby guru would be able to pick it up and use it.

Jubilee is currently in use for the blog you are reading now, and I would be interested to hear from anyone who does try it out I am always open to the thoughts and comments of others, so what are you waiting for? give it a try.

Gems used:
http://www.gemcutter.org/gems/wysihat-engine
http://www.gemcutter.org/gems/less
http://www.gemcutter.org/gems/gravatar_image_tag

Plugins used:
http://github.com/technoweenie/restful-authentication
http://github.com/technoweenie/permalink_fu

DRYing up your database config written by: Lee Richmond posted on: 11 January 2010

One of the things that I love about Ruby on Rails is that it allows you to implement the DRY andREST principles with a lot of ease.

As anyone who has looked at Ruby on Rails knows the database config file (database.yml) is one place that could do with DRYing up for instance here is how a standard database.yml might look:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

development:
  adapter: mysql
  encoding: utf8
  database: myapp_development
  username: root
  password: mypassword
  pool: 5
  socket: /var/run/mysqld/mysqld.sock

test:
  adapter: mysql
  encoding: utf8
  database: myapp_test
  username: root
  password: mypassword
  pool: 5
  socket: /var/run/mysqld/mysqld.sock

production:
  adapter: mysql
  encoding: utf8
  database: myapp_production
  username: root
  password: mypassword
  pool: 5
  socket: /var/run/mysqld/mysqld.sock

As you can see this isn't exactly DRY, so here is my solution to this problem:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

defaults: &defaults
  adapter: mysql
  encoding: utf8
  username: root
  password: mypassword
  pool: 5
  socket: /var/run/mysqld/mysqld.sock

development:
  database: myapp_development
  <<: *defaults

test:
  database: myapp_test
  <<: *defaults

production:
  database: myapp_production
  <<: *defaults

as you can see this solution is much DRYer and in my opinion much easier to work with.

Resolutions, goals and aims. written by: Lee Richmond posted on: 04 January 2010

So, 2010 a new year, this means that for many its a time for making resolutions only to break them a few weeks later. For me resolutions represent something that has no goal, that we set ourselves at the start of the year knowing that we will not even make the slightest attempt of keeping up to them, I decided to take a slightly different tack and set myself a series of goals to try and achieve by the end of the year, nothing silly like stop eating chocolate and pizza (because we all know that’s not going to happen!) but some things I genuinely believed I could achieve within a year. Below is a list of the goals I set and how I did:

A new Car

Well as you can see from this blog post I succeeded in this one. I know the car I now have isn't exactly brand spanking new but lets face it, I wasn't interested in a new car, I've always been into my older Japanese sports cars and my MR2 is a beautiful car to drive and to look at.

A new job

I achieved this in August 2009 not exactly in the manner I had wanted but in my opinion being let go from Aspect gave me the push I needed, after being a solo developer for so long I wanted a chance to work as part of a development team and I am pleased to say that Coolpink gave me that opportunity.

A new Home

Well I haven't completely achieved this as yet but me and my girlfriend have signed the lease on a nice 2 bedroom house in Bramley, Leeds and we are hoping to move in within the next week or so. The only thing that stopped this being actioned before the new year was that the boiler needed to be replaced and with it being Christmas this was cutting things a bit fine.

All in all I think that setting goals rather than resolutions has helped me greatly in getting where I wanted over the past year.

so far for the next year I haven't decided what my goals are going to be, I think one of them will be to average at least one blog post per month. but we shall see.

Rss RSS Atom ATOM

latest articles

categories

Follow_me Recommend Me Geekup-logo