Yesterday I came across this nifty tool to update the version numbers in my Gemfile.
Now you might be wondering why not just use the bundler to take care of stuff.The problem with bundler is firstly its slow and whenever there are transient dependencies it would tell us to update the dependency rather than taking care of it.
Take a look at it Gemfly
Postgres is a really powerful database with a lot of features, One of the most important features which is very rarely found in other databases is “Table inheritance”
Table inheritance is very similar to class inheritance of OOP.In Table inheritance you have a parent table which is inherited by another table with extra columns in it.
By default the pg gem doesnt support table inheritance.
In the current project that I am working on, the business logic required the user to have template using which he could create items.This is where table inheritance shines.It allowed me to create the template model which contained all the generic attributes for the item.So everytime I would update the template the relevant model for the template would also be updated.
Databases are awesome, they are these blackboxes where data is stored and retrieved at really fast rate.Postgresql is one really fast open source database.
Usually when you want to speed up read speed on your database you usually create indexes on the relevant column.But recently I came to this realization that having more indexes increases the time per insert.
Here is the unscientific benchmark I ranContinue reading
Last week I got a keyboard off of Souq which is a local Amazon competitor.I found a really good deal on it for a genuine apple keyboard for 3 times less the original price.The only gotcha was that the keyboard had both Japanese and English characters on it.It didn’t make a lot of difference to me since I was learning some Japanese in my spare time.
The only major issue with the device was the way it was detected on my mac.By default the apple macbook would set the keyboard layout to international pc which worked well with the keyboard but when I didnt use the keyboard the laptop keyboard would get messed up unless I change it back to US Keyboard.
My colleague showed me a tool on the mac called Keyboard Maestro which would automate tasks on my laptop like expanding text or sending tasks to omnifocus.Continue reading
Last week my colleague at TURN8 informed me that his browser was infected with adware.
As eminent from the previous blog post Adware Medic came right to my mind.
So i launched adware medic and it immediately detected the malware in the ` /Users/username/Library/ScriptingAdditions ` .There was folder which contained the malware waiting for me to delete and delete it just what I did.
But after a couple of minutes my colleague asked me I got rid of the malware.So I took a look at the folder and the malware had somehow restored itself.Continue reading
Automated testing an application can be difficult and time consume.Even after writing your tests you will always have to run it again and again to achieve the red green refactor flow.
To make this task easier the ruby ecosystem has a really powerful and versatile test runner called Guard.
Guard run like a daemon on your machine and runs tests whenever your code changes.This helps you maintain concentration and focus on the tests and code rather than monotonous manual running of the test.