<?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 Vignesh Pai on Medium]]></title>
        <description><![CDATA[Stories by Vignesh Pai on Medium]]></description>
        <link>https://medium.com/@vigneshpai?source=rss-7cf806ab5053------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xn2zc3D2CXqcjXPg.</url>
            <title>Stories by Vignesh Pai on Medium</title>
            <link>https://medium.com/@vigneshpai?source=rss-7cf806ab5053------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:24:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vigneshpai/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[Creational Design Patterns | Let's get Creative!]]></title>
            <link>https://vigneshpai.medium.com/creational-design-patterns-lets-get-creative-e6ac53fd98bb?source=rss-7cf806ab5053------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6ac53fd98bb</guid>
            <category><![CDATA[creational-patterns]]></category>
            <category><![CDATA[abstract-factory-pattern]]></category>
            <category><![CDATA[interfaces]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[factory-pattern]]></category>
            <dc:creator><![CDATA[Vignesh Pai]]></dc:creator>
            <pubDate>Thu, 11 Mar 2021 19:21:09 GMT</pubDate>
            <atom:updated>2021-03-15T14:58:37.532Z</atom:updated>
            <content:encoded><![CDATA[<h3>(Part 1/2)</h3><blockquote>This post(s) is an attempt to present the contrasting differences between several Creational Design Patterns in layman terms.</blockquote><blockquote>Prerequisites:<br>- Purpose of Design Patterns, (<a href="https://vigneshpai.medium.com/design-patterns-22b3f6761530">checkout</a>)<br>- Familiarity with SOLID Design Principles (<a href="https://vigneshpai.medium.com/solid-design-principles-a-preface-bb95a4e1296e">checkout</a>)<br>- The patterns covered here are not bound to any programming language, this blog will not be containing any code snippet but only class diagrams. (<a href="https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/">how to class diagrams</a>)</blockquote><h3>What are Creational Design Patterns?</h3><p>Creational Design Patterns deal with object creation mechanisms, trying to increase efficiency, code reuse, and flexibility.</p><h3>What are the different Creational Design Patterns?</h3><ul><li>Factory Method</li><li>Abstract Factory</li><li>Builder</li><li>Prototype</li><li>Singleton</li></ul><h3>Factory Method</h3><h4>[Plot]</h4><p>Creational design patterns are all about creating new objects. In our case, let us consider the scenario of producing a new car — <em>Maruti Suzuki Baleno</em>.<br>Let us define the classes <strong>Car</strong> and <strong>CarCreator</strong>. <strong>CarCreator </strong>implements various methods to produce the car.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/0*0P_zQo2mvp2YZXzf" /><figcaption>fig (a)</figcaption></figure><h4>[Problem]</h4><p>With the above system (or manufacturing plant), we can produce as many cars as we want. The problem occurs when the manufacturer launches a car — <strong>Brezza</strong> to the market. <strong>Brezza</strong> being an SUV model, cannot be produced in our current manufacturing plant.</p><p>An SUV model will require our CreatorClass to accept a different set of inputs like dimensions, chassis, engine, etc.</p><h4>[Solution]</h4><p>A supervisor (developer) going through the manufacturing plant (codebase) introduces Factory Method Pattern to fix the situation. He introduced the concepts of abstract and concrete components.</p><p>The product <strong>Car </strong>is considered an abstract class interface; <strong>Baleno</strong> and <strong>Brezza </strong>become the concrete products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*2pRYUZPw1T0bBmfm" /><figcaption>fig (b)</figcaption></figure><p>Another abstract class <strong>CarCreator</strong> is defined with multiple methods. The method — <strong>CreateCar()</strong> is an abstract class that accepts a parameter — <strong>type</strong> to produce the <strong>Car</strong>s — <strong>Baleno</strong> and <strong>Brezza</strong>. The method <strong>QualityAssurance()</strong> becomes a separate and common process outside of <strong>CreateCar()</strong> that every <strong>Car</strong> has to go through. Furthermore, the concrete classes <strong>BalenoCarCreator</strong> and <strong>BrezzaCarCreator</strong> defined the concrete method for <strong>CreateCar()</strong> that creates <strong>Baleno</strong> or <strong>Brezza</strong>.</p><p>Here <strong>CreateCar() </strong>is a <strong>FactcoryMethod</strong>, which is the only decision-maker in producing the required Car.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/0*O6xQKEkFe2Q_2hI5" /><figcaption>fig (c)</figcaption></figure><p>In general terms <em>fig(d) </em>represents the class diagram for Factory Abstract Method. Note the <em>dependency</em> <strong>ConcreteCreatorB</strong> &amp; <strong>ConcreteCreatorA</strong> on <strong>ConcreteProductB</strong> &amp; <strong>ConcreteProductA</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xQBPP_MS7KJC339Q" /><figcaption>fig (d)</figcaption></figure><h3>Abstract Factory</h3><h4>[Plot]</h4><p>The Maruti Suzuki’s Hatchback and SUV we produced were very well received in the Indian market. So much so that, the cars became bestsellers in their respective segments. This quickly gained the attention of competitors and a few joint ventures with Maruti Suzuki were proposed.</p><p>One such was Toyota — Maruthi Suzuki joint venture. According to this, Toyota gets to rebrand the 2 cars (Baleno &amp; Brezza) as Glanzo and Urbancruiser.</p><h4>[Problem]</h4><p>The Glanzo and Urbancruiser had only cosmetic changes from their counterparts. It would make a lot of sense to manufacture the cars in the already existing plant, we now have to tweak the system (codebase) with the very minimal change to not strain the production pace (efficiency) of the current market bestsellers.</p><p>One way is to create more concrete products — <strong>Glanzo</strong> and <strong>Urbancruiser </strong>in addition to <strong>Baleno</strong> and <strong>Brezza</strong>. This would also need the two additional <em>factories </em><strong>GlanzoCarCreator</strong> and <strong>UrbancruiserCarCreator.</strong> This approach creates a lot of repetitive code, which is not advised.</p><h4>[Solution]</h4><p>The first thing the Abstract Factory pattern suggests is to identify and explicitly declare interfaces for each distinct product.</p><p>Between the four models <strong>Baleno, Brezza, Glanza</strong>, and <strong>Urbancruiser</strong>, we define two <em>interfaces</em> based on types of cars — <strong>Hatchback</strong> and <strong>SUV</strong>. These <em>interfaces</em> are <em>realized</em> with concrete classes distinguished by their families (manufacturers). This approach provides scope for welcoming more manufacturers <strong>🤑 </strong>. Fig <em>(e)</em> represents the interface for <strong>Hatchback</strong>, the interfaces for <strong>SUV</strong> or even <strong>MPV</strong> types can be deduced the same way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*059S8OreiPGj-Icv" /><figcaption>fig (e)</figcaption></figure><p>Next, the <em>Abstract Factory </em>needs to be declared as an interface with a list of creation-methods for each type (of car) belonging to the family. That is <strong>createHatchback()</strong> and <strong>createSUV()</strong>; these abstract methods return the products of the type <strong>Hatchback</strong> and <strong>SUV</strong> respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*XPyxqaf3inCnriuj" /><figcaption>fig (f)</figcaption></figure><p>For each variant of the family, we create a concrete class based on the CarFactory interface i.e, <strong>MarutiSuzukiCarFactory </strong>and <strong>ToyotaCarFactory</strong>. These concrete classes take care of adding their family essence in building the product.</p><p>When the client code(factory) wants to produce a Hatchback car, it does not have to know the family variant. Irrespective of the family, the client code executes <strong>move() stop()</strong> as declared in the interface of cars.</p><p>Below is an overview of the class diagram, the client code invokes <strong>CarFactory()</strong> expecting the return type — <strong>Car</strong> (here, Hatchback).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TtW8NrTyO3aele2K" /><figcaption>fig(g)</figcaption></figure><p>Abstract Factory classes are often based on a set of Factory Methods. Many designs start by using Factory Method and evolve towards Abstract Factory when customization is required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6ac53fd98bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Patterns]]></title>
            <link>https://vigneshpai.medium.com/design-patterns-22b3f6761530?source=rss-7cf806ab5053------2</link>
            <guid isPermaLink="false">https://medium.com/p/22b3f6761530</guid>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[solid-design-principles]]></category>
            <category><![CDATA[design-patterns]]></category>
            <dc:creator><![CDATA[Vignesh Pai]]></dc:creator>
            <pubDate>Tue, 09 Mar 2021 18:21:39 GMT</pubDate>
            <atom:updated>2021-03-15T14:28:47.159Z</atom:updated>
            <content:encoded><![CDATA[<h3>Design Patterns | An Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*txi9E85pF5X3BxzI" /><figcaption>Photo by <a href="https://unsplash.com/@giuliamay?utm_source=medium&amp;utm_medium=referral">Giulia May</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The origins of Design Patterns</h3><p>Back in the 90s, object-oriented programming was the talk of the town. The programmers were bejewelling their codebase with superclasses, virtual functions, and complicated inheritance. Not coincidentally, the programmers often ran into trouble given the limitations of then programming languages.</p><p>It was the <em>“Gang of Four”</em> who first introduced the idea of Design Patterns. The GoF were inspired by the concept of architectural patterns (yes, namespace: civil) that defined a language for town planning. The window dimensions, levels in a building, parks in the neighborhood, etc. were the important aspects of town planning.</p><p>The book <em>“Design Patterns: Elements of Reusable Object-Oriented Software”</em> or simply the <em>“GoF book”</em>, featured 23 patterns that attempted to solve commonly occurring object-oriented design. These designs are not bound to any specific programming language.</p><h3>What are Design Patterns?</h3><ul><li>Design patterns are <strong>not</strong> a set of code snippets or libraries that one can readily use in their codebase.</li><li>Design Patterns are merely the blueprints that solve a recurring design problem.</li><li>They can be liberally customized to fit a specific implementation.</li><li>They are not bound to any specific language, but it can get very challenging to implement (a few) design patterns given the limitations of certain languages.</li></ul><h3>Classification of patterns</h3><p><strong>Idioms</strong> are low-level implementations that dictate the use of language-specific features to form the components building higher-level architectural patterns. <strong>Architectural patterns</strong> are the abstraction of design patterns at a higher level.</p><p><em>“Idioms are language-specific.”</em></p><p><em>“Architectural patterns are applied over an entire application or the system.”</em></p><p>Again, <em>“Design patterns intended to solve design problems... on a modular level.”</em></p><h4><strong>Classification of Design Patterns</strong></h4><p>Depending on the purpose or the problem that patterns are addressing, these are the following classifications:</p><ul><li><strong>Creational patterns</strong> deal with object creation mechanisms, trying to increase efficiency, code reuse, and flexibility. (<a href="https://vigneshpai.medium.com/creational-design-patterns-lets-get-creative-e6ac53fd98bb">checkout my detailed post</a>)</li><li><strong>Structural patterns</strong> deal with the composition of objects and classes into larger structures while making them flexible and efficient. (<a href="https://refactoring.guru/design-patterns/structural-patterns">read more</a>)</li><li><strong>Behavioral patterns</strong> deal with the complex control flow and the assignment of responsibilities between objects. (<a href="https://refactoring.guru/design-patterns/behavioral-patterns">read more</a>)</li></ul><h3>When are Design <strong>Patterns</strong> not preferred?</h3><p>Patterns do not magically improve the quality of a codebase. Adding patterns that fail to address the right problems will certainly cause code maintenance hell.</p><p>Novice developers who have just familiarized themselves with patterns need not start out trying to use patterns. Most often simpler code would do just fine. But, for someone who hasn’t explored patterns yet, it is definitely worth investing good amount of time.</p><h3>Also read:</h3><p><strong>Resources:</strong></p><ul><li><a href="https://sourcemaking.com/design_patterns">https://sourcemaking.com/design_patterns</a></li><li><a href="https://www.geeksforgeeks.org/software-design-patterns/">https://www.geeksforgeeks.org/software-design-patterns/</a></li></ul><p><strong>Advantages:</strong></p><ul><li><a href="https://blog.bitsrc.io/5-reasons-to-love-design-pattern-ce0570a8a15a">https://blog.bitsrc.io/5-reasons-to-love-design-pattern-ce0570a8a15a</a></li><li><a href="https://www.developer.com/design/article.php/1474561/What-Are-Design-Patterns-and-Do-I-Need-Them.htm">https://www.developer.com/design/article.php/1474561/What-Are-Design-Patterns-and-Do-I-Need-Them.htm</a></li></ul><p><strong>Criticism:</strong></p><ul><li><a href="https://refactoring.guru/design-patterns/criticism">https://refactoring.guru/design-patterns/criticism</a></li><li><a href="https://medium.com/young-coder/is-it-time-to-get-over-design-patterns-8851864a6834">https://medium.com/young-coder/is-it-time-to-get-over-design-patterns-8851864a6834</a></li><li><a href="https://medium.com/comparethemarket/design-patterns-should-be-considered-harmful-45ac06cd15ce">https://medium.com/comparethemarket/design-patterns-should-be-considered-harmful-45ac06cd15ce</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b3f6761530" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Design Principles: A preface]]></title>
            <link>https://vigneshpai.medium.com/solid-design-principles-a-preface-bb95a4e1296e?source=rss-7cf806ab5053------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb95a4e1296e</guid>
            <category><![CDATA[bad-code]]></category>
            <category><![CDATA[solid-design-principles]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Vignesh Pai]]></dc:creator>
            <pubDate>Wed, 28 Oct 2020 11:15:13 GMT</pubDate>
            <atom:updated>2023-10-05T07:41:52.343Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOLID Design Principles | A preface</h3><h4>The need and motivation for following SOLID Design Principles</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ed6GzCuFJ8a2Ylz5" /><figcaption>Photo by <a href="https://unsplash.com/@crawford?utm_source=medium&amp;utm_medium=referral">Crawford Jolly</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><em>TLDR;</em><strong><em> </em></strong>Identify the symptoms of bad code and understand their cause: Rigidity, Fragility, Non Reusability.</blockquote><p>Most of you have lived a day when you are greeted at your desk by the morning refreshing breeze(air wick), and a few have smelled it turning pungent at the sight of the sheer number of bugs raised, creeping into your inbox. You take a few sips of coffee while shallow debugging just enough to conclude, <em>“This is easy, couple of line changes and it would work like a charm!”. </em>In the following <em>Stand-Up</em>, you face the grinning QA and declare a good and lavish 8 hours for the fix in front of your team and the scrum master. After some dig up, you realize the module you are fixing has a dependency elsewhere; it hits harder when you find yourself chasing a rabbit hole of dependencies. With only a few hours remaining, you succumb “<em>lavish estimate is not lavish enough</em>”.</p><p>Most of you know what follows next. In tough situations like these, the developer with his hands dirty is often seen as a dentist performing open-heart surgery. The developer might have a good number of valid reasons to explain this absolute plethora of mess, but it all sounds Greek and Latin to the managers.</p><p>When was the last time the code you wrote has slowed you down? You modify a small part of the codebase and that slows down the whole app. Or worse of all, you change a small part of one module and some functionality of a totally unrelated(you think) module breaks down!</p><p>Let’s try to identify the symptoms and classify the reasons behind them.</p><h3><strong>Rigidity</strong></h3><p>Code is rigid when changing a piece of code requires subsequent changes in a functionally independent module.</p><p><em>In a hospital management system, suppose you want to restrict the OPD visit hours, but this modification requires you to change the working hours of Doctors and staff, the design is said to be rigid.</em></p><blockquote>“Code that has a dependency that snake in so many directions, that you cannot make an isolated change without changing anything around it.” <br><em>— </em>Uncle Bob.</blockquote><p>Rigid code often results in developers fearing to fix the non-critical problems because they would not know how long it will take.</p><h3><strong>Fragility</strong></h3><p>Code is considered fragile when you develop a new feature that works completely fine, but it also induces an error in a completely different module. Fragile code is more painful than Rigid code; there is no easy way to find the errors in a completely independent module during the development.</p><p><em>Suppose you want to update patients’ admission forms, but after the changes, you find the billing module is throwing unexpected errors.</em></p><blockquote>“Fragile code breaks in bizarre and strange ways that you cannot predict. In extreme cases, your senior would tell you not to touch that module, that module is too fragile, every time had anyone modifies it, something else goes wrong. This is the ultimate failure of software development.”<br>— Uncle Bob.</blockquote><p>It gets challenging to maintain a codebase with fragility. Every fix or new feature introduces a few bugs in unexpected modules. Here the developer has to hunt the cause of errors, and on the other hand, he has to bear the distrusting management and clients.</p><h3>Non Reusability</h3><p>Code reuse is the practice of using existing code for a new function or software. Reusable code could be a library/module that is called multiple times within the codebase; or, the desired code can be copy-pasted from a completely separate software. But to reuse code, that code needs to be of high-quality — reliable, generic, and secure.</p><blockquote>“The desirable part of the code are horribly coupled to the undesirable parts of the code that you cannot use the desirable part of the code somewhere else.”<br>— Uncle Bob.</blockquote><p>You often find a piece of code that does what you need it to do, but it does more than that. The baggage around it is so much that you better off develop it from scratch or even duplicate it within the same codebase.</p><p>The absence of reusable code often causes code redundancy. As time goes by, one can’t even recognize what code is unnecessary and eventually, the whole project becomes clumsy and hard to maintain.</p><p>The above is a summary of symptoms that show that your code smells bad. The common factor for all the above three problems is Coupling. The modules depend upon each other in undesirable ways and that results in coupling. The code should be decoupled across the modules and layers to avoid them.</p><p>There are many techniques and practices out there which prevent bad code. <strong>SOLID Principles</strong> is a coding standard that all developers should have a clear concept for properly developing software to avoid a bad design<strong>. </strong>The broad goal of the SOLID principles is to reduce dependencies so that engineers change one area of software without impacting others. Additionally, they’re intended to make designs easier to understand, maintain, and extend.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb95a4e1296e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Would you dare to imagine the Fourth Dimension? | A quixotic writeup!]]></title>
            <link>https://vigneshpai.medium.com/would-you-dare-to-imagine-the-fourth-dimension-aaf15e75b14c?source=rss-7cf806ab5053------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaf15e75b14c</guid>
            <dc:creator><![CDATA[Vignesh Pai]]></dc:creator>
            <pubDate>Fri, 18 Oct 2019 15:32:21 GMT</pubDate>
            <atom:updated>2020-10-29T10:17:02.694Z</atom:updated>
            <content:encoded><![CDATA[<h3>Thought-provoking thoughts</h3><p>Have you ever wondered, if there would exist a higher dimension, in addition to the so-called X, Y, and Z dimensions? Have you ever felt how weird or amazing our lives would be if the universe had (has) a few more spatial dimensions? I know there are a lot of sci-fi movies that elaborate on the existence of the fourth dimension, but don’t you feel there could be a fifth, sixth, and seventh dimension? Wait, is it going to be infinite of them? Well, there was a situation when physicists decided to apply a postulated theory on both big (extremely big) things and small (in the scale of nano’s) things. Here the idea of three (and even four) dimensions didn’t uphold the theory, it was when physicists and mathematicians tweaked the concept to include 10 dimensions — their equations worked perfectly fine!</p><h3>The fourth dimension! Time? Really…? Wait a MINUTE…</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gf9IJOcjxajsLfxw" /><figcaption>Photo by <a href="https://unsplash.com/@jontyson?utm_source=medium&amp;utm_medium=referral">Jon Tyson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Based on theories and mathematics, one can prove that higher dimensions exist. But how would you imagine one? Let’s say, the fourth dimension is Time, then what would be 5th? Smell? Love? (Hello Interstellar fans!) If you ask this question to yourself and others, it would seem very natural and obvious that Time rightly claims as to the fourth dimension. But, hold on, I believe time exists in all the spatial dimensions. On an X-Y plane, I draw a point <em>(x1, y1)</em> after say <em>t</em> seconds, I draw another point at <em>(x2, y2)</em>. Do you see how <em>t </em>independent and everywhere?<em> </em>I consider time as a tool of measurement, just like grams and liters. There a “delay” and “mass” are two units in the following sentences: “Add 200 grams more cereal for the scale to level.” and “Wait for 20 minutes for the next bus to arrive.”</p><p>It was the Babylonians who 1 hour has 60 minutes and each minute has 60 seconds. Why 60? Well, it has more divisors than (say) 10 or 100. Time, as I understand, is an (imaginary) tool that we humans have discovered throughout the stories of evolution and the future. Time has helped us measure how far we stand from the big-bang. Or rather, how far I (along with other programmers) stand since January 1, 1970.</p><h3>So what is it then?</h3><p>I do not know what the higher dimension would look like, and neither do many scientists who spent their lives in this quest.</p><p>The fourth dimension is something that we cannot travel in (at least as of now) but are comprised in it. The fourth dimension is something that we are not equipped to visualize. But hey, there’s a way, we can try to ballpark what the fourth dimension would be, that is to imply our understanding to go from 3D to 4D.</p><p>Let us begin from the Dot. Often referred to as a singularity, a point in one dimension. ( Fun fact: The center of a black hole is a gravitational singularity.) This is Zero-dimension.</p><p>Now, if I have another dot — Dot-B somewhere around the previous dot — Dot-A, and draw a straight line between them, I have discovered One-dimension.</p><p>Similarly, I draw another line parallel to the previous line of the same length. I also draw two more lines closing the plane to form a square. (you could do a triangle as well.) This is Two-dimension.</p><p>Imagine a paper square on a table, Now I lift the square in mid-air. This drops a shadow on the table, I’ll draw imaginary lines connecting the adjacent vertices, now I have a cube. This is Three-dimension. Generally speaking, x, y, z ends here, but, wait for the fourth dimension.</p><p>Now, take this 3D cube and consider another cube and try to draw lines between the corresponding vertices. How would you do it? To make it easier, imagine a bigger cube that comprises a smaller cube within it, now it’s easier to draw the lines. We now have something called a Tesseract. So, is Tesseract a fourth dimension object? Absolutely not! It’s the shadow of a fourth dimension object in 3D. Just as the square is a 2D shadow of a cube, and a line is a 1D shadow of a square at a certain angle.</p><h3>Anything more?</h3><p>Every dot on a line is a singularity in itself. The ends of the diameter on a circle fall on the one-dimension. Every cross-section section of a cube is a square. All the objects in the higher dimension have a part of it in its subsequent lower dimension.</p><p>You know only at certain angles the shadow of a square becomes a straight line, the shadow of a cube gives a square, a cuboid gives a rectangle, and a sphere gives a circle. Henceforth, every 3D object cast a 2D shadow; or for every 2D object, at least one 3D object can be extrapolated.</p><p>If we go with the concept, every 3D object that we see around, might have its existence in a higher dimension? We are the impressions of our higher dimensional existence?</p><p>Stay tuned for my next story.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaf15e75b14c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Google Camera on the Asus Zenfone Max Pro M1. No Root required.]]></title>
            <link>https://vigneshpai.medium.com/install-google-camera-on-the-asus-zenfone-max-pro-m1-no-root-required-b1733be7489f?source=rss-7cf806ab5053------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1733be7489f</guid>
            <category><![CDATA[no-root]]></category>
            <category><![CDATA[zenfone-max-pro-m1]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[google-camera]]></category>
            <category><![CDATA[install]]></category>
            <dc:creator><![CDATA[Vignesh Pai]]></dc:creator>
            <pubDate>Sun, 19 Aug 2018 16:44:14 GMT</pubDate>
            <atom:updated>2018-09-04T13:26:48.012Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Google Camera on the Asus Zenfone Max Pro M1 | No Root</h3><blockquote>Welcome to quick guide to boost a really impressive camera sensor with an amazing camera app. You don’t have to worry about voiding the warranty with this process, because No Root Required.</blockquote><h3>Why Google Camera?</h3><p>Here are some comparisons between the two:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTUvN86q3LWYa849AquXMA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmyZciwrgAlHurvPYWLxQA.jpeg" /><figcaption><strong>Left: Google Camera || Right: Stock Camera</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_AfeIbzDTePF1tAyWz7HQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fz7jM7Ey48YxZG6yWakgUQ.jpeg" /><figcaption><strong>Left: Google Camera || Right: Stock Camera</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MfFRiopVSq_loNzf994NqA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cshn2Q_lhr047te-Ko1cCA.jpeg" /><figcaption><strong>Left: Google Camera || Right: Stock Camera</strong></figcaption></figure><h4>You will need the following to carry out the installation process smoothly:</h4><ul><li>A computer: windows/mac/linux</li><li>A USB cable.</li><li>Internet to download the required files (or you can pre-download it).</li><li>and of course, the Zenfone Max Pro M1.</li></ul><h3>There are three major steps in installing Google Camera:</h3><ul><li>Step 1: Phone &amp; ADB setup (a two step procedure in itself).</li><li>Step 2: Enable the Camera2API.</li><li>Step 3: Side-load the Google Camera app.</li></ul><h3>Step 1: Phone &amp; ADB setup</h3><h4>Phone Setup:</h4><blockquote>Here you will enable Developer Options to “Allow USB Debugging”.</blockquote><ol><li>Launch the Settings application on your smartphone.</li><li>Goto System &gt; About phone &gt; tap Build number 7 times. This enables the Developer Mode and you can play around with Developer Options (but, carefully!).</li><li>Now in Settings app, goto System&gt; Developer Options &gt; Enable (toggle) USB Debugging. You should see a prompt — “Allow USB Debugging”, Press “OK”.</li></ol><h4>ADB Setup for Windows: (<a href="https://www.xda-developers.com/install-adb-windows-macos-linux/">mac/linux</a>)</h4><blockquote>At the end of this, your smartphone will be recognised to carry out the ADB commands.</blockquote><ol><li>Download the latest <a href="https://dl.google.com/android/repository/platform-tools-latest-windows.zip"><strong><em>Platform-Tools</em></strong></a>.</li><li>Extract the contents of this ZIP file into a folder. Ex: C:\platformtools</li><li>Launch Windows Explorer, browse the location of extracted folder, Ex: C:\platformtools</li><li>Goto <strong><em>File &gt; Open command prompt</em></strong>. A Command Prompt window will pop-up. (If you prefer the PowerShell on Win10, you should be knowing your way already. Refer ADB Setup for Linux for further commands.)</li><li>Now, connect your smartphone to the computer via USB cable. Find the item ‘<strong><em>USB charging this Devices</em></strong>’ in the <strong><em>Notifications &gt; Tap for more options &gt; select Transfer files</em></strong>. (Also known as MTP mode)</li><li>In the Command Prompt window, enter the following command to launch the ADB daemon: <strong>adb devices</strong></li><li>If the Phone Setup was carried properly, you will see a prompt — <strong><em>“Allow USB Debugging?” </em></strong>. Check <strong><em>“Always allow from this computer”</em></strong> and press <strong><em>“OK”</em></strong></li><li>Now, in the Command Prompt window, re-enter the previous command: <strong>adb devices </strong>. Your device’s serial number on the command prompt like so: <strong>IM23VIGNZ07PIE device</strong> .Yay! This confirms your device is recognised and you can run a bunch of ADB command (but, very carefully!).</li></ol><h3>Step 2: Enable the Camera2 API</h3><blockquote>Camera2 API to gives the camera app a better access to more advanced controls of the camera, like manual exposure (ISO, shutter speed), focus, RAW capture etc. The same is required by the Google Camera app that we’ll be installing in the next step.</blockquote><ol><li>Switch off your phone.</li><li>Enter the bootloader mode by pressing Power and Volume-up button, both together.</li><li>On the Command Prompt / Terminal run the following command:<br><strong>Windows Command Prompt:</strong> fastboot oem enable_camera_hal3 true<br><strong>Windows PowerShell:</strong> .\fastboot oem enable_camera_hal3 true<br><strong>macOS or Linux Terminal:</strong> ./fastboot oem enable_camera_hal3 true (make sure you have USB cable connected and current working directory in Command Prompt/Terminal is same the extracted directory in Step 1)</li><li>Now, long press the power button to shutdown the device, then, turn-on the device.</li></ol><p>With this, Camera2API should be enabled on your smartphone. It’s always better to verify whether Camera2API is successfully enabled. Find the below link to install <strong>Camera2 API Probe</strong> from the Google Playstore.</p><p><a href="https://play.google.com/store/apps/details?id=com.airbeat.device.inspector">Camera2 API Probe - Apps on Google Play</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwOSgMOK6Kglhvn2gYtuRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uRE0nKlnH6V8ozSXpIPi7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0qiRWGoOQ1l5b71We3Rpfw.png" /><figcaption>Here’s the <strong>Camera2 API Probe </strong>result on our device</figcaption></figure><h3>Step 3: Side-load the Google Camera app</h3><blockquote>To install an app on an android device, you can either use stores like PlayStore or you can directly install(side-load) the apk from a trusted source. Google camera apk will be installed the latter way. <a href="https://forum.xda-developers.com/asus-zenfone-max-pro-m1/themes/app-arnova8g2s-google-camera-port-t3813489/page2">Here’s all the details about the Google Camera Port</a> that you’ll be installing.</blockquote><ol><li>Download the latest the Google Camera APK on your phone:<br>- <a href="https://www.celsoazevedo.com/files/android/google-camera/f/GoogleCamera-Pixel2Mod-Arnova8G2-V8.apk">This was the latest version when this article was formed.</a><br>-<a href="https://forum.xda-developers.com/asus-zenfone-max-pro-m1/themes/app-arnova8g2s-google-camera-port-t3813489"> Here’s the xda link for the app.</a> You may find next versions here.</li><li>Tap on the installed APK to install the app with default package installer. If you are prompted with third party app warning, allow it. That’s the whole point!</li></ol><p>Now you have the perfect camera for your phone! Thanks to Asus for letting us enable <strong>Camera2 API</strong> and thanks to contributors like <a href="https://forum.xda-developers.com/member.php?u=4860033">Arnova8G2</a> for having us the Google Camera Port.</p><p>You can post your queries in the comments below.<br>Thank You!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1733be7489f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>