Thursday, March 26, 2015

Crossed 10,000 blog views - Reflecting back on the experiences I've had along the journey of being a blogger(part 1)

Today is just not another day for me, looking back at my journey of being a blogger(which is one of the multiple hats that many people wear as part of their lives), today is a special day. I'm thankful to all the viewers who've visited my blog as if it wouldn't be for them I wouldn't have crossed the 10,000 views mark. Today, I would like to talk about blogging and how it has helped me till date in many ways  both personally and professionally and also what I've learnt along the journey so far in my attempts to be a better blogger.

People generally would like to know why they should do something(part 1 - here I will attempt to share experiences of how blogging has benefited me) before they would want to know how it is done better(part 2 - I will share my two cents of learnings of what might possibly help you to be a better blogger from my experience) so I will talk about things in that order in a series of posts starting from this one.

The BIG question(for some may be), How has blogging personally and professionally impacted my life -

1. The first thing I can think of from the top of my mind is that it's the freedom of speech where I talk about anything(anything which is generally considered 'appropriate' in the blogging sense or in the blogging world is what I'm basically referring to here - in case you're already thinking otherwise :)) under the sky.

2. It has given me more confidence that people find the information I've shared to be useful or else why would people revisit a blog time and again. This in itself I feel has many related benefits.

  • It kinda gives me the sense of feeling that somewhere I can connect with people(the extent is not what really matters here, but just being able to connect is in itself a fulfilling feeling in many ways :))
  • Somewhere it tells me, that what I'm facing in terms of a problem and may be whose solution I'm blogging about, is something that others like me are seeking out too :). So this makes me reflect that , yeah, it's okay to face problems and try to figure out solutions to them via blogs. One needn't really have to consider themselves to be inferior in anyway when they face such problems. It's just you try finding a solution yourself first before you head out for seeking solutions from the world around. 
3. It has given me joy. This joy, for me is the joy of sharing, the joy of giving back to the community whose blogs I've referred to when I had faced some roadblocks. Joy of the feeling, yeah, that by doing my bit(it's very little compared to the number of bloggers out there in the world today who religiously blog more often then I do), I can may be tell myself that yeah, I'm atleast a drop in the mighty ocean of the community of such people around me.

4. People around get to better understand you as a person through your blog. They get to know what you care about and what you are passionate about. All this through your thoughts in your blog.

5. On a professional front, it has given me many things like -
  • The blog has helped me get a better job offer as people get to know me better as a person before I get interviewed by any of them. How?
    • It separates out any such candidate who has a blog from those who may not have one
    • People have looked at the technical blogs I've written and checked for things they'd look for when generally interviewing potential candidates for a relevant job opening
    • I don't know what exactly that is that such interviews look out for, but it could be some useful things that are unique about you on the technical lines or may be it's just the fact that you believe in the spirit of giving back to something for what you've used from that thing(in my case it's open source technologies like Ruby on rails), that one can find out through your blog.
  • People in the professional world have recognized me my blog(to a very small extent so far, but this is still one true thing that has happened with me)
  • It has helped me be a better writer. I still remember one of my very senior office colleagues told me that I should even consider freelance writing. 
  • On one of my blogs which was in an internal hosted platform for a company I worked for previously had a comment from one of the readers who said 'I could visualize the series of events with respect to what you've written in your blog'. I still very well remember this comment and today it just makes me believe more on my potential. Just think about it, how nice would you feel if you get such a comment. This is the only reason why I'm reiterating what that person told me via the comment to that post back then. Just a word of appreciation can do so much to boost one's confidence if we humans actually go to see :).
  • Others began to appreciate what I blogged about. It just simply felt nice as one generally does if you get a pat on your back for you work, don't you?. One of my blogs was listed on paper.li . This post and the picture below say it all 


  • The above made me realize I have decent writing skills too :). I could write more confidently in other forms of professional written communication(like emails etc.,) because of the practice or the learnings I had with writing things like blogs
  • My vocabulary got better and I could even speak more confidently . I could even comprehend things better when others spoke about stuff as some of the words they used sounded more familiar.
  • Blogging, I humbly believe now has come to be one of my strengths. It helps me know myself better as a person and it kinda gives me more confidence as to something I can definitely categorize under the bucket of strengths. I believe this will add to anybody's unique selling proposition(USP) as a potential candidate for an appropriate suitable position which may require one to use writing skills to an extent where you could influence people by your words. This makes me remember the quote, 'The pen is mightier than the sword".
6. Why am I writing about all this you may ask. Here's the answer -

I don't think this is actually a big deal that I have crossed 10,000 views, but this is just a nice feeling and I just want to live it and share it, that's basically why I'm writing this. Looking back, I kinda now feel, if somebody would have told me all of this earlier or may be even something else about blogging which I'm yet to discover :)(who knows, I'm sure there are more people out there who have experienced and learned more with blogging than I have), I would have written even more articles than what I've written up to now.

Also, I'm not saying all this to boast, I'm just sharing what motivates me to keep blogging and why may be you, a patient reader who has actually read what I've written so far should also consider doing this. You've read this far in itself probably shows you somewhere care about something and you're trying to find out what that thing is. Blogging may give you an audience where you could be more expressive or simply find more people who share similar interests and even talk about them through blogs :)(Hope you see the connection blogging can may be make for you by now :)) 

What I've said in the above kinda reminds me of Steve Jobs inspirational speech at the Stanford graduation ceremony where he says a couple of things which I feel I can now better relate to. Will list them below -

1. One can connect the dots only looking backwards. How true, I didn't realize I would learn so much about myself via blogging. But I can simply say I'm happy now to know learn some more about myself and I'm still exploring to know more :)

2. Quoting Steve Jobs - "Sometimes life hits you in the head with a brick. Don't lose faith. I'm convinced that the only thing that kept me going was that I loved what I did. You've got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle." 

- For me what I found out was that I personally enjoy blogging, it took a while to figure it out but I'm glad I did eventually :). But overall, j
ourney of self exploration still goes on for me :)


Lastly,  I can think of one person today on the top of my mind who had encouraged me to blog more when I first started blogging few years back. His name his Deepak Prabhu Matti and I'm really thankful to him for this. I'm also grateful again to my viewers and all my friends who've told me 'Hey, nice blog!' or things on those lines, I wouldn't be here without you all. Please forgive me if I've missed mentioning somebody. Lastly, I can definitely without any doubt say that, I'm grateful to Google and the folks who've built the Blogger platform because without their stats, platform I wouldn't really know today where I stand in the blogging world(I do realise I still have a long way to go).

All in all, I can say what goes around comes around to may be summarize many things around this post :)

There's a part 2 of this post that I'll be writing sometime soon about what I've learnt to help me be a better blogger. Stay tuned if you'd like to read about that..

Thank you.


Thursday, March 19, 2015

The roadtrip that led to my first Rails commit and how you could make yours too

It's been a long time since I made a post here, sorry about that.

This post is kinda different, I've actually posted the content of this article on another site called AirPair. You can view the details of the actual experience that I had contributing to rails here. I would be glad to have you reviews and rating on this post on AirPair. The way it works at AirPair is, these articles need to have some minimum number of reviews and a certain rating in order to be published.

If any of you think this post has something handy for anybody who'd like to contribute to Rails or just open source in general, please don't forget to review and rate this post.



Thank you.

Sunday, December 7, 2014

Indent two spaces per tab in Sublime Text 3

Indenting two spaces per tab is useful when programming in languages like Ruby. I was able to search for an easy way to do this in Sublime Text 2 but it took me sometime to figure out how to get this right for Sublime Text 3.

Here's how we can set this as a default for a user in Sublime Text 3

Step 1 : Sublime Text -> Preferences -> Settings - User. (Please read the PS below if you're a linux user)



Step 2 : Within the existing set of flower brackets("{}") that are specific to the user we need to add customized settings to override the default settings that one would find in Preferences -> Settings - Default. We need to add the below settings to use two space indentation -



Below is an example of how the user settings file would look like after you override the default settings with the above changes.



 Step 3: Save the changes and you should be good to go. 


P.S: Surprisingly, I found the Preferences section for the debian package(I had it installed on Ubuntu 14.04) of Sublime Text 3 at a different location than where it is when one sets up the same through Mac OSx.



Sunday, November 23, 2014

Refactoring code along the lines of the DRY principle by leveraging the power of Ruby blocks and lambdas

In my early days as a ruby programmer, I used to always look for good examples through which I could understand Blocks and lambdas in Ruby. I did understand them after some research but I guess the connectivity of a real life e.g., was somewhere missing to help me remember how can one use them always. That's how I relate to this post and here's an attempt to help drive home the concept of Ruby lambdas and blocks for beginners at least to some extent. This has been tried and tested on Ruby-1.9.3p484

Here we'll try to explore how one could leverage the power of Blocks and Lambdas to make your code look more clean by refactoring one's code along the lines of better adhering to the Don't Repeat Yourself(DRY) principle.

Below is the original code of a singly linked list before any refactoring is done -


Refactoring 1 - 

Problem Context - Methods list_count(returns the number of linked list elements)  and list_elements(list the linked list elements) basically traverse through the entire linked list including the last node and both have a duplicated linked list traversal condition @current_pointer != nil .

To do - Remove the above duplication

Solution - Blocks to the Rescue! 

Adding blocks - If you have a look at the list_elements and the list_count methods they have duplicated for the lines 35-39(excepting line 37) and 45-49(excepting line 48). This doesn't adhere to the DRY principle and hence requires further refactoring. 

Below is a screen shot of what gets changed. You can have a look at this commit which shows the full modified version of the code as part of the first refactoring.


End Result - Lesser lines of code.

Refactoring 2 -

Problem Context - If you observe carefully, you'd find the other traverse_list method has the linked list traversal condition @current_pointer,next_node != nil and they are used to add a new node to the linked list at the end through the add_in_end method and the same is used in the get_tail method to get the last node. With the above condition, the current pointer stops at the last node but on the other hand with the condition @current_pointer != nil used by the list_count and list_elements method use the current pointer goes past the last node to satisfy the specific method requirement. The question now is, can we still remove any further duplication? The answer is yes.

Solution - Introducing Lambdas because we can't use past multiple blocks to methods in Ruby 1.9 . Read this link for more info.

Below is a screen shot of what gets changed. You can have a look at this commit which shows the full modified version of the code as part of this refactoring.


End Result - More concise solution adhering to the DRY principle.

Credits to the Pickaxe book by Dave Thomas for the learnings and to Avinasha for recommending this book.

P.S: This code has scope for further refactoring. I have just taken two sample use cases in an attempt to try and explain Blocks and Lambdas in Ruby.