What You Learn From Binge Watching

Binge Watching or Marathon watching is the practice of watching multiple episodes of a television program in rapid succession, typically by means of DVDs or digital streaming (Source: Oxford Dictionary). It has become a more common pass time or activity for the common people. It has become something that is planned and prepared to do alone or as a group. The availability of shows on demand through streaming service is the reason behinds huge growth of this activity, from a casual reference here and there to a more common social activity.

There is the joy of waiting for each episode, per week. Discussing theories for the next episode and reviews of the previous one with friends or other fans. This is still there even when you binge watch. Just that instead of the next episode you are discussing about the next season.

But what I wanted to write is not about what binge watching is or how it is (or it is not) good. What I wanted to talk about is, what I learned or noticed binge watching old TV shows or a long 10/11 season TV shows. The good points that I feel like is good to know or keep in mind in ones life. The one here is me of course 😁.

[TIL] Starting Ruby Method With Capital Letter

Last day while I was browsing through some Java code online, I noticed that some method has names starting with capital letters. I Method names are written in small letters in ruby. This Java code made me wonder if there was anything preventing us from using method names starting with capital letter, in ruby. So I started my irb and wrote the following code.

1
2
3
def Test
  puts 'testing 123'
end

And when I ran to call the method Test in the irb i got the following error.

Review on Rail 4.3.0 Beta

Active Job, deliver later will give us a lot of abstraction. One will have to move the business logic present in workers to models or services, but that would make our system more maintainable. If the Active Job is a simple plug and play then in future projects one can use delayed_job when the load is light and when the load increases they can shift to redis based resque or sidekiq. Thinking of migrating from one system to another always give the developers a head ache. This can essentially solve it. Active Job was planned to be a feature in rails 4.0 but later they decided not. I am glad that they are releasing it in 4.2

Convert Short Urls to Long Urls

How to get a long/actual url from a short url?

Sometimes when we try to fetch short urls, using curl, we get a blank page as reply or a 301 ERROR. The reason being that there is no html file stored at that location,only a header with details ,on where the person who has opened the url would be redirected to.

So to get the actual url or long url from the short url, we just have to read the location stored in the html header.