<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arun kumar on Medium]]></title>
        <description><![CDATA[Stories by Arun kumar on Medium]]></description>
        <link>https://medium.com/@ambidexter?source=rss-d4b1c075e772------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vkHwppC8K0AXulp3djuEuw.jpeg</url>
            <title>Stories by Arun kumar on Medium</title>
            <link>https://medium.com/@ambidexter?source=rss-d4b1c075e772------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:28:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ambidexter/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Future of happy employees]]></title>
            <link>https://medium.com/prod-io/the-story-of-an-app-called-mili-a92d960f63d6?source=rss-d4b1c075e772------2</link>
            <guid isPermaLink="false">https://medium.com/p/a92d960f63d6</guid>
            <category><![CDATA[hr-and-tech]]></category>
            <category><![CDATA[manager]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[digital-age]]></category>
            <dc:creator><![CDATA[Arun kumar]]></dc:creator>
            <pubDate>Wed, 12 Jul 2017 06:31:57 GMT</pubDate>
            <atom:updated>2017-07-12T11:17:49.745Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*sYufCuzswN2AgMWiU4icXA.png" /><figcaption>People leave bosses not companies.</figcaption></figure><p>According to a survey one in two people leave their company because of their boss. So there is a 50% probability that if someone left your team, it is due the discord between the employee and their manager.</p><p>Manager is the reason for an employee’s success and growth in an organization. He is their caretaker, their adviser and their peer. If a manager does not play this role effectively, organizations lose best of their talents and ultimately pay the price in the long run.</p><p><strong>Why does this happen? Is the Manager at fault all the time?</strong></p><p>It is not the manager’s fault completely. In the dynamic environment that we work in, manager is not only required to do get things done from others but is also answerable for his own projects and deadlines. This is when the other responsibility takes a back seat.</p><p>Keeping up with every single person in the team is a hard task. You cannot know everything about everyone at all times.One definitely needs help / assistance.</p><p>An assistant who knows all about your team, their performance, their competencies, their weakness, their strengths, their professional goals and their performance. This assistant on demand can give you all the information and help you be the manager that your employees dream about.</p><p>How great would that be?</p><p>Pretty cool we thought, and hence brought Mili into existence.</p><p><strong>So who or what is Mili?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*u82MSndRyFynctuLt2j2zg.png" /></figure><p>It’s an age of connectivity and creativity, an age where one way of being connected is simply not enough. While social media networking showcases fantastic ways of innovation in being connected, corporate too are cashing in on the hype.</p><p>Traditional approach of quarterly, half yearly or annual appraisal processes involve last minute scrambling of ratings and rewards often ended with little or no room for personal as well as professional improvement.</p><p>Mili is your personal assistant/companion who triggers messages according to your interaction with your team members. The App analyses the pain points of your employees and helps you help them overcome these. If an employee’s performance is low because of lack of a certain skill, the app prompts you to send him for a relevant training, the app also follows up with you WRT the outcome of the training. If you haven’t interacted with your team for a long period of time it reminds you to interact with them.</p><blockquote><strong>What does Mili do (explained in 3 points)</strong></blockquote><blockquote><strong>Engaging Disconnected Teams</strong> — Constant companion for Manager to engage with employees and drive results</blockquote><blockquote><strong>Performance Development </strong>— Track and manage performance &amp; team learning through live interactions</blockquote><blockquote><strong>Data Driven Talent Management </strong>— Real-time data and analytics to drive manager’s decision</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*nzl0K1N6Zg2zAuXS0El1fA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KKKXPRjoLrIhsEBJM_odsQ.png" /><figcaption>Analytics Screen</figcaption></figure><h3><strong>Let’s talk tech:</strong></h3><p>An idea is just the beginning, the next step was to bring it all together, a tougher challenge at hand.</p><p>Choosing a tech stack was the first step. We had an added advantage here as there were 3 developers with us who had the knowledge of 3 different technologies. (C#,RoR and Objective C)</p><p>The languages we used were as follows:</p><ul><li>Ruby on Rails</li><li>HTML &amp; JavaScript</li><li>Objective C</li></ul><p>Two days technically means an approximate of 20hrs to finish a hack. So as much as our engineers love to write original code, in this sort of a time frame, it only makes sense to use appropriate tools which gets things done faster.</p><p><strong>Snapshot of what we achieved in 2 days:</strong></p><p><strong>Hack day 1:</strong></p><ul><li><strong>Design Prototype: </strong>Marvel is ideal for creating fast, click-through prototypes for web and mobile apps. Checkout our awesome designs <a href="https://marvelapp.com/142d873">here</a></li><li><strong>API design: </strong>Mili relies heavily on APIs. We went with Rails 5 with api only mode. Rails provides a set of defaults that allows developers to get up and running quickly, without having to make a lot of trivial decisions.</li><li><strong>User Interface: </strong>Bringing the prototypes to live was very challenging for the iOS developer as we were demanding pixel perfect implementation of the design. (looks matter, don’t they :P)</li></ul><p><strong>Hack day 2:</strong></p><ul><li><strong>Analytics/Insights: </strong>Mili collects a lot of insights about the employees and it was quite challenging to represent the data in different charts. We chose to use the following libraries “Highcharts’, ‘D3.js’ and ‘Plotly.js’</li><li><strong>Push notifications: </strong>Implementing push notifications on a mobile platform, especially in iOS, is not the most straightforward task. After some research we chose to use ‘One Signal’ — it just took 15 minutes for us to set up ‘one signal’ as they have automated almost all of the back-end effort</li></ul><p>The requirement from the start were very clear. We knew exactly what we wanted and what the end goal was, hence we were able to prioritize and divide our work accordingly. This is the sole reason of achieving all that we showcased through the app in 2 days. We did not have a single change in our requirements which kept our focus at its best.</p><p><strong>Our Pitch Tricks and the rest</strong></p><p>After the cake is iced we needed to present it to the client (our judges). <strong><em>‘Never judge a book by it’s cover’</em></strong> they say, but packaging matters a lot. A good pitch is one which is short, crisp and gets the audience hooked on to you. We had leading HR Professionals as our judges, hence it was ideal to customise our pitch to that audience, having said that we had a couple of them who were not from that industry, so the trick was to use examples that everyone connects to instantly and weave a story around it. Everyone loves a good story.</p><p>The pitch was divided into 5 parts,</p><ol><li>Problem Statement</li><li>Solution</li><li>How the solution works</li><li>Why would the solution work</li><li>Why the problem at hand is of the utmost importance to resolve</li></ol><p>We were one among the very few teams that finished their pitch in time. We didn’t spend time in explaining the app separately, the PPT was in flow with the pitch, and so was the demo. Had we separated the both we would have ended up taking a lot of time. We also focused on only the star attractions and left the rest to show if needed during the Q&amp;A session. We had already jotted down a list of things that the judges would ask us as we did not showcase everything, leaving room for some doubt in their minds, which later on we would resolve :) pretty good trick and it worked in our favour.</p><p>What we loved about the 2 days was the understanding within the team. We were all exactly on the same page at all times. We leveraged our mentors to the fullest. Lunch room talks gave us insight from a competitor’s perspective and brainstorming sessions helped us understand each other’s perspective and ideas. Small things like these go a long way.</p><p>And that folks is the recipe for success.. Oh and it also helps when you have an awesome sauce team :D</p><p><strong>Arun | Mithun | Govardhan | Sourabh | Nikita | Raksha | Dileep — the winners :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a92d960f63d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prod-io/the-story-of-an-app-called-mili-a92d960f63d6">Future of happy employees</a> was originally published in <a href="https://medium.com/prod-io">Prod.IO</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Executing Ruby program ? You need to know this.]]></title>
            <link>https://medium.com/prod-io/executing-a-ruby-program-10b599b9b4e7?source=rss-d4b1c075e772------2</link>
            <guid isPermaLink="false">https://medium.com/p/10b599b9b4e7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Arun kumar]]></dc:creator>
            <pubDate>Tue, 25 Apr 2017 05:07:04 GMT</pubDate>
            <atom:updated>2017-04-25T07:06:24.085Z</atom:updated>
            <content:encoded><![CDATA[<h4>PART 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aj0LL0q_Fym3rx7-9wGgUQ.png" /></figure><blockquote>How many times do you think Ruby reads and transforms your code before running it? Once? Twice? <strong>Thrice!</strong></blockquote><p>Whenever you run a Ruby script what happens beneath is truly amazing. Ruby rips your code apart into small pieces and then puts it back together in a different format… <strong>three times</strong>! Between the time you type “ruby” and start to see actual output on the console, your Ruby code has a long road to take, a journey involving a variety of different technologies, techniques and open source tools.</p><p>How can a computer language be smart enough to understand the<br>code you give it? What does this intelligence really consist of?</p><p>Let’s look at the journey your code takes…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTaq4VXW1leIgEUrLQXsgw.jpeg" /></figure><p>In this post we’ll follow a journey of a simple ruby program that is lexed, parsed and compiled into bytecode. We’ll use the tools that Ruby gives us to spy on the interpreter every step of the way.</p><p>Let’s take the following ruby code and rip it apart.</p><p>10.times do |n| puts n end</p><h3>Tokenizing</h3><p>Before ruby interpreter can run the program it converts it from a somewhat free-form programming language into more structured data.</p><p>Ruby interpreter tries to break your program into small chunks, or tokens.</p><p>The ruby library provides a module called Ripper, that lets us process ruby code in the same way how ruby interpreter processes it</p><pre>require &#39;ripper&#39;<br>Ripper.tokenize(“10.times do |n| puts n end”)<br># =&gt; [&quot;10&quot;, &quot;.&quot;, &quot;times&quot;, &quot; &quot;, &quot;do&quot;, &quot; &quot;, &quot;|&quot;, &quot;n&quot;, &quot;|&quot;, &quot; &quot;, &quot;puts&quot;, &quot; &quot;, &quot;n&quot;, &quot; &quot;, &quot;end&quot;]</pre><p>Tokenizer is completely stupid, even if you give an invalid ruby code it will still tokenize it.</p><pre>require &#39;ripper&#39;<br>Ripper.tokenize(&quot;10.times do {n} puts n end&quot;)<br># =&gt; [&quot;10&quot;, &quot;.&quot;, &quot;times&quot;, &quot; &quot;, &quot;do&quot;, &quot; &quot;, &quot;{&quot;, &quot;n&quot;, &quot;}&quot;, &quot; &quot;, &quot;puts&quot;, &quot; &quot;, &quot;n&quot;, &quot; &quot;, &quot;end&quot;]</pre><h3>Lexing</h3><p>A lexer converts the statements in code into various categories of like key words,constants,variable etc just like identifying parts of speech in a sentence and produce token.</p><pre># =&gt; [&quot;10&quot;, &quot;.&quot;, &quot;times&quot;, &quot; &quot;, &quot;do&quot;, &quot; &quot;, &quot;|&quot;, &quot;n&quot;, &quot;|&quot;, &quot; &quot;, &quot;puts&quot;, &quot; &quot;, &quot;n&quot;, &quot; &quot;, &quot;end&quot;]</pre><p>When Ruby sees these characters, it tokenizes them. That is, it converts them into a series of tokens or words that it understands by stepping<br>through the characters one at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tygwE5ly495ipb3rIyyKQ.jpeg" /></figure><p>Let’s use ripper to tokenize the ruby script.</p><pre>require &#39;ripper&#39;<br>require &#39;pp&#39;<br>pp Ripper.lex(&quot;10.times do {n} puts n end&quot;)<br># =&gt; <br>[[[1, 0], :on_int, &quot;10&quot;],<br> [[1, 2], :on_period, &quot;.&quot;],<br> [[1, 3], :on_ident, &quot;times&quot;],<br> [[1, 8], :on_sp, &quot; &quot;],<br> [[1, 9], :on_kw, &quot;do&quot;],<br> [[1, 11], :on_sp, &quot; &quot;],<br> [[1, 12], :on_lbrace, &quot;{&quot;],<br> [[1, 13], :on_ident, &quot;n&quot;],<br> [[1, 14], :on_rbrace, &quot;}&quot;],<br> [[1, 15], :on_sp, &quot; &quot;],<br> [[1, 16], :on_ident, &quot;puts&quot;],<br> [[1, 20], :on_sp, &quot; &quot;],<br> [[1, 21], :on_ident, &quot;n&quot;],<br> [[1, 22], :on_sp, &quot; &quot;],<br> [[1, 23], :on_kw, &quot;end&quot;]]</pre><p>In the example above we are using Ripper to Lex our program, as you can see, it’s now tagging each token as being an identifier :on_ident, an operator :on_kw, an integer :on_int, etc.</p><p>There is still no real syntax checking going on at this point. The lexer will happily process invalid code.</p><h3>Parsing</h3><p>Once your code is converted into series of tokens, what does ruby do ? Can it directly understand and run the code by going through the tokens and execute it one by one. NO!</p><p>Ruby has a long way to go.. The next step is parsing where tokens are grouped into sentences or phrases that makes sense to Ruby.</p><p>But how will ruby understand what you are telling it with your code ? Ruby uses parser generator — takes a series of grammar rules as input that<br>describe the expected order and patterns in which<br>the tokens will appear. The most used parser generator is Yacc(Yet another Compiler Compiler) but ruby uses a new version of Yacc called Baison.</p><p>The grammar rule file for ruby is parse.y. This file defines the actual syntax and grammar that you have to use while writing a ruby program. So parse.y is heart and soul of Ruby where the language itself is defined.</p><p>Now we have the parse.y file which has the grammar/rules but how will it analyse and process the incoming tokens?</p><p>Next, it uses an LALR parser to convert the input stream of tokens into a<br>data structure called an abstract syntax tree.</p><p>To be continued…</p><blockquote>Reference:</blockquote><blockquote>Ruby Under a Microscope — Pat Shaughnessy</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10b599b9b4e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prod-io/executing-a-ruby-program-10b599b9b4e7">Executing Ruby program ? You need to know this.</a> was originally published in <a href="https://medium.com/prod-io">Prod.IO</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is a symbol in ruby]]></title>
            <link>https://medium.com/@ambidexter/what-are-symbols-in-ruby-a177a26224ff?source=rss-d4b1c075e772------2</link>
            <guid isPermaLink="false">https://medium.com/p/a177a26224ff</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Arun kumar]]></dc:creator>
            <pubDate>Sun, 27 Dec 2015 16:27:58 GMT</pubDate>
            <atom:updated>2015-12-27T16:32:32.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tc6Z1DeHS_jpJVNh8Hd73w.png" /></figure><p>Symbol is like a variable but it’s prefixed with a colon(:). Symbols are Strings, an important difference is, Symbols are immutable. Mutable objects can be changed after assigning while immutable objects can only be overwritten. It also means only one copy of a symbol needs to be created. Thus, if you have</p><pre>var_1 = :my_symbol<br>var_2 = :my_symbol</pre><p>:my_symbol will only be created once, and var_1 and var_2 point to the same area of memory. On the other hand, if you have</p><pre>var_1 = &quot;my_symbol&quot;<br>var_2 = &quot;my_symbol&quot;</pre><p>a string containing my_symbol will be created <em>twice</em>, and var_1 and var_2 will point to different instances.</p><pre>#object_id- Returns an integer identifier for <em>obj</em><br>puts &quot;my_symbol&quot;.object_id    # 43900321<br>puts &quot;my_symbol&quot;.object_id    # 53284673<br>puts :my_symbol.object_id     # 342943<br>puts :my_symbol.object_id     # 342943</pre><p>So, when do we use a string and a symbol?</p><ul><li>If the identity of an object is important, use a symbol.</li><li>If the contents of an object are important, use a string.</li></ul><pre><em><br>symbol_obj = :yes</em></pre><pre><em>if symbol_obj == :yes<br>  print &quot;You understood symbols&quot;<br>else <br>  print &quot;Spend more time to understand symbols&quot;</em></pre><pre><em>string_obj = &quot;yes&quot;</em></pre><pre><em>if string_obj == &quot;yes&quot;<br>  print &quot;You understood the difference between symbol and string&quot;<br>else <br>  print &quot;Spend more time to understand symbols&quot;</em></pre><p>This gives the same result, but is it efficient?</p><p>In this example, every mention of ‘yes’ creates a new object stored separately in memory, whereas symbols are single reference values that are only initialized once. In the first code example, only :yes exists, whereas in the second example you end up with the full strings of ‘yes’ and ‘yes’ taking up memory.</p><p><strong>Advantages of using symbols:</strong></p><ol><li>A Ruby symbol is an object with O(1) comparison</li></ol><p>To compare two strings, we potentially need to look at every character. For two strings of length N, this will require N+1 comparisons</p><pre>def string_compare str1, str2<br>  if str1.length != str2.length<br>        return false<br>  end<br>  for i in 0...str1.length<br>    return false if str1[i] != str2[i]<br>  end<br>  return true<br>end<br>string_compare &quot;foobar&quot;, &quot;foobar&quot;</pre><p>But since every appearance of :foobar refers to the same object, we can compare symbols by looking at object IDs. We can do this with a single comparison.(O(1))</p><pre>def symbol_compare sym1, sym2<br>  sym1.object_id == sym2.object_id<br>end<br>symbol_compare :foobar, :foobar</pre><p>2. A Ruby symbol is a label in a free-form enumeration</p><p>In C++, we can use “enumerations” to represent families of related constants:</p><pre>enum BugStatus { OPEN, CLOSED };<br>BugStatus original_status = OPEN;<br>BugStatus current_status  = CLOSED;</pre><p>But because Ruby is a dynamic language, we don’t worry about declaring a BugStatus type, or keeping track of the legal values. Instead, we represent the enumeration values as symbols:</p><pre>original_status = :open<br>current_status  = :closed</pre><p>3. A Ruby symbol is a constant, unique name</p><p>In Ruby, we can change the contents of a string:</p><pre>&quot;foobar&quot;[0] = ?b # &quot;boo&quot;</pre><p>But we can’t change the contents of a symbol:</p><pre>:foobar[0]  = ?b # Raises an error</pre><p>4. A Ruby symbol is the keyword for a keyword argument</p><p>When passing keyword arguments to a Ruby function, we specify the keywords using symbols:</p><pre># Build a URL for &#39;bug&#39; using Rails.<br>url_for :controller =&gt; &#39;bug&#39;,<br>        :action =&gt; &#39;show&#39;,<br>        :id =&gt; bug.id</pre><p>5. A Ruby symbol is an excellent choice for a hash key</p><p>Typically, we’ll use symbols to represent the keys of a hash table:</p><pre>options = {}<br>options[:auto_save]     = true<br>options[:show_comments] = false</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a177a26224ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>