<?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 Shaswat Lenka on Medium]]></title>
        <description><![CDATA[Stories by Shaswat Lenka on Medium]]></description>
        <link>https://medium.com/@shaswatlenka?source=rss-b605c8e24791------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pjXXDvxzbDPlOlw9L3lG7Q.jpeg</url>
            <title>Stories by Shaswat Lenka on Medium</title>
            <link>https://medium.com/@shaswatlenka?source=rss-b605c8e24791------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 18:31:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shaswatlenka/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[Why we will most likely not improve over time]]></title>
            <link>https://shaswatlenka.medium.com/why-we-will-most-likely-not-improve-over-time-481aff395adb?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/481aff395adb</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Fri, 19 Mar 2021 20:42:05 GMT</pubDate>
            <atom:updated>2021-03-19T20:42:05.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*5N-gDh2yuvKO-TEH.jpg" /><figcaption>A duckling to make your day bright.</figcaption></figure><p>I like to compare myself with a software release cycle, with each new patch and bug fix, I am a better version. Be it a major defect or moderate, being able to fix it in time must be a priority. I even changed my bio recently, because i don’t like coffee anymore. Diet coke feels better.</p><p>Evolution, change, improvement, growth, whatever you call it, is a natural way of survival. Great companies have fallen because they simply couldn’t change to the need of time (Gamestop.) . Relative competitive success comes from constant improvement. If coronavirus can improve within a year to come back stronger in its infection game, then why can’t you? Here are the reasons why you can’t.</p><h4>Confirmation Bias</h4><p>We all love to want something to happen badly. For me, it’s being able to look at the sunset with a cup of tea in the evening, without worrying about anything, for 10 minutes. In other words, my priority is freedom of time to do whatever I like. For you, it might be financial success, a zero figure or getting into a great university. But the problem is,</p><blockquote>“because I want to have freedom over my time, and the thought of not actually having it makes me a failure, I would convince myself that I have freedom over time, without ever actually improving myself to achieve it.”</blockquote><p>During a serious World Cup Cricket match, Sachin Tendulkar getting back to the pavilion at duck is his mistake, not because you were eating Bingo Mad Angles instead of blue color Lay’s. I hope you get it now. Just because we have huge respect for Sachin, we are not ready to believe that he can play bad sometimes. Similarly, we all are huge fans of ourselves. We see ourselves like someone in the future and only believe the facts that supports our belief and ignore everything that threatens it.</p><p>“Its okay to eat junk once in a while and miss the gym. Kya fakak padega.”</p><p>“This company is so popular, i should buy its share!”</p><p>“Who needs a health insurance? What will happen to me at worst?”</p><p>“I have a strong immunity and eat tulsi everyday, I don’t need a mask.”</p><p>“Apple is Apple. Iphone is Iphone.”</p><p>… the list goes on.</p><p>If you are one of these people, you probably haven’t achieved the goals you have set for yourself. And you’ll probably be denying this fact in your mind while reading this, because of confirmation bias.</p><h4>No, But, Because</h4><p><em>“I performed bad again in that test”,</em></p><p>I guess you need more practice.</p><p><em>“</em><strong><em>No</em></strong><em> man, the questions were pretty tough, everyone performed bad”.</em></p><p>2.</p><p>“That guy is really making a killing”</p><p>“<em>Yeah, </em><strong><em>but </em></strong><em>what is the point of having so much money, he has no children. He must be depressed.</em>”</p><p>3.</p><p>“You should control your smoking habits”</p><p>“Oh! This is <strong><em>because </em></strong>of exams, i don’t smoke that much.”</p><p>These are real conversations that I have had at some point in my life. These conversations display our default behaviour conditioned through practice over time by shifting blame and keeping our self-image intact when facing negative feedback or dismiss positive feedback given to someone else. But the problem is, we never have an unbiased opinion on ourselves. In other words, we are the worst judges for ourself. But in case of criticising a third person, we can do the job pretty well.</p><blockquote>Its like the difference between writing your own unit tests in dev. environment vs a tester testing your code in test environment. He will, in almost all the time, find more defects that you.</blockquote><p>You can’t open a door standing with your nose into it. Step back. Relax. Take Responsibility. Be Vulnerable.</p><p><em>Hope you liked this short off-track article with an experimental writing style. It feels great to be able to find time to write what’s on top of my mind. During the last one year, i have been exploring different things other than computer science like cooking, farming, raising ducks and geese, astrophysics, finance, economics and stand-up comedy. And now, i will be having a lot of things to write about. :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=481aff395adb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contributing to Open Source — A complete guide]]></title>
            <link>https://shaswatlenka.medium.com/contributing-to-open-source-a-complete-guide-1b9d9706b8fd?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b9d9706b8fd</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[open-source-software]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Fri, 04 Sep 2020 00:59:24 GMT</pubDate>
            <atom:updated>2020-09-04T00:59:24.055Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*iZ8rPrENd4oudirZ-rG4kA.png" /></figure><h3>Contributing to Open Source — A complete guide</h3><p>I first got to know about the open-source community in 11th grade through a flyer of Google’s popular open-source event called “<a href="https://summerofcode.withgoogle.com/">Google Summer of Code</a>”. This was the first time I was introduced to the world of <a href="https://www.freeopensourcesoftware.org/#:~:text=Free%20Open%20Source%20Software%20(FOSS,use%2C%20modify%2C%20and%20distribute.">FOSS</a> — Free and Open Source Softwares. In my journey thereafter, the world of FOSS has fostered my software development career in a way unimaginable. In 5 years down the line, I had contributed to open-source organizations like <a href="https://www.mozillapulse.org/entry/602">jste</a> &amp; <a href="https://github.com/fossasia">fossasia</a>. I was a contributor in Mozilla Global Sprint 2018 and now maintain my own open-source organization under the umbrella name of <a href="https://github.com/purplepotion">purplepotion</a> where we work on several original ideas and PoCs in the field of Healthcare Informatics, Precision Medicine, and AI. In this article, we will be</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*voSk0OURPopMOa02gQA9XQ.png" /><figcaption>purplepotion</figcaption></figure><p>discussing the details on how you can start with contributing to open-source software and how will it help you shape your software development career.</p><h3>What is Open Source?</h3><blockquote>The term originated in the context of software development to designate a specific approach to creating computer programs. Today, however, “open source” designates a broader set of values — what we call “<a href="https://opensource.com/open-source-way">the open source way</a>.” Open source projects, products, or initiatives embrace and celebrate principles of open exchange, collaborative participation, rapid prototyping, transparency, meritocracy, and community-oriented development. — opensource.com</blockquote><p>Or simply put, its a set of principles in software development that revolve around principles of open exchange of ideas and code, for the collective development of the community. Basically, the code for such software is publicly available and anyone is allowed to suggest change/improvements that could make the software better. But why would anyone do this? And above all, for free!?</p><h3>But why are we working for free?</h3><p>We all are aware of the fact that our time is invaluable and often said, time is money. But why do open source developers invest a major portion of their time in return of no money? There is more than one reason for this.</p><ol><li><strong>Hobby: </strong>Most open source contributors are already <strong>full-time employees</strong>. Hence they are already involved in a high-paying job and take the open-source as a free time hobby.</li><li><strong>Gaining relevant experience: </strong>The other major part of the community are <strong>students</strong>. And in this case, contributing to open source is a major way to showcase their programming portfolio. Unlike any university software project, an open-source project is of production scale with a high-quality maintainable codebase. From “high-quality”, I mean the architecture of the software is elegant and covers some of the very important concepts of software design which is not usually gained in an academic curriculum.</li><li><strong>Code Review: </strong>One of the most valuable skills one gets from working with FOSS projects is the ability to study and understand code that is written by others. Hence while writing code themselves, open-source contributors already inherit the ability to write clean, readable, maintainable, and documented code.</li><li><strong>Community Experience: </strong>Open source instills a sense of teamwork and building with the community, for the community. In this process, we meet a lot of like-minded people who are way smarter than us and share our strengths with one another so that we become stronger together. We learn from each other’s coding patterns, design patterns, etc. So it&#39;s always a win-win for everyone.</li><li><strong>For the cult of open-source: </strong>After all, we are the change-makers! We believe in the ideology of open-source! With each line of code written and adopted, we are making the world a better place! We envision a world where software is FREE and knowledge is OPEN to all! We are ONE community and are governed by the same set of philosophy! Open source is our identity and this is what we believe in and will keep making better software, free — and open to all.</li></ol><h3>Contributing to FOSS Projects</h3><p>Below is a step by step process in which you should approach open-source. I believe this is the most effective way to be able to contribute and make this steep learning curve a bit easier to climb. I learned it the hard way! :)</p><ol><li><strong>Switch to Linux/Unix(macOS): </strong>windows systems, natively do not support a lot of tools and features that help in locally building OSS. These are natively supported by Linux and Unix systems. On windows, even if you’ll be able to build using third-party applications, you’ll be wasting a lot of your precious time, and in case of a bug or any trouble encountered in the process, you won&#39;t be getting much help from online forums as most other developers won&#39;t be using windows themselves. I love windows machines, but when it comes to a few things, one of them is software development, you won&#39;t get much out of it. To contribute to an OSS project you would need to first build a local copy of the software on your system and then keep it in sync with the remote copy(using git) while you are developing your modifications/improvements. This is exactly where Linux and Unix systems come handy.<br><strong><em>NOTE</em></strong>: Some FOSS projects might be using technologies that are natively supported by Windows(e.g. .NET projects). Unless you aspire to work on such projects, you should make a switch.</li><li><strong>Master a STACK: </strong>This is the <strong>MOST IMPORTANT </strong>step in your journey of OSS development. A STACK is a set of tools that enable you to code, build, test, debug, deploy, and maintain software. A common STACK consists of a <em>primary</em> <strong><em>programming language</em></strong><em>, a </em><strong><em>framework(s)</em></strong><em>(based on needs of the project), </em><strong><em>library(es)</em></strong><em>(based on needs of the project), a deploying tool(for deploying into production/testing eg. docker), and a </em><strong><em>VCS</em></strong><em>(like git/mercurial, etc). </em>The takeaway here is that you need to master <strong>ONE programming language.</strong></li></ol><blockquote>By mastering a programming language, I mean you should be able to implement and utilize all the basic and advanced concepts of programming including data structures, algorithms, design patterns such as <a href="https://en.wikipedia.org/wiki/Object-oriented_programming"><strong>OOP</strong></a> with little to no guidance. You should be able to perform any programming task including the use of third party libraries, software testing, debugging, developing <a href="https://en.wikipedia.org/wiki/Application_programming_interface"><strong>APIs</strong></a>, etc. Again, mastering a language differs from person to person and is a never-ending process. It depends on where you set the bar and are confident enough, but the above mentioned few are the basic tasks you should be able to do effortlessly. (read <a href="https://medium.com/@shaswatlenka/anybodys-guide-to-computer-science-d76ec7bb094e?source=friends_link&amp;sk=7f4e455fb363fdef101e23f202d81acf">this</a> article to know more)</blockquote><p>After you feel that you now have a stronghold in a programming language, its time to build your very first project using that language in a common field where your programming language is popularly used. (for python, say a Machine Learning project). You need to make sure that you are including the following things in your first project.</p><ul><li>A <strong>VCS — </strong>Version Controlling Systems are a major part of FOSS. Every OSS project uses a VCS. The most popular among them at the time of writing this article is <strong>git. </strong>— Here’s a <a href="https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV">tutorial</a> that I like a lot.</li><li>A <strong>Readme.md</strong> file: Yes. You read it right. Documenting each and every detail of your project is important. All popular OSS are heavily documented and you should check out their documentation and see how they are writing it. you should get the documentation of your favorite OSS by just googling “my_fav_OSS docs”. You must also know that you can contribute to an OSS just by contributing to its documentation! Hence make it a habit to write READMEs for every project in something called a “<a href="https://en.wikipedia.org/wiki/Markdown#:~:text=Markdown%20is%20a%20lightweight%20markup,using%20a%20plain%20text%20editor.">markdown</a> language”.</li><li>A <strong>coding convention</strong> — Don’t just code it away! Every programming language has a defined coding convention. even the spaces you give between your dependencies declaration line and your local declaration line is important! Remember when you are programming for open-source, the code style should look homogeneous everywhere.</li></ul><blockquote>var x = 10 and var x=10; even though works the same must not be used interchangeably. the spaces matter. Read more about the coding conventions of the programming language you are using . e.g. <a href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> for Python.</blockquote><ul><li>A <strong>design principle </strong>—As a well-architectured house needs careful planning, similarly, a well-designed software needs a careful choice of design principles based on the application in order to avoid bad design choices. In fact, you might be using design principles in your everyday code without even noticing it. OOPS!</li></ul><p>Resource for knowing more about software architecture: <br>⭐️<a href="http://aosabook.org/en/index.html">The Architecture of Open Source Softwares</a>🔗</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*KDGBFHG0HYj07u2BF8Hq3g.png" /><figcaption>The architecture of open source softwares written under 500 lines</figcaption></figure><ul><li>A <strong>testing</strong> tool — Almost every programming language comes with a testing library/framework. You must include one in your project. You should develop the habit of testing your code before committing it. Your pull request(a GitHub terminology — means that you want to the maintainer/admin of an OSS to accept your code into their codebase) has high chances of getting a rejection if you do not add tests for it. even if you want to add a single function, write a test for it. Look out for a popular testing suite for your application.</li><li>A <strong>deployment</strong> tool — No matter how small your software project looks, and how irrelevant its scale might be, you must learn to deploy it. deployment might look different in different cases. But learn how you can deploy it. <a href="https://www.docker.com/">Docker</a> is becoming highly popular these days so might as well learn it. You are open to other options as well.</li><li><strong>GitHub</strong> —This is the most satisfying part. Pack and share your creation with the world! GitHub is used in unison with git but as git is a VCS, I mentioned it above. GitHub is a place where the source code lives. You can find the source code of almost all the popular FOSS on GitHub. With its ever-increasing popularity, it’s often referred to as the new Resumé! (Refer to the git tutorial mentioned under VCS header).</li></ul><p>3. <strong>Choosing an organization</strong> — Now that you have mastered a STACK in the way I have mentioned above, you should be ready to contribute to open source without any fear. Look into organizations that are following a similar STACK. Learn more about their projects and if it interests you, then look into their documentation and learn more. If you are still interested, then reach out to them and ask them how to start contributing(it&#39;s usually written at the bottom of the README). Read further to know more about reaching out to the organization.<br>🔗<a href="https://summerofcode.withgoogle.com/organizations/">LIST OF POPULAR ORGANIZATIONS</a>⭐️</p><p>4.<strong> Learn to communicate effectively</strong>— A major part of open-source revolves around communicating with other developers. Open source communities communicate with the public and among themselves through channeled chatting systems like IRC(very popular), Slack(very popular), Gitter(popular), Discord(rare), Google Groups(very rare). It is usually mentioned in their GitHub page(look into README file). To really make the most out of your open source journey, you should not shy away even to ask a really trivial question. You should first find the appropriate channel for the type of your query. Usually, #general is used for all kinds of conversations, you can find the channels and their purposes somewhere in the README or in the docs.</p><p>5. <strong>Reading source code</strong> — At first, looking at the source code might make you go crazy and make you slam your head somewhere but if you have followed point no.2 and 3 religiously, you will do way better than others who just land on source codes without preparations. If you have used all the technologies mentioned in point 2, you would easily know what to look at and what to ignore without getting bamboozled at the sheer size of the codebase.</p><p>6.<strong> Start from solving issues </strong>— Issues are mentioned under the “issues” section of a code repository. These are some of the bugs reported by an end-user or a developer. Usually, good issues are highly detailed and have some folks already working on them. Sometimes issues are just minor room for improvements. You would know the type of an issue usually from its tag. Usually, the best way of introducing yourself to the developers is by working on an existing issue or a proposed improvement. If you feel confident enough that you could solve the issue, then just comment that you are taking up the issue and if someone else is already working on it, you can work together on the issue. (of course, this cannot be done in a competitive scenario like <a href="https://summerofcode.withgoogle.com/">GSOC</a>). Your code reading skills will improve a lot in the process of solving issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*5gDP7N-OCh6CuV8cb7_OhQ.png" /></figure><p>Once you have made your first change/improvement, and make a pull request, a response is usually made within one or two days. If the maintainer has no issues with your code, he merges your pull request into the codebase and your pull request is accepted. Trust me, that’s the best feeling in the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*_amwtfcg_NzdthSM9WzC2Q.png" /><figcaption>I got my first pull request accepted in the Mozilla Global Sprint event 2018.</figcaption></figure><h4>BONUS:</h4><p>⭐️<a href="https://dev.to/realabbas/curated-list-of-open-source-programs-events-and-competitions-4cfk">CURATED LIST OF OPEN SOURCE PROGRAMS, EVENTS, AND COMPETITIONS</a>🔗</p><p>ALSO, CHECK OUT: <a href="https://medium.com/@shaswatlenka/anybodys-guide-to-computer-science-d76ec7bb094e?source=friends_link&amp;sk=7f4e455fb363fdef101e23f202d81acf">ANYBODY’S GUIDE TO COMPUTER SCIENCE</a>🖥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b9d9706b8fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anybody’s Guide to Computer Science]]></title>
            <link>https://shaswatlenka.medium.com/anybodys-guide-to-computer-science-d76ec7bb094e?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/d76ec7bb094e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Mon, 04 May 2020 16:29:53 GMT</pubDate>
            <atom:updated>2020-05-04T16:29:53.327Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2db8F59LEiO6VfX0fJDpgA.jpeg" /></figure><h4>A guide to starting a journey in computer science irrespective of academic background</h4><p>4 years back, in my freshman year, I was trying to find the answer to a question that had always occupied my mind — “I am from biomedical engineering. Is my career doomed if I am more excited about Computer Science?”. Now while writing this article at 72 words per minute, I am also an incoming Software Development Engineer at an MNC (if everything works well amidst the COVID-19 pandemic 🙂 ). This article is dedicated to anyone who is willing to swim against the tide and has a sweet tooth for Computer Science!</p><h4>The Opening</h4><ol><li>Harvard’s <a href="https://www.edx.org/course/cs50s-introduction-to-computer-science"><strong>CS50</strong></a><strong> — Just take it</strong>.</li></ol><p>Even if you have been already taught CS from your elementary/secondary high school, I bet anyone made it this interesting as the team of CS50. I took this in my first semester and it should take 2–3 days to complete.</p><blockquote>“When things don’t go as expected, remember why you started, and it will always be CS50.”</blockquote><p>2. <a href="https://www.nand2tetris.org/"><strong>nand2tetris</strong></a><strong> — The best course ever made.</strong></p><p>You are all jiffed up with the fun things CS50 taught you, and are now ready to take your next step. In this course, you will be making your own personal computer including all the hardware and software by NAND gates, and eventually, develop and play <a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> on it! But wait a minute! Why does CS100/1/2 in every tier-I Indian institute be something like “Introduction to <strong>Computer Programming</strong>”? When will we smash the keyboard as any other sci-fi hacker guy does? When will our screen go black and green and our wallpapers screaming, “Talk is cheap, show me the code!”?</p><p>Here is a set of questions that were generally asked to me by my peers in freshman year which are not uncommon at all.</p><ol><li>Which Programming Language should I start with?</li><li>I want to do Machine Learning. Should I learn Python or R?</li><li>Which is the best for competitive programming? Python or C++?</li><li>How many programming languages do you know?</li></ol><p>Last but not the least, “Acha, from placements perspective, which programming language is the best?”.</p><p>I believe the correct answer to all these questions would be to start from the basics. Programming in itself is a really advanced topic to start with. If you could just make a functional computing device, it would answer some of the most fundamental questions of Computer Science. And if building your personal computer with just NAND gates doesn’t excite you, you should probably rethink your decision to pursue programming and can stop reading this article right now.🙂</p><h4>The Surprise</h4><p>Now that you are reading this line, I appreciate your love for Computers. You can officially call yourself a beginner. By now, you would have learned how the most primitive computer software — BIOS, kernel, OS, assembly language is built. You would have also built your own programming language by now. So finally! We have come to a point that we can learn something you were waiting here for so long. Yes! Mathematics!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*QXOaYrxiEn5JysqzNWs6pA.jpeg" /><figcaption>Get your copy today!</figcaption></figure><p>Mathematics is heavily underrated as a prerequisite to programming by many institutions. Although most institutes have the required topics taught in parallel but many topics are unnecessary. <strong><em>Discrete mathematics, linear algebra, and calculus</em></strong> are some of the most important topics you should have mastered beforehand in order to really understand fundamental algorithmic theories. And if you have just heard that there’s something cool about “Machine Learning” from your seniors, all of it is just mathematics.</p><p>3. <a href="https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/index.htm"><strong>Mathematics for Computer Science</strong></a><strong> (MIT 6.042J)</strong></p><p>There are a ton of different courses in this regard but this was what I found appropriate for me.</p><h4>Introspection</h4><p>Pat yourself if you have come this far. Now you are officially entitled to ask the question, “Which programming language should I start with?”. (In fact, you would have already used a couple of programming languages in the process but here I mean a more standard programming language).</p><p>The answer to this question is it depends on your goals! Why have you come this far to learn a programming language? What do you want to achieve with it? Whether you want to disrupt the world with a new software product or compete with other programmers in solving puzzles? Do you wish to be an ethical hacker or a security expert? Do you find AI the next big thing or want to connect with the world as a web developer? You might be from the Department of Physics who wants to develop scientific simulations or a biomedical engineer trying to bridge the gap between humans and computers! The choices here are numerous, and so does the programming language associated with it. You might even have multiple interests and are confused about what to do.</p><p>I would suggest you thoroughly prioritize over the ONE best thing you would definitely want to do as a long term goal. The next step is to Google about it. See what are the latest stories and ideas around it. Introspect whether pursuing this goal will bring you a sense of daily achievement over the next one year and how does it align with the plans you have after you pass out from college. Giving an example, a possible introspection could be:</p><blockquote>I have an inclination towards competitive programming as I have observed and consider myself a good problem solver and would enjoy solving problems on a daily basis. This would also come handy in getting through job interviews which is also my long term goal after passing out of college.</blockquote><p>If you are the above-mentioned person, you should probably start with C++ and sign up for an online coding platform. If you are like me, who loves to develop opensource software products, you can start with any programming language based on the need for your solution. Start with Python if you want to become a Machine Learning Engineer in the future and so on. I would suggest you do your own research and take your own time in selecting your first programming language. Again, its more of a personal choice.</p><h4>This Is Super Important</h4><p>After you decide your first programming language, the most important thing is learning and implementing most of the classic Datastructures and Algorithms using the same programming language. There are tons of courses on different platforms, and I don’t want to mention anything specific regarding this. (<em>see </em>BONUS<em> section for the list of all courses</em>)</p><p><strong>NOTE I:</strong> usually MITx OpenCourseWare uses <a href="https://en.wikipedia.org/wiki/Pseudocode"><strong>pseudocode</strong></a> to teach algorithmic implementations, and if you are not confident to implement the same in your chosen programming language then you can search for a course like “Datastructures and Algorithms with X” where X is your programming language.</p><p>It is also imperative to not switch to another language before completely mastering ONE programming language. By mastering, I mean you should be able to implement and utilize all the basic and advanced concepts of programming including data structures, algorithms, design patterns such as <a href="https://en.wikipedia.org/wiki/Object-oriented_programming"><strong>OOP</strong></a> with little to no guidance. You should be able to perform any programming task including the use of third party libraries, software testing, debugging, developing <a href="https://en.wikipedia.org/wiki/Application_programming_interface"><strong>APIs</strong></a>, etc. Again, mastering a language differs from person to person and is a never-ending process. It depends on where you set the bar and are confident enough, but the above mentioned few are the basic tasks you should be able to do effortlessly.</p><p><strong>NOTE II: Operating System </strong>is one of the most essential and elegant topics in computer science. I haven’t mentioned it anywhere because you would have already learned the basics in the nand2tetris course. Take <a href="https://www.ops-class.org/">HackTheKernel</a> course for a more solid understanding.</p><h4>Taking Up Challenges</h4><p>After all, the final goal of this journey is to solve a problem that matters to you. You will eventually serve a group of the population who will harness your skills and reward your services. In the corporate sector, your skills will ultimately serve the client whereas, in the research sector, your skills will serve the community. The point here is, start taking up challenges in the areas of your interest. Numerous programming challenges are being open to the public every day and in all possible fields. There is no engineering field in which computer science cannot make an impact. So signing up for such challenges would prepare you for actually using the skills you have gained so far. Moreover, the anticipation of incentives would keep you motivated on a daily basis.😁 These are some <a href="https://towardsdatascience.com/top-20-websites-for-coding-challenge-and-competition-in-2020-f667089a5b47"><strong>popular platforms</strong></a><strong>.</strong></p><h4>Building a Profile</h4><p>A profile is your unique identity and a logical substantiation of the superpowers you possess. It is your identity as a programmer or a computer science enthusiast. In fact, it’s your profile that speaks louder and clearer than the two-page resume you carry around. I would suggest using <a href="https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV"><strong>GitHub</strong></a><strong> </strong>as your programmers’ diary. <strong>Git and GitHub </strong>are one of the most essential and powerful tools in the software industry. But even if you aren’t into software development, you can still use GitHub as a profile-building tool. GitHub allows you to commit and timestamp any document and keeps a track of all your activities in the form of commits. It also has a bunch of other useful utilities for software developers but as a beginner, you can just upload all your projects, code snippets, and almost everything and document it accordingly. Moreover, this would help you ensure that you are consistent on a daily basis, and with time, your profile would become more meaningful and stronger.</p><h4>…And Repeat</h4><p>Computer Science as any other field of study is endless in itself. At this point, you would have had a strong foundation to continue to learn and explore different topics of your interest. This is an iterative process and should never stop. In fact, it gets easier day by day and more natural for you to understand any advanced concept. At this point, I had started exploring Artificial Intelligence and was finding ways of incorporating the learned concepts in the healthcare industry. I had started making my own projects and uploaded my works on GitHub. I was exploring different <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">FOSS</a> projects which gave me an idea of the importance of software architecture. Then I started learning software architecture and different software design principles. It was a journey of exploring new things to learn and eventually learning them. There was no sequence from here. I had started with Python and I went on to learn every possible thing that can be achieved by Python only, without shifting to any other programming language. I used Python for Web development, standalone app development, Machine Learning, Deep Learning, networking, software testing, data analysis, visualizations, and competitive programming. Most of my projects are built with just Python and its framework and libraries. At this point, it would hardly take a week to learn a new programming language if the necessity arrives.</p><h4>BONUS💰</h4><p>Until my final year, I had completed around fifteen <a href="https://en.wikipedia.org/wiki/Massive_open_online_course">MOOCS</a> besides my normal academic curriculum.<strong><em> </em></strong><a href="https://github.com/sindresorhus/awesome"><strong><em>Here’s a list of all the awesome courses for you to take</em></strong>.</a> (Credits: <a href="https://github.com/sindresorhus">Sindre Sorhus</a>)</p><p><em>Thanking all the creators and maintainers of Open Online Courses who have made education more than grades on a glossy paper.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d76ec7bb094e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Who are you?]]></title>
            <link>https://shaswatlenka.medium.com/who-are-you-fa6f596e72e0?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa6f596e72e0</guid>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[identity]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Tue, 10 Dec 2019 06:31:08 GMT</pubDate>
            <atom:updated>2019-12-10T06:31:08.477Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecHlX76lhuX9y8-bYx59BA.jpeg" /><figcaption>An unknown Mushroom</figcaption></figure><p>The remarkable journey of the “you”, started with a single identity — “The homo sapiens”, a million years ago. We all were one. Living beings identified as species. We evolved. We became hunters and gatherers. Men and Women. Men were identified and associated with hunting and protection from getting hunted. Women were associated with gathering food, preparing shelter and fertility. We evolved. The strongest men became kings and in turn, gave birth to a dozen other identities. Ministers, Knights, bishops, soldiers ready to serve the kingdom. We became singers, dancers, actors, and writers. As we evolved further, our identities multiplied. We became athletes, magicians, and fortunetellers, and slaves! Many identities became extinct and many were born. We aren’t hunters, gatherers and slaves anymore, nor kings or queens. Phew! Welcome to the 21st century with drumrolls!</p><h4>The Identity explosion</h4><p>A few days ago, I came across an “Instagram influencer”, “a doer, not a dreamer”, a girl whose “standards were high, just like her heels” and a guy “sending his selfies to NASA because he was a star”. Thanks to social media that we have more identities than the number of people on the earth. Now we can validate the awesomeness of our life without much effort. Just share your #awesome #healthy #breakfast and see how instant gratification kicks you before life does! Don’t worry if your breakfast sucks more than your looks, we have other identities up for grabs!</p><p>The attention centric business model of social media tech giants are the detonators of the identity explosion. <strong>Attention is the currency that validates identity</strong>. This validation in turn, through a complex chain of chemical reaction, produces a temporary high in the brain. This phenomenon is not new or enlightening, just that it has become highly convenient today. Well, this is one side of the coin, “getting attention is a great feeling”. What about paying attention? Does it produce the same high as that of getting attention?</p><h4>The currency of identity — Earn it or spend it?</h4><p>Mihaly Csikszentmihalyi, in his popular research on “Flow — The Optimal Experience” writes —</p><blockquote>During flow, <strong>attention</strong> is freely invested to achieve a person’s goals because there is no disorder to strengthen out or no threat for the self to defend against. When a person can organize his or her consciousness so as to experience flow as often as possible, the quality of life starts to improve.</blockquote><p>He describes flow as a state of consciousness achieved by paying intense attention to the ONE thing that defines a “goal” which I would rather like to say, an identity. This experience has been documented in professional artists and musicians when they are practicing or performing.</p><p>During flow, the passage of time becomes imperceptible. The mind, along with the body, undergoes an optimal experience just by paying attention to the core traits of an identity i.e. the act of painting for the artist and the act of singing for the musician. But do all identities have the privilege of experiencing flow?</p><p>During my short stay at Bengaluru, I regularly went to a chaiwala ( A professional tea-brewer) in the evenings. It was surprisingly open from 7 am in the morning till 11 pm in the night and even more surprising was that I had never seen an empty queue in front of his stall. He had some peculiarities of his own such as adding milk to black tea instead of boiling milk directly and using a cloth filter choked with tea leaves instead of adding the leaves directly to boiling milk as it is usually done in East. However, what fascinated me was his act of serving tea. The whole drama, emotion and crafty wrist skills with which he was serving tea to each customer. He took a set of three cups in one hand and sloshed tea in each of them from the tea mug in the other hand from at least two feet from the cups in mid-air, swirled with one leg on the ground while serving the filled cups in between this elegant move. More than how he performed his tea-crafts, I was more into knowing why he did this? Why not just serve tea which tasted brilliant anyway! So, I decided to ask him one day. His answer not only surprised me but also introduced me to witness my first flow experience. He said, “It makes me happy. The customers like this. I also think that tea becomes tastier due to this.” This is flow. Unwavering attention to a single task, irrespective of the task itself, that gives you happiness. If the identity of a chaiwala can achieve the state of flow, so can you. Whoever you are.</p><h4>Why “You” matter?</h4><p>During the Holocaust, Viktor Frankl, an Austrian neurologist, and psychiatrist had survived more than three concentration camps. He gives an account of survivability in such inhumane conditions in most of his academic and non-academic works. In Auschwitz(one of the concentration camps), the inmates who were of no use physically(who were unable to physical work due to disease, weakness or loss of appetite) were sent off to the gas chambers. Surprisingly, Viktor had found a pattern in the people who went to the gas chambers and had started predicting the next probable batch of people who were most likely to get burnt to death. His explanation was simple and powerful. People from different professions worked in concentration camps, each one with different identity, a different story, and a different meaning in life. Under the stressful conditions of the camp — starvation, physical fatigue, harassment and the uncertainty of life — the stories of all the people bent to a single reality — survival. The people who lost their identity also lost meaning in life and started deteriorating in all aspects. Those were the first to miss working hours, skip meals, and finally sent to gas chambers as they had rendered completely useless. On the other hand, the people who managed to preserve their individual identity, their purpose and meaning of life, saw hope in a life after the holocaust.</p><blockquote>Bring a billionaire and a beggar and starve them to see both becoming a single identity — hungry humans.</blockquote><h4>How do you decide “You”?</h4><p>It might seem obvious to know who you are or at least who you should be but surprisingly the unavailability of such an answer is a not so common, epidemic. You might want to become a person who earns enough to live happily ever after. A common phrase most Indian parents proudly sermon after their children pass Higher Secondary is, “Work hard for these two years and you will be happy for a lifetime”. Perhaps, going with the collective opinion, money is the key to a happy life and hard work is associated with a means to earn more. The below graphs show the result of the most cited academic work of Richard A. Easterlin — <em>“Income and Happiness: Towards a Unified Theory”</em>. The research aimed at establishing the relationship between income and average happiness of a large cohort and to a stark surprise, we can clearly see that average happiness remains almost constant despite substantial income growth! I do not intend on saying that don’t earn money, just be careful how much you value it :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*zROxlqpFMOwgFAiil2kyXw.png" /></figure><p>The aim here is to become an identity that is both satisfying and sustainable. “Happiness is a function of meaningful relationships and meaningful work” — is concluded by a 75 year long and ongoing research at Harvard School of Psychology. The sustainability of your identity relies on meaningful relationships whereas satisfaction depends on meaningful work. It doesn’t matter what you do, the question you should be asking is why you do it? Why does it matter so much and how does it add meaning to a purpose greater than yourself! What would you write in your own eulogy? And how many people would be there to read it out? I leave these questions open to you. Rather than biasing you with my opinion, I have stated the facts standing on the shoulder of giants and left you to ponder upon :)</p><p>I.<em> No comments have been made at any person in any manner. The captions are what I found on the internet and is not a means of personally targetting anyone. It was a means of telling that there are a lot of identities now.</em></p><p>II.<em> All the figures and small text excerpts are owned by their respective authors from which I have weaved a net of ideas. Credits go to me for the “unknown mushroom” photo. Thanks!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa6f596e72e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting off to a Running Start — RunIO Hackathon]]></title>
            <link>https://medium.com/dsc-nit-rourkela/getting-off-to-a-running-start-runio-hackathon-7c113fd12328?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c113fd12328</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[nit-rourkela]]></category>
            <category><![CDATA[sustainable-development]]></category>
            <category><![CDATA[event-management]]></category>
            <category><![CDATA[college-life]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Sat, 19 Oct 2019 19:06:09 GMT</pubDate>
            <atom:updated>2019-12-22T20:37:09.131Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Getting off to a Running Start — RunIO Hackathon</h3><h4>The struggles and memories of organizing the first Hackathon at NIT Rourkela</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUs1h-ktS_KN9ysy5Pqk9A.jpeg" /><figcaption>RunIO Hackathon 2018 — with speaker Harsh Arya</figcaption></figure><h4>What Why When?</h4><p>RunIO Hackathon was the first-ever Hackathon to be conducted at the National Institute of Technology Rourkela. Opencode, the official open-source society of NIT Rourkela was the organizing club behind the event at the annual festival of the technical society of NIT Rourkela — “Innovision”. RunIO was one of the flagship events of Innovision, which had more than 200 registrations within two weeks of the opening of the date of the registration! The theme of the hackathon was “Sustainable Development”, and hence the name — “RunIO” — develop products for the long run. The event took place on the 2nd and 3rd of November 2018 as a 24 Hrs long Hackathon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrpPa4Mq0QoafS2opZpNSg.jpeg" /><figcaption>The Venue — TIIR Auditorium NIT Rourkela</figcaption></figure><h4>Behind the Scenes</h4><blockquote>To make a great event, you need a great team. period.</blockquote><p>The culture of hackathons was completely new to the institute at the time and only a single club had its constitution along that line. Opencode was the official open-source society and was making plans well in advance of such an event. A team was selected as the core team consisting of the most active and enthusiastic members of the club. Different teams were made for sponsorship, management, design, and tech. With no one in any team having an experience of organizing a hackathon, it was a great learning experience for everyone. We took inspiration from different student-run hackathons across the nation and looked for their sponsors and started mailing them. Our motivation boosted when we got some replies and were sure that we were following the right direction. We followed the MLH(Major League Hacking) sponsorship email format and code of conduct. The design team came up with an intuitive brochure and we were ready for collecting funds for the hackathon!</p><p>Although we had made a lot of effort to collect funds for the event, the responses regarding the same were not as expected. We got a few replies from firms who supported us with gifts and goodies but the event would not exist without actual cash. Amidst almost no financial support GitHub came to the rescue. We found a GitHub campus ambassador who agreed to visit the campus and was able to raise some funds for the hackathon. Some local dealers advertised using the event and we got some funds from there. This was not enough for the event but now we were sure that we can have a decent enough hackathon if we kept things modest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vlr66O6HabuB-AgFMakumg.jpeg" /><figcaption>The organizing team with speaker Krishnakant Mane at the center</figcaption></figure><p>The biggest set back to the event came from the place we least expected: Our Institute. Finding a good enough venue for the hackathon played a key role and each workspace in the institute had its shortcomings. If one was perfect with space, it had no ventilation. On the other hand, well-ventilated places did not have arrangements for internet connection. The process for booking these places was more of a cumbersome process and a good amount of time needed to be invested in there. With some people not knowing what a hackathon was, were reluctant in providing us the room access at night for a 24Hrs event. Amidst this chaos, we had to decide fast as the dates were closing in. Hence the team decided to get a well-ventilated auditorium space with some compromise in internet connectivity. We arranged some routers later.</p><p>Food was an important aspect for the participants and we had to make sure the reliability of the dealer and at the same time making sure that it comes under the budget. We approached around a dozen nearby restaurants and caterers and selected the one with a considerable rate and reliable food quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x9tYaDDo8PR30FvuVJREKg.jpeg" /><figcaption>The participants</figcaption></figure><h4>All’s well that ends well!</h4><p>In spite of all the struggles of organizing a completely student-run hackathon for the first time, the team successfully converted an almost distant dream into reality. Finally, it was happening and we had organized a real hackathon with a remarkable turnout and wonderful judges and speakers. In the end, we can just say that the struggle was worth the efforts we all had put in as the event was highly praised by the Dean Student Affairs who visited the event himself and distributed the prizes to the winners. There were a ton of lessons learned and rooms for improvements uncovered which we are looking forward to implementing in future hackathons. Till then, we own the memories of the first-ever student-run hackathon of NIT Rourkela.</p><h4>Key takeaways for first-time organizers —</h4><p>Organizing an event for the first time can be a daunting task. And a hackathon is a mammoth of a task. Here are a few key pointers from our experience that can save you from getting overwhelmed —</p><ol><li>Start as early as at least four months before with the sponsorships as it is the most important part of the hackathon above anything else.</li><li>Even before going for sponsorship, make sure you have a brochure and a website ready to make potential sponsors believe that you are organizing a hackathon.</li><li>Make sure all your emails have your school/university email ids mentioned and not personal email. This will confirm that you are a student studying at that university.</li><li>Make sure you have a small dedicated team for every aspect of your hackathon. You need to make them believe that the success of the event depends on their hard work.</li><li>Choosing a venue should be the second most important point in your hackathon checklist. An ideal venue should be spacious enough to accommodate all the selected participants comfortably, should be air-conditioned and full-time internet connectivity must be accessible.</li><li>If your institute has a rigorous and complicated room booking process you may not want to be in trouble at the last moment. Make sure that your room is booked well in advance.</li><li>Rule of thumb — Sponsorship in terms of money is always more important than that of schwag or credits so make a target of money you require as sponsorship and try to get one-third more than the target.</li><li>Ensure good quality of food from your vendor. Never compromise food quality for less budget.</li><li>Make sure you have enough volunteers for the events. The managers of the event might be busy or tired, hence having a dedicated team for volunteering is very important during the event.</li><li>Lastly, make everyone feel that it&#39;s their event! The more incentivized your team feels, the more they will be willing to work for you. :)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c113fd12328" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dsc-nit-rourkela/getting-off-to-a-running-start-runio-hackathon-7c113fd12328">Getting off to a Running Start — RunIO Hackathon</a> was originally published in <a href="https://medium.com/dsc-nit-rourkela">GDSC NIT Rourkela</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing a Knowledge Graph — Python]]></title>
            <link>https://shaswatlenka.medium.com/implementing-a-knowledge-graph-python-de73a48362df?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/de73a48362df</guid>
            <category><![CDATA[cayley]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gizmo]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Sun, 23 Jun 2019 15:41:40 GMT</pubDate>
            <atom:updated>2019-06-23T15:41:40.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*MVcpBQoCcOmAlg-FZQbjjw.png" /><figcaption>courtesy — cayley.io</figcaption></figure><h3>Implementing a Knowledge Graph — Python</h3><p>In part one of this two-part series (<a href="https://blog.usejournal.com/knowledge-graph-algorithmic-implementation-of-a-thought-process-part-i-3c88b7588695?source=your_stories_page---------------------------">link</a> to Part I), we saw how we can imitate a thought process by using a Knowledge Graph. In this part, let&#39;s get our hands dirty! 😄</p><p>We will use an Open Source Graph database called <a href="https://cayley.io/">Cayley</a> for the KG backend. Grab the latest binary from <a href="https://github.com/cayleygraph/cayley/releases">here</a> according to your OS. After you have downloaded, go to the root directory and find the cayley.yml file. If its not present, create it. There should be a cayley_example.yml file to guide you. This file is the configuration file of cayley. One of the important use of this file would be to set up the backend database where the graph will be stored. There are several options available( <a href="https://github.com/cayleygraph/cayley/tree/master/docs">see docs</a>). We will use MySQL for the database. I assume you have MySQL installed. If not, installing it is pretty straightforward(google it :P ). Now make sure your cayley.yml file looks like this: <em>(replace &lt;your_root_password&gt; with your actual password for MySQL root and replace &lt;your_database_name&gt; with the name of your database.</em></p><h4>cayley.yml:</h4><pre>store:<br>  # backend to use<br>  backend: &quot;mysql&quot;<br>  # address or path for the database<br>  address: &quot;root:&lt;your_root_password&gt;#@tcp(localhost:3306)/&lt;your_database_name&gt;&quot;<br>  # open database in read-only mode<br>  read_only: false<br>  # backend-specific options<br>  options:<br>    nosync: false<br>query:<br>  timeout: 30s<br>load:<br>  ignore_duplicates: false<br>  ignore_missing: false<br>  batch: 10000</pre><p>now let’s start our graph I am using windows so exact commands might differ from Mac and Linux. You can see (<a href="https://github.com/cayleygraph/cayley/blob/master/docs/Quickstart-As-Application.md">this file</a>):</p><h4>Open command prompt/terminal and go to the cayley root directory and type this in terminal:</h4><pre>cayley init</pre><p>Cayley will automatically detect the configurations in cayley.yml file and setup a database. now to load a graph database, we need to know about something called a “schema”.</p><p>A schema is a specific way of representation of an information. For example, JSON (JavaScript Object Notation) is an example of a schema. For more information on schemas go to Schema.org’s <a href="https://schema.org/">website</a>. Here for our purpose we will use a schema called “N-quads”. More information about N-quad is <a href="https://www.w3.org/TR/n-quads/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*idZrLEgACcRlRJYF0Kkspw.png" /><figcaption>An N-quad schema of a small social network</figcaption></figure><p>In the above example N-quad file, we have a schema of something like this: &lt;person&gt; &lt;follows&gt; &lt;person&gt; &lt;status&gt; . This means that the two &lt;person&gt; are the nodes of a graph and &lt;follows&gt; is the “directional relation” between them. &lt;status&gt; is optional and describes someting more about the relationship.</p><p>Now, next step is to load this to our MySQL database. To do so run:</p><pre>cayley load -i &lt;path_to_nquads_file&gt;</pre><p>replace the &lt;path_to_nquads_file&gt; with the relative path to your N-quads file. Making an N-quad file is easy. Just write in the N-quad schema and save it with a “.nq” extension.</p><p>After loading the graph to cayley you can run an web instance to interact and visualize with your KG using the gizmo query language(which is not that hard to pick up). Run:</p><pre>cayley http</pre><p>Go to <strong>localhost:64210</strong> on your browser and you can see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5ycbdgZ2bbntn5p5BdFZQ.png" /><figcaption>Cayley Web Interface</figcaption></figure><p>you can type any query here to interact with your KG. An example query is:</p><pre>g.V().All()</pre><p>this means get <strong>all</strong> <strong>vertices</strong> of the graph object “<strong>g</strong>”. More about the query language can be found <a href="https://docs.cayley.org/">here</a>.</p><p>You can also visualize the graph in the web app. Read the <a href="http://localhost:64210/docs/Quickstart-As-Application">docs</a> to be able to do so.</p><h3>Now comes the interesting (which no one told you) part:</h3><p>We have implemented a simple Knowledge Graph using Cayley graph database and MySql. Can we interact with this graph remotely without using the web app? Yes! Cayley exposes the graph to the API endpoint : <a href="http://127.0.0.1:64210/api/v1/query/gizmo">http://127.0.0.1:64210/api/v1/query/gizmo</a></p><p>We can use the python “<strong>requests” </strong>library to make POST requests and query the Graph wherever we want (Cayley should be running in the background to provide the API endpoint).</p><pre>import requests<br>import json</pre><pre>query = &quot;g.V().All()&quot;<br>endpoint = &quot;<a href="http://127.0.0.1:64210/api/v1/query/gizmo">http://127.0.0.1:64210/api/v1/query/gizmo</a>&quot;<br>response = requests.post(endpoint, data=query)</pre><pre>#the response is a JSON object<br>json_response = response.json()<br>print(json_response)</pre><p>Run the above code in Jupyter Notebook and you should be able to see the JSON response of the API and play around with it. Phew!</p><p>Thats all folks! Hope you enjoyed this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de73a48362df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Knowledge Graph — Algorithmic implementation of a thought process? — Part I]]></title>
            <link>https://shaswatlenka.medium.com/knowledge-graph-algorithmic-implementation-of-a-thought-process-part-i-3c88b7588695?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c88b7588695</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Sun, 26 May 2019 10:25:37 GMT</pubDate>
            <atom:updated>2019-05-30T04:41:09.738Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*Eg6ynT_XnnOjXaYWT-FmuA.png" /><figcaption><em>Image courtesy — cayley.io</em></figcaption></figure><h3>Knowledge Graph — Algorithmic implementation of a thought process?🧐 — Part I</h3><p>Knowledge graphs have been used for quite a while in the industry. Big players like Google and Microsoft use it for storing context-specific information and relations that are useful in improving search results. In this two-part series, I will explain a different perspective of knowledge graphs in part I. In part II, we will implement a Knowledge graph using Python and an open source graph database called Cayley. But first, let&#39;s begin describing what a Knowledge Graph is(hereafter we’ll abbreviate it by KG):</p><p>When you google, say, “where is infinite loop?”, how does Google know that you refer to a place and not the infinite loop in programming? With every word you type, you refer to a real-world object and having some information about the object and how people have referred to it in past becomes extremely important. So how exactly can we keep all the relevant information about a real-world entity and all its relationships to other events/entities? A graph! A graph with the nodes as an entity and the connections to other nodes as some sort of relationship it might have with it. In the above example, The entity “Apple Corporation” might be connected with “infinite loop” with the relation “headquarter” and the keyword “where” might be connected to the entity “place” with the relation “refers to” and place, in turn, might be connected with “Infinite Loop” with the relation “is”. So when we traverse the Graph, it might read out like — “where refers to a place which is Infinite Loop” and what information do we have about Infinite Loop? “Apple Corporation Headquarters!” So, this makes sense!</p><p>A KG is a graph in which all the entities are represented as nodes of the graph and their connection to other entities is established by a relationship. Just like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*KWPgLzrs0kOBZom1v5M-FA.png" /></figure><p>In the above example, a relationship can also be established between me and my Grandfather as a ‘grandson’, and that’s the beauty of KGs.</p><p>I hope that by now you should have got a high-level idea of what a KG is. If not, here are some more resources:</p><ol><li><a href="https://hackernoon.com/wtf-is-a-knowledge-graph-a16603a1a25f">WTF is a Knowledge Graph</a></li><li><a href="http://Introducing the Knowledge Graph">Introducing the Knowledge Graph</a></li></ol><p>Okay! Now that you have got a fair idea of what a KG is, let&#39;s see how can a KG help us build an intelligent thought process. Let&#39;s take an example:</p><p>You are a very efficient problem solver in Physics. You can get to the concept behind the problem before anyone else in your class. So, you must be thinking in a way others don’t, when they approach such a problem. So, how can I, who is a pathetic noob in Physics, mimic your thought process to get to the concept behind the problem? Can we use a KG instead?</p><p>So I sit beside you and asked you to loudly speak your thoughts while solving the problem. While you solve, I extracted the key entities from your thoughts and established relationships between them and the concepts required to solve the problem in a KG. I asked you to solve all the problems in a given chapter and then all the problem in the given book! Now my KG is complete! I have replicated all the keywords and connections that fire your neurons! Now my KG should be able to tell the concept used in all the problems in that book. But can it suggest a concept for another problem from another author? Maybe. Or, maybe not. As we encounter different words, sentences and keywords which is not present in our KG, it would get confused or unable to suggest an answer. If that is the case, we need to feed this new information to our knowledge graph until we exhaust all the possibilities of every entity and their relations. It&#39;s the same as a toddler trying to learn her mother tongue. But how can we as Data Scientists and AI enthusiasts use such a beautiful feature of KGs?</p><p>We’ll see that in Part — II of this topic when we actually build a KG for semi-supervised multi-class classification next week. Till then, keep learning!</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dtech%26utm_content%3Dguest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2Fnewsletter%2Fnoteworthy-in-tech%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dtech%26utm_content%3Dguest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c88b7588695" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using TF.IDF for article tag recommender systems in Python]]></title>
            <link>https://shaswatlenka.medium.com/using-tf-idf-for-article-tag-recommender-systems-in-python-d1cf74e28b6a?source=rss-b605c8e24791------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1cf74e28b6a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[recommender-systems]]></category>
            <dc:creator><![CDATA[Shaswat Lenka]]></dc:creator>
            <pubDate>Sat, 01 Dec 2018 17:05:03 GMT</pubDate>
            <atom:updated>2018-12-01T17:05:03.862Z</atom:updated>
            <content:encoded><![CDATA[<p>So why am I even writing just another “recommender systems” article while there are tons of such on the internet! My answer is because I didn’t get a lot of help while I was developing one. Building recommender systems are easy! Aren’t they? But when we speak of recommending appropriate tags to an article the things become quite different. Very different. I’ll tell you why later in the article but for now let’s jump into the problem statement.</p><p>In this article, we will design a tag recommendation system for a set of tech articles from hackerearth. But before jumping into code we will see how TF.IDF works internally.</p><h3><strong>TF.IDF</strong></h3><p>It stands for <strong>Term Frequency. Inverse Document Frequency</strong> (the dot in between means algebraic multiplication). It is a product of two functions namely TF and IDF.</p><p>where <em>tf = number of times a single term appears in a particular document.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*Ng3dQp5aQWrZgK07ebZjjg.png" /><figcaption>inverse document frequency</figcaption></figure><p>in the IDF equation, <strong><em>N</em></strong><em> is the total number of documents and the denominator represents the number of documents in our dataset that contains a term </em><strong><em>t </em></strong><em>belonging to document </em><strong><em>d</em></strong><em>.</em></p><h3>Let&#39;s start building!</h3><p>import the required libraries (it&#39;s better if you use the anaconda python bundle as most of the libraries come pre-installed), make sure you have all the libraries imported below. I will explain how each library helps us as we follow along.</p><pre>import pandas as pd <br>import re<br>import nltk<br>import csv<br>import time<br>nltk.download(&#39;stopwords&#39;)<br>from nltk.corpus import stopwords<br>from nltk.stem.porter import PorterStemmer<br>from sklearn.feature_extraction.text import CountVectorizer<br>from sklearn.feature_extraction.text import TfidfTransformer</pre><h4>Data Cleaning or Preprocessing</h4><p>I am using a hackerearth challenge dataset of various tech articles and the dataset looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*Pe5KW50LLBpjkf9E-eo3Og.png" /><figcaption>screenshot of dataset’s first 5 entries in jupyter notebook.</figcaption></figure><p>we can see that there are 4 columns. The “tags” column contains the actual tags. What we are interested in is the “article” column. It has the articles written in HTML which we need to clean. After cleaning the HTML tags we will remove all the <strong>stopwords</strong> and perform <strong>stemming</strong>. Stopwords are the words that are common words that need to be omitted for any NLP pipeline while stemming is converting the different version of the same word to the root word. e.g. ate, eat, eating, all have “eat” as the root word.</p><pre>#Porter Stemmer object for stemming<br>ps = PorterStemmer()<br>#creating the corpus for all the articles<br>corpus = []<br>chunk_size = 10000</pre><pre>#Preprocessing<br>def Preprocessing(df):<br>    for i in range(0,chunk_size):<br>        article = re.sub(&#39;[^a-zA-Z]&#39;, &#39; &#39;, df[&#39;article&#39;][i])<br>        title = re.sub(&#39;[^a-zA-Z]&#39;, &#39; &#39;, df[&#39;title&#39;][i])<br>        article = article.lower()<br>        title = title.lower()<br>        article = article.split()<br>        title = title.split()<br>        article = [ps.stem(word) for word in article if not word in set(stopwords.words(&#39;english&#39;)) and len(word) != 1] <br>        title = [ps.stem(word) for word in title if not word in set(stopwords.words(&#39;english&#39;)) and len(word) != 1] <br>        article = &#39; &#39;.join(article)<br>        title = &#39; &#39;.join(title)<br>        paragraph = article + title<br>        corpus.append(paragraph)</pre><p>The above code removes <strong>HTML tags</strong>, <strong>stopwords</strong>, converts every word to <strong>lowercase</strong>, performs <strong>stemming</strong>, adds the <strong>title</strong> with the <strong>article</strong> and appends it to the <strong>corpus</strong> array. I have used <strong>chunk_size</strong> to extract a chunk of data at once from the dataset as the dataset is large for us to compute at once. We will use chunk_size later to extract chunks from the dataset.</p><h4>Performing TF.IDF</h4><p>Now let&#39;s create the function that computes the TF.IDF.</p><pre>def TfIdf(x):<br>    cv = CountVectorizer(max_df = 0.85, max_features = 1000)    <br>    word_count_vector = cv.fit_transform(corpus)</pre><pre>#to see the words in the vocabulary use: list(cv.vocabulary_.keys())[:10]</pre><pre>#calculate the IDF<br>    #WARNING: ALWAYS USE IDF ON A LARGE CORPUS<br>    tfidf_transformer=TfidfTransformer(smooth_idf=True,use_idf=True)<br>    tfidf_transformer.fit(word_count_vector)</pre><pre># do this once, this is a mapping of index <br>    feature_names=cv.get_feature_names()</pre><pre># get the document that we want to extract keywords from<br>    doc=corpus[x]<br>     <br>    #generate tf-idf for the given document<br>    tf_idf_vector=tfidf_transformer.transform(cv.transform([doc]))<br>    return [feature_names, tf_idf_vector,doc]</pre><h4>Helper Functions</h4><p>We will need two helper functions, one to sort the words with decreasing order of relevance and the other to extract the top entries from our feature vector.</p><pre>#helper functions<br>def sort_coo(coo_matrix):<br>    tuples = zip(coo_matrix.col, coo_matrix.data)<br>    return sorted(tuples, key=lambda x: (x[1], x[0]), reverse=True)<br> <br>def extract_topn_from_vector(feature_names, sorted_items, topn=10):<br>    &quot;&quot;&quot;get the feature names and tf-idf score of top n items&quot;&quot;&quot;<br>    <br>    #use only topn items from vector<br>    sorted_items = sorted_items[:topn]<br> <br>    score_vals = []<br>    feature_vals = []<br>    <br>    # word index and corresponding tf-idf score<br>    for idx, score in sorted_items:<br>        <br>        #keep track of feature name and its corresponding score<br>        score_vals.append(round(score, 3))<br>        feature_vals.append(feature_names[idx])<br> <br>    #create a tuples of feature,score<br>    #results = zip(feature_vals,score_vals)<br>    results= {}<br>    for idx in range(len(feature_vals)):<br>        results[feature_vals[idx]]=score_vals[idx]<br>    <br>    return results</pre><p>We are done with the major portion of the program. What’s left now is to execute the above functions and create our submission file.</p><h4>Execution and creation of submission file in csv</h4><pre>#reading in CSV&#39;s from file path<br>dataset = pd.read_csv(&#39;./new_dataset/train.csv&#39;, chunksize = chunk_size, iterator = True )<br>with open(&#39;submission.csv&#39;,&#39;a&#39;,newline=&#39;&#39;) as csvFile:<br>    writer = csv.writer(csvFile)<br>    for chunk in dataset:<br>        df = chunk<br>        Preprocessing(df)<br>        for x in range(chunk_size):<br>            <br>            #perform TF.IDF<br>            tfidf = TfIdf(x)<br>            <br>            #sort the tf-idf vectors by descending order of scores<br>            sorted_items=sort_coo(tfidf[1].tocoo())<br>     <br>            #extract only the top n; n here is 5<br>              keywords=extract_topn_from_vector(tfidf[0],sorted_items,5)<br>            top_tags = &quot;&quot;<br>            for y in keywords.keys():<br>                top_tags = top_tags + (y + &quot;|&quot;)                                <br>            row = [df[&#39;id&#39;][x],top_tags]<br>            writer.writerow(row)<br>        csvFile.close()<br>        break</pre><blockquote>NOTE: Choose the chunk_size as appropriate to your dataset size(or not at all!). Here I have used 10000 for my example.</blockquote><h4>And we are done!</h4><p>We have created our tag-recommender system which writes the tags to a file submission.csv. It looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*SrCFD7gd-PpsWwfmmHipXQ.png" /></figure><h3>Conclusion</h3><p>Many techniques can be employed for creating a tag recommender but one of the most used ones (though not the best) is finding the TF.IDF. <a href="https://pdfs.semanticscholar.org/f7dd/1eadeccf2648b0a41bd25465862fe19a2e3f.pdf">Here</a> is a link that discusses in depth about the various challenges in designing algorithms for article tag recommendation systems. It also discusses other popular algorithms and their performances. The complete code for this article can be found <a href="https://github.com/ShaswatLenka/ML-Projects/blob/master/Hackerearth%20ML%20Challenge/tag_recommender_system.py">here</a>. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1cf74e28b6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>