Sunday, 23 February 2014

Comparing SSD with HDD

I decided to give away my 250 GB Samsung HDD to my friend as i have no real use to it anymore. We can say it has low 'milage' on it - in practice it was only used for 2 years and only during the weekends in my 'second' PC.

Before giving it to anyone of course it worth to clean it. I thought i use Ubuntu's built-in 'Disk Utility'.


When i was looking for the option to erase all content i realized this is a great opportunity to compare my 64 GB SSD (Samsung also) to this HDD. The 'Benchmark' feature offers two mode. Read-Only mode or Read/Write mode. I had to go with the first as the latter one requires an empty disk. The benchmark will give you:
  • Minimum read rate
  • Maximum read rate
  • Average read rate
  • Average access time
Of course i remembered some figures from magazines where they compared SSD to HDD respecting these attributes but i was excited to see this in action. First let's see the HDD graph:


What amazed me is the dispersion when it comes to the access time (marked as green). The average read rate was 121.2 Mb/s. Now let's see how the 'non-spinning-cousin' performed:


Note how balanced the access time graph is. Also it was measured to be around 0.2 ms. The average read rate was about 261.8 Mb/s.

I am using this small SSD in this PC for around a year and it turned out to be a great investment for me. I had issues running Java application servers for development and using the SSD i could get away with 2GB DDR2. As i only use this PC on the weekend i did not want to invest too much in DDR2 RAM which is outdated anyway. Startup time is next to nothing and i don't mind the 64 gigs of available space as this is a machine i use for work only.

What are your experiences?

Tuesday, 24 December 2013

Christmas lights (led) with Arduino

This is a very quick post just to say Merry Christmas(!) and also to give you a small kick towards LED control using Arduino. I advise you to visit Jeremy Blum's great tutorials then you can quickly put this together.

"ingridients"

  • Arduino panel (can't think of one which you could not use) + USB cable
  • Breadboard
  • Wires
  • 4 LED
  • 4 270 OHM resistor
Let me just share the code here without any schematics of the wiring (straightforward):


const int RED = 13;
const int YELLOW = 12;
const int GREEN = 11;
const int ORANGE = 10;
const int pause = 500;

int programStates[12][4]={
  {HIGH, HIGH, HIGH, HIGH},
  {HIGH, LOW, LOW, LOW},
  {LOW, HIGH, LOW, LOW},
  {LOW, LOW, HIGH, LOW},
  {LOW, LOW, LOW, HIGH},
  {HIGH, LOW, LOW, HIGH},
  {LOW, HIGH, HIGH, LOW},
  {HIGH, LOW, LOW, HIGH},
  {LOW, HIGH, HIGH, LOW},
  {LOW, HIGH, LOW, HIGH},
  {HIGH, LOW, HIGH, LOW},  
  {LOW, LOW, LOW, LOW}
};


void setup() {                

  pinMode(RED, OUTPUT);     
  pinMode(YELLOW, OUTPUT);     
  pinMode(GREEN, OUTPUT);     
  pinMode(ORANGE, OUTPUT);     
  
}

void setLed(int port, int state) {
  
  digitalWrite(port, state);
  
}

void loop() {

  for (int i = 0; i < 12; i++) {
    setLed(RED, programStates[i][0]);
    setLed(YELLOW, programStates[i][1]);
    setLed(GREEN, programStates[i][2]);
    setLed(ORANGE, programStates[i][3]);
    delay(pause);
  }  

}
And let's see it in action:


http://www.youtube.com/watch?v=eaK2H-Soen8
Youtube video

Monday, 8 October 2012

How to: Eclipse Series - Conditional breakpoints - Debugging

In the following video you can learn how to set conditional breakpoints for debugging in the Eclipse IDE.