<?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[rishabhstr - Medium]]></title>
        <description><![CDATA[!random everyday stuff - Medium]]></description>
        <link>https://medium.com/rishabhstr?source=rss----9ce509f6643d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>rishabhstr - Medium</title>
            <link>https://medium.com/rishabhstr?source=rss----9ce509f6643d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:43:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/rishabhstr" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Javascript Essentials — A brief guide to the basic underlying concepts]]></title>
            <link>https://medium.com/rishabhstr/javascript-essentials-a-brief-guide-to-the-basic-underlying-concepts-cd69da944d23?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/cd69da944d23</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Sat, 27 Jan 2018 12:18:00 GMT</pubDate>
            <atom:updated>2018-01-29T15:07:11.627Z</atom:updated>
            <content:encoded><![CDATA[<p>In this world of ever evolving world wide web, Javascript is something that is inevitable for every developer. Everyone has once in their life worked with this language and have had a lot of strange gotchas and aha moments.</p><p>This blog post tries to summarise the essential concepts that you will need over time to write great code and use great features in this ever-evolving language. I will also leave you with some external reference links, in case you want to explore more into any concept.</p><blockquote>Javascript is a lightweight, <strong>single-threaded</strong>, <strong>natively synchronous</strong>(though we can make it asynchronous as well), <strong>dynamically typed</strong>, <strong>interpreted</strong>, high-level programming language that <strong>supports object-oriented </strong>and<strong> functional programming </strong>paradigms.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dk_c6Kwi4JaIxYDlvE3NfQ.png" /></figure><p><em>This post will try to summarise JS in the following categories</em>:</p><ul><li>How it works?</li><li>How functions and variables behave?</li><li>Diving into asynchronism</li><li>Using the concepts of Object Oriented Programming</li></ul><p>(Functional programming concepts will be out of scope for this post)</p><blockquote>How it works?</blockquote><p>As Javascript is an interpreted language it needs an interpreting engine to run any piece of code that you’ve written. Generally, it is executed by browsers but it can be interpreted natively as a script using node.js as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FA9NGxNB6-v1oI2qGEtlRQ.png" /><figcaption>Overview of Javascript V8 Engine</figcaption></figure><p>Javascript Engines like Chrome V8, Chakra and SpiderMonkey are used for interpreting and performing the desired tasks. Javascript Engines are a topic of their own and if you want to know more about these, take a look at this <a href="https://blog.sessionstack.com/how-does-javascript-actually-work-part-1-b0bacc073cf">blog post</a> by <a href="https://blog.sessionstack.com/@zlatkov">Alexander Zlaktov</a>, which explains it in detail.</p><blockquote>How functions and variables behave?</blockquote><ul><li><strong>Variable Scope</strong>: JS has two types of scopes, i.e., local and global. All functions are by default global, also, and variable scope can only be limited to local if it is “defined” inside a function.</li></ul><blockquote>If the variable is not defined inside the function, then it automatically assigned as a global scope. So, things need to be defined as <em>var x = 123;</em> instead of <em>x = 123;</em> for local scoping. This also brings the concept of closures into play!</blockquote><ul><li><strong>Variable Hoisting</strong>: This is one of the things that JS interpreter performs behind the scenes. To understand this, always treat JS statements as composed of two parts seperately, i.e., definition and declaration. What this means is that no matter where variables are declared within a particular scope, all variable declarations are moved to the top of their scope, but the assignments remain where they are supposed to be!</li></ul><blockquote>Hoisting also works in case of functions. This means that <strong>function definitions, i.e.</strong><strong><em>function xyz() {...}</em>, are hoisted completely</strong>, whereas a <strong>function expression, i.e.</strong><strong><em>var xyz = function() {...}</em>, is not hoisted </strong>and this is because it works like variable hoisting and only the variable declaration is hoisted.</blockquote><ul><li><strong>Introduction to Callbacks</strong>: JS treats functions as first-class objects, i.e., their type isObject. This is why we can pass a function as an argument into another function, which can be executed later. These passed functions are called as Callback functions or higher-order functions.</li><li><strong>Closures</strong>: This helps in creating scope chains by letting us define function inside a function. As javascript by default doesn’t support classes, so closures helps in using the class and scope limiting concepts to large extent. Every closure maintains 3 scope chains: <strong>global, local and parent</strong> scopes. These can get tricky sometimes and as a solution <strong>IIFEs</strong> are used.</li><li><strong>Value vs. Reference</strong>: Javascript is always pass by value, but when a variable refers to an object, the “value” is a reference to the object. Changing the value of a variable <em>never</em> changes the underlying primitive or object, it just points the variable to a new primitive or object. However, changing a <em>property</em> of an object referenced by a variable does change the underlying object. It is also called as <a href="https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_sharing">Pass by object sharing</a> .</li></ul><blockquote>Diving into Asynchronism (AJAX)</blockquote><ul><li><strong>Introduction</strong>: In asynchronism, the JS engine runs in an event loop. When a blocking operation is needed, the request is started, and the code keeps running without blocking for the result. When the response is ready, an interrupt is fired, which causes an event handler to be run, where the control flow continues. In this way, a single program thread can handle many concurrent operations. And it started as callbacks, as it could be passed along functions and can be executed at a later stage anytime. But it was soon realised that it results in the problem of <a href="http://callbackhell.com/">callback hell</a>.</li><li><strong>Callback hell and solutions</strong>: Callback hell arises due to our classic mistake of thinking the code execution flow to be top-to-bottom. Because of which, we end up producing spaghetti code. As a mitigation, we can follow these principles as a good coding practice and avoid callback hells: Keep the code as shallow as possible, Modularise code instead of using anonymous functions or use advanced solutions like promises, generator/yield or async/await.</li></ul><blockquote>Using the concepts of Object Oriented Programming</blockquote><ul><li><strong>Introduction</strong>: There are 3 patterns to create objects in an Object oriented way: object-literal pattern[var abc = {p1: ...}], prototypal pattern[function abc() {abc.prototype.p1 = ...}] and constructor pattern[function abc(x) {this.p1 = x}]. For using inheritance, JS supports prototypal inheritance where we can overwrite and pass prototypes across objects to make use of inheritance chaining.</li><li><strong>Resolving the Rules of ‘new’ and ‘this’</strong>: ‘new’ operator does 5 things whenever it is called: -&gt; create a new object -&gt; sets internal __proto__ to constructor function’s external property -&gt; point this to newly created object -&gt; execute constructor function whenever this is mentioned -&gt; returns reference to the newly created object.</li><li>this: acts ALWAYS as a reference to a singular object. It is assigned as a function’s property whenever it is executed. The most important concept in JS is that “<em>this is not assigned a value until an object invokes the function where this is defined”.</em> Dealing with this gets tricky while working with callbacks, closures, method assignment to variables and when borrowing methods, while requires special care and use of techniques like apply, call and bind.</li></ul><blockquote>In <strong>strict</strong> mode, <em>this</em> holds the value of <strong>undefined</strong> <strong>in global functions</strong> and <strong>in</strong> <strong>anonymous functions that are not bound to any object</strong>.</blockquote><ul><li><strong>Apply, Call, Bind, &amp; arguments</strong>: These are some common properties which are always present with every method, which help in resolving this references and handle conflicts properly. To have more detailed view of the specifications and how things work, take a look on this article, <a href="https://medium.com/@omergoldberg/javascript-call-apply-and-bind-e5c27301f7bb">JavaScript - Apply, Call and Bind</a>.</li><li><strong>Object Prototypes</strong>: There are two interrelated concepts prototypes when it comes to prototypes in JavaScript. <strong>First</strong>, every JS function has a prototype property and you attach properties and methods on this prototype property when you want to implement inheritance. This is generally not enumerable, but it can be accessed via __proto__ (pseudo property) in some browsers. <strong>Second</strong>, is the prototype attribute which points to the parent of the current object in the prototypal inheritance chain. This is often used in the case you want to access access properties on objects.</li></ul><p>With that I’ll quickly wind up this blog post and see you in the next one. If time permits, I’ll also compare and give brief overviews of other high and middle level languages I’ve worked with, in my previous experiences.</p><p>Also, I highly recommend everyone to read <a href="https://medium.com/@_ericelliott">Eric Elliot</a>’s blog post, “<a href="https://medium.com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3">The Two Pillars of Javascript</a>” in which he beautifully sums up the underlying concepts of Javascript and reveals the mysteries you might be waiting to know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd69da944d23" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/javascript-essentials-a-brief-guide-to-the-basic-underlying-concepts-cd69da944d23">Javascript Essentials — A brief guide to the basic underlying concepts</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackeCorp architecture and Scalability]]></title>
            <link>https://medium.com/rishabhstr/hackecorp-architecture-and-scalability-b94b654ce151?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b94b654ce151</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[digitalocean]]></category>
            <category><![CDATA[fail2ban]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Sun, 15 Oct 2017 21:28:25 GMT</pubDate>
            <atom:updated>2017-10-16T15:27:33.681Z</atom:updated>
            <content:encoded><![CDATA[<p>Last weekend we hosted an online jeopardy style Capture the Flag competition on <a href="http://hackecorp.cf/">http://hackecorp.cf</a>. As a part of ACM, BIT Mesra we conducted this event for our university’s annual technical festival, Pantheon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*lWLMrXbFrN4VH5OROJ45Xw.jpeg" /><figcaption>Pantheon Mr. Robot prelims</figcaption></figure><p>The online preliminary round of our event `Mr. Robot` was hosted on hackecorp.cf and we used some interesting tools for setting up the whole event architecture. Our aim was to conduct an event with interesting questions, uninterrupted user experience while keeping our expenditure at a minimum.</p><p>As we wanted it to be an interesting event for every participant, we made problems from various domains of Information Security like Web Security, Steganography, Forensics, Reverse Engineering, Ciphers, Hashing and Scripting. The participants really enjoyed and learned new concepts while solving the problem set.</p><p>But under the hood to keep things working swiftly, we used some interesting architecture thinking of much worse cases that could’ve happened! A lazy hacker is home to devil’s mind, you know. :P</p><p>The initial task was to get a cloud space for hosting our application and a DNS for a cool name for our prelim round. Regarding the cloud space, our application was fired up by Digital Ocean’s shared cloud servers which we claimed using our GitHub’s student pack. And we booked a cool domain name <a href="http://hackecorp.cf/">http://hackecorp.cf</a> (pronounced hack-e-corp, Mr. Robot reference here) using a free domain provider service. But, as we wanted a reliable DNS service, we used the DNS provider as a Canonical name to our DigitalOcean’s DNS service. This way, we had an efficient and realiable IP resolution infrastructure.</p><p>Next, we had to deploy our application CTFd(<a href="https://ctfd.io/">https://ctfd.io</a>), an open source tool to conduct jeopardy style CTF events. As this is a Flask application, we had various tools to choose for as a Flask server. But as, we had a correct estimate of user traffic, we chose to go for gunicorn with a 4 worker model configuration. This also saved our time by not setting up every minute details as compared to a uWSGI server.</p><p>Also, to create a secure environment for our application we used Docker to create an isolated environment. This helped in isolating the application’s users to a separate environment, which would prevent any user from accessing any unintended data or perform any prohibited action. We binded this docker container to a local port and blocked this port from foreign access.</p><p>To provide more control over the traffic and much more features we chose nginx as a reverse proxy to create a common path to tunnel traffic from. This provided us with more control over incoming HTTP traffic to prevent unnecessary traffic and attacks. We used `fail2ban` as a DDoS mitigation service, which would prevent users form causing frequent erroneous requests by blocking incoming packets from defaulters using unix’s iptables. Further several security headers were implemented to improve several known threats to websites. nginx was the perfect tool for helping us in managing configuration changes. It was also acting as a shock absorber for varying application workload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Md6tjzaPh4tRNn-fh7hu2g.png" /><figcaption>Server status during the event :)</figcaption></figure><p>Finally, to monitor our server status, we used a server monitoring tool to keep us updated with realtime statistics about the server and aware of what is going on currently with the server. This helped us in keeping a close eye on the server to perform anything needed in case of anything going wrong.</p><p>So the whole event was set up with some open sourced and easily available tools and server spaces using student packs, absolutely free-of-cost! :D</p><p>All the participants really enjoyed the overall experience and our servers had no downtime. As we also wanted our juniors to learn new concepts and get a knack of information security, which they did.</p><p>This event was a success, yay!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b94b654ce151" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/hackecorp-architecture-and-scalability-b94b654ce151">HackeCorp architecture and Scalability</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Summer ’17 Internship @ Crowdfire]]></title>
            <link>https://medium.com/rishabhstr/summer-17-internship-crowdfire-97576fdd2a44?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/97576fdd2a44</guid>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Fri, 30 Jun 2017 03:42:37 GMT</pubDate>
            <atom:updated>2018-01-22T18:18:35.288Z</atom:updated>
            <content:encoded><![CDATA[<h4>39 days, 8000 Lines of Code, 20 developed features, handling a whole product with my mentor and lots of good memories</h4><p>I got to know about Crowdfire from Quora and CrunchBase and got really intrigued with their interesting design and engineering (if you haven’t, do have a look!). I was looking for an onsite experience this summer, and as I couldn’t find an opening on their career page, I sent an email expressing my interest anyway.</p><p>After a rigorous interview process consisting of 6–7 rounds, I got an opportunity to work at one of the best startups in India. Exploring about them on internet, I got to know that these guys have a really cool office too, I was excited! And I saw this on my first day, yay! :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySWREb_UJcPTiVZA8l9vRg.jpeg" /><figcaption>Cafeteria and the view outside! ❤</figcaption></figure><p>Crowdfire is a place full of cool, friendly and kind-hearted people who are dedicated towards their work. I really enjoyed learning and programming at Crowdfire with such a talented team of people.</p><p>With a product which is so simple to use for the end-user, some really interesting and thought-out engineering works under the hood to lower latency, increase availibility and thereby, to keep the users happy.</p><p>In my two months of internship, I worked on some really cool features. Some of which included:</p><ul><li>Developing a NLP bot micro-framework which could be integrated to different team communication platforms like Slack, telegram, HipChat, etc. and integrating it in our slack team. We used <a href="https://api.ai/">api.ai</a> to develop our intended intents and understanding natural language from the user.</li><li>Developing various python scripts and setting them up as cron jobs to trigger them at a specific time like reminders, etc.</li><li>Developing various features like generating CSV reports, device management module, syncing user’s calendars for different events.</li><li>Using concepts of graphs on front-end and back-end for developing a visualisation for organisation hierarchy chart. We used various concepts like recursion, DFS, BFS and topological sort which was really interesting.</li><li>Along with all this work, there were discussions held on Databases (redis, elastic search, reverse indexing), System Operations (containerisation, AWS, kubernetes), Code Infrastructure (async services, code design), team distribution and management (agile SDLC).</li></ul><p>Being a full-stack django developer, I was responsible for maintaining the overall product. The best thing was that everyone’s ideas were welcomed and my mentor <a href="https://medium.com/u/b90d26d73fcc">Deepak Jain</a> was an awesome, understanding guy and a great listener. Though I preferred to first solve most of the stuff by myself and think over the problems twice, he was the go-to guy when things looked complicated.</p><blockquote>We work hard, play hard, keep partying like it’s your job — David Guetta :P</blockquote><p>Yes, Firestarters follow this very strictly and we have soccer and cricket once a week, where we go together and play with full passion.</p><p>Firestarters also celebrate all events like birthdays, work anniversaries of our colleagues with delicious cakes and warm wishes. Apart from this, they also welcome new employees with champagne, crowdfire swag box, mugs and lots of warmth and listen to their stories and experiences.</p><p>With all the work and play, Crowdfire takes care of everything else. They provide you a new Macbook Pro for work, and have a loaded refrigerator, cafeteria, coffee machine, fruits, cereals, and a lots of other stuff to get your meals covered throughout the day.</p><p>Each and every day here was so interesting and I loved every bit of it. I love programming new stuff and here, I got a chance to move at a fast pace and develop many new features in such a short span of time. And I love <a href="https://medium.com/u/239c59159dda">Crowdfire</a> for this! Hope to see you guys again!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJAYWXBeANgyQHstXaJiUw.jpeg" /><figcaption>Almost a double thumbs up at the last day of Internship! @<a href="https://medium.com/u/239c59159dda">Crowdfire</a> XD</figcaption></figure><blockquote>Until then, Peace! ✌️</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97576fdd2a44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/summer-17-internship-crowdfire-97576fdd2a44">Summer ’17 Internship @ Crowdfire</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chatbot architecture in Python]]></title>
            <link>https://medium.com/rishabhstr/chatbot-micro-framework-in-python-4c29170d7318?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/4c29170d7318</guid>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[slackbot]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Thu, 29 Jun 2017 14:12:13 GMT</pubDate>
            <atom:updated>2017-11-18T18:05:48.260Z</atom:updated>
            <content:encoded><![CDATA[<h4>NLP Chatbot using python + api.ai + chat applications</h4><h3>Natural language chatbots</h3><p>Chatbots can be really helpful for retaining communications between you and your end-user. And as artificial intelligence has grown over the recent years, we can now make the end-user experience even better by making our bots intelligent by understanding the conversational contexts and with this you can basically create a chatbot which feels like chatting with a real human being and reduce the actual conversation time by responding to most obvious requests or even better, respond to all the intended queries.</p><h3>Purpose</h3><p>With the power of AI, we will create intelligent chatbots which can answer natural language queries and perform the intended tasks. With the help of such an architecture, we plan to connect as many various chat applications like facebook messenger, HipChat, Slack, Telegram, etc. as we want while writing the code once.</p><p>For simplicity, lets just start with a single chat application, slack. I will mention `slack` everywhere i mean any chat application. Once our architecture is all set, it will be a piece of cake to connect other chat apps.</p><h3>Architecture</h3><p>The ultimate aim for us here is to:</p><p><em>A =&gt; Connect slack to any NLP api service, we choose </em><a href="http://api.ai/"><em>api.ai</em></a><em> here. We have two options for this:</em></p><ol><li>Use api.ai integrations <a href="https://api.ai/docs/integrations/slack">as shown</a>. This is easier and faster to setup but has less flexibility.</li><li>Use api.ai <a href="https://api.ai/docs/integrations/">SDK</a> and write a server which listens to messages from slack and forwards it to api.ai. This is a bit time taking but gives more flexibility in preprocessing data and stuff.</li></ol><p><em>B =&gt; Connect </em><a href="http://api.ai/"><em>api.ai</em></a><em> to our server and do what we want to do with data.</em></p><ol><li>Use HTTP calls using api.ai fulfillments. This is easier and less resource intensive but decreases flexibility again.</li><li>Use WebSockets to keep a persistent connection from api.ai to your server. This requires more effort and consumes more resources which results in wasting</li></ol><p>We use option 1 in both steps A and B, because it is more efficient, light and fast to develop. So our architecture finally looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J6qFxROzmK0kKRr09oC0fg.png" /><figcaption>Overall application architecture</figcaption></figure><h3>Building api.ai Intents</h3><p>Get started with this <a href="https://api.ai/docs/docs/get-started">tutorial</a> to build intents and entities and build a basic bot. Test this bot in api.ai test console to get an idea of how the whole thing works.</p><p>Basically, these steps should be followed:</p><ol><li>Build an intent and their supporting entities. Give some example user inputs for these intents so that api.ai can train its model and trigger this intent on similar user requests.</li><li>Setup intent fulfillment URL to the server’s URL which you have deployed your system on.</li><li>Name this intent with an action-name which needs to be handled on the fulfillment server and perform the desired action.</li></ol><h3>Setting up</h3><p>For the chosen architecture choice, we now just need to connect these two steps to fire up the whole thing up.</p><p>Step 1: Connect slack to api.ai using their integration using the <a href="https://api.ai/docs/integrations/slack">guide here</a>.</p><p>Step 2: Make a micro-framework and serve this over HTTP to parse information out of fulfillment callbacks from api.ai and performing the desired action. A sample is shown as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14bacb7cdf7107641c91a689927e8bed/href">https://medium.com/media/14bacb7cdf7107641c91a689927e8bed/href</a></iframe><p>Direct a URL to this method from any web-framework you are using, let it be Flask, Django, or anything else.</p><p>I am calling this a micro-framework here because this kind of modularity makes the code available to any number of chat apps. by just adding another integration from api.ai and you just have to add the new intent’s action-type into the micro-framework and all your chat apps will reflect the changes immediately.</p><h3>Adding platform specific features</h3><p>Now if you want to add platform specific features to this whole application like interactive messages for slack, you will have to bridge the connection between an existing chat connection to a from your server to slack and send a HTTP payload, that’s how interactive messages or other platform specific features work. For this, you will have to setup platform specific SDK or you can just send it as an HTTP payload with help of tokens, this depends and varies with the platform.</p><p>You can check an example payload for interactive messages on slack here <a href="https://api.slack.com/docs/message-buttons">https://api.slack.com/docs/message-buttons</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c29170d7318" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/chatbot-micro-framework-in-python-4c29170d7318">Chatbot architecture in Python</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[India Innovation Challenge ‘16]]></title>
            <link>https://medium.com/rishabhstr/india-innovation-challenge-16-8481c267ad48?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/8481c267ad48</guid>
            <category><![CDATA[interests]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Wed, 16 Nov 2016 19:26:22 GMT</pubDate>
            <atom:updated>2018-01-06T07:12:33.263Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a smart ring and getting in top 50 teams over the nation</h4><p>I along with some senior year students from our university participated in a challenge by IIM Bangalore, Texas Instruments and Indian Government(Make in India campaign).</p><figure><img alt="7183.0167.TIIC_WebBanner_1600x543_01.jpg-1230x0.jpg" src="https://cdn-images-1.medium.com/max/1024/0*MKy9XiNIdGx7nNpd.jpg" /></figure><p>This was a challenge for all Indian students to present their ideas to the world and we developed a low-cost bluetooth-enabled smart ring which is working great(for now atleast, as it is still in testing phase :P ).</p><figure><img alt="meme-sparta-leonidas-this-is-performance-testing.png" src="https://cdn-images-1.medium.com/max/453/0*Nld6IntG8JwzurJx.png" /></figure><p>We made the application to connect with our smart ring, do some data processing and visualisation on the application. We have developed a AngularJS web application as a front-end and node.JS server to connect to any interface(mobile/web). I’ve already explained my application in my <a href="https://rishabhstr.wordpress.com/2016/10/01/turing-the-smart-ring/">earlier post</a>.</p><p>After submitting our entry, on 15th November, we received an email <a href="https://e2e.ti.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-06-66/Shortlisted-teams-for-the-Quarterfinals.pdf">Shortlisted teams for the Quarterfinals.pdf</a> and following the link we came to know that we(Team ID: 1603) have been shortlisted as Quarter finalist amongst top 428 teams of 11,000 participant with the project name Low-cost bluetooth-enabled smart Ring for Pulse Oximetry Solutions.</p><p>Our application’s architecture was carefully designed to deal with data synchronisation problems. We’ve been planning to soon proceed with mobile application for android and iOS platforms soon to make the use for our ring more practical and solve a more realistic problem with our device.</p><p>We love solving problems and are excited to move forward with this and let’s see what we can make together! :)</p><blockquote>Update: We got selected as semi-finalists as top 50 teams! Yay! :D</blockquote><figure><img alt="main-qimg-d994f33965aba42b7537b7d36380c083-c.jpeg" src="https://cdn-images-1.medium.com/max/480/0*0LiNnAzPb3vcObxk.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8481c267ad48" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/india-innovation-challenge-16-8481c267ad48">India Innovation Challenge ‘16</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Summit ‘16@Lisbon]]></title>
            <link>https://medium.com/rishabhstr/web-summit-16-lisbon-c0e5007d69ec?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/c0e5007d69ec</guid>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[interests]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[conference]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Sat, 12 Nov 2016 19:08:02 GMT</pubDate>
            <atom:updated>2018-01-06T07:05:26.483Z</atom:updated>
            <content:encoded><![CDATA[<h4>Receiving student Scholarship as one of the top 100 students across the globe!</h4><p>we got selected for web summit’s student scholarship and attended the Summit in Lisbon in November 2016.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*WFE0PotYEP_GJkWdL3xcxw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*din2EFIv5dpwEfccPyJjrw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*DKnGWmoBDcUgPNeex4qvfQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQn67H7C5na23aFwITkiaA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5A0iiRVm79c1qq6FTof-kA.jpeg" /><figcaption>A Glimpse of the event</figcaption></figure><p><a href="https://websummit.net/">Web Summit</a> described as “Europe’s largest technology marketplace” is actually one of the biggest conferences that you can experience the world. It is a 5-day long conference, start-up exhibit, and much more all going on simultaneously. It covers more than 15 interest areas for people and has more than 50,000 attendees from all over the world.</p><p>We attended many talks and met a lot of start-ups to discuss their ideas and see the recent on-goings in the tech world. We listened to talks by many famous personalities in the tech world like Richard Stallman and Chris Di Bona.It was a dream-come-true to see these guys in person, which we talk and read about every day.</p><p>We also met a lot of people like start-up founders, other student scholars and team leaders of companies like Facebook, MSQRD, Microsoft, Google, Github and many others. We had a nice chat with a lot of people around the conference to share our experience and listen to their experiences. We made some good friends at the conference and enjoyed the experience thoroughly.</p><p>I really like meeting new people and exploring what experiences they have to share. I would really like to attend more conferences like these and work some ideas I get while travelling around and talking with people.</p><figure><img alt="techandstuff.jpg" src="https://cdn-images-1.medium.com/max/703/0*SUcnliE-MKGTmPor.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0e5007d69ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/web-summit-16-lisbon-c0e5007d69ec">Web Summit ‘16@Lisbon</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Portable Binaries for ssh_scan]]></title>
            <link>https://medium.com/rishabhstr/portable-binaries-for-ssh-scan-4a3c63ca9f15?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a3c63ca9f15</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[interests]]></category>
            <category><![CDATA[mwos]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Fri, 21 Oct 2016 18:54:17 GMT</pubDate>
            <atom:updated>2018-01-06T07:08:21.829Z</atom:updated>
            <content:encoded><![CDATA[<h3>portable binaries for ssh_scan</h3><p>Currently, ssh_scan is available as a gem, docker container and source code compilable by the user, but it can be difficult and time-consuming for the user to compile the code every time on their systems. Also, a common problem with ruby apps is not having a native ruby environment where you want to run it.</p><p>So, our mentor suggested that traveling-ruby can be the right fit. It basically allows you to ship the entire application and a pre-compiled ruby with the file. Starting off with a simple script for generating binary, we extended it into producing binaries for all major systems using automated rake tasks. So now, at any time you can run something like rake package to generate various binaries for different systems. We currently support linux_x86, linux x86_64, osx and win32 systems.</p><p>Using this rake task automation we can generate portable binaries in seconds and are ready to go. You can take a look at the tasks here: <a href="https://github.com/mozilla/ssh_scan/pull/237/files">https://github.com/mozilla/ssh_scan/pull/237/files</a>.</p><p>Further, we have also created a pipeline for automating task spawning using Travis-ci and with this pipeline, what basically happens is, on every release of ssh_scan, Travis will automatically run this rake task and upload the created binaries to Github.</p><figure><img alt="Featured4.png" src="https://cdn-images-1.medium.com/max/512/0*X4S5_dV3jXzlG2XT.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a3c63ca9f15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/portable-binaries-for-ssh-scan-4a3c63ca9f15">Portable Binaries for ssh_scan</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mozilla Winter of Security 2016]]></title>
            <link>https://medium.com/rishabhstr/mozilla-winter-of-security-2016-b2dde7cb221c?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b2dde7cb221c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[mwos]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Thu, 20 Oct 2016 18:19:07 GMT</pubDate>
            <atom:updated>2018-01-06T07:10:19.063Z</atom:updated>
            <content:encoded><![CDATA[<p>After Google’s Summer of code, covering another season of programming, we applied and got selected for Mozilla’s Winter of Security program and will be working with our mentors for these winters — 2016.</p><figure><img alt="500px-winterofsecurity_logo_light_horizontal" src="https://cdn-images-1.medium.com/max/500/0*m6sHPY83y7w2qdPt.png" /></figure><p>We will be working on a security utility called `ssh_scan`, which basically is a configuration and policy scanner for SSH servers. This is a native ruby project and relies on minimal dependencies to do its work. You can take a look at its initial functionality here</p><p><a href="https://asciinema.org/a/7pliiw5zqhj7eqvz7q437u6vx">untitled</a></p><p>It has been some time since we have been working with this now and we already have a command-line tool which just needs an SSH service and gives back a JSON report of what it supports and its policy status. We follow a Test-driven Development approach to keep our code tested and try to keep our test coverage high. We are also using Travis CI for continuous integration of our tool across various ruby version(about 5). We also have an official `ssh_scan` blog running on jekyll which you can take a look here: <a href="https://mozilla.github.io/ssh_scan//2016/10/20/first-meeting-with-mwos-project-team.html">https://mozilla.github.io/ssh_scan//2016/10/20/first-meeting-with-mwos-project-team.html</a></p><p>So this was just an introductory post about Mozilla Winter of Security program and I will talk about my work in the following blogs. Until then</p><figure><img alt="bbts" src="https://cdn-images-1.medium.com/max/500/0*Jm89MxTG_hVdMmAy.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2dde7cb221c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/mozilla-winter-of-security-2016-b2dde7cb221c">Mozilla Winter of Security 2016</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[tuRing — the smart ring]]></title>
            <link>https://medium.com/rishabhstr/turing-the-smart-ring-f7fbc02eb11b?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/f7fbc02eb11b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[interests]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Sat, 01 Oct 2016 19:07:19 GMT</pubDate>
            <atom:updated>2018-01-22T05:57:11.017Z</atom:updated>
            <content:encoded><![CDATA[<h3>tuRing — the smart ring</h3><p>I along with three other students from our university were working on a smart ring for Pulse-oximetry based healthcare solutions. Our team consists of four members, two of them are working on the hardware and I along with my friend are working on developing the software interface to interact with the device over BLE(Bluetooth Low-energy), which is a wireless personal area network technology helping devices to communicate wirelessly.</p><p>We had to develop the application from scratch. We just had a device and somehow we had to extract live data from it and show its visualisation on our interface.</p><p>We started with a node.js server which could speak to our ring’s hardware over BLE using a node.js library, noble and get data from it whenever required. after BLE connection, we had to do some data calculations and then push it for visualisation. Upon successful communication, we had to decide on how can we push this data continuously to the front-end. We had some options like polling, sockets and sockets looked like the right way to go as we had to ensure packet delivery so that no information gets lost.</p><figure><img alt="untitled-diagram" src="https://cdn-images-1.medium.com/max/662/0*Y27vD6_L6iuRQVXy.png" /><figcaption>Application Architecture</figcaption></figure><p>So we chose AngularJS along with socket.io for connecting to our node server and formed a pool of pre-allocated memory and used it as a queue so that newly pushed data works in the FIFO manner and our browser doesn’t get out of memory as the amount of data will get accumulated due to data pushed by the server continuously.</p><p>I read somewhere that sockets can also introduce memory leaks into your application when disconnected sockets are not handled carefully. So we also introduced a simple code for monitoring sockets continuously on both server and browser.</p><figure><img alt="screen-shot-2016-12-15-at-9-07-41-am" src="https://cdn-images-1.medium.com/max/1024/0*s3MAnTOePY0hhaiN.png" /><figcaption>socket tracking</figcaption></figure><p>We examined some open sourced data visualisation libraries like plotly, angular-charts, d3.js, etc. for plotting our data and we finally used a subset of d3.js, angular-charts for data visualisation. As we had a live feed of data, we needed a fast replotting tool and this tool fits perfectly in this need.</p><figure><img alt="screen-shot-2016-12-15-at-9-06-53-am" src="https://cdn-images-1.medium.com/max/1024/0*k6-vTQpT1erutnpq.png" /><figcaption>live data visualisation</figcaption></figure><p>Finally, our application worked pretty well with the device and live feed was plotting on the front-end without any memory leaks.</p><p>This project was different from other projects I did, as we did not have much details about how this idea was going to be implemented. We had to think through the architecture and finally the product turned out to be pretty well. It was an awesome experience of practical system design and optimizing system performance!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7fbc02eb11b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/turing-the-smart-ring-f7fbc02eb11b">tuRing — the smart ring</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC ’16: last week]]></title>
            <link>https://medium.com/rishabhstr/gsoc-16-last-week-c0a16cee1582?source=rss----9ce509f6643d---4</link>
            <guid isPermaLink="false">https://medium.com/p/c0a16cee1582</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[interests]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Rishabh Saxena]]></dc:creator>
            <pubDate>Sun, 14 Aug 2016 15:22:46 GMT</pubDate>
            <atom:updated>2018-01-06T07:16:58.716Z</atom:updated>
            <content:encoded><![CDATA[<p>As the GSoC final evaluations are going to start tomorrow, this blog post will summarise the project experience and delve into the tasks I worked on. I will wrap up with the challenges I faced during the last three months and the steps I took to overcome them.</p><p><strong>Background</strong></p><p>OSEM already had a ticket purchasing feature for its conferences where the attendees could buy tickets for the conference. But many people found that the workflow was not very user-friendly and as a result, this feature was not frequently used. We identified the main pain points for the users:</p><ul><li>The earlier ticketing feature used to ask attendees for the tickets they want to but still, the payments were manually done at the conference.</li><li>This made the significance of ticket purchases confusing for the users.</li></ul><p><strong>The Plan</strong></p><p>So my task was to improve the ticketing process. We planned to do this by addressing the pain points as directly as possible. The initial plan was to:</p><ul><li>Improve the user ticket purchase workflow</li><li>Add a online ticket payment feature</li></ul><p>After few rounds of discussion with the OSEM community, we decided to implement the payment feature using `active-merchant`. It is one of the most popular payment library (which also meant readily available documentation, yay!). It was also a good choice for organisers as it gives them the freedom to choose any payment gateway of their choice.</p><p><strong>The Task</strong></p><p>After 34 commits, 30 days of reviewing, 700 lines edited and 165 review comments, I was finally able to meet all the requirements. I learnt many important things in the process like</p><ul><li>Security</li><li>Testing</li><li>Code styling</li><li>Code quality</li></ul><p>The commit got LGTM from key contributors. I was so happy that finally ‘my code’ will be powering OSEM.</p><figure><img alt="payment" src="https://cdn-images-1.medium.com/max/1024/0*lbmG4COPBm5DD-0k.png" /></figure><p><a href="https://github.com/openSUSE/osem/pull/1042">Check active-merchant implementation here on Github</a>.</p><p><strong>The Complication</strong></p><p>However, as many things in real life, we stumbled upon a list minute hiccup. Actually, it was a big one. Some community members pointed out that this feature has to comply with better PCI Guidelines as we are dealing with confidential information like credit card numbers. There are various certificate levels in PCI guidelines, each with different requirements and costs. We found out that the `active-merchant` solution would have to be PCI SAQ-D compliant, which is the most stringent of all and requires considerable capital expenditure.(Read more about PCI DSS guidelines <a href="https://blog.spreedly.com/2014/12/18/pci-dss-v3-0-for-online-merchants/">here</a>.)</p><p>After further discussion with the community, it was decided that there was a need to reimplement the whole feature to make it SAQ-A compliant. This will offload the security aspect to established third parties which are SAQ-D compliant and hence it will becheaper for the organiser to integrate such a solution without worrying about the burden of getting SAQ-D certification. We looked into a few options (see <a href="https://github.com/openSUSE/osem/issues/1105">here</a>) and finally decided to integrate Stripe iFrame payment feature directly into the application.</p><p><strong>The task re-implemented</strong></p><p>Towards the second half of GSoC, I re-implemented the online payment feature using Stripe payment gateway. The original work helped in accelerating this development work as I had a good idea of all the tests which should pass. The development process was very close to TDD and I liked this way of programming. Within 2 weeks, I re-implemented the feature while handling all possible exceptions in the payment process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*GD_VwTUNVNUikDqbccHKfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*eaoffTptzKiYClH4lBQgiA.png" /><figcaption>The new payment interface.</figcaption></figure><p><a href="https://github.com/openSUSE/osem/pull/1108">Check stripe implementation here on Github</a>.</p><p><strong>Challenges</strong></p><p>There were various unforeseen changes and adjustments which were encountered during the course of this project. As I wanted to do my best in GSoC and follow the plan closely, these changes were very challenging for me to cope up. I would like to thank my mentors for continuous guidance and support in the project. In the process, I always kept my focus on thinking about “what to do next?” instead of “why did it go wrong?”.</p><p>One line from my mentor stayed in my head</p><blockquote>“Things always keep changing for better in Open Source Society.”</blockquote><p><strong>Overall Experience</strong></p><p>I got to learn a lot about Ruby on Rails, TDD, better code practices, better testing practices and Web Security guidelines and standards. I also learnt about how payments are handled by various payment gateways and what are the best practices when you want to use a payment processor/gateway in your application.</p><p>Meeting lovely SUSE people and fellow GSoC students at openSUSE Conference 2016, Nuremberg was a wonderful and encouraging life experience too.</p><p>The overall experience in Google Summer of Code with openSUSE was full of learning, support and joy. The whole community was very supportive during the GSoC project and I want to work more with Open Source Society and learn more with the concept of collaborative learning.</p><p>I would highly recommend people to work with Open Source community and learn along with the most learned and knowledgeable people who are passionate about their work. :)</p><p>I will continue working with openSUSE solving bugs in OSEM and carrying out various other improvements possible in OSEM. I will first make other required changes to make the feature better and then I am thinking to work with dockerizing the OSEM platform in my free time :)</p><p><strong><em>Summary</em></strong></p><ul><li>You can see the issues we have worked with, <a href="https://github.com/openSUSE/osem/issues?utf8=%E2%9C%93&amp;q=is%3Aissue%20author%3Arishabhs95">here</a>.</li><li>You can look into all the pull requests we created for OSEM <a href="https://github.com/openSUSE/osem/pulls?utf8=%E2%9C%93&amp;q=is%3Apr%20author%3Arishabhs95%20">here</a>.</li><li>You can see all our merged commits into OSEM <a href="https://github.com/openSUSE/osem/commits/master?author=rishabhs95">here</a>.</li></ul><p><em>you can find me on gitHub at </em><a href="http://github.com/rishabhs95"><em>rishabhs95</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0a16cee1582" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rishabhstr/gsoc-16-last-week-c0a16cee1582">GSoC ’16: last week</a> was originally published in <a href="https://medium.com/rishabhstr">rishabhstr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>