<?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 Kiran Gopalakrishnan on Medium]]></title>
        <description><![CDATA[Stories by Kiran Gopalakrishnan on Medium]]></description>
        <link>https://medium.com/@kirangopalakrishnan?source=rss-6357c0e8ea9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*f_IleqnCvNmo2oPGpRxDwg.jpeg</url>
            <title>Stories by Kiran Gopalakrishnan on Medium</title>
            <link>https://medium.com/@kirangopalakrishnan?source=rss-6357c0e8ea9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:02:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kirangopalakrishnan/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[A brief history of women in computer science]]></title>
            <link>https://kirangopalakrishnan.medium.com/a-brief-history-of-women-in-computer-science-67feecf70cf6?source=rss-6357c0e8ea9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/67feecf70cf6</guid>
            <category><![CDATA[women]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Kiran Gopalakrishnan]]></dc:creator>
            <pubDate>Mon, 08 Mar 2021 05:31:37 GMT</pubDate>
            <atom:updated>2021-03-12T22:39:42.729Z</atom:updated>
            <content:encoded><![CDATA[<p>In the early winter of 1852 in London, Augusta Ada Lovelace was already awaiting death at the mere age of 36; sometimes I find my self wondering whether Ada would have ever thought that the notes that she made concerning the proposed analytical engine by Charles Babbage, the would-be father of computers will be the first-ever computer program ever written.</p><p>Ada was tasked with translating an article on her mentor Charles Babbage’s analytical engine written by Italian engineer Luigi Federico Menabrea for a Swiss journal. She translated the original French text into English and added her own thoughts and ideas on the machine. Her notes ended up being three times longer than the original article, which would later be published in 1843, in an English science journal.</p><p>In her notes, Ada described how codes could be created for the device to handle letters and symbols along with numbers. She also theorized a method for the engine to repeat a series of instructions, a process known as looping that computer programs use today. Lovelace also offered up other forward-thinking concepts in the article. She envisioned a wide range of applications for the analytical engine. She foresaw its use for more than just calculating and number crunching, even as its creator Charles Babbage and many others focused only on those capabilities.</p><p>Ada’s contributions to the field of computer science would remain forgotten for another century, Until 1953, In <em>Faster Than Thought: A Symposium on Digital Computing Machines,</em> where B. V. Bowden republished her work. And she would later be immortalized by the U.S. Department of Defense in 1980 as the name of their newly developed computer language.</p><blockquote>The Analytical Engine has no pretensions whatsoever to originate anything. It can do whatever we know how to order it to perform. — Ada Lovelace</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*R4i5B3ceNbqezrKArCx9gA.jpeg" /><figcaption>Ada Lovelace, circa 1840. Credit: <a href="http://www.gettyimages.com/license/3066349">Hulton Archive <em>Getty Images</em></a></figcaption></figure><p>Sometime in 1947, At the Harvard Computation Laboratory, Grace Hopper and her colleagues are confused as to why the Aiken Relay Calculator on Mark II is not working; as grace checks and re-checks the relays on Mark II, she finds something amusing, A Moth is trapped in Relay 70, which is causing the calculator to malfunction. She yells out to her colleagues that she found a bug, which would later become a familiar word to every programmer and would be cemented in the history of computer programming as the word to describe program failures.</p><p>Coining the term Bug is an infinitesimally small feat when compared to what Grace Hopper would go on to contribute to the world of computer science.</p><p>In 1949 Hopper joined the Eckert-Mauchly Computer Corp., where she designed one of the first compilers, which translated instructions into computer codes and coined the word <a href="https://en.wikipedia.org/wiki/Compiler"><em>compiler</em></a>.</p><p>In1957 her division developed Flow-Matic, the first English-language data-processing compiler, which had many features that inspired <a href="https://en.wikipedia.org/wiki/COBOL">COBOL</a>.</p><p>It was Hopper’s strong belief that programs should be written in a language that was more human-readable, and should be close to English; later, In the spring of 1959, Hopper served as a technical consultant to the CODASYL, a committee that consisted of computer experts from industry and government, and the CODASYL committee created a new language named <a href="https://en.wikipedia.org/wiki/COBOL">COBOL</a> (<strong>CO</strong>mmon <strong>B</strong>usiness-<strong>O</strong>riented <strong>L</strong>anguage). This new language extended Hopper’s FLOW-MATIC language with some ideas from the IBM equivalent at the time named <a href="https://en.wikipedia.org/wiki/COMTRAN">COMTRAN</a>. Grace’s vision of a programming language that was as readable as English was captured in the new business language. COBOL would go on to be the most ubiquitous business language to date.</p><p>Sixty years later, COBOL remains widely and actively used across the banking and finance systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gASe93NP832dFVujR7RCMQ.jpeg" /><figcaption>Grace hopper with Univac II, Credit: computerhistory.org</figcaption></figure><p>On a cold winter’s day in 1959, Mary Allen Wilkes walked into the employment office of M.I.T,</p><p>“Do you have any jobs for computer programmers?” she asked.</p><p>They did have jobs for programmers, and it was hard to find one back then, the discipline did not exist yet (for example, Stanford didn’t have a computer science department until 1965.), So they hired her.</p><p>She started working on the IBM 704; not only did she have to write it in assembly language, since the 704 didn’t have a screen or a keyboard, but she also had to type it in and give it to a typist, who translated each command into holes on a punch card. She would carry boxes of commands to an “operator,” who then fed a stack of such cards into a reader. The computer-executed the program and produced results, and typed them out on a printer.</p><p>In 1961, Wilkes was assigned to a prominent new project, the creation of <a href="https://en.wikipedia.org/wiki/LINC">LINC</a>. One of the world’s first interactive personal computers, the computer would fit in a lab or an office and would have its own keyboard and screen so that it could be programmed more quickly, without awkward punch cards or printouts. The designers, who knew they could make the hardware, needed Wilkes to help write the software that would let a user control the computer in real-time.</p><p>In 1964, when Wilkes returned home after traveling the world, she was asked to finish writing the operating system for LINC, Which she gladly accepted. But, as she did not want to move to St.Louis, where the lab that she worked at was re-located to, they sent her a LINC computer to her home in Baltimore, She was one of the first people in the world to have a personal computer in her home.</p><p>Soon after, LINC users around the world were using her code to program medical analyses and even create a chatbot that interviewed patients about their symptoms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*28jCZ0zU_mX46DhYwvrsFA.jpeg" /><figcaption>Wilkes with LINC at her home Credit: tatacommunications.com</figcaption></figure><p>In the afternoon of July 20th, 1969, from 384,400 Kilometers away, Michael Collins, flying the command ship(Still in orbit while Aldrin and Armstrong are on their way to the moon) from behind the Moon, reports to Earth that the landing craft is on its way down to the lunar surface. It is the first time Mission Control has heard of the action. “Everything’s going just swimmingly. Beautiful!” Collins reports.</p><p>Meanwhile, below the lunar orbit, Armstrong throttles up the engine to slow the Lunar module before dropping down on the lunar surface. The landing is not easy. The site they approach is four miles from the target point, on the southwestern edge of the Sea of Tranquility. Seeing that they are approaching a crater about the size of a football field and covered with large rocks, Armstrong takes over manual control and steers the craft to a smoother spot. His heartbeat has risen from a normal 77 to 156.</p><p>Time is now 20:09, Mission control, A radio message from the eagle is received, it’s aldrin, a slight but recognizable panic in his voice, “we are on final minutes of descent, <em>Eagle’s</em> computer is sounding alarms, The 1202 alarm has gone off”, the panic has spread from aldrin’s voice into the faces of everyone at mission control. A moment of silence, Mission control is notified of another alarm going off on the Guidance computer onboard the Eagle; this time, it is 1201, silence has now completely taken over.</p><p>Guidance Officer Steve Bales turns to the left corner of the room with a looming question on his face, “Margaret,” he exclaimed,</p><p>” Tell them it is safe to proceed.”</p><p>There was not a shadow of doubt in the response. The message is relayed back to the eagle.</p><p>Eight minutes later, the 68-inch probes beneath three of the spacecraft’s four footpads touch down, flashing a light on the instrument panel, Armstrong shuts off the ship’s engine. The craft settles down with a jolt almost like that of a jet landing on a runway. It is at an angle of no more than four or five degrees on the right side of the Moon as seen from Earth. Armstrong immediately radios Mission Control: “<strong>The Eagle has landed</strong>.”.</p><p>The woman in the corner from the earlier story was Margaret Heafield Hamilton; She was director of the Software Engineering Division of the MIT Instrumentation Laboratory, which developed the on-board flight software for the Apollo space program. And this would be the first time the world would hear the term “Software Engineering.” It didn’t exist before.</p><p>“It quickly became clear,” Margaret later said, “that the software was not only informing everyone that there was a hardware-related problem, but that the software was compensating for it.” An investigation would eventually show that the astronauts’ checklist was at fault, telling them to set the rendezvous radar hardware switch incorrectly. “Fortunately, the people at Mission Control trusted our software,”</p><p>The achievement was a monumental task at a time when computer technology was in its infancy: The astronauts had access to only 72 kilobytes of computer memory (in comparison, a 64-gigabyte cell phone today carries almost a million times more storage space). Programmers had to use paper punch cards to feed information into room-sized computers with no screen interface.</p><p>As the landing occurred, Hamilton, then 32, was hooked up to Mission Control from MIT. “I was not concentrating on the mission, per se,” Margaret confessed. “I was concentrating on the software.” After everything worked properly, the weight of the moment hit her. “My God. Look what happened. We did it. It worked. It was exciting.”</p><p>While developing the guidance and navigation systems for the Apollo missions, Margaret Hamilton was the one who coined the term “software engineering.” She felt that software developers earned the right to be called engineers; she was met with criticism at the time; they said it inflated her work’s importance, but today when software engineers represent a fervently sought-after segment of the workforce, no one is laughing at Margaret Hamilton.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*wwiktzUTgtVuGPMNT5aqaw.jpeg" /><figcaption>Margaret Hamilton with the code she and her team wrote for the Lunar Module, Credit: <a href="https://news.mit.edu/2016/scene-at-mit-margaret-hamilton-apollo-code-0817">mit.edu</a></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FB7CnVGtd1_Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DB7CnVGtd1_Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FB7CnVGtd1_Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dcfda9bf2a0bda7d4dc3d618705f392/href">https://medium.com/media/1dcfda9bf2a0bda7d4dc3d618705f392/href</a></iframe><p>What clearly began as a field heavily dominated by women changed shortly after World War II. In the US, recognizing software development was a significant expense; companies wanted to hire an “ideal programmer.” Psychologists William Cannon and Dallis Perry were hired to develop an aptitude test for programmers. From an industry that was more than 50% women, they selected 1400 people, 1200 of whom were male. This paper was highly influential and claimed to have “trained the industry” in hiring programmers, with a heavy focus on introverts and men.</p><p>During World War II, women operated some of the first computational machines used for code-breaking at Bletchley Park. In the United States, by 1960, according to government statistics, more than one in four programmers were women. At M.I.T.’s Lincoln Labs in the 1960s, where Wilkes worked, she recalls that most of those the government categorized as “career programmers” were female. It wasn’t high-status work — yet.</p><p>According to the American Association of University Women,<strong> </strong>By 1970, women only accounted for 13.6% of bachelor’s in computer science graduates. In 1984 that number rose to 37%, but it has since declined to 18% — around the same time personal computers started showing up in homes.</p><p>In Britain, following the war, women programmers were selected for redundancy and forced retirement, leading to the country losing its position as computer science leader by 1974.</p><p>180 years after Ada Lovelace scribbled down the first computer program, and 60 years later Grace Hopper redefined programming, here we are, Computer science is now plagued by stereotypes and is an unsustainable career path for women, at least in the western hemisphere, Somehow we have managed to go backward.</p><p>The usual argument that I hear is that none of this is deliberate and that there are fewer women in engineering because fewer women choose STEM in their education as a path to follow. But the matter of fact is that engineering and especially computer engineering is inaccessible to women, and we as a society have directly contributed to the social situation that led us here, maybe not you or me individually, but we do have to bear responsibility for our actions as a collective society.</p><p>It has long been my opinion that for us to make progress as a society, technology and education should not only be accessible but should also provide sustainable paths for talent to grow regardless of their gender.</p><p>A 2019 report from <a href="https://research.hackerrank.com/women-in-tech/2019">HackerRank</a> suggests that women are far more likely to be in junior positions as a developer than men regardless of their age, in fact, the report found that 20% of women above the age of 35 hold junior positions in companies, while for men that number falls to a mere 4%.</p><p>Another report by <a href="https://www.techrepublic.com/article/why-more-than-half-of-women-leave-the-tech-industry/">CapitalOne</a> in 2019, found that the majority of women who stay in tech (73%) said they considered leaving their tech careers at some point because of limited opportunity for advancement (27%), unfair compensation compared with male peers (25%), and little support of management (22%).In the same report, of the women who stayed in tech, 75% said they had female role models in their company, 45% said they participated in peer groups, and 56% said they had good mentors and were given training opportunities.</p><p>Inspiration is infectious, to truly empower women in tech, we must allow them to inspire other women to step into the industry and provide them with avenues to share their stories and help other women navigate their own careers.</p><p>I believe that if we were to provide the right opportunities and mentorship and create an inclusive and supportive environment for our female peers maybe, just maybe, we will find Grace Hoppers, Margaret Hamiltons, and Mary Allen Wilkeses among us once again, and we will be better for it.</p><p>Credits &amp; References:</p><ul><li><a href="https://www.nytimes.com/2019/02/13/magazine/women-coding-computer-programming.html">The Secret History of Women in Coding (Published 2019)</a></li><li><a href="https://www.nasa.gov/mission_pages/apollo/missions/apollo11.html">Apollo 11 Mission Overview</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67feecf70cf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The cost of tracking cost — How we built the frontend for Cost Tracker]]></title>
            <link>https://medium.com/tech-at-tempo/the-cost-of-tracking-cost-how-we-built-the-frontend-for-cost-tracker-2b25274174d7?source=rss-6357c0e8ea9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b25274174d7</guid>
            <category><![CDATA[atlassian]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[time-tracking]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Kiran Gopalakrishnan]]></dc:creator>
            <pubDate>Mon, 02 Nov 2020 13:50:33 GMT</pubDate>
            <atom:updated>2020-11-05T13:47:42.149Z</atom:updated>
            <content:encoded><![CDATA[<h3>The cost of tracking cost — How we built the frontend for Cost Tracker</h3><p>Montreal was still reeling from the grey skies of a harsh winter when I first walked through the doors of Tempo Software. In the April of 2018, I started with team <em>Westfalias </em>as a front-end developer, A development team that was building a cloud counterpart to Tempo Budgets, Which would later be named Cost Tracker.</p><p>In my previous job, I built Voice Recognition enabled AI assistants for the automotive industry on Android Automotive OS. A very hardware and engineering-focused environment, and not much to do with Front-end or Javascript, as we wrote most of our code in Java and C.</p><p>When I started, Cost Tracker was still in its infancy. There was only a single page consisting of a button to create a project and the modal to input a project name. It was also part of the front-end monolith that included the rest of Tempo’s cloud offerings, Timesheets, Planner, Accounts, Teams, Reports, etc.</p><p>After working with the existing codebase for a few months, it became increasingly apparent that it would be beneficial for Cost Tracker to be a module on its own and break away from the monolith.</p><p>We wanted Cost tracker to be simple, consistent, and maintainable. Moving away from the rest of the front-end monolith would allow us to build it with our very own tech stack that could be different from the rest of the frontend stack, which mainly consisted of ReactJS, Redux for state management, ImmutableJS, and a Django Python server which serves up JS bundles.</p><p>And break away we did.</p><p>We moved Cost Tracker into its own module with <em>Typescript &amp; React</em> as the main stack and a Flask server that serves up the JS bundles.</p><p>Part of the reason we moved it out of the monolith was that we wanted to engineer it rather than just develop it. The difference being that the latter is more concerned with implementation details and seemingly and usually lacks a coherent structure. In contrast, engineering requires that you design, architect, and consider the system holistically as you build it.</p><p>This initial idea led us to question what we knew about frontend development at the time, and subsequently led us to ask what if we had…</p><ol><li>No Redux for state management.</li><li>A self-explanatory component architecture.</li><li>Services for managing business logic.</li><li>Flat data models over complex and nested structures</li><li>Tests that test what we see.</li><li>Readability &amp; simplicity over optimizations.</li></ol><p>As we discussed these ideas more, we started to gain a clear picture. Allow me to explain some of these decisions in a bit more detail and with some much-needed context.</p><p>As a side note, since I will be talking a lot about Cost Tracker, if you are unfamiliar with Cost Tracker or Tempo in general, make sure that you check us out at <a href="https://www.tempo.io/">https://www.tempo.io</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9LyDFesyMv8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9LyDFesyMv8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9LyDFesyMv8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a52845ce093552592f89eccfd9a606f/href">https://medium.com/media/5a52845ce093552592f89eccfd9a606f/href</a></iframe><h3><strong>No Redux for state management</strong></h3><p>Redux(and Flux architecture) was built to solve problems that occur in large scale applications. Facebook is a good example of a situation where you would need something like Redux because the sheer scale of the application makes it next to impossible to determine the next state and debug issues, Without having something like Redux.</p><p>When Redux launched in 2015, React’s context API was not usable, as it was only intended for internal use. Redux was very helpful at the time since it got rid of prop drilling when you wanted to share data between different component trees.</p><p>But the world has changed since 2015; Redux has too much boilerplate nowadays and, in my opinion, is a little bit over-engineered. React Context API is now officially available and is a good alternative for Redux, And an action-reducer pattern is now readily available via the <a href="https://reactjs.org/docs/hooks-reference.html#usereducer"><em>useReducer</em></a> hook. We don’t need Redux for that anymore.</p><p>Most of the companies/teams don’t have the large scale issues that Redux solves; Neither are they building apps of such scale to justify having Redux.</p><p>We weren’t either, so we decided to have instead a simple homemade HOC(Higher-order Component) solution that provided the same API&#39;s that Redux provided, but much simpler and without too much boilerplate.</p><p>We could always add Redux later if we encountered those problems that Flux and Redux can solve.</p><p>After all, we should develop pragmatically while testing and refactoring meticulously; from this, an architecture will emerge that will automatically point us towards Redux once the time comes.</p><p>We have yet to encounter something that required Redux, and we are gradually migrating from our HOC solution to a purely Context powered hook based state management that is completely typesafe(Based on one of my personal projects, named <em>Recon</em> — <a href="https://github.com/KiranGopalakrishnan/Recon">https://github.com/KiranGopalakrishnan/Recon</a>).</p><h3><strong>A self-explanatory </strong>component<strong> </strong>architecture</h3><p>A big part of the front-end architecture can be made visible by having a directory structure representing it.</p><p>The old <strong>common, components, reducers</strong> structure, are outdated and are not very representative of the app&#39;s overarching architecture.</p><p>We decided to adopt a directory structure that would be self-evident of our component architecture. The idea was that you could take a look at the directory structure and accurately predict where certain logic would be.</p><p>The ideology behind the directory structure accurately reflected the ideology behind the architecture.</p><p>Each route in Cost Tracker is called a<strong><em> View. </em></strong>All these views would be represented by their own folder under a common folder called <strong>v<em>iews</em></strong>. Each view has one entry point, and it would be a component with the same name as the View; for example, for the following route:</p><pre>/:project-id/scope</pre><p>we have a folder called <strong>S<em>cope </em></strong>under<strong><em> views</em></strong><em>, </em>and the entry point would be a component named Scope in a file called <em>Scope.tsx.</em></p><p>Each view consists of <strong><em>features;</em></strong><em> a single</em><strong><em> </em></strong>feature is a self-contained tree of components. Each view would have multiple features that make up the said view, and all features would reside under the <strong><em>features </em></strong>folder in their respective views.</p><p>These features have no access to any other Views or components except common components shared by all Views and the components shared by features within the view that they are defined in. This is also the only layer where components would be connected to the global state.</p><p>Common components were moved to a <strong><em>common </em></strong>folder and were shared by multiple Views; all the common components shared by features inside a View were moved to a common folder inside their respective <strong><em>features</em></strong> folders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*vC7uu6PgGgWi8vHlyeTa4w.png" /><figcaption>Cost tracker’s directory structure</figcaption></figure><p>This structure made sure that the code wasn’t intertwined, and tracking the change&#39;s impact was now easy because we could make a change in a feature and confidently assume that the change would be self-contained within the View.</p><p>This also ensured that component relationships are predictable and promoted having local states and lifting the state when required instead of moving it to the global state.</p><p>This not only brought consistency across our codebase, but it also made it easier to find where a certain piece of code is located, saving us a significant amount of time when we had to fix a bug or trace a bottleneck in our app.</p><p>This had some exciting implications on testing features vs. Views as well. We were able to come up with the testing system that allowed us to have <strong><em>unit tests for components used by features. Integration tests for features as a whole</em></strong>, this allowed us to cover features and the interactions that they would have with the user, but this still needs to be fleshed out, we are not using this as much as we should.</p><p>Having integration tests on the front end is very beneficial because unit tests test individual components, and end to end tests are costly and require many set-ups. Even then, they often mostly test happy paths. Integration tests would allow us to test a feature as a whole. This could also work as documentation for the feature, provided that you cover all interactions that the user would have with it.</p><h3><strong>Services for managing business logic</strong></h3><p>Another decision was to move business logic into files under a services folder. A service is a file representing a domain, and it would contain all the logic and interactions within that domain.</p><p>For example:</p><p>ScopeService would handle retrieving the project&#39;s current scope, importing a scope and associated values, etc.</p><p>If you are unfamiliar with what scope is in Cost Tracker, then you can read more about it here: <a href="https://tempo-io.atlassian.net/wiki/spaces/THC/pages/473137593/Updating+a+Project+Scope">https://tempo-io.atlassian.net/wiki/spaces/THC/pages/473137593/Updating+a+Project+Scope</a></p><p>This is what the scope view looks like in Cost Tracker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzVSE7H9l7R_LkjllgpOJw.png" /><figcaption>Scope View in Cost Tracker</figcaption></figure><p>And this is how the architecture of the Scope View looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csUEiKsTczn5lxM39C9vlg.png" /><figcaption>A simplified version of our component architecture for Scope View</figcaption></figure><p>ProjectService is another service that deals with updating the project settings, retrieving a project when requested, etc. The services also dispatched the results of these operations if an update to the global state is required.</p><p>The functions within the services follow the single responsibility principle, and composing these functions together would enable us to execute a specific action that can be invoked from the View.</p><p>This made our application&#39;s business logic independent from the reducers and global state, made it easier to test the business logic, and made sure that the logic to update the application&#39;s state was separated from its actual business logic and it’s API interactions.</p><h3>Flat data models over nested structures</h3><p>From previous experience and my open-source experiments in Javascript, it has become clear that building a maintainable app has a lot to do with how its data is modeled.</p><p>It has always been my opinion that if you separate your data from your Views and really map out all the data that your frontend has or needs, certain patterns emerge. These patterns will lead us to define relationships between our data models. By understanding the underlying data relationships, we can make an informed decision on how we should approach the architecture of the application that we are building.</p><p>By constantly deconstructing our data models, we were able to ask if the data in our app made sense and whether it made sense to keep this piece of data in the global state or is it more of a local concern of a view.</p><p>We were also able to interrogate the benefits of having this as a global state instead of a local one and ask how this data is related to the rest of our application&#39;s data. These questions allowed us to keep our data models simple and helped us avoid nested structures.</p><p>The risk of having a complex and nested structure in your data model is that to access this structure and compose the data requires a complex logic. By modeling our data to be flat, accessing data is more of a single level concern, and composing said data could be done easily.</p><p>To quote Linus Torvalds.</p><blockquote>“Bad programmers worry about the code. Good programmers worry about data structures and their relationships.”</blockquote><h3>Test what we see</h3><p>Testing has always been a controversial subject in front-end development. Enzyme, the testing library from Airbnb, was always too focused on the implementation details; the front-end landscape desperately needed something that would allow us not to be concerned with the implementation. Instead, it would allow us to test what we see in the UI.</p><p>It made sense to us that we would want to test what we see, which also meant that if we add tests that covered a component&#39;s functionality, we could safely refactor that component without changing the tests as long as the output remained the same.</p><p>We believe that the tests should represent how your software will be used, and this is exactly the principle behind the <strong>react-testing-library, </strong>which we adapted for Cost Tracker. It has helped us in ways that we didn’t expect. This was also the main reason we were able to write integration tests for our features.</p><h3><strong>Readability &amp; simplicity over optimizations.</strong></h3><p>In my experience, it is common for software projects to get messy and unmaintainable because they were either written to be performant or the code is just too clever to make sense.</p><p>In my opinion, <em>no code should be optimized unless you have a specific requirement for it to be optimized. </em>It&#39;s usually not worth spending a lot of time micro-optimizing code before it&#39;s obvious where the performance bottlenecks are.</p><p>For example, I have seen countless front-end developers write a for loop instead of a map or a reduce function when iterating over a large array because a for loop is faster.</p><p>A traditional for loop is faster than a map or a filter, but this, and I cannot stress this enough, doesn’t matter. You are actually sacrificing the readability of your code for an optimization that is premature, and in 99.5% of the cases not needed.</p><p>It doesn’t matter even if you are dealing with an array of an unknown number of items; javascript has the ability to iterate through a large number of items in arrays within milliseconds(Refer: <a href="https://github.com/dg92/Performance-Analysis-JS#results-for-large-data-set-of-array-size-50000---1000000">https://github.com/dg92/Performance-Analysis-JS#results-for-large-data-set-of-array-size-50000---1000000</a>).</p><p>In this particular example, map, filter, and reduce were introduced to JavaScript because loops make it hard to follow the logic, especially if they are nested. By using loops instead we would be setting ourselves back a decade to solve a problem that doesn’t exist.</p><p>In my previous job, we had rigorous requirements for performance. The software we wrote would be mounted in a vehicle, and most of the vehicles had much less processing power than a traditional computer. And every line of code that we wrote was very performance conscious.</p><p>But none of our optimizations actually had much of an effect on the performance of the application.</p><p>The real performance improvements came from architectural changes and pre-computing values and such. The fact that we saved 0.3 milliseconds when iterating over an array of fifty thousand items was effectively worthless to us.</p><p>To quote <strong>Donald Knuth.</strong></p><blockquote>“Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: <strong>premature optimization is the root of all evil.</strong> Yet we should not pass up our opportunities in that critical 3%.”</blockquote><p>Understanding the difference between that 3% and 97% is essential for writing maintainable applications. In that 3%, about half of them, in my experience, usually have nothing to do with your data structure or your smaller inefficiencies and everything to do with how your app or feature is architected and how your logic is constructed.</p><p>To conclude this overreaching point, I find it necessary to remind ourselves that over 80% of an application’s life-cycle is spent in maintenance. We should pay a lot of attention to the problems of support and maintenance when you’re designing.</p><blockquote><em>“Always remember that code gets read more times than it gets written.”</em></blockquote><p><em>A</em>ll these measures that we have adopted, including the ones that are mentioned here and countless others that I have left out, have all been introduced to make sure that the application that we wrote, and continues to evolve, is not only understandable and maintainable by everyone who works on it, But also by those who will work on it in the future.</p><p>We continue to evaluate these decisions to understand whether it made sense to adhere to them or if it is time to consider a change. This feedback loop that we created has helped us keep our front-end code maintainable, easy to understand, and scalable.</p><p>All of us who were involved in building Cost Tracker feel extremely privileged to have had the opportunity to stray from the traditional ideals and architecture and to have had the chance to experiment with new and exciting things.</p><p>And to those who are reading, I hope we inspire you to do the same, to experiment, to imagine things differently, to seek out new opportunities, to make a path where none exists, and to wonder…</p><blockquote>What if ?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b25274174d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-at-tempo/the-cost-of-tracking-cost-how-we-built-the-frontend-for-cost-tracker-2b25274174d7">The cost of tracking cost — How we built the frontend for Cost Tracker</a> was originally published in <a href="https://medium.com/tech-at-tempo">Tech at Tempo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The sound of her wings]]></title>
            <link>https://medium.com/in-stories/the-sound-of-her-wings-56a844d417b7?source=rss-6357c0e8ea9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/56a844d417b7</guid>
            <category><![CDATA[poetic-prose]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[sandman]]></category>
            <category><![CDATA[neil-gaiman]]></category>
            <category><![CDATA[storytelling]]></category>
            <dc:creator><![CDATA[Kiran Gopalakrishnan]]></dc:creator>
            <pubDate>Thu, 20 Aug 2020 16:10:38 GMT</pubDate>
            <atom:updated>2020-08-20T16:10:38.350Z</atom:updated>
            <content:encoded><![CDATA[<p>There, in the park, in the heat of summer, sits an unusual man, feeding the birds. He is tall, thin, with bone-white skin and pitch-black hair, and two distant stars were looking out from where his eyes should be.</p><p>There sits Morpheus, The lord of dreams, one of the nine endless, The ruler of The Dreaming. But today he is neither, today he is just as us mortals are, devoid of all motivation, searching for his place in the universe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*nSlHYsbA_ofwgV-JKrVWPA.jpeg" /><figcaption>The sound of her wings issue cover</figcaption></figure><p>This is how the eighth issue of Neil Gaiman’s The Sandman begins. Morpheus has just reclaimed all his tools, he had crossed roads with Lucifer himself, and doctor destiny to claim his pouch of sand, his helm, and his ruby, the three items that give him his power, he should be feeling victorious, all-powerful, but instead, he is pondering his long existence in the mortal plane, unable to decide what to do next, where does he go now?</p><p>Morpheus dreads his plight, and Neil Gaiman captures it in his exquisite style.</p><blockquote>…Suddenly, the quest was over. I felt … drained. Disappointed. Let down. Does that make sense? I had been as sure that as soon as I had everything back I’d feel good. But inside I felt worse than when I started. I feel like, nothing</blockquote><p>“The sound of her wings” marks the end to part one of the sandman story, the last chapter in Gaiman’s “Preludes and Nocturnes” the first volume of his Sandman series. It is one of the most definitive Sandman stories if not for the beautiful prose and the striking dialogue, Then for the fact that this is when we first meet Death.</p><p>Death, another endless, sister to Morpheus, the grim reaper herself, she comes to visit a self-pitying Dream, And you would expect Death to be something like Dream, after all, she is endless, maybe a bit more stoic and a bit less moody. But she is the polar opposite of Morpheus, she is funny, energetic, and she quotes Mary Poppins. Death is the opposite of everything you expect her to be. Somehow Neil Gaiman managed to make Death, the grim reaper, fun.</p><p>As the story progresses, Death becomes angry at Morpheus for being mopy,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_GheggGqpwbnoxALJbv8w.jpeg" /></figure><p>But she is Death, and she has work to do, souls to collect, so she gives Morpheus a choice, go with her or keep feeding the pigeons and loathing in self-pity, Morpheus chooses to go with her, After all, there is no denying Death!</p><p>Morpheus and his sister move through the mortal realm, soundless and unbothered.</p><p>Death stops to collect a Jewish fiddler. And from the darkness, He hears the beating of mighty wings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0Feu25RVXRRTRAp9uiNjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z-3OO1OlDaODYcoxsFGrpw.png" /><figcaption>Death collects the violinist</figcaption></figure><p>Death and Dream make another stop, this time at a comedy club, the comedian has died on stage.</p><p>The sound of wings.</p><p>Death expresses her envy towards her brother.</p><blockquote>Mostly they aren’t too keen to see me. They fear the sunless lands. But they enter your realm each night without fear.</blockquote><p>To which Morpheus replies</p><blockquote>And I am far more terrible than you, my sister</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q96KYueQavsrlIUOZcvWGQ.png" /></figure><p>And we arrive at one of my favorite panels in all of the sandman, a simple one and yet so heartbreaking, only a handful of words are spoken, a question and an answer, but captures the nature of Death so effortlessly, so elegant, so cruel…</p><p>Death claims a newborn baby, and as she picks it up</p><blockquote>But… is that all there was ? is that all I get?</blockquote><p>Asks the child, and my heart breaks.</p><p>Once again, the sound of wings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5yw7S9OfisC2o0E_zFc-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdAaJjtxlWsV19Ve1IPwkg.png" /><figcaption>Is that all there was? Is that all I get?</figcaption></figure><p>As she collects more people, Dream remembers a song celebrating death that he heard long ago.</p><blockquote>Death is before me today:<br>Like the recovery of a sick man,<br>Like going forth into a garden after sickness.</blockquote><blockquote>Death is before me today:<br>Like the odor of myrrh,<br>Like sitting under a sail in a good wind.</blockquote><blockquote>Death is before me today:<br>Like the course of a stream,<br>Like the return of a man from the war-galley to his house.</blockquote><blockquote>Death is before me today:<br>Like the home that a man longs to see,<br>After years spent as a captive.</blockquote><p>Morpheus starts to remember what he had once forgotten, He remembers why he exists, why he is needed, his responsibilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXY0Yr9A7HCf1qZq6oGWBg.png" /></figure><p>As they return to the park where they began their journey from, <br>Morpheus thanks his sister for reminding him of his duty.</p><p>But death has another appointment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PI8LTnSHHehpJiza3PN9pA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91lfM3TxdFGtlbfRXlh0AA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEP2SJZvUBodpw0_HHkZvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLJpZmaxf8dZHfUzW_EaaQ.png" /><figcaption>One last appointment</figcaption></figure><p>Dream parts with his sister, Determined to rebuild his empire.</p><p>Epilogue.</p><p>I close the book and vacantly stare at my window,</p><p>The snowfall has now slowly shifted to a blizzard; my coffee has gone cold, whatever warmth it had not too long ago had now slowly faded.</p><p>I put the book back on the shelf.</p><p>And away from my window, mixed with the winds, and the beeping of snowplow vehicles, a church bell is ringing…</p><p>and I hear…..</p><blockquote>The gentle beating of mighty wings!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56a844d417b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-stories/the-sound-of-her-wings-56a844d417b7">The sound of her wings</a> was originally published in <a href="https://medium.com/in-stories">In Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The curious case of NaNs in Computer Science]]></title>
            <link>https://kirangopalakrishnan.medium.com/the-curious-case-of-nans-in-computer-science-27f9968ca0e0?source=rss-6357c0e8ea9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/27f9968ca0e0</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Kiran Gopalakrishnan]]></dc:creator>
            <pubDate>Sat, 30 Sep 2017 16:36:54 GMT</pubDate>
            <atom:updated>2017-10-23T18:17:50.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*27GzmuwyW2dRA2KwzP6OEw.png" /></figure><p>Have you ever came across JavaScript&#39;s NaN Object ? Have you spend hours on stack-overflow(Okey,A little bit of exaggeration) trying to figure out why NaN === NaN or NaN == NaN evaluates to false ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*qHb2tf1eyCz7bgPbPUqXCw.gif" /></figure><p>If you have then you already know that NaN is the only JavaScript object that returns false when compared with itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*Pym7L-1Cf7X5TO6-4o2tpQ.jpeg" /><figcaption>Credit: quickmeme.com</figcaption></figure><p>For those who are not familiar with JavaScript ,NaN (Not a Number)is an object which is the returned value when <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math">Math</a> functions fail</p><pre>(Math.sqrt(-1)); </pre><pre>//or when a function trying to parse a number fails </pre><pre>(parseInt(&quot;blabla&quot;))</pre><p>To put things in perspective the different evaluations for NaN and results are as follows.</p><pre>NaN === NaN;        // false<br>Number.NaN === NaN; // false<br>isNaN(NaN);         // true<br>isNaN(Number.NaN);  // true<br><br>function valueIsNaN(v) { return v !== v; }<br>valueIsNaN(1);          // false<br>valueIsNaN(NaN);        // true<br>valueIsNaN(Number.NaN); // true</pre><p>But what if i told you thattypeof NaN is &#39;number&#39;</p><p>So i was one of those curious minds searching for an answer when i came across NaN in my early years of doing JavaScript.And the only answer i found was “Because JavaScript says so”.For a 13 year old boy just starting his journey to the holy land of programming that was a satisfying answer at the time.Since then every time i needed to test for NaN i have been using isNaN without fully understanding it because “JavaScript says so”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*2RKCJqwDKiHr3mHCymn5sg.gif" /></figure><p>Present day — I was working on a React-Node.JS AI chat-bot project over the weekend and then it happened a <a href="https://www.npmjs.com/package/simple-react-counter">simple react component library that i had built in past</a> suddenly started outputting NaN(A simple parsing error in my component library).</p><p>But little did they know,Now that i have meddled through JavaScript and it’s wide variety of frameworks and libraries for over 10 years and having built a few libraries myself i was ready to take on the mystery of NaN. So i decided to put on my Sherlock Holmes hat(Along with my fake British accent) and dig deep into the heart of JavaScript and even further into the art of Computer Science.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*vq9raHccapY2TnUxcZ6dIA.gif" /></figure><p>The reason behind such behaviour lies in the history of NaNs.<br>NaNs were introduced by <strong>IEEE Standard for Floating-Point Arithmetic</strong> (<strong>IEEE 754</strong>) sometime in 1985 along with quantities like infinity as a standard for invalid outputs for an arithmetic operation. NaNs are represented as fields filled with 1&#39;s in the computer Memory. Prior to the IEEE standard, programmers often used a special value to represent undefined values, but there was no guarantee that they would be handled consistently or correctly.</p><p>Now consider a comparison operation between two values a&amp; b, such that</p><p>a==b can have 4 possible results.</p><ol><li>a is greater than b</li><li>a is less than b</li><li>a is equal to b</li><li>a and b are unordered if any of the values are NaN and hence cannot be assumed equal(This is also the case for when a &amp;b are NaNs) according to IEEE 754</li></ol><p>Hence is the reason why any direct comparison will return false.And is also the reason why a === would also return false.</p><p>The mystery have been solved.</p><h4>Elementary my dear Watson.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*I7LQvn7geFMCrLqJsSMspA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27f9968ca0e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>