<?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 Nishant Sethi on Medium]]></title>
        <description><![CDATA[Stories by Nishant Sethi on Medium]]></description>
        <link>https://medium.com/@nsethi610?source=rss-fafa882cfa9d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_HwYhlMNvCVToIIo2rLKyA@2x.jpeg</url>
            <title>Stories by Nishant Sethi on Medium</title>
            <link>https://medium.com/@nsethi610?source=rss-fafa882cfa9d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 18:23:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nsethi610/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[Create React App with Express Server]]></title>
            <link>https://medium.datadriveninvestor.com/create-react-app-with-express-server-d36cb31ad25e?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d36cb31ad25e</guid>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[template]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 20:24:32 GMT</pubDate>
            <atom:updated>2022-05-02T21:33:08.576Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>How often have you felt like wasting time by creating separate apps for frontend and backend by using different commands like <strong>npm express-generator app</strong> for the backend and <strong>npx create-react-app my-app</strong> for frontend( assuming you are using react)?</blockquote><blockquote>Well not anymore, the create-react-app <strong>cra-template-with-express</strong> template to the rescue.</blockquote><h3>About</h3><p>This is the custom template built on top of the base template for creating a simple React app by adding the express server which extends <a href="https://github.com/facebook/create-react-app">Create React App</a> webpack configurations.</p><p>If you don’t specify a template (for example, --template with-express), Simple React app will be created by default.</p><p>For more information, please refer to:</p><ul><li><a href="https://create-react-app.dev/docs/getting-started">Getting Started</a> — How to create a new app.</li><li><a href="https://create-react-app.dev/">User Guide</a> — How to develop apps bootstrapped with Create React App.</li></ul><h3>Install</h3><blockquote>npx create-react-app &lt;your-app-name&gt; --template with-express</blockquote><p>Just use this single command and it will create a nice well-structured app for you like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*orr0JCaP8V3OIIAkn4ecrQ.png" /></figure><h3>How to Use it.</h3><blockquote><strong>Don’t do yarn start</strong>.</blockquote><p>Instead, refer to the following commands. Navigate to your-project by cd your-project and run the following commands:</p><ul><li>To Run Server - npm run server or yarn run server</li><li>To Run Client - npm run client or yarn run client</li><li>To Run Server with Client - npm run server-with-client or yarn run server-with-client</li></ul><h3>Development</h3><ul><li>To continue developing your frontend app, go to the frontend folder using cd frontend command and continue your development as you would do for your traditional frontend app.</li><li>To continue developing your backend app, go to the backend folder using cd backend command and continue your development as you would do for your traditional backend app.</li><li>To view your frontend app, go to <a href="http://localhost:3000/">http://localhost:3000</a></li><li>Backend is hosted at <a href="http://localhost:9000/">http://localhost:9000</a></li><li>In case you need to change the port of your backend app, navigate to,backend/bin/open www, and change port to your desirable port at line 15.</li></ul><p>Make sure to change your proxy object in your frontend package.json.</p><p>You can find the template <a href="https://github.com/nishant-sethi/cra-template-with-express-server">here</a>.</p><p>You can find my published package <a href="https://www.npmjs.com/package/cra-template-with-express">here</a>.</p><p>Please feel free to drop a comment if you need a demonstration for the same. I am sure it will help you guys to improve productivity.</p><p>Also, requesting all the readers to use this package and contribute by providing their feedback to make it more robust and in helping the developing community.</p><p>You can also hire me for freelance work<br>Upwork <a href="https://www.upwork.com/freelancers/~014f750462368afb57">https://www.upwork.com/freelancers/~014f750462368afb57</a></p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d36cb31ad25e" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/create-react-app-with-express-server-d36cb31ad25e">Create React App with Express Server</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React: The Big Picture-Part II]]></title>
            <link>https://medium.datadriveninvestor.com/react-the-big-picture-part-ii-e9b2e1778753?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9b2e1778753</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Wed, 20 May 2020 17:45:06 GMT</pubDate>
            <atom:updated>2021-04-28T13:00:50.127Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Again, if you’re reading this, I assume that <a href="https://medium.com/@nsethi610/react-the-big-picture-62c678dac7dc"><em>you read my previous post which tells you what makes react special and worth choosing over the competition</em></a> and now you are looking for a short overview of tradeoffs so that you can decide if react is right for you and your team</p><h3><em>Tradeoffs</em></h3><h4>Tradeoff 1: Framework vs. Library</h4><p>The first tradeoff is framework versus library. Competitors like Angular and Ember are frameworks. React, in contrast, is generally considered a library, since it’s lean and focused on components and it is free of opinions.</p><p>Now, a framework isn’t fundamentally better than a library; it’s a tradeoff. Here are a few advantages to choosing the framework approach like</p><ul><li>A framework contains more opinions, so you can avoid spending time trying to choose between many options which reduces decision fatigue and there’s often less setup overhead.</li><li>Frameworks can help enforce consistency since most frameworks are more opinionated.</li></ul><p>However, React’s library approach also has some clear advantages. At only around 35K gzipped, React is significantly smaller than most frameworks. This means that it’s small enough that you can sprinkle it on existing applications so that you can slowly migrate an existing app to React, even a server-side rendered app.</p><p>Imagine you have an existing app built-in .net, Java, Ruby, PHP, Python — Whatever. Since React is small and flexible you can replace a single component on the page with a react component. And, you can use your React components anywhere because they’re light-weight and atomic. This is precisely how Facebook slowly rendered its application from a server-side rendered PHP to React. And React doesn’t force any decisions on you. It allows you to only pull in the features that you need to keep your app. You’re free to pick the precise technologies that you need for your project, and you’re free to select the best technology for your use case as well.</p><h4>Tradeoff 2: Concise vs. Explicit</h4><p>The second tradeoff to consider is concise versus explicit.</p><p>React trades conciseness for predictability and explicitness. You spend a little more time explicitly wiring things up together, but that helps them not fall apart, and it also helps people better understand what the code is doing.Here’s a concrete example,</p><ul><li>Frameworks like Knockout and Angular popularize two-way binding as a way to avoid typing by automatically keeping form inputs in sync with the underlying data.</li><li>This approach was extremely popular until React came along. It was popular because it requires less coding. With two-way binding, JavaScript values and inputs are automatically kept in sync.</li><li>In contrast, <em>React embraces one-way binding instead</em>. It requires a little more code. With React, you declare an explicit change handler and you reference it on your input.</li></ul><p>This extra work has some benefits like</p><ul><li>You have more control because you can declare precisely what should happen in every event.</li><li>You can transform and validate input before updating the state and perform performance optimizations as desired.</li><li>Your code is more explicit since you clearly state what you want to happen when an event occurs, and this makes it easy to understand and debug when an error happens.</li></ul><p>Although React helped repopularize doing the one-way binding, other popular libraries like Angular have shifted gears and embraced it as well today for these reasons. Now if your team strongly prefers two-way binding, you can use libraries that add it to React, but for the reasons I just mentioned, few do so, and I don’t really use it. Also, you don’t really need to declare a separate change handler for each input. There are simple patterns for centralizing your change handlers in React, more you can find <a href="https://reactjs.org/docs/handling-events.html">here</a>.</p><p>In summary, here’s the tradeoff. React requires more typing to implement than traditional two-way binding approaches, but with the benefit of easier maintenance, greater clarity, reliability, and performance.</p><h4>Tradeoff 3: Template-centric vs. JavaScript-centric</h4><p>The 3rd tradeoff is template-centric versus JavaScript-centric.</p><p>Angular, Vue and Ember seek to make HTML more powerful by inventing their own unique syntax for writing code in HTM. React takes the exact opposite approach and instead utilizes the power of JavaScript to handle HTML. This fundamental difference is what makes React so elegant.</p><p>let’s consider writing a loop in each technology.</p><ul><li><em>With Angular, you say *ngFor, then use a syntax that looks a bit like JS, but is declared inside a string.</em></li><li><em>Vue is similar, but a little less typing. Again, you write your looping code inside a string.</em></li><li><em>With Ember, you use Ember’s #each helper, which is rather wordy compared to the others above.</em></li><li><em>Finally, with React, you use JavaScript’s built-in map function and a plain JavaScript arrow function to display each user name.</em> So the only React-specific syntax is the curly braces, so it’s not just preferable because it’s less code, it’s preferable because the syntax is plain JavaScript.</li></ul><p>Finally, let’s see how each handles clicking on a button.</p><ul><li><em>With Angular, you add parentheses around the event, and unlike traditional event handlers, you also put parentheses by the event handler name as though you’re invoking it. This syntax wouldn’t work if it were real JavaScript.</em></li><li><em>With Vue, you use v-on with a colon and the event name, or you can put an at sign the front of click. Again, both of these are Vue-specific syntax.</em></li><li><em>And, with Ember, you specify a plain onclick, which is nice, but inside, you use an Ember-specific convention to tie the click to a specific action, which is declared via a string.</em></li><li><em>Finally, with React you declare an onClick handler. </em>So in React, you use the native click handler name, but it’s CamelCase’d since React’s JSX uses JavaScript casing rules; otherwise, the only unique syntax is that you specify the function name inside a curly brace instead of in quotes. If you know JavaScript, then you know how to handle conditionals, looping, and events in React. This is why React’s API is so small.</li></ul><p>This will be more clear if you look at the exact code but you don’t really need to worry about all the frameworks and library. I’m trying to contrast the approach to provide a clarity of why react is preferable.</p><p>So,let’s actually come to the point and contrast the benefits of each approach. The benefit of the template approach is that</p><ul><li>it requires less JavaScript knowledge. Template languages provide a streamlined API for performing core functions.</li><li>You focus on enhancing a template with framework-specific syntax.</li><li>And these unique syntaxes have some advantages like avoiding the confusion that’s often caused by JavaScript’s this keyword behavior.</li></ul><p>This makes templates more approachable for developers who are new to JavaScript. And in theory, a template language is preferable because of a principle called the rule of least power. It’s counter-intuitive, but less powerful languages can theoretically be preferable because they can protect from misuse by only allowing the user to perform a small set of prescribed operations.</p><p>But Of course, there’s an obvious downside, which is that the template-centric approach leads to framework-specific syntax. To get good at template-centric libraries like Angular and Vue, you must spend your time learning their specific syntax and rules for doing things that JavaScript can already handle.</p><p>In contrast, React has very little unique syntax to learn, and since React embraces JavaScript, you don’t have to learn a new vocabulary to describe the new features that other template-centric libraries like Angular add to HTML. Most of what you write in React is really just plain JavaScript. This leads to less typing and less code, which I find produces a result that’s easier to read and debug.</p><p>Finally, React’s JavaScript-centric approach encourages improving your JavaScript skills. And admittedly, you could consider this a downside because the list of new features in ES 2015 was significant. But, once you do, you won’t just be better at React, you’ll be better at JavaScript</p><p>In summary, to get better at React, you mostly need to learn modern JavaScript. And this is great because it means your skills will transfer to all other JavaScript code that you write, even if you move away from React in the future.</p><h4>Tradeoff 4: Separate vs. Single File</h4><p>The 4th tradeoff is a separate template versus a single file per component.</p><p>Patterns like MVC popularize separating the model, view, and controller into three separate files. Traditionally for web apps, this means that the view is HTML. The model declares the data for the view in JavaScript, and the controller controls the interactions with the model.</p><p>In contrast, with React, each component is an autonomous concern. Each component stands on its own and can be composed of other components to build rich, complex UIs. This means markup and logic are co-located in the same file. When React was introduced in 2013, people were very skeptical about React’s design because it ran against the current best practice of placing HTML templates and JavaScript logic in separate files.</p><p>In React, each component contains both logic and markup in the same file, so on the surface, this feels like it violates the principle of separation of concerns. However, in React you think about separation of concerns differently.</p><p>Traditional separation of concerns often fixates on placing each technology in a separate file. So in web development, this means placing HTML, CSS, and JS in separate files. But React recognizes that while these are indeed separate technologies, they must be carefully composed together to do anything useful. So in React, each component is a separate concern. <em>Examples include</em></p><ul><li><em>a button</em></li><li><em>a DatePicker</em></li><li><em>an accordion</em></li><li><em>or a TextInput.</em></li></ul><p><em>Each of these components is a separate concern. </em>It will often embed logic, styling, and markup concerns because JavaScript, CSS, and JSX work together to create a useful component. In my experience, placing such intertwined concerns in separate files actually hinders debugging and slows feedback because you have to mentally keep these separate files in sync. And of course, by composing small, simple components together, you can create more complex components. So, I feel that components are a common concern worth separating. The old mindset of separating HTML, JavaScript, and CSS into separate files, merely separated technologies, but their concerns and interactions are actually fundamentally intertwined. If you change one file, it often requires corresponding changes to other files. Oh, and you’re not forced to handle styling in the same file. With React, you’re free to handle CSS in a traditional separate CSS file if you prefer.</p><p>Think of component composition like Russian dolls. Russian dolls are interesting because each doll can hold a smaller doll inside (I like Russian dolls analogy but it’s my original) . React’s component model works the same way. Simple, reusable components can be composed together to build rich, complex user interfaces. React’s component approach lends itself well to building complex UIs by breaking your page down into small autonomous pieces that you can reason about and test in isolation.</p><p>So, these are some of the tradeoff which we should understand and keep in mind while choosing framework or library for your project</p><p><a href="https://medium.com/@nsethi610/react-the-big-picture-part-iii-34780bf8452f"><em>In the next and the last module, I will end the series by considering common concerns</em></a> that I hear about react and approaches to mitigate these concerns.</p><p>Article motivation and resource guide from <a href="https://medium.com/u/50a6c7ef7431">Pluralsight</a></p><p>Thanks for reading. Do give appreciation by giving claps and Do not forget to give you feedback.</p><p>Happy coding!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9b2e1778753" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/react-the-big-picture-part-ii-e9b2e1778753">React: The Big Picture-Part II</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React: The Big Picture-Part III]]></title>
            <link>https://medium.datadriveninvestor.com/react-the-big-picture-part-iii-34780bf8452f?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/34780bf8452f</guid>
            <category><![CDATA[sofware-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[fullstack-development]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Wed, 20 May 2020 17:44:11 GMT</pubDate>
            <atom:updated>2021-04-28T13:00:56.175Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Once Again, if you’re reading this, I assume that <a href="https://medium.com/@nsethi610/react-the-big-picture-part-ii-e9b2e1778753"><em>you read my previous post which tells you about tradeoffs so that you can decide if react is right for your team</em></a> and now Let’s discuss common concerns that I hear about react and approaches to mitigate these concerns.</p><h3><em>Why not React</em></h3><h4>Concern 1: HTML and JSX Differ</h4><p>The first common concern could be that JSX differs from HTML.</p><p>React uses an optional syntax that looks a lot like HTML called JSX. Now JSX’s syntax is 99% the same as HTML, but <em>it does differ in a few ways such as htmlFor instead of for, and className instead of class, inline styles are declared in JSON format, comments are handled in JavaScript style instead of HTML style and so on .</em></p><p>But, learning JSX’s differences is trivial. The list of differences is quite short and thus easy to adopt. But, how browser will understand JSX? Basically, you need to compile JSX down to plain JavaScript calls so that the browser can understand it or this concern can be handled by multiple ways.</p><ul><li>Honestly, since there are only a few differences between HTML and JSX, We can typically convert existing HTML with a simple find and replace it. The list of differences is so small that it should not take much time.</li><li>Or, there’s also an online HTML to JSX compiler and an npm package called HTML to JSX that you can use. With this online HTML to JSX compiler, you enter your HTML on the left and it displays the resulting JSX on the right. Now if you have a lot of HTML to convert to JSX, you can convert it in bulk using the HTML to JSX package on npm. This is a command-line tool and it uses the same code that’s running behind the scenes on the online HTML to JSX compiler that I just showed you. So you can point this at a set of files and convert your HTML in bulk.</li></ul><p>In summary, this concern can be handled with ease.</p><h4>Concern 2: Build Step Required</h4><p>The second common concern is closely related to the first.</p><p>When you use JSX, React requires a build step. As I mentioned, you need to compile JSX down to plain JavaScript calls so that the browser can understand it.</p><p>In practice, this is trivial to handle today. Frankly, worrying about needing a build step makes little sense today. These days, a build step is a critical part of just about any web application. No matter what JavaScript framework you’re using, you’re going to want a build step. You’ll want to minify your code to save bandwidth. You’ll want to transpile your code so that you can use modern JavaScript features today, even before your platform offers full support. And you’ll want to lint your code and run your automated tests when you hit Save as well. So compiling JSX is just another thing that happens automatically along the way.</p><p>Today’s two most popular transpilers both work great with React- Babel, and TypeScript, and both allow you to use modern JavaScript features today even before all browsers offer full support. And most importantly for React developers, both transpile React’s JSX for you. And there are a variety of React boilerplates that make it easy to get started and have build steps built in automatically to transpile JSX for you. Create-react-app, which I’ve mentioned in my previous module, is the most popular option today. And it also minifies and bundles your code, and even includes automated testing support so you don’t even need to configure your development or production build environment to work with JSX. This all just happens automatically.</p><h4>Concern 3: Version Conflicts</h4><p>The third concern is potential version conflicts.</p><p>As I mentioned in previous module, React with React DOM weighs only around 35K minified and gzipped. That’s a very reasonable size, but there are some downsides to having a runtime at all. You can’t run two versions of React at the same time on the same page, so this means that you need to keep your React components on the same version for a given page. In contrast, if you build standardized Web Components, you don’t have to worry about version conflicts at all since there’s no runtime. Standard Web Components just leverage the support that’s built right into the browser.</p><p>However, for reasons I outlined in a previous module, I still prefer working in React over using plain Web Components, and that’s partial because the Web Components standard lacks features that I love from React and other frameworks like efficient DOM updates, reactive data binding, and more. So there are other interesting tools to consider like SkateJS, Svelte, and Stencil, which bring those features to Web Components without the need for a framework. These options are interesting because they leverage the Web Components standard, but add extra features. They also embed their runtime within each component so you don’t need to worry about version conflicts. And since React is a lean component library, you will often choose to use related libraries with React such as React Router, so you need to run compatible versions. This means that you typically need to run a recent version of React to avoid a version conflict.</p><p>Here are three tips to avoid version conflicts.</p><ul><li>First, agree as a team which version of React you’re working with.</li><li>Second, upgrade React when you’re upgrading related libraries.</li><li>And finally, on the rare instances where there are breaking changes in a future release, decide as a team when to upgrade.</li></ul><h4>Concern 4: Outdated Resources Online</h4><p>The 4th concern is old stuff showing up in searches.</p><p>React has a large, mature community, and it has evolved since it was open-sourced in 2013. Search for the term react example on Google, and you get 1. 7 million results. There are over 57, 000 questions tagged with react on Stack Overflow and around 30, 000 questions on related technologies like React Native, React Router, and Redux. And there are thousands of blog posts out there on blogging platforms like Medium about React and related technologies. And, having many great resources online is a great thing, right? Absolutely. But there’s an obvious risk.</p><p>Some of these public content is outdated. React has evolved since it was released in 2013, so as you search around the web, you’ll see some patterns that are no longer popular today. Features have been extracted from React Core to keep the library lean and simple. Since React is used for more than just the web now, React DOM was extracted to a separate package, so you’ll see many posts using the style on the left, but today, reference the separate React DOM library for web development. And if you’re doing development for other platforms, you’ll import the renderer that’s appropriate for that platform such as React Native.</p><p>Second, since most people are using ES classes today, react. createClass was extracted to a separate library called create-react-class, so you need to reference this separate library if you want to declare React components using the createClass style. And since only some teams choose to use PropTypes over alternatives like TypeScript and Flow, the PropTypes library was extracted to a separate npm package, too. So you’ll need to install the PropTypes library and import it as you see here on the right.</p><p>Finally, mixins were initially a popular way to share functionally between components in React. However, due to various issues, mixins are no longer part of React Core. Today, alternative patterns like higher-ordered components and render props serve this purpose. Now, this is an advanced topic, so don’t worry if that makes no sense at all.</p><p>The bottom line is when you see an old point that mentions mixins, look into these alternative patterns instead. So keep these four changes in mind. And of course, when you’re in doubt, check React’s documentation. It’s excellent, up to date, and actively maintained by Facebook.</p><p>Thanks for reading. Do give appreciation by giving claps and Do not forget to give you feedback.</p><p>Article motivation and resource guide from <a href="https://medium.com/u/50a6c7ef7431">Pluralsight</a></p><p>Happy coding!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34780bf8452f" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/react-the-big-picture-part-iii-34780bf8452f">React: The Big Picture-Part III</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React: The Big Picture]]></title>
            <link>https://medium.datadriveninvestor.com/react-the-big-picture-62c678dac7dc?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/62c678dac7dc</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[react-architecture]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Wed, 20 May 2020 11:43:03 GMT</pubDate>
            <atom:updated>2021-04-28T13:01:00.067Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>React: The Big Picture- Part I</strong></h3><p>Hello there, if you’re reading this, I assume that you are new to react and you are looking for a getting started guide of react, what it is and why it has become so popular so that you can decide if react is right for you and your team</p><p>This module consists of three short submodules. In the first module, we will explore what makes react special and worth choosing over the competition. In the next module, <a href="https://medium.com/@nsethi610/react-the-big-picture-part-ii-e9b2e1778753"><em>we’ll discuss the trade-offs inherent in react’s design</em></a> so that you can understand what you’re getting and what you are giving up by choosing to react. And, I<a href="https://medium.com/@nsethi610/react-the-big-picture-part-iii-34780bf8452f"><em> will end the module by considering common concerns</em></a> that I hear about react and approaches to mitigate these concerns.</p><h3><strong><em>Why React?</em></strong></h3><h4>Reason 1: Flexibility</h4><p>Perhaps the most compelling reason to choose React is once you learn it, you can build user interfaces for a huge variety of platforms and use cases.</p><p>React is remarkably flexible. React embeds fewer opinions than its competition, so it’s more flexible than opinionated frameworks like Angular and Ember.</p><p>React is a library, not a framework, and as you’re about to see, React’s library approach has allowed it to evolve into a remarkably flexible tool. When React was initially created, it had a single, focused use case. It was for creating components for web applications.</p><p>However, as React has grown in popularity, its ecosystem has grown to cover a variety of use cases.</p><h4>Reason 2: Developer Experience</h4><p>Reason number 2 is the developer experience.</p><p>Trust me, once you try to learn React, you’ll likely fall in love. Because:</p><ul><li>The rapid feedback development experience, combined with React’s small, logical API, creates a development experience that’s very hard to beat.</li><li>It offers a simple API that’s easy to learn. There are very few concepts to master. React’s API is so small and straightforward that developers rarely need to check the docs. The entire API just fits in your head. Could this get any simpler? (I’m a big fan of chandler from friends 😛)</li></ul><p>With reach, you develop small atomic reusable code, which is known as a component. <em>It’s basically a function that returns what looks like HTML</em>. With React components, you import React at the top using a standard JavaScript import statement, then you can declare a component using a standard JavaScript function. The function receives variables via an object called props. You can also declare a React component using a standard JavaScript class. These are called functional components.This approach is slightly more typing but gives you a little more power.</p><p>Now, if you would have looked at some examples of react components, you’re likely wondering what’s happening here inside this render function. It looks like HTML, but it’s sitting in a JavaScript file, so how does that work? Well, that’s called JSX.</p><p>There are a few minor differences between JSX and HTML like,</p><ul><li>JSX compiles down to JavaScript and It becomes a call to React.createElement.</li><li>The function is passed the name of the tag that you created, an object that specifies the attributes you’d like to set.</li><li>And finally, the markup that should sit inside. This final parameter contains calls to other elements if you have nested markup. For more details, you can go to react <a href="https://reactjs.org/docs/react-api.html">docs</a>.</li></ul><p>Traditional libraries like Angular, Vue, and Ember seek to enhance the power of HTML by inventing their own syntax for simple operations like looping. For example,</p><ul><li>in Angular, you say *ngFor let the user of users.</li><li>In Vue, you say a v-for user in users</li><li>in Ember, you say #each user in users.</li></ul><p>React went the exact opposite route. Instead of trying to make HTML more powerful, React just handles HTML with JavaScript. You don’t need to learn new framework-specific keywords, rules, and syntax for conditionals, looping, and so on. You just use JavaScript. JavaScript already has a built-in function for iterating over an array called map so in React you just plain JavaScript. Basically, traditional libraries put fake JavaScript in HTML. And React is doing the exact opposite. It puts fake HTML in JavaScript. I find React’s approach preferable because it creates a simpler API. React encourages you to get better at JavaScript, and in doing so, you also get better at React.</p><p>I use create-react-app, which is the most popular way to scaffold the React app today. I just say create-react-app with the desired name for my app ( <em>npx create-react-app my-app</em>) , and it creates a fully working development environment on my machine. With a single command, <em>npm start</em>, it starts up a web server on my machine and serves my React app.</p><p>In React, each component is atomic; it stands alone. This means you can work with each component in isolation, and every time you save your code, the changes are immediately reflected in the browser, which is also known as <strong>Hot Reloading</strong>.</p><p>And here’s the great thing. If you make a mistake, you receive a detailed error message in the browser. If I forget to close a tag within JSX, I get a compile-time message about the precise line where I made a mistake. And if you need to debug your code, it’s easy to set a breakpoint and view the original code in the browser. Through the power of source maps, you can see the original code that you wrote in your editor displayed within the browser.</p><p>You can use an online React editor like CodeSandbox to easily experiment with React, share your work, and even build your entire app. There’s no configuration required. Just load the site and start coding. CodeSandbox makes it easy to experiment with React and share your work. When I’m trying an idea, I just load up this site and start coding. You can create multiple files, reference them, use modern JavaScript, and every time you hit a key, you see your changes reflected on the right.</p><h4>Reason 3: Corporate Investment</h4><p>Reason number 3 is that many well-respected corporations are deeply invested in React and its ecosystem today.</p><p>React was created by Facebook, so of course, React is heavily used in and by Facebook, one of the highest-trafficked apps in the world, as well as Facebook’s other properties such as Instagram and WhatsApp. Facebook is deeply committed to React. Although React is an open-source project, four of the top six committers to the React project are current, full-time Facebook employees. And the Facebook development team maintains an active blog that consistently outlines the details of each release and plans for the future. Because of Facebook’s deep existing commitment to React in production, when breaking changes occur in React, Facebook has consistently provided a codemod that automates the change.</p><p>Now, a codemod is a command-line tool that you can point at your codebase to automate changes. So with React codemod, you can automatically update older React components to the latest specification. Over the years when breaking changes have occurred, the Facebook team has consistently published a codemod in order to automate updates to the latest version.</p><p>So for example, when Facebook released React 15. 5, the propTypes feature was published as a separate package, and the use of the propTypes feature embedded in React began throwing a warning to notify developers of the change. To make updating easy, Facebook released a codemod to automate the changes by updating imports to reference the separate propTypes packages.</p><p>The beauty is we can feel confident about writing React components today because of Facebook’s deep investment in the production of React code, which means they must rely on the codemods that they create to update their own code. Facebook has over 30, 000 components in production. This is a benefit of using React because it helps assure that significant breaking changes in the future are highly unlikely. Doing so would require Facebook to deal with painful breaking changes to tens of thousands of their own components, so this helps assure the long-term stability of the project.</p><h4>Reason 4: Community</h4><p>The 4th reason to consider React is it boasts a huge, active community. Since 2013, React’s popularity has steadily grown to over 75, 000 stars on GitHub today. This makes React one of the most popular repositories on GitHub. Today, it has over 1, 000 contributors. In fact, out of over 2 million repositories, only 3 repositories have more stars on GitHub than React. There are over 55, 000 threads on Stack Overflow that are tagged reactjs, and nearly 20, 000 tagged react-native, as well as a long list of related tags for other React-related technologies.</p><p>Now all this matters because it adds up to a simple fact: if you’re trying to do something in React, you can almost certainly find an example of it online. And hey, what developer doesn’t love a little copy and paste now and then? It’s pretty awesome being able to consistently get answers from other people who have run up against the same challenge that you’re trying to solve. And that’s because React is embraced by far more than just Facebook. Today, many of the world’s most respected companies use React, including Apple, Netflix, Amazon, Airbnb, PayPal, and many more that you see here. Many of these companies regularly open-source their React-related work as well. So if you choose to React, you’re certainly in great company. And you don’t need to create your own components since there’s a huge list of free and mature component libraries online. Microsoft open-sourced their React component library for making user interfaces that look and feel like Microsoft office. Material-UI offers a set of React components that implement Google’s material design guidelines. And React-Bootstrap is a popular library that contains React components that make it easy to work with Bootstrap.</p><p>Plus, there are literally hundreds of interesting standalone React components out there on GitHub that you might find useful. Check out the awesome React list on GitHub for a long list of additional components. Deep community investment has led to a wide variety of mature, related projects. Do you need routing? Well, check out the React Router. Do you want to handle complex data flows using a library? Well, Redux and Mobx are two popular options to consider today. Do you want to set up automated testing? Well, check out Jest, which is also from Facebook. Want an alternative to RESTful API calls where you can declare your API calls on the client? Try out GraphQL, which is a great fit for React apps. Want to quickly set up a server-side rendered site in React with node? Then try Next. js. Of course, this just scratches the surface of the ecosystem. This list could go on and on. So I guess you could say that React is kind of a big deal right now.</p><h4>Reason 5: Performance</h4><p>When React was first released, its performance was striking and helped set it apart from the competition. The React team recognized that JavaScript is fast, but it’s the DOM that makes it feel slow. They realized that updating the DOM is expensive, so they found that updating the DOM in the most efficient way would help enhance performance.</p><p>So behind the scenes when you change data, React intelligently figures out the most efficient way to update the DOM. When React was created years ago, this was a novel design that gave React a notable performance advantage in many cases. Before React, most libraries would unintelligently update the DOM to reflect the new state. This often led to redrawing a significant portion of the page even when only a minor change had occurred. In contract, React monitors the values of each component’s state. When a component’s state changes, react compares the existing DOM state to what the new DOM should look like. It then determines the least expensive way to update the DOM.</p><p>This sounds complicated, but it’s all handled automatically behind the scenes. And there are multiple benefits to this approach. It helps avoid layout thrashing, which is when a browser has to recalculate the position of everything when a DOM element changes. And being efficient is increasingly important in a world where many people are using mobile devices. Mobile devices vary widely in their CPU power, and conserving battery life is a concern as well. This also enables React’s simple programming model. When data changes, React efficiently updates the DOM automatically. And there’s nothing extra that you have to do to enjoy this performance benefit. When you update the state of a component, it happens automatically. The comparison happens in memory, so it’s typically very fast</p><p><em>I Hope these reasons provide some clarity of why react is so popular than other existing libraries and frameworks . I</em><a href="https://medium.com/@nsethi610/react-the-big-picture-part-ii-e9b2e1778753"><em>n the next module, we’ll discuss the trade-offs inherent in react’s design</em></a> so that you can understand what you’re getting and what you are giving up by choosing to react.</p><p>Thanks for reading. Do give appreciation by giving claps and Do not forget to give you feedback.</p><p>Article motivation and resource guide from <a href="https://medium.com/u/50a6c7ef7431">Pluralsight</a></p><p>Happy coding!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62c678dac7dc" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/react-the-big-picture-62c678dac7dc">React: The Big Picture</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TF-IDF for Similarity Scores]]></title>
            <link>https://medium.datadriveninvestor.com/tf-idf-for-similarity-scores-391c3c8788e8?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/391c3c8788e8</guid>
            <category><![CDATA[tf-idf]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[word-embeddings]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Fri, 04 Oct 2019 20:32:46 GMT</pubDate>
            <atom:updated>2022-05-02T21:29:13.662Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is TF-IDF ?</strong></p><p>TF-IDF means term frequency-inverse document frequency, is the numerical statistics method use to calculate the importance of a word to a document in a collection or corpus.</p><p>The traditional approaches used where importance of words used to be calculated by the frequency of the word in a document fails when it comes to the importance of an article(a, an, the) and importance of a word which is not being repeated more than once.The importance increases proportionally to the number of times a word appears in the document but is offset by the frequency of the word in the corpus (data-set).</p><p><strong>How to calculate the TF-IDF?</strong></p><h4>Term frequency</h4><p>Suppose we have a set of English text documents and wish to rank which document is most relevant to the query, “the brown cow”. A simple way to start out is by eliminating documents that do not contain all three words “the”, “brown”, and “cow”, but this still leaves many documents. To further distinguish them, we might count the number of times each term occurs in each document; the number of times a term occurs in a document is called its <em>term frequency</em>. However, in the case where the length of documents varies greatly, adjustments are often made (see definition below). The first form of term weighting can be summarized as:</p><blockquote><em>The weight of a term that occurs in a document is simply proportional to the term frequency.</em></blockquote><h4>Inverse document frequency</h4><p>Because the term “the” is so common, term frequency will tend to incorrectly emphasize documents which happen to use the word “the” more frequently, without giving enough weight to the more meaningful terms “brown” and “cow”. The term “the” is not a good keyword to distinguish relevant and non-relevant documents and terms, unlike the less-common words “brown” and “cow”. Hence an <em>inverse document frequency</em> factor is incorporated which diminishes the weight of terms that occur very frequently in the document set and increases the weight of terms that occur rarely.</p><p><a href="https://www.datadriveninvestor.com/2020/02/19/five-data-science-and-machine-learning-trends-that-will-define-job-prospects-in-2020/">Five Data Science and Machine Learning Trends That Will Define Job Prospects in 2020 | DataDrivenInvestor</a></p><p>So, Inverse Document Frequency (idf) can be summarised as:</p><blockquote><em>The specificity of a term can be quantified as an inverse function of the number of documents in which it occurs.</em></blockquote><h4>Example to support the above theoretical concept</h4><p>Let’s us take 3 documents to show how this works.</p><p><strong>Doc 1:</strong> Ben studies about computers in Computer Lab.<br><strong>Doc 2:</strong> Steve teaches at Brown University.<br><strong>Doc 3:</strong> Data Scientists work on large datasets.</p><p>Let’s say we are doing a search on these documents with the following query: <strong>Data Scientists</strong></p><p>The query is a free text query. It means a query in which the terms of the query are typed freeform into the search interface, without any connecting search operators.</p><h4>Step 1: Computing the Term Frequency(tf)</h4><p>Frequency indicates the number of occurences of a particular term <em>t </em>in document <em>d</em>. Therefore,</p><pre>tf(t, d) = N(t, d), wherein tf(t, d) = term frequency for a term <em>t</em> in document<em> d</em>.</pre><pre>N(t, d)  = number of times a term <em>t</em> occurs in document<em> d</em></pre><p>We can see that as a term appears more in the document it becomes more important, which is logical.We can use a vector to represent the document in bag of words model, since the ordering of terms is not important. There is an entry for each unique term in the document with the value being its term frequency.</p><p>Given below are the terms and their frequency on each of the document.</p><p>[N(t, d)]</p><p><strong>tf for document 1:</strong></p><p>BEN -&gt;1 , STUDIES -&gt; 1 , COMPUTER -&gt; 2 , LAB -&gt; 1</p><p>Vector Space Representation for Doc 1 : <strong>[1, 1, 2, 1]</strong></p><p><strong>tf for document 2:</strong></p><p>STEVE -&gt; 1, TEACHES -&gt; 1, BROWN -&gt; 1, UNIVERSITY -&gt; 1</p><p>Vector Space Representation for Doc 2 : <strong>[1, 1, 1, 1]</strong></p><p><strong>tf for document 3:</strong></p><p>DATA -&gt; 1, SCIENTISTS -&gt; 1 WORK -&gt; 1, LARGE -&gt; 1, DATASETS -&gt; 1</p><p>Vector Space Representation for Doc 3 : <strong>[1, 1, 1, 1, 1]</strong></p><p>Thus, the representation of documents as vectors in a common vector space is known as <em>Vector Space Model</em> and it’s very fundamental to information retrieval.</p><p>Since we are dealing with the term frequency which rely on the occurrence counts, thus, longer documents will be favored more. To avoid this, normalize the <strong><em>term frequency</em></strong></p><pre>tf(t, d) = N(t, d) / ||D||<br>wherein, ||D|| = Total number of term in the document</pre><p><strong>||D|| for each document:</strong></p><p>DOCUMENTS||D||172536</p><p>Given below are the normalized term frequency for all the documents, i.e. <strong>[N(t, d) / ||D||]</strong></p><p><strong>Normalized TF for Document 1:</strong></p><p>BEN -&gt; 0.143, STUDIES -&gt; 0.143, COMPUTER -&gt; 0.2860, LAB -&gt; 0.143</p><p>Vector Space Representation for Document 1 : <strong>[0.143, 0.143, 0.286, 0.143]</strong></p><p><strong>Normalized tf for document 2:</strong></p><p>STEVE -&gt; 0.2, TEACHES -&gt; 0.2, BROWN -&gt; 0.2, UNIVERSITY -&gt; 0.2</p><p>Vector Space Representation for Document 2 : <strong>[0.2, 0.2, 0.2, 0.2]</strong></p><p><strong>Normalized tf for document 3:</strong></p><p>DATA -&gt; 0.167, SCIENTISTS -&gt;0.167, WORK -&gt; 0.167, LARGE -&gt; 0.167, DATASETS -&gt; 0.167</p><p>Vector Space Representation for Document 3 :<strong> [0.167, 0.167, 0.167, 0.167, 0.167]</strong></p><h4>Step 2: Compute the Inverse Document Frequency — idf</h4><p>It typically measures how important a term is. The main purpose of doing a search is to find out relevant documents matching the query. Since tf considers all terms equally important, thus, we can’t only use term frequencies to calculate the weight of a term in the document. However, it is known that certain terms, such as “is”, “of”, and “that”, may appear a lot of times but have little importance. Thus we need to weigh down the frequent terms while scaling up the rare ones. Logarithms helps us to solve this problem.</p><p>First of all, find the document frequency of a term t by counting the number of documents containing the term:</p><pre><strong>df(t) = N(t)</strong></pre><pre>where-<br>df(t) = Document frequency of a term t<br>N(t) = Number of documents containing the term t</pre><p>Term frequency is the occurrence count of a term in one particular document only; while document frequency is the number of different documents the term appears in, so it depends on the whole corpus. Now let’s look at the definition of inverse document frequency. The idf of a term is the number of documents in the corpus divided by the document frequency of a term.</p><pre>idf(t) = N/ df(t) = N/N(t)</pre><p>It’s expected that the more frequent term to be considered less important, but the factor (most probably integers) seems too harsh. Therefore, we take the logarithm (with base 2 ) of the inverse document frequencies. So, the idf of a term t becomes :</p><pre>idf(t) = log(N/ df(t))</pre><p>This is better, and since <em>log </em>is a monotonically increasing function we can safely use it. Let’s compute IDF for the term Computer:</p><pre>idf(computer) = log(Total Number Of Documents / Number Of Documents with term Computer in it)</pre><p>There are 3 documents in all = Document1, Document2, Document3</p><pre>The term Computer appears in Document1<br><br>idf(computer) = log(3 / 1)<br>          = 1.5849</pre><p>Given below is the <strong>idf </strong>for terms occurring in all the documents-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*6GVA1_aOl99Ybpo3X79kGw.png" /></figure><h4>Step 3: tf-idf Scoring</h4><p>Now we have defined both tf and idf and now we can combine these to produce the ultimate score of a term t in document d. Therefore,</p><pre>tf-idf(t, d) = tf(t, d)* idf(t, d)</pre><p>For each term in the query multiply its normalized term frequency with its IDF on each document. In Document3 for the term data, the normalized term frequency is 0.167 and its IDF is 1.5849. Multiplying them together we get 0.2646. Given below is TF * IDF calculations for data and Scientists in all the documents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*r-z7aAYrs10twKfbuJ0R_w.png" /></figure><p>We will use any of the similarity measures (eg, Cosine Similarity method) to find the similarity between the query and each document. For example, if we use <em>Cosine Similarity</em> Method to find the similarity, then smallest the angle, the more is the similarity.</p><h4>How to code it in Python?</h4><pre><strong>import</strong> math</pre><pre>d = list()</pre><pre>d.append(&#39;An apple a day keeps the doctor away&#39;.lower().split(&#39; &#39;))</pre><pre>d.append(&#39;Never compare an apple to an orange&#39;.lower().split(&#39; &#39;))</pre><pre>d.append(&#39;I prefer scikit-learn to orange&#39;.lower().split(&#39; &#39;))</pre><pre>compDoc = &quot;I&#39;d like an apple&quot;.split(&#39; &#39;)</pre><pre>terms = set()</pre><pre>tf = list()</pre><pre>temp = dict()</pre><pre><strong>for</strong> doc <strong>in</strong> d:</pre><pre><strong>    for</strong> item <strong>in</strong> doc:</pre><pre>         temp[item] = doc.count(item)/len(doc)</pre><pre>         terms.add(item)</pre><pre>    tf.append(temp)</pre><pre>    temp = dict()</pre><pre>idf = dict()</pre><pre>temp = dict()</pre><pre><strong>for</strong> term <strong>in</strong> terms:</pre><pre>    temp[term] = 0</pre><pre><strong>    for</strong> doc <strong>in</strong> d:</pre><pre><strong>        if</strong> term <strong>in</strong> doc:</pre><pre>           temp[term]+=1</pre><pre>    idf[term] = 1+math.log(3/temp[term])</pre><pre>tfidf = [0, 0, 0]</pre><pre><strong>for</strong> term <strong>in</strong> compDoc:</pre><pre><strong>    for</strong> i <strong>in</strong> range(len(d)):</pre><pre><strong>        if</strong> term <strong>in</strong> d[i]:</pre><pre>           tfidf[i]+= tf[i][term]*idf[term]</pre><pre><strong>print</strong>(tfidf.index(max(tfidf))+2)</pre><h3>References:</h3><p><a href="https://www.geeksforgeeks.org/tf-idf-model-for-page-ranking/">TFIDF-GeeksForGeeks</a></p><p><a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf">TFIDF-wikipidea</a></p><p>Thanks for reading. Do give appreciation by giving claps and Do not forget to give you feedbacks</p><p>You can also hire me for freelance work<br>Upwork <a href="https://www.upwork.com/freelancers/~014f750462368afb57">https://www.upwork.com/freelancers/~014f750462368afb57</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fb2a0d6%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fb2a0d6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href">https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=391c3c8788e8" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/tf-idf-for-similarity-scores-391c3c8788e8">TF-IDF for Similarity Scores</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI in E-Commerce]]></title>
            <link>https://medium.datadriveninvestor.com/ai-in-e-commerce-dfc5827e94c7?source=rss-fafa882cfa9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfc5827e94c7</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[3d-modeling]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Nishant Sethi]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 06:10:29 GMT</pubDate>
            <atom:updated>2020-09-23T02:15:08.540Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5iXwdrX795wCMSkomY26w.jpeg" /></figure><p><strong>Introduction:</strong></p><p>A big difference between human beings and computers is that humans have developed some fundamental understanding of the world. With this understanding, it is easier to transfer a complex structure through a brief explanation. Similarly, it is believed that artificial intelligence (AI) will enable computers to gain an understanding of the world which will make artistic work much easier.</p><p>Today, e-commerce has been incorporating AI into everything such as for enhancing the consumer experience, attracting users into accessing their platform and increasing conversion rates. Whether you talk about <strong>Personalized Recommendations,</strong> where Amazon’s “item-to-item collaborative filtering” algorithm is providing tailor-made content direct to the homepage which resulted in an increase in its sales or you talk about voice commands where Voice-activated assistants like Amazon’s Echo, Google Home, and the Apple HomePod, or on mobile devices with Cortana and Siri, AI is ruling the world. Today, companies like Alibaba, Rakuten, eBay etc. are using Al for fake reviews detection, chatbots, product recommendations, managing big data, etc.</p><p><strong>Gartner predicts that 85% of interactions between customers and retailers will happen “without interacting with a human” </strong><a href="https://www.gartner.com/imagesrv/summits/docs/na/customer-360/C360_2011_brochure_FINAL.pdf"><strong>by 2020</strong></a>.</p><p>While delivering a convenient browsing experience and wider assortment, e-commerce still had limitations. It could not overcome consumers’ desire to study the product from all possible angles prior to purchase, nor could it convincingly replicate the in-store experience. To overcome this limitation, 3D modeling is being a major contributor with which retailer can provide customers with a graphical 3D product representation. With this, a customer can choose what part of the object they’d like to see, whether they want to zoom in or out the object or they want to rotate the object. All these features are accessible today with 3D modeling.</p><p><a href="https://www.datadriveninvestor.com/2020/03/04/on-artificial-intelligence-and-surveillance-capitalism/">On Artificial Intelligence and Surveillance Capitalism | Data Driven Investor</a></p><p>The following content/article will look into feature extraction from 2D images and reconstruction of 3D objects, using machine learning. This article also explains the traditional approach for this and the need for shifting from a traditional approach to Modern technologies.</p><p>In 3D modeling, we develop a mathematical representation of any surface of an object (either inanimate or living) in three dimensions via specialized software like AutoCAD,3ds max etc. The product is called a 3D model. And Texturing or more formally Texture mapping is a method for defining high-frequency detail, surface texture, or color information on a computer-generated graphic or 3D model. Texture mapping originally referred to a method (now more accurately called diffuse mapping) that simply wrapped and mapped pixels from a texture to a 3D surface.</p><p>Traditionally, it was done with the help of various modeling tools such as AutoCAD, 3ds max etc. It mostly focuses on detecting, grouping, and extracting features (edges, faces, etc.) present in a given picture and then trying to interpret them as three-dimensional clues. Although these traditional approaches are very successful in creating an accurate 3d product, it comes out to be a very tedious and manual task and 3D modelers really have to be very good with strong observational tools.</p><p>A lot of researches have been done on this field and it turns out that the solution can be achieved using the power of Machine Learning and Neural Networks.</p><p>Both <a href="https://arxiv.org/abs/1610.07584">Wu</a> and <a href="https://arxiv.org/abs/1704.00710">Häne’s</a> papers show that it is possible to generate a 3D object, using one input image and convolutional neural networks. This will be considered simple enough for the third consumer friendly requirement. What needs to be tested is the limitation of the output resolution and the generation time, which is not specified in any of the papers referenced above.</p><p>The approach is to use an iterative empirical development method. The generative model is first split into two different neural networks. One is used to extract features from an input image, the other will use the output from the first NN to create a 3D object. These networks will be trained and optimized individually using an exploratory, iterative, empirical approach. Meaning that small changes are made to hyper-parameters / dataset and the neural network (NN) is retrained, to see if the NN is improving further.</p><p><strong>Conclusion</strong></p><p>To conclude, Integrating AI into your business can feel daunting, but there are a number of programs that can provide with as little or as much as you’d like. Plus, it’s probably more in use than you even realize. And, Today companies are incorporating this challenge with both hands and investing in AI development to develop more and more 3D assets. E-commerce can not achieve an impressive market size without technology and with technology getting more matured and advanced, one can expect the e-Commerce industry to reach at incomparable levels of growth in the time ahead.</p><p>Thanks for sparing your time!! :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fb2a0d6%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fb2a0d6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href">https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfc5827e94c7" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/ai-in-e-commerce-dfc5827e94c7">AI in E-Commerce</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>