<?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 PrepNew on Medium]]></title>
        <description><![CDATA[Stories by PrepNew on Medium]]></description>
        <link>https://medium.com/@prepnew?source=rss-3b1e704a4ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*sGH5maYN0DCKaVH_NyeTPQ.png</url>
            <title>Stories by PrepNew on Medium</title>
            <link>https://medium.com/@prepnew?source=rss-3b1e704a4ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:15:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prepnew/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[# Aware: Mindful Breathing App]]></title>
            <link>https://medium.com/@prepnew/aware-mindful-breathing-app-4fb3c377fde6?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fb3c377fde6</guid>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[meditation]]></category>
            <category><![CDATA[breathing-exercise]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Mon, 19 Oct 2020 18:34:04 GMT</pubDate>
            <atom:updated>2020-10-19T18:40:39.678Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Aware: Mindful Breathing App Developed using Flutter within 24 hours</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pbdDdE1XVyIPfYDnMleIA.png" /></figure><p>Breathing plays a very important role in our life. Not only it keeps you alive but control and depth of breathing define your personality also. Like if you are a deep breather it helps you to get rid of anxiety and depression.</p><p>Few breaths before facing an interview or public speaking make you calm and make your voice much clear.</p><p>I have gone through many apps but none of them was not what I was looking for. Most of those were hiding the main feature behind the paywall which was not affordable.</p><p>Being a developer, Instead of paying for features, I decided to develop an app on weekend and successfully launched it on Google Play.</p><p>I want you all to download it and review it.</p><p><a href="https://play.google.com/store/apps/details?id=com.mogaero.aware">https://play.google.com/store/apps/details?id=com.mogaero.aware</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fb3c377fde6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If I get time to read only one book in 2020, I will go with this awesome one.]]></title>
            <link>https://medium.com/@prepnew/if-i-get-time-to-read-only-one-book-in-2020-i-will-go-with-this-awesome-one-a0efb3eec47e?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0efb3eec47e</guid>
            <category><![CDATA[mba]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[2020]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 18:23:09 GMT</pubDate>
            <atom:updated>2020-01-30T18:23:09.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><a href="https://amzn.to/2OfLDHY"><img alt="" src="https://cdn-images-1.medium.com/max/331/1*EhDDQGze4Zmf6NqY73vMOw.jpeg" /></a><figcaption>The visual MBA</figcaption></figure><p>Jason Barron spent 516 hours in class, completed mountains of homework and shelled out tens of thousands of dollars to complete his MBA at the BYU Marriott School of Business. Along the way, rather than taking boring notes that he would never read (nor use) again, Jason created sketch notes for each class — visually capturing the essential points of his education — and providing an engaging and invaluable resource.<br> <br>Once finished with his MBA, Jason launched a widely successful Kickstarter campaign distilling these same notes into a self-published book to help aspiring business leaders of all backgrounds and income levels understand the critical concepts one learns in business school.<br> <br>Whether you are thinking about applying to business school, are currently in college studying business, or have always wondered what is taught in an MBA program, this highly entertaining and visual book is for you.</p><h3><strong>Buy from Amazon</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0efb3eec47e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This 5 lines Python script will convert a Non-English XML file to a JSON file with Perfection]]></title>
            <link>https://medium.com/@prepnew/this-5-lines-python-script-will-convert-a-non-english-xml-file-to-a-json-file-with-perfection-5ee8f327b8c7?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ee8f327b8c7</guid>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Wed, 11 Dec 2019 12:13:47 GMT</pubDate>
            <atom:updated>2019-12-11T12:21:23.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="This 5 lines Python script will convert a Non-English XML file to a JSON file with Perfection" src="https://cdn-images-1.medium.com/max/690/1*jsgLaIkhgF7SzQS1FWIPug.jpeg" /></figure><p>Whatever I write It comes from my own experience. Last week I was working on one of mine pet project which was initially developed in Native Android using Java 4 years ago. So now I just wanted to rewrite it using Flutter to make it available on Android and iOS from the same codebase. One thing that was challenging for me was to handle XML files which were responsible for two major functionalities.</p><p>If you have no idea about android and want to know more then you may read this very next paragraph. In case you just want to convert XML into JSON you can skip it.</p><p>Let me explain a little bit more. Suppose you have written 100 pages of content in English or whatever language you were proficient, now you want to develop an android application which can display this content as an E-book like pattern and You are also sure that content will change so you may just want to put it inside Android app and any user can read it offline. So you put your whole content in the Android project inside a folder res(which stands for resources) in a file string-array file.</p><p>This file looks like this</p><pre>&lt;?xml<em> version</em>=&quot;1.0&quot;<em> encoding</em>=&quot;utf-8&quot;?&gt;</pre><pre>&lt;resources&gt;</pre><pre>&lt;string-array <em>name</em>=&quot;sloka&quot;&gt;</pre><pre>&lt;item&gt;ओ३म् भूर्भुवः स्वः तत्सवितुर्वरेण्यं भर्गो देवस्य धीमहि धियो यो नः प्रचोदयात्।&lt;/item&gt;     &lt;item&gt;ओ३म् भूर्भुवः स्वः तत्सवितुर्वरेण्यं भर्गो देवस्य धीमहि धियो यो नः प्रचोदयात्।&lt;/item&gt;</pre><pre>&lt;/string-array&gt;</pre><pre>&lt;/resources&gt;</pre><p>This is a valid XML that contains only two slokas (Holy lines from Hindu scriptures). It contained more than 300 slokas. Rest is removed for the sake of brevity.</p><p>In native android, every configuration, layout, and content is stored in XML files and android read and render it beautifully . As I was not willing to parse these XML files using an XML parser in Flutter so I decided to convert them into JSON files.</p><p>So I opt for Python to do the conversion. I set up Python using the Anaconda tool and my project structure was like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Do-hgzZkGBDeJPFRyOaX2g.png" /></figure><p>I will first explain the problem that I was facing using code snippets. Then I will show you the code which solved that problem.</p><p>This is index.py which is the main script file that is going to do the conversion. In simple words, It is just reading a file bl_content.xml and converting it JSON file.</p><p><strong>index.py</strong></p><pre>import xmltodict</pre><pre>import json</pre><pre>with <strong>open</strong>(&#39;bl_content.xml&#39;,mode=&#39;r&#39;) as in_file:</pre><pre>xml = in_file.read()</pre><pre>with <strong>open</strong>(&#39;shabd_content.json&#39;,mode=&#39;w&#39;) as out_file:</pre><pre>json.dump(xmltodict.parse(xml,process_namespaces=True), out_file)</pre><p><strong>Output</strong></p><pre>{&quot;string-array&quot;: {&quot;item&quot;: [&quot;\u0930\u093e\u091c\u0938\u094d\u0925\u093e\u0928 \u092e\u0947\u0902 \u092e\u0930\u0942\u092d\u0942\u092e\u093f \u0915\u093e \u0928\u093e\u0917\u094c\u0930, \u0928\u093e\u0917\u094c\u0930\u0940 \u092c\u0948\u0932\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f</pre><p><strong>It was not the output that I was not expecting. It was converting all non- English characters to their respective Unicode I had to avoid this somehow.</strong></p><p>If you are experimenting with new programming language then it becomes tough to figure out what is going wrong. So I googled and went through many solutions but nothing worked. So I started debugging step by step</p><p><strong>Step 1</strong></p><p>I had to figure out whether the <strong>encoding problem</strong> was occurring due to <strong>File Read Operation</strong> or <strong>File Write operation.</strong></p><p>To understand this I just consoled the data read from the XML file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mPhwZgXSsYcSD9tq_-QNPA.png" /></figure><blockquote><strong>As you can see data is in the same format(It is not in Unicode format) even after reading from an XML file. That made one thing clear there is no problem in XML reading method (xmltodict.parse). So it also made clear that something was missing in json.dump method.</strong></blockquote><p>so I decided to go through json.dump method documentation and find that I needed to pass <strong>ensure_ascii=False </strong>which is <strong>True </strong>by default.</p><p><strong>Final Script</strong></p><pre>import xmltodict</pre><pre>import json</pre><pre>with <strong>open</strong>(&#39;bl_content.xml&#39;,mode=&#39;r&#39;) as in_file:</pre><pre>xml = in_file.read()</pre><pre>with <strong>open</strong>(&#39;shabd_content.json&#39;,mode=&#39;w&#39;) as out_file:</pre><pre>json.dump(xmltodict.parse(xml,process_namespaces=True), out_file,<strong><em>ensure_ascii=False</em></strong>)</pre><p>Look at <strong><em>ensure_ascii=False</em></strong><em> in the very last line of code</em><strong><em>. </em></strong><em>Which did magic for me.</em></p><p><strong>Final output</strong></p><pre>{<br> &quot;item&quot;: [&quot;ओ३म् भूर्भुवः स्वः तत्सवितुर्वरेण्यं भर्गो देवस्य धीमहि धियो यो नः प्रचोदयात्।&quot;, &quot;ओ३म् भूर्भुवः स्वः तत्सवितुर्वरेण्यं भर्गो देवस्य धीमहि धियो यो नः प्रचोदयात्।&quot;]<br>}</pre><p>This is a valid JSON and can be directly put into the Flutter assets folder and can be parsed easily and rendered in a listview. If you are not concerned about that You have just learned how to avoid Unicode Horror.</p><p>I hope You have enjoyed it.</p><p>Thank you for your time and thank you in advance for the clapping.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ee8f327b8c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting list of printers attached to system using Electron.JS]]></title>
            <link>https://medium.com/@prepnew/getting-list-of-printers-attached-to-system-using-electron-js-528e59c860?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/528e59c860</guid>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Mon, 18 Nov 2019 14:44:15 GMT</pubDate>
            <atom:updated>2019-11-18T14:44:15.716Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I am to share code snippet that I used to get the list of the printers attached to my system using Electron JS. Recently I was working on a project where I have to store the default selection for printer. If I do show then during printing anything it will ask me again and again to select printer So main motive was to make the process easy.</p><p>In Electron.JS to get the printer list looks tough but it is very easy when go for implementation. Checkout the code snippet here.</p><pre>handlePrint() {<br>        const { remote } = require(&#39;electron&#39;);<br>        const { BrowserWindow, dialog, shell } = remote;<br>        let printWindow = new BrowserWindow({ &#39;auto-hide-menu-bar&#39;: true,show:false });<br>        printWindow.loadURL(&quot;www.google.com&quot;);<br>        let list = printWindow.webContents.getPrinters();<br>        console.log(&quot;All printer available are &quot;,list);<br>    }</pre><p>this method can be used anywhere you want whether you are using vanilla Javascript or React.Js. You can use var instead of let if you are not using ECMAScript.</p><p>I was using it with React.js.</p><p>So whole code snippet looked like this.I used Json Storage npm module to store my select choice for printer.</p><p><a href="https://gist.github.com/CodeNextGen/aedb3dc766c57365e64cc2013ad77082">https://gist.github.com/CodeNextGen/aedb3dc766c57365e64cc2013ad77082</a></p><p>I am using React.js here with Electron but concept will remain same with all frameworks.</p><p>I hope this will help you to get more out of Electron.js Framework.Thanks for being here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=528e59c860" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to keep only single instance of Electron App ?]]></title>
            <link>https://medium.com/@prepnew/how-to-keep-only-single-instance-of-electron-app-d02df2360414?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/d02df2360414</guid>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Mon, 18 Nov 2019 14:42:30 GMT</pubDate>
            <atom:updated>2019-11-18T14:44:58.672Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to keep only single instance of Electron App ?</h3><p>When I was recently working on Electron.JS project then I come across a strange problem. Actually to requirement there must be only one instance of the app. If someone try to click again on the launcher icon again on system then It must not run two instances of app rather it must refocus the window in currently running app instance.</p><p>So solve this problem I am going to share my code snippet which may be useful for you as well.</p><pre>var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {<br>  // Someone tried to run a second instance, we should focus our window.<br>  if (mainWindow) { <br>    if (mainWindow.isMinimized()) mainWindow.restore();<br>    mainWindow.focus();<br>  }<br>});<br><br>if (shouldQuit) {<br>  app.quit();<br>}</pre><p>This is the code which is doing the trick. It is checking if any instance is available then refocus it otherwise just create a new instance and run it.</p><p>You may my full file where I implemented in the project.</p><p><a href="https://gist.github.com/CodeNextGen/af99bc7aaf71ff8dd795b7ff5e6804cf">https://gist.github.com/CodeNextGen/af99bc7aaf71ff8dd795b7ff5e6804cf</a></p><p>I hope you are going to like this.Thanks for being here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d02df2360414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Display Youtube Video thumbnail on Android/iOS/Web/Flutter/React Native in easy way]]></title>
            <link>https://medium.com/@prepnew/display-youtube-video-thumbnail-on-android-ios-web-flutter-react-native-in-easy-way-6d37619d15a5?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d37619d15a5</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[youtube]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Sun, 17 Nov 2019 09:07:18 GMT</pubDate>
            <atom:updated>2019-11-17T09:07:18.844Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*gQz1XR9VjyQ75aeC.png" /></figure><p>Recently I have implemented Youtube api in android application. One thing that google do is it provided a jar file with the help of which you can display youtube thumbnail.</p><p>But I find this method little bit more memory consuming plus in recyclerview you have to detach all references to avoid memory leakage during scrolling.</p><p>After scrolling many times it was not as smooth as must be. The main culprit was the code which download video thumbnail and display it.</p><p>One things that need to fetch a video thumbnail is video id which is last part of any Youtube link video. For example</p><p><a href="https://www.youtube.com/watch?v=x96iLmXqRYk"><strong>https://www.youtube.com/watch?v=x96iLmXqRYk</strong></a></p><p><strong>The part after v= is </strong><a href="https://www.youtube.com/watch?v=x96iLmXqRYk"><strong>x96iLmXqRYk</strong></a><strong> which is called video id.</strong></p><p>After this One this that we need is a magic link which fetch the thumbnail</p><pre><a href="http://img.youtube.com/vi/%22+videoID+%22/0.jpg">http://img.youtube.com/vi/&quot;+videoID+&quot;/0.jpg</a></pre><p>lets replace it with our example video id</p><pre><a href="http://img.youtube.com/vi/x96iLmXqRYk/0.jpg">http://img.youtube.com/vi/<strong>x96iLmXqRYk</strong></a><a href="http://img.youtube.com/vi/x96iLmXqRYk/0.jpg">/0.jpg</a></pre><p>To test it just click on above link to see the magic.</p><p>One more important thing we can replace <a href="http://img.youtube.com/vi/x96iLmXqRYk/0.jpg">0.jpg</a></p><p>with 1.jpg and so on if video contains more than one thumbnail but in most of the cases we need only primary thumbnail.</p><p>So this is a link and it can be used everywhere. In mobile apps (Native as well hybrid) and Web only thing that you need it video id.</p><p>So I decided to create UI for video view which was used inside a RecylerView like this</p><p><a href="https://gist.github.com/CodeNextGen/8ff3315713f87b13df1f825144bcfa6f">https://gist.github.com/CodeNextGen/8ff3315713f87b13df1f825144bcfa6f</a></p><p>Every youtube video has video id on basics of which thumbnail is fetched. So change I made in Java code was like this.</p><pre>try {<br>            String title = mCollections.get(position).title;<br>            String description = mCollections.get(position).post_content;<br>            String videoID = mCollections.get(position).link;<br>            collectionViewHolder.title.setText(Html.fromHtml(title));<br>            String imageUrl=&quot;<a href="http://img.youtube.com/vi/%22+videoID+%22/0.jpg">http://img.youtube.com/vi/&quot;+videoID+&quot;/0.jpg</a>&quot;;<br>            //Log.e(&quot;image url&quot;,imageUrl);<br>            Picasso.with(ctx).load(imageUrl).placeholder(R.drawable.loader).error(R.drawable.jambhgurutrans).into(collectionViewHolder.youtubeThumbnail);<br><br>        } catch (Exception e) {<br>            Picasso.with(ctx).load(&quot;<a href="http://www.bishnoinextgen.in/wordpress/wp-content/uploads/2017/01/jambhguru.png">http://www.bishnoinextgen.in/wordpress/wp-content/uploads/2017/01/jambhguru.png</a>&quot;).into(collectionViewHolder.youtubeThumbnail);<br>        }</pre><p>I am using Picaso library for image loading from network you can use whatever you like.</p><p>If you want to code in conventional way which was not working good for me you can follow on link given below</p><p><a href="http://www.androhub.com/how-to-show-youtube-video-thumbnail-play-youtube-video-in-android-app/">http://www.androhub.com/how-to-show-youtube-video-thumbnail-play-youtube-video-in-android-app/</a></p><p>Download and run this app. On very first page , list with multiple type of item using recycler view is implemented<br> with youtube video, audio, images and many more view types.</p><p><a href="https://play.google.com/store/apps/details?id=stayrocks.jambh.vani">https://play.google.com/store/apps/details?id=stayrocks.jambh.vani</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d37619d15a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Listening to changes in Directory using Node.js]]></title>
            <link>https://medium.com/@prepnew/listening-to-changes-in-directory-using-node-js-fe28d2bc427f?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe28d2bc427f</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Sun, 17 Nov 2019 08:48:02 GMT</pubDate>
            <atom:updated>2019-11-17T08:48:02.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*TbC7phoTo5VnpZu9.png" /></figure><p>In this topic we are going listen changes in directory using node.js.</p><p><strong>What are applications of it in real life ?</strong></p><ul><li>Many time you want to refresh user interface to list changed folders when you are creating something like <strong><em>file manager.</em></strong></li><li>If you implement it on server to check if something changed, like you can <strong><em>enhance security of website</em></strong> by watching a folder of change.If any change is made in particular server directory then this code will send you email that somebody has inserted script or made changes in existing files.is not it amazing?</li></ul><p><strong>What is needed to implement this functionality</strong> ?</p><p>In my implementation I used it with react.js, redux in an electron.js project. What I did here is that whenever a change is made in particular path it will dispatch a redux event which can be listened by other components registered to listen.</p><pre>import React, { Component } from &#39;react&#39;<br>import { connect } from &#39;react-redux&#39;<br>import { FileChange } from &#39;../actions/filechange&#39;<br>const storage = require(&#39;electron-json-storage&#39;);<br>const ipcRenderer = require(&#39;electron&#39;).ipcRenderer;<br>const remote = require(&#39;electron&#39;).remote;<br>const BrowserWindow = remote.BrowserWindow;<br><br>class Header extends Component {<br>  constructor(props) {<br>    super(props);<br>    this.state = {<br>      open: false,<br>    };<br>    <br>  }<br>  <br>  componentDidMount() {<br><br>    storage.get(&#39;watch_folder&#39;, (error, data) =&gt; {<br>      if (data)<br>        this.StartWatcher(data.path, this.props);<br>    });<br>  <br>  }<br><br>  <br><br>  StartWatcher = (path, props) =&gt; {<br>    var chokidar = require(&quot;chokidar&quot;);<br>    var watcher = chokidar.watch(path, {<br>      ignored: /[\/\\]\./,<br>      persistent: true,<br>      ignoreInitial: true<br>    });<br>    function fileHasChanged() {<br>      props.fileChange();<br>    }<br><br>    function onWatcherReady() {<br>      console.info(&#39;From here can you check for real changes, the initial scan has been completed.&#39;);<br>    }<br>    // Declare the listeners of the watcher<br>    watcher<br>      .on(&#39;add&#39;, fileHasChanged)<br>      .on(&#39;addDir&#39;, function (path) {<br>        console.log(&#39;Directory&#39;, path, &#39;has been added&#39;);<br>      })<br>      .on(&#39;change&#39;, function (path) {<br>        console.log(&#39;File&#39;, path, &#39;has been changed&#39;);<br>      })<br>      .on(&#39;unlink&#39;, fileHasChanged)<br>      .on(&#39;unlinkDir&#39;, function (path) {<br>        console.log(&#39;Directory&#39;, path, &#39;has been removed&#39;);<br>      })<br>      .on(&#39;error&#39;, function (error) {<br>        console.log(&#39;Error happened&#39;, error);<br>      })<br>      .on(&#39;ready&#39;, onWatcherReady)<br><br>  }<br><br>  render() {<br>    return &quot;You Ui part&quot;<br> } } <br>const mapDispatchToProps = dispatch =&gt; { return { fileChange: () =&gt; FileChange(dispatch) } } <br>export default connect(null, mapDispatchToProps)(Header)</pre><p>Chokidar module provides listener for everything like adding ,deleting of folders and well as files. Here you can see StartWatcher method which contain</p><pre>watcher .on(&#39;add&#39;, fileHasChanged)</pre><p>it means whenever a new file is added it will call fileHasChanged method and fileHasChanged will despatch a redux event to update different ui components.</p><p>Hope you will like this and I am pretty sure you may implement may good things using this wonderful npm module.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe28d2bc427f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating wordpress Rest Api without Using Any Plugin]]></title>
            <link>https://medium.com/@prepnew/creating-wordpress-rest-api-without-using-any-plugin-118db4d21860?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/118db4d21860</guid>
            <category><![CDATA[wordpress-plugins]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Sun, 17 Nov 2019 08:39:46 GMT</pubDate>
            <atom:updated>2019-11-17T08:39:46.667Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ZIlluokyXPhgH1sC.png" /></figure><p>Today we are going to create REST API without using any plug-in on Wordpress.<br> One thing interesting about Wordpress is that it is easy to use and you can create any good looking website in with 1 hr.<br> But If you want to create mobile application for same website then you have to install official WP-REST-API plugin or any third party plugin. It looks easy in starting but if you want to scale then it becomes very tough to learn internals of plugin how it really works which is very hard thing to do.</p><p>I have used wordpress for my most the websites and mobile apps as backend. The best thing about wordpress is that you have to ready made admin panel So need to inventing the wheel again. Just go with and create you mobile app with hours.</p><p>One thing you have to note down is that If you want to add custom with post or categories then you can use ACF (Advanced Custom Field Plugin) for this purpose it is very easy and mature enough plus you will find enough tutorials about it on google and youtube.</p><p>So let us start creating Wordpress REST API without using any plugin.</p><p>First for create an Api.php file in folder or beside the wp-content,wp-admin folders. I have created this inside a folder name ‘api’</p><p>The file which controls the whole wordpress is wordpress loader file named <strong>wp-load.php</strong> .If you get access to it you can make any kind of changes in it.<br> So we are going to use the same.</p><p>So inside ‘api’ folder I am going to create api.php file and whole code is like this</p><p><a href="https://gist.github.com/CodeNextGen/21877629f7c4b326d6791f12660950c1">https://gist.github.com/CodeNextGen/21877629f7c4b326d6791f12660950c1</a></p><p>Usage example</p><p><a href="http://www.codenextgen.com/bishnoinextgen/api/api.php?method=getAllCategories">http://www.codenextgen.com/bishnoinextgen/api/api.php?method=getAllCategories</a></p><p>You will find many method implemented inside the api.php file like for recent post you have RecentPosts method, To call this</p><p><a href="http://www.codenextgen.com/bishnoinextgen/api/api.php?method=RecentPosts">http://www.codenextgen.com/bishnoinextgen/api/api.php?method=RecentPosts</a></p><p>Things to remember</p><p>1) You to put this script file on right place,I have created api folder and then placed it inside. and give reference to wp-load.php (see very first line)</p><p>2) If you are not getting any error in response like white screen try to install ACF plugin mentioned above.</p><p>I hope this is going to very helpful for you people.</p><p>In case of any queries,comment below. Thanks for being here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=118db4d21860" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Youtube Redesign Using Flutter]]></title>
            <link>https://medium.com/shipkaro/youtube-redesign-using-flutter-21a4a431aee1?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/21a4a431aee1</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[case-study-solutions]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Sun, 02 Jun 2019 09:56:51 GMT</pubDate>
            <atom:updated>2021-01-19T16:18:48.808Z</atom:updated>
            <content:encoded><![CDATA[<h3>YouTube Re-Design Using Flutter</h3><p>It was an interview task job to improve the Youtube user experience and design using new stunning hybrid application platform Flutter (By Google in Dart Programming language)</p><p>I have been working as a Flutter Developer for 1 year. Before that, I worked on React Native. When I compare these two platform Flutter outperform React Native in a maximum of cases. Last month Google added support for Flutter web and Flutter Desktop so this is going to rule the development world in the very near future.</p><p>So let&#39;s get started</p><h3>Home Page</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDOJSjws7fwhYfeNBl8h5w.png" /></figure><p>The first change that I felt that must be is a <strong>Search Button </strong>at the bottom because most of the operations on the phone are performed using thumbs and everything that is important must be on the radar of your thumbs. Search plays a very important role and when we are in a situation holding our phone using one hand(e.g standing in Bus, shopping mall) and then search should be performed using the thumb and phone size are increasing day by day (Many phones look like tablet nowadays) so it becomes tough to click on search button giving in-app bar every time. So I keep both but add it to the bottom as well with a beautiful curvy bottom tab design.</p><h3>Search Page</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lN1b9WD4tMM485-Xwe2zSQ.png" /></figure><p>When you click on the search icon then you will have a search screen that is<strong> filled with a video list based upon your search history</strong>. If we keep this screen empty then it is not a positive impact on the user. Even in e-commerce applications, we can utilize this idea to never show a customer an empty Cart page, We can show recent good deals to encourage them to purchase something to improve sales.</p><p>The second thing, the <strong>search bar is made auto-focused to make the keyboard open</strong> by default to make things easy for the user. as shown in the screenshot below</p><h3>Video Detail Screen</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G4oqn-z5m03_1xZK6kNeYA.png" /></figure><p>On the media player, I feel the need for having a loop button, many times we feel obsessed with particular music and we want to watch it again and again.</p><p>The second thing is after the video description there comes a list of video recommendations after there is a comment session. Even as a video watcher /creator, to see the comments /reply I have to scroll too much to comment. So I put the description and comment section on the same level to make things easily accessible.</p><h3>Account Page</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CAemCeL0Q-rCFInfEXfEQ.png" /></figure><p>I feel the design of this screen could be made better but from a user experience point of view what I want to show here is that when you watch youtube videos it consumes internet data and time. You get information for free that is a good thing but this can be improved by adding the <strong>concept of Gamification </strong>when we watch videos we watch ads as well. For ads Publisher get money, youtube get their share but a watcher we got nothing even after out watch time is 5 years. Youtube must reward us that we are returning users we are using your product (instead of Twitch) then it must give some monetary rewards to the watcher as well or any kind of appreciation as they wish.</p><p><strong>Second is</strong>, Users must be able to set default categories of their interest for trending and other recommendations.</p><p><strong>The third is</strong>, User must be provided step by step guide to make money from youtube easily accessible. If there will be a link it is more chances that the user will go for it. Like if you are a singer How can youtube help you to be recognized, all kind of stuff like this.</p><p><strong>The last one is </strong>even if I have subscribed with notification for a particular channel, But if I am on holidays and I don’t want to get distracted by any notification then there must be <strong>don’t disturb mode</strong> from youtube only. Like <strong>Bright side</strong> is a very informative channel I like it but it uploads more than 3 videos per day, nearly 10–15 min. of each so when you don’t have enough time, it irritates.</p><h4>But what if <strong>you are a Flutter developer and You don’t have any interest in redesigning Youtube then You are only concerned about source code then I am happy to say I have open-sourced it on Github.</strong> Don’t forget to give it a Star on Github and Also do some clapping if you just liked the topic.</h4><p><a href="https://github.com/CodeNextGen/youtube_redesign">CodeNextGen/youtube_redesign</a></p><p>Thanks a lot for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21a4a431aee1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shipkaro/youtube-redesign-using-flutter-21a4a431aee1">Youtube Redesign Using Flutter</a> was originally published in <a href="https://medium.com/shipkaro">shipkaro — my journey to $10k</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why did I ditch Wordpress for my Blog as a Programmer]]></title>
            <link>https://medium.com/@prepnew/why-did-i-ditch-wordpress-for-my-blog-as-a-programmer-bd47f51a698e?source=rss-3b1e704a4ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd47f51a698e</guid>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[codenext]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[PrepNew]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 02:12:30 GMT</pubDate>
            <atom:updated>2019-01-15T02:15:07.392Z</atom:updated>
            <content:encoded><![CDATA[<p>It was a great transition and I hope this will help me to build better products in near future. <a href="http://www.codenextgen.com/"><strong>CodeNextGen</strong> </a>is the website I am talking about.</p><h4>No Wordpress then What ?</h4><p>I decided to go with static website generator named Gatsby there are many but Gatsby is completly based upon React JS. I have been React.JS and React Native Developer so it was for me to get started. If you are familiar with Golang then you with Hugo and there are many more you may select according to your skills performance of all of them are nearly same after all the convert you content to static website.</p><h4>Why Static Website Generator ?</h4><ul><li>As these tools create static html website from your content so you get amazing speed and it matters a lot to retain users.</li><li>Security is very important and as a blogger you can’t waste your valuable time by applying plugin on wordpress website to make it harder and harder to secure it and you have to install a new version of wordpress every week to stay safe.</li><li>In static website generator all content I create is in Markdown file and most of the time programmer are habitual of writing Markdown files (.Readme file on github repositories) so it is easy for me write content.</li><li>I write my blog then push it on git which is configure on my server (<a href="https://m.do.co/c/cde511b716c8"><strong>Digital Ocean</strong></a>)and then my website get updated automatically (I will write post in future about this one don’t worry about it for time being)</li></ul><h4>Why not Static Website Generator ?</h4><ul><li>If your website contains ecommerce and tough functionalities which are tough to implement in static website genreator then you must not switch to Static website generators.</li><li>If you are not good at Markdown and not familiar with Git and not willing to learn these then you must not switch to Static website generators.</li><li>To develop a website and post a blog you need a bit of programming knowledge so if you are not good at it and have no near future plan to learn it then you must not switch to static website genertors.</li></ul><p>Views expressed above are from my personal experience you may like the idea of static website generators or not.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd47f51a698e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>