Laptop Upgrade to SSD

My SSD arrived in post on 2nd shipped from Hong Kong. It was a Kingston V300 240GB SSD which I got for $99 shipping included. Earlier I received the HDD Caddy again from Ebay. I finished my work on Friday early and opened up my Asus K55VD with hopes it will be faster by the end of the day. That is what happened.

Given my track record of breaking things, my mum was concerned. I waited for her to take a nap in the afternoon and started the operation.

The outers screws came out easy. But the screws holding the HDD container to the body of the laptop was hard. After a little play it came out. The screws holding the HDD to the container was the worst offender of the day. I had to try many times to get it un-screwed without damaging the thread. Oh boy! My hand really hurt.

By the time I got the second screw, mum walked up to my office room with a cup of tea and a WTH expression in her face. I explained I am upgrading the computer and she was like “how is breaking an upgrade”.

I finally got the screws out. The took place of the HDD. Then I removed the DVD W/R. This can be easily done by removing the rectangular small sticker on the back of the body. Then you have access to a screw. Once you remove it you can pull out the optical drive.

Once you remove it from the machine, you can use a pin to push on the emergency eject button and open up the tray. Otherwise you can just keep the tray ejected before shutting down the computer. There will be a clip on the side. When you press it the outer lip of the drive will come out.

Fit this lip to the HDD caddy. Also pin the HDD derive to the HDD Caddy. Once done just push it inside and screw it back in.

That is it! Now you have a Hybrid Drive. In the case of the Asus K55, that is nearly 1TB (240GB + 750GB).

I installed Ubuntu (after 2 days of Antergos foo-do) and Damn wasn’t it fast! That was even with all my engineering applications installed and running in boot. It is not as fast as my current laptop which is the 7th Gen HP Envy 15 which has an nVME disk but that is plenty.

Cannon 77D from Metropolitan

Strong beams of light penetrated my window and the time was 8AM. I rushed and got ready. I haven’t got ready in the morning in the last 5 years. It was tough, but totally worth it, today I am going to buy my first camera. Months of online research came to a halt last night concluding in favor of the Cannon 77D.

I stopped by the Metropolitan PhotoHub, the Cannon Agent in Sri Lanka. It is a decent place. It is situated near (more or less in front of) the Bambalapitiya Holy Family Convent.

I entered the shop. I waked over the showcased cameras and noticed that the 77D was not on display. I looked in the eye of the representative who walked towards me and said, “77D, I am here to buy one with the EF-S 18-55mm lens”.

We talked about the warranty, pricing and the cash-back-offer. It was some 17k. That makes it cheaper than CameraLK, if I get it. I also got a EF-S 55-250mm telephoto lens to get a decent coverage in focal-lengths.

Then I paid the money and in the mean time the rep went to the stores to get my camera. It took a while and I was looking at the nice Camera bags that were there. The rep took some time to come back but when he did, there she was. He told me that, I am the first official 77D customer in Sri Lanka, how cool is that?

I knew nothing about the camera. I had only held it once. The rep was very helpful and I had a pleasant experience. I, a photography noob, walked out of the store with my own ‘enthusiast level’ camera.

Mission accomplished, I said to my self as ignited the engine to head back home hungry, but happy!

Cannon 77D Available at Metropolitan (Agent)

Memories are important, I learnt it the hard way. Since I started valuing a good photo/video I have been looking for a decent camera to buy. I started with the Sony A6000. It was too old, though it was in par with even modern DSLRs in the price range. It was also compact. But I changed my mind when I noticed the Cannon 77D.

I checked out the 77D in CameraLK. Almost instantly I fell in love with the camera and determined to get one my self. A friend of mine advised me to check the dealers. One-and-a-half months back they, Metropolitan (M Center), didn’t have it and said the first stock will arrive in a couple months time.

Today I checked with them over the phone and got a surprise news.

The 77D is available. With the 18-55mm kit lens it costs nearly 150,000 rupees. How ever there seems to be cash-back deal. That is they return some thing around 17,000 rupees later by cheque. That means it is a good price for the camera.

You might want to stop by the M-Center in Bambalapitiya if you like to have a look. I am busy and might need to wait till next week to get my hands on one.

CEB Power Cut App (idea)

Surprises are not fun! Except when it is 13 flashing her tits. As an software engineer and systems administrator I get a lot of surprises. Some times in the middle of the night. But the worst kind of surprise is when you don’t have power, it is a planned down time, and you didn’t know it, and had a lot of plans.

I would like to suggest the CEB or who ever is interested in to make an app that will push notifications to users on pending service down times. I can also join the fun, but at the moment, I am quite busy.

I am thinking…

  • it could be general (the CEB, Water Board etc)
  • Would need push notifications to user devices
  • Any thing else? yah and be AD free

Any body? Pretty please!!!

JSON API v1 with Rails 3 - Libraries

This is the Part 2 of my experience on implementing an API on a Rails 3 app on JSON API v1 specifications. Part 1 is recommended to be skipped as it is ‘boring’.

Rails has a lot of resources when it comes to implement an API in compliance with JSON API v1 specifications. But unfortunately that requires Rails 4+. I had to settle with JSON API Serializers gem (which supports Sinatra and other Ruby frameworks too) and manually dealing with the rest.

For API documentation, I decided to settle with Swagger. I believe it doesn’t require justification.

Finally I ended up using the following…

  • Grape v0.7
  • Grape Swagger v0.8
  • Grape Entity v0.4.8
  • Grape Swagger Rails v0.3
  • JSON API Serializers v1.0.0

Let me elaborate.

Grape v0.7

Grape is framework / DSL for building APIs. It doesn’t require Rails. Initially we were going to make the API standalone but later decided to mount it on the existing Rails application.

As I remember bundler choose grape v0.7. I tried to use a later version of Grape and ended up updating multiple gems version. Finally I had to update the Ruby version to 2.2 and Rails had to be updated to 3.2.22. Unfortunately the app was not functional at that point.

You may have better fortune and be able to install a better version of grape depending on your actual dependencies and if you can update to Rails 3.2.22.

Grape Swagger v0.8

In case you don’t know, grape-swagger is the lib that generates the definitions the swagger-ui require to display. This gem will introduce some helper methods that you can describe the API neatly.

This is not the newest grape-swagger version, it is many years old, but it will do. There is a compatibility chart in the master branch of the grape-swagger gem but it doesn’t cover old versions like grape v0.7.

I went through many versions to find a match. This version will give us Swagger 1.2 compatible JSON definitions.

Grape Entity v0.4.8

The idea of grape entity is to model requests and responses. For example we may have a User model but we may only want to expose fields like first_name, last_name and email. This does just that. With grape-wagger we are able to define the data types as well so it gets documented.

Documentation is the whole reason why you will need to get grape-entity involved. But I later found out that it is not ideal, but that is all we have.

Grape Swagger Rails v0.3

Grape Swagger Rails is a rails mounted Swagger UI. If you are not using Rails you don’t need to use this. Instead you can simply host the configured static Swagger UI separately.

This is no compromise. This is the latest version and supports swagger 1.2 compatible definitions.

Thats the libraries I have used and why I have used them.

this article is wip