<?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 Sneha Thakare on Medium]]></title>
        <description><![CDATA[Stories by Sneha Thakare on Medium]]></description>
        <link>https://medium.com/@snhthakare?source=rss-e416f0f3ae38------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*crEAVbtT6QXF3qExbHHBKQ.jpeg</url>
            <title>Stories by Sneha Thakare on Medium</title>
            <link>https://medium.com/@snhthakare?source=rss-e416f0f3ae38------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 09:39:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@snhthakare/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[How can you mitigate carbon footprint as a developer?]]></title>
            <link>https://snhthakare.medium.com/how-can-you-mitigate-carbon-footprint-as-a-developer-14b35e41e97a?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/14b35e41e97a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[website]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Fri, 02 Dec 2022 19:00:52 GMT</pubDate>
            <atom:updated>2022-12-02T19:00:52.390Z</atom:updated>
            <content:encoded><![CDATA[<h3>How can you mitigate carbon footprint as a developer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*jswVjyDE3Epbem8DdZ-n6w.jpeg" /></figure><p>Every action we take online has an environmental impact, it takes significant energy to run applications and transmit data.</p><p>A piece of code might run billion times in its life cycle, and the effects will be felt as long the code exists. Even if an application is made just slightly more energy efficient, the savings can be amplified many times.</p><p>We as software engineers can make small changes to make a big difference in a lot of ways which will not only help in mitigating carbon footprint but also result in shorter load time and electrical energy savings</p><p>Every day businesses and customers are welcoming and opting to go green and to keep up with the requirement I have some actionable steps that we can follow to contribute to the greener picture</p><h3>Emails</h3><p>Millions of emails are sent and received on a daily basis, all of which produce CO2. Imagine the amount of savings a small change in the way we use emails are lead to.</p><ul><li>Deleting unwanted, old emails and declutter your mailbox regularly</li><li>Eventually ensure any junk does not get stored in your email folders. Unsubscribe to newsletters that you no longer read and are just lying in your mailbox</li><li>Use a single document link instead of email attachments for content that will be shared and downloaded multiple times</li><li>Use other messaging tools for small bits of information like Slack rather than emails</li></ul><h3>Browsing</h3><ul><li>Rethink the way you browse by choosing greener alternatives to Google search engine — Ecosia, Lilo, DuckDuckGo</li><li>Close the tabs when not in use, because the tabs will still be connected to the server and use significant energy</li><li>Delete old media from social media if you don’t need them, they are just lying there and taking up space for nothing</li><li>Use bookmark to access frequently used websites rather than searching for it every single time or simply type the address if you remember it</li></ul><h3>Code</h3><ul><li>Developers can start by deleting commented and unused code that comes by default with scaffolding.</li><li>Caching data ensures fewer data calls to reduce the load on your servers and also utilise minimal bandwidth.</li><li>Reconsider programming libraries and opt for lighter alternatives, also avoid installing unnecessary plugins that add bloat to your website</li><li>Rethink your fonts and reduce unwanted animations. WOFF and WOFF2 use higher compression methods compared to TTF for example</li><li>Replace oversized images with optimal file format(eg. SVG, WebP) and compress them using a tool to reduce their weight. You can use tools like <a href="https://tinypng.com/">TinyPNG</a>, <a href="https://tinyjpg.com/">TinyJPG</a>, <a href="https://svghero.app/?utm_source=blog_ricardo_dantas&amp;utm_campaign=sustainability&amp;utm_medium=social&amp;utm_term=sustainability&amp;utm_content=sustainability">SvgHero</a>, and <a href="https://shortpixel.com/">ShortPixel</a>.</li><li>Using CDNs and servers that are local to your consumers. This will reduce traffic on telecom networks, which will considerably reduce the energy consumption used by their infra-structure.</li></ul><h3>Devices</h3><ul><li>If you use OS or apps that supports Dark Mode, then consider switching the theme to use darker colours. Darker colours are better for the eyes and can save battery and energy on devices</li><li>Change phones and computers less often.</li><li>Unplug router when not in use for a long time.</li><li>Shut down your machine if you are away from it for more than a few hours</li><li>Deleting unused mobile apps and disable mobile notifications if you don’t need them</li></ul><p>You can also calculate the carbon footprint of your website here:</p><p><a href="https://www.websitecarbon.com/#new-test">https://www.websitecarbon.com/#new-test</a></p><h4>I would love to know your thoughts in addition to these steps to reduce carbon footprint. Let me know in the comments section below.</h4><h3>References</h3><ul><li><a href="https://abookapart.com/products/sustainable-web-design">Sustainable Web Design by Tom Greenwood</a></li><li><a href="https://cloudblogs.microsoft.com/industry-blog/en-gb/technetuk/2021/10/12/how-to-measure-and-reduce-the-carbon-footprint-of-your-application/">How to measure and reduce the carbon footprint of your application - Microsoft Industry Blogs - United Kingdom</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14b35e41e97a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Compile, Test & Deploy my smart contracts using Truffle]]></title>
            <link>https://snhthakare.medium.com/how-i-compile-test-deploy-my-smart-contracts-using-truffle-9acc26aea572?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/9acc26aea572</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Fri, 06 May 2022 12:40:21 GMT</pubDate>
            <atom:updated>2022-05-06T12:40:21.881Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8nHQdtAXjU3Gwp6XEs-UQ.jpeg" /></figure><p><em>Truffle is a development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM).</em></p><p>In this article, we will see how to start using Truffle to write, compile, test and deploy smart contracts that run on the blockchain.</p><h4>Installing truffle</h4><p>To get started, we need to install Truffle on our computer using npm. Open a terminal and use the following command to install it globally.</p><pre>npm install -g truffle</pre><p>Create a folder for your new truffle project and initialize it using the command listed below</p><pre>truffle init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*FY8icCiRzDx3UuTqOK4evQ.png" /><figcaption>The folder structure in VS code after you initialize the project</figcaption></figure><p>Once this operation is completed, you’ll now have a project structure with the following items:</p><ul><li><em>contracts/: Folder for Solidity contracts</em></li><li><em>migrations/: Folder for scriptable deployment files</em></li><li><em>test/: Folder for test files for testing your application and contracts</em></li><li><em>truffle.js: Truffle </em><a href="https://trufflesuite.com/docs/truffle/reference/configuration"><em>configuration file</em></a></li></ul><p>For the moment, all we are going to do is uncomment the part of the configuration file (truffle-config.js) where we define the network to be used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f5FRs7GMIxAeoWNdpSISmQ.png" /></figure><h4>Write a smart contract</h4><p>You can write a smart contract in a file with a .sol extension and save it under the contracts folder or you can paste an existing smart contract from Remix IDE.</p><p>I have another article on writing smart contracts in Solidity linked <a href="https://snhthakare.medium.com/write-compile-your-first-solidity-code-2126cd243611">here</a>.</p><h3>Compile</h3><p>Next, we will compile our code using the following command and you will notice a build folder in our project directory post compilation</p><pre>truffle compile</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*_oHK9HEhb33--ODjLRCTWg.png" /><figcaption>Check the JSON file under build/contracts</figcaption></figure><p>Truffle’s contract artifacts are the large JSON files that get saved in your <em>build/contracts/</em> directory. Truffle saves our artifacts when we compile and updates our artifacts with address information when we migrate.</p><h3>Test</h3><p>Truffle lets you write tests in Javascript and Solidity. It uses the <a href="https://mochajs.org/">Mocha</a> testing framework for testing the Smart Contract. All test files should be located in the ./test directory. Truffle will only run test files with the following file extensions: .js, .ts, .es, .es6, .jsx,.sol. All other files are ignored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VpiyXWJX6lFkdcJlK1ah3w.png" /><figcaption>Here’s a simple test file for Storage smart contract</figcaption></figure><p>We need to ask for contracts to interact with, within your test explicitly. We can do this by using the artifacts.require() method, a method provided by Truffle that allows us to request a usable contract abstraction for a specific Solidity contract.</p><p>To explain this test code in short</p><ol><li>‘contract()’ is the same as ‘describe()’ in mocha.</li></ol><p>2. ‘it()’ is used to create a test.</p><p>3. Deploys the contract.</p><p>4. Get the value of the variable ‘updatedData’.</p><p>5. Use assert.equal() to test if the expected output is the same as the actual output.</p><p>To run all tests, simply run:</p><pre>truffle test</pre><pre>or</pre><pre>truffle test ./path/to/test/file.js</pre><h3>Deploy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnWXnUcpNliJwwAYyH7e7g.png" /><figcaption>Numbering in the filename denotes the order of deployment of the contract</figcaption></figure><h4>Deployer function</h4><p>All migrations must export a function via the module.exports syntax. The function exported by each migration should accept a deployer object as its first parameter. The deployer object is your main interface for staging deployment tasks.</p><p>To deploy our smart contracts, we’re going to need to connect to a blockchain. Truffle has a built-in personal blockchain that can be used for testing. This blockchain is local to your system and does not interact with the main Ethereum network.</p><p>You can create this blockchain and interact with it using Truffle Develop.</p><ol><li>Run Truffle Develop:</li></ol><pre>truffle develop</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnQyEweScwNi3Dng4UqFFA.png" /><figcaption>This shows accounts and their private keys that can be used when interacting with the blockchain.</figcaption></figure><pre>migrate</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tTj_d5xl2tJ0u_p4vMQAow.png" /><figcaption>Shows the transaction IDs and addresses of your deployed contracts. It also includes a cost summary.</figcaption></figure><p>You can use these Ids and addresses to create and connect to UI or develop a Dapp.</p><p>Done!!! That’s how to compile, test and deploy a Smart Contract.</p><p>You can find the complete code <a href="https://github.com/snehathakare/truffle-tutorial">here</a>.</p><p>Thanks for reading this article ❤</p><p>Clap 👏 If this article helps you.</p><p>Connect with me on <a href="https://www.linkedin.com/in/snehathakare/">LinkedIn</a> and <a href="https://github.com/snehathakare">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9acc26aea572" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple ways to connect your React app to MetaMask]]></title>
            <link>https://snhthakare.medium.com/simple-ways-to-connect-your-react-app-to-metamask-fee4f99b3d37?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee4f99b3d37</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[metamask]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Sun, 03 Apr 2022 16:37:32 GMT</pubDate>
            <atom:updated>2022-04-03T16:37:32.559Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZRn28eC-FIblfKX4mFmGA.png" /></figure><h3>Why MetaMask</h3><p>MetaMask was created to meet the needs of Ethereum-based websites. It handles account management and connects the user to the blockchain.</p><p>Install the Metamask browser extension from <a href="https://metamask.io/">here</a>. Once MetaMask is installed and running (make sure you back up your Secret Recovery Phrase)</p><h4>App overview</h4><p>In this example we will create a simple component in React with a “Connect to Wallet” button which on click will interact with our Metamask wallet to retrieve wallet address and user account balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gVn0H0Co4AaGIJH-0oqyiA.png" /><figcaption>Return a button with the connectWallet function as the onClick handler</figcaption></figure><h4>Ethereum Provider</h4><p>MetaMask injects a global API into websites visited by its users at window.ethereum. This API allows websites to request users&#39; Ethereum accounts, read data from blockchains the user is connected to. The presence of the provider object indicates an Ethereum user.</p><p>We will use window.ethereum object using the following steps:</p><ul><li>Detect the Ethereum provider (window.ethereum)</li><li>Detect which Ethereum network the user is connected to</li><li>Get the user’s Ethereum account and account balance</li></ul><p>First we add a check to see if Metamask is installed, if yes then we request the account address.</p><p>The <strong>eth_requestAccounts</strong> is an array of a single, hexadecimal Ethereum address string. The request causes a MetaMask popup to appear<strong> </strong>which will trigger the user to login to their MetaMask wallet if no account is connected to the app or site address… If the MetaMask wallet is already connected to the app, then it will not alert you and just grab the account that is currently selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NC3JGpdpOvNfTMcbR5QZLg.png" /><figcaption>If ethereum object is found we connect and retrieve user account address</figcaption></figure><h4>eth_getBalance</h4><p>This returns the balance of the account of given address. So I have added a function <strong>getAccountBalance</strong> which uses the eth_getBalance to retrieve the balance of current user account. We will call this function after we get our current user account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ugmzl4JpEi35sn_7gb60pw.png" /></figure><p>After this our application should be able to display the current user account address and balance amount for that account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTvBzrF0Z1tL7r3VVkR6Zw.png" /><figcaption>After clicking on the connect wallet button successfully connected to MetaMask</figcaption></figure><h4>Connect wallet using ethers.js</h4><p>The ethers.js is a compact library for interacting with the Ethereum Blockchain and its ecosystem. For more information read the documentation <a href="https://docs.ethers.io/v5/getting-started/">here</a></p><p>You can add ethers in your React app using the command below and import it to your component.</p><pre>npm install --save ethers</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SqZP1G8jo8KMuYdsUBiww.png" /></figure><ul><li>A Provider (in ethers) is a class which provides an abstraction for a connection to the Ethereum Network. It provides read-only access to the Blockchain and its status.</li><li>A Web3Provider wraps a standard Web3 provider, which is what MetaMask injects as window.ethereum into each page</li><li>MetaMask requires requesting permission to connect users accounts:</li></ul><p>await provider.send(“eth_requestAccounts”, []);</p><h4>Get user balance and format ethers</h4><p>Added functionality for getting the account balance in useEffect which will change if the current user account changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7KzWrYs3K4HXncTUFA_cNQ.png" /></figure><ol><li><em>provider</em>.<strong>getBalance</strong>( <em>address</em> [ , <em>blockTag</em> = <em>latest</em> ] ) ⇒<em>Promise&lt; </em><a href="https://docs.ethers.io/v5/api/utils/bignumber/"><em>BigNumber</em></a><em>&gt;</em></li></ol><p>Returns the balance of <em>address</em> as of the <em>blockTag</em> block height.</p><p><em>2. ethers</em>.<em>utils</em>.<strong>formatEther</strong>( <em>value</em> ) ⇒ <em>string</em></p><p>Ether.js provides a utility for formating Ether value which I have used to format our account balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzw2hy7RIgMcCcJo_Chl8g.png" /><figcaption>Succesfully connected wallet using ether.js</figcaption></figure><h3>Conclusion</h3><p>That’s it for now! In this simple way we can connect MetaMask with your decentralized application. For convenience purposes here is the full open source link to this project on <a href="https://github.com/snehathakare/ReactMetamask">GitHub</a></p><p>If you have any questions, please feel free to contact me via <a href="https://www.linkedin.com/in/snehathakare/">LinkedIn</a></p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fee4f99b3d37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write & Compile Your First Solidity Code]]></title>
            <link>https://snhthakare.medium.com/write-compile-your-first-solidity-code-2126cd243611?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/2126cd243611</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[remix-ide]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Thu, 24 Mar 2022 06:38:21 GMT</pubDate>
            <atom:updated>2022-03-24T06:38:21.967Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*sYy611Mk7ZyRMC327OyQRg.png" /></figure><p>Solidity is the programming language to write smart contracts on the Ethereum blockchain. It’s a statically-typed, object-oriented programming language.</p><p>Contracts in Solidity are similar to classes in object-oriented languages. They contain persistent data in state variables, and functions that can modify these variables. A contract and its functions need to be called for anything to happen.</p><p>IDEs, such as Remix, make the creation process seamless using UI elements.</p><h3>Remix IDE</h3><p><a href="https://remix.ethereum.org/"><strong>Remix</strong></a><strong> </strong>is an online IDE that enables you to write and debug your Solidity code. When you first visit Remix, you should see a landing page similar to the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0BA-AidMzQE6v6M4i_hyrQ.png" /></figure><h3>Writing Your First Smart Contract</h3><p>Click the <strong>Create New File</strong> icon in the File Explorers tab. Name the new file and use the <strong>.sol</strong> extension to show that the file contains Solidity code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mL4qATA7Um73ImjWKpV4Mg.png" /></figure><p><em>Line 1: </em>Specifying <a href="https://spdx.org/licenses/">SPDX license</a> type, the Solidity compiler encourages the use of machine-readable <a href="https://spdx.org/">SPDX license identifiers</a>. Every source file should start with a comment indicating its license. If you skip the whole comment (it won’t result in an error, just a warning).</p><p><em>Line 2</em>: On the first line we are declaring which Solidity compiler we want to use. The pragma keyword is used to enable certain compiler features or check.</p><p><em>Line 4</em>: We are declaring our contract here and naming it as <strong>MyFirstContract. </strong>It is normal practice to use the same filename as the contract name. For example — this contract will be saved in the file name <strong>MyFirstContract.sol </strong>(.sol is the file extension for solidity smart contracts).</p><p><em>Line 5</em>: We are declaring an array of type uint (Unsigned Integer) named numbers, this variable will be used to store data. State variables are variables whose values are permanently stored in contract storage.</p><p><em>Line 7–17</em>: Next, we will add a function, using which we will get the count of even numbers.Functions are usually defined inside a contract. Functions accept parameters and return variables to pass parameters and values between them. Here the function is returning a parameter unsigned integer count. In addition, the function is marked as <strong>public</strong> which means that the function can be called by anyone.</p><p><em>Line 19–25</em>: We will add another function to check if the number is even and return true or false based on the result. This function is marked as <strong>view</strong> which tells Solidity compiler that this is a read-only function. Other than that the function also has <strong>returns (bool)</strong>, which means that the function will return a <strong>boolean value</strong>.</p><h3>Compile and Deploy</h3><p>To compile your code, click on the <strong>Solidity compiler</strong> button. When you hover over the buttons on the left side of the editor, you should be able to see the button’s name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*oaAJ56ZsRlyWcV5N_QpTHQ.png" /></figure><p>Now click on the button that reads <strong>Compile MyFirstContract.sol</strong>. If the compiler doesn’t encounter any errors, then you’ll have successfully compiled your first smart contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*b4pRC24LY5m-B_me1ZvF-g.png" /></figure><p>To deploy your code, click on the <strong>Deploy &amp; run transactions</strong> button. This button is just below the <strong>Solidity compiler</strong> button in the left-hand menu. While on this page, ensure that your contract name displays correctly above the <strong>Deploy</strong> button.</p><p>You can now click <strong>Deploy</strong> to run your code on the current local test network, with no transaction fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*hSg12XWeIGWGvWzjaRjp0Q.png" /></figure><p>You can test your code from the REMIX IDE itself. Under the Deployed Contracts section, click on your deployed contract and you will see your functions. The compiler automatically generates <a href="https://docs.soliditylang.org/en/v0.8.13/contracts.html#getter-functions">getter functions</a> for public state variables, which allows other contracts to read their values.You can add sample input values and test your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*zFfXHOdHUMdlvjz8TrATHg.png" /></figure><h3>Conclusion</h3><p>So we have successfully created and deployed our smart contract written in Solidity to the blockchain, You can refer the <a href="https://docs.soliditylang.org/en/v0.8.13/introduction-to-smart-contracts.html#a-simple-smart-contract">Solidity</a> Documentation for more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2126cd243611" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean coding practices I use in React]]></title>
            <link>https://snhthakare.medium.com/clean-coding-practices-i-use-in-react-82b6f7f17022?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b6f7f17022</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Thu, 20 Jan 2022 09:41:15 GMT</pubDate>
            <atom:updated>2022-01-20T09:41:15.646Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ieGem5BdpyVY_zf5gQxm8w.jpeg" /></figure><p>Your code needs to be understood by you and others who will work with you. I have been in situations where my work was only to refactor the existing code. Fixing one thing would lead to breaking other things, reading bad code took ages. A cleaner and organized code structure will also provide you with an upper edge over other candidates.</p><h3>Naming and Formatting practice</h3><ol><li>The name must be self-explanatory. The name of your function should be a verb, example, setToken, getUserInfo, calculateAge, etc.</li><li>Camel case for class name, function, and variable names.</li><li>Function and variables start with a lowercase letter.</li><li>The name of your class and variable must be nouns.</li><li>A component should start with a capitalized letter.</li><li>Proper indentation can reveal bugs quickly and it is easier to read through the code</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LjiGeOQP3kU5CkAS0JTwbw.png" /></figure><h3>Adding Comments</h3><ol><li>Avoid comment unless it adds more value such as explaining something that is not declared. A comment should explain the intent of writing the particular code logic.</li><li>Update the comments after you refactor someone else’s code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUVgySxZdj20PxMcrjcVwQ.png" /></figure><h3>Functions</h3><ol><li>A function should be small and do only one thing. Break your code down into chunks to make sure each function can only do a specific task.</li><li>Keep arguments to the minimum</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xl6B-4hY144y1X2ufIJXLw.png" /></figure><h3>Create separate files for each component</h3><p>The most important way to write cleaner React code is to get good at abstracting our code into separate React components.</p><p>This means that each file is responsible for just one component and there’s no confusion about where a component comes from if we want to reuse it across our app.</p><h3>Move shared functionality into React hooks</h3><p>If I wanted to perform a certain task for data across multiple components, I create a custom hook for it and reuse it in my code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAhDJRqmEj3LDInalTVDWA.png" /></figure><h3>Tips</h3><ul><li>KISS (Keep it simple, stupid)</li><li>Avoid boilerplate code that is repeated in multiple places with little to no variation</li><li>Every piece of logic should have a single representation that is unambiguous.</li></ul><p>I hope you find this article useful to improve your own React code to make it cleaner, easier to read, and ultimately more enjoyable to create your projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b6f7f17022" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I overcame tutorial purgatory in my freelance journey]]></title>
            <link>https://snhthakare.medium.com/how-i-overcame-tutorial-purgatory-in-my-freelance-journey-68eaf440652e?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/68eaf440652e</guid>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 19:40:17 GMT</pubDate>
            <atom:updated>2021-02-01T19:40:17.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*heX2CK913Ho9meRvbxUrLw.png" /></figure><p>From the time I started my freelance journey, I have held myself back for long because of how much I did not know. So I started looking for tutorials on the internet to get as much information as possible.</p><p>Whatever I was building was around the tutorials I came across and I used them as a support to build my project. All I had on my portfolio was a list of small projects which I learnt off some tutorials. This is how I fell into the deep hole of what they call a “<em>tutorial purgatory</em>”.</p><p>It was important to get out of it immediately, I was not building anything worthwhile and always doubting myself if I was ready enough for the real world scenario. I was not able to get out of this circle and always made excuses to watch another tutorial of the same subject.</p><p>So I decided to take up the <a href="https://www.100daysofcode.com/">100DaysofCodeChallenge</a> to start small and build something new every single day. This helped me gain my confidence back and not just rely on tutorials. So here are my two cents on how I overcame this problem.</p><p><strong>#Start your own project from scratch. </strong>Use pencil and a paper to chalk out a plan, list the technology you will use, the features it will have, how it will look. Divide your project into smaller tasks. Write down actionable steps to complete your project. You can use interface design tools like <a href="https://www.figma.com/">Figma</a>, <a href="https://app.diagrams.net/">Draw.io </a>.</p><p><strong>#Get out of your comfort zone</strong>. This is the reason why I fell into this hole, tutorials always felt safe and comfortable . Don’t give up until you have the answer. Search for articles(<a href="https://medium.com/">Medium</a>), ask questions on forums(<a href="https://stackoverflow.com/">Stack Overflow</a>), reach out to a senior, add comments on technical blogs to take your project forward. Code every single day and build a habit out of it. Resolving more issues will give your confidence a boost.</p><p><strong>#Troubleshooting for the win. </strong>Get into the habit of reading your error messages. Try to explain your errors better and work on formulating clear questions. Retrace your steps to locate what change caused the error. Keep testing as you code to keep it clean.</p><p><strong>#Don’t be too hard on yourself. </strong>Doesn’t mean you should give up on tutorials completely. Follow certain rules while reaching out for a tutorial- don&#39;t search for a tutorial on anything you already know, watch only one tutorial for a single topic, start applying what you have learnt immediately.</p><p>You can never know everything about a technology, nobody does, and you will always search things on the internet like everyone does. Don’t let that stop you from building stuff and take on new challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68eaf440652e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy ways to deploy your React app for free]]></title>
            <link>https://snhthakare.medium.com/easy-ways-to-deploy-your-react-app-for-free-c75219841486?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/c75219841486</guid>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Sun, 06 Sep 2020 19:21:26 GMT</pubDate>
            <atom:updated>2020-09-06T19:21:26.374Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SzrSsS1stZQ7ipYObndbAw.png" /></figure><h4>Using Github Pages and Firebase</h4><h4>What is Deployment?</h4><p>Deploying is when you put your work on the internet for everybody to see. When web developers complete their projects, they package their code and deploy to the World Wide Web. Deployment may occur multiple times throughout a software project.</p><p>Deploying an application built on frameworks such as React, Vue, or Angular is much different from that of deploying a site built with HTML, CSS, and JavaScript.</p><p>In this article, I will show you how to deploy a React application in two different ways. There are a lot more ways of deploying your React app, but once you get the hang of it, most steps are similar.</p><p>Let’s get started!</p><h3>Github Pages</h3><p>I have created a Todo App using <a href="https://github.com/facebook/create-react-app">create-react-app</a></p><p><strong>You will need</strong> :</p><ul><li><a href="https://github.com/join">GitHub</a> Account.</li><li>Install <a href="https://git-scm.com/">Git</a> on your machine and <a href="https://help.github.com/en/articles/set-up-git">Set up Git</a>.</li></ul><p>Make sure you have node.js and npm installed in your machine.</p><p>1. Create a repository for your app, I named mine as todo-app</p><p>npm init react-app todo-app</p><p>2. Commit and push your code to Github repo master branch</p><p>3. Then we need to install <a href="https://www.npmjs.com/package/gh-pages">GitHub Pages</a> package as dev-dependency.</p><p>cd todo-app<br>npm install gh-pages --save-dev</p><p>4. Modify package.json file</p><p>We need to add homepage at the top level, then we define this as a string and the value to be &quot;http://{username}.github.io/{repo-name}&quot; {username} is your GitHub username, and {repo-name} is the name of the GitHub repository you created it will look like this :</p><p>&quot;homepage&quot;: &quot;<a href="https://snehathakare.github.io/todo_app/">http://snehathakare.github.io/todo-app</a>&quot;</p><p>Then in the existing scripts property we to need to add predeploy and deploy.</p><p>&quot;scripts&quot;: {<br>//Add this line to scripts section of package.json<br>&quot;predeploy&quot;: &quot;npm run build&quot;,<br>&quot;deploy&quot;: &quot;gh-pages -d build&quot;<br>}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qv_36R6ei87_wkTr_7SckQ.png" /><figcaption>This is how my package.json looks</figcaption></figure><p>5. Now to deploy it to GitHub Pages.</p><p>just run the following command :</p><p>npm run deploy this will generate a production build and deploy it to GitHub Pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kfWe6y-ycPlSef12BbslyQ.png" /></figure><p>You can browse to your homepage URL mentioned in package.json in step 4 to view your app. (<a href="https://snehathakare.github.io/todo_app/">https://snehathakare.github.io/todo_app/</a>)</p><h3>Firebase</h3><p>In order to use <a href="https://firebase.google.com/">Firebase</a>, you need to log in to your <a href="https://console.firebase.google.com/">firebase console</a> and create a new project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S9BlMLJoSIOTzlLKiuRE1g.png" /></figure><p>If you don’t have a Firebase account yet, sign up for a <a href="https://console.firebase.google.com/">Firebase account</a> and create a new project there.</p><p>I have a Todo App in React and a new project created in my Firebase console.</p><ol><li>Install the Firebase CLI globally to your node modules:</li></ol><blockquote>npm install -g firebase-tools</blockquote><p>2. Associate the Firebase CLI with a Firebase account (Google account)</p><blockquote>firebase login</blockquote><p>This will give you a URL in your command line that opens in a browser. If this doesn’t happen, Firebase CLI may open up the URL automatically. Use your Google account to create a Firebase project, and give Google the necessary permissions. Return to the command line to verify a successful login.</p><p>3. In your project folder execute the following command:</p><blockquote>firebase init</blockquote><p>This will give you Hosting options to choose from, Select <strong>Hosting: Configure and deploy Firebase Hosting sites.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zqW4RcCQu2SE1SA5U_OjA.png" /></figure><p>Google knows about Firebase projects associated with your account after you logged in, select your Firebase project from a list of projects.</p><p>Select <strong>Use an existing project</strong></p><p>Select your Firebase Project (eg. todo_list)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HIqTfsJTZ9VAP4wYL_KDw.png" /></figure><p>You have to specify the folder where Firebase will look for assets for deployment. By default, create-react-app will generate a build folder that will contain the production assets. Unless you change default configuration, you will want to enter build for this option.</p><p>You will be asked whether or not Firebase should configure as a single-page app. You will want to enter y (Yes) for this option.</p><p>The last option is whether or not Firebase should overwrite your existing build/index.html. If you have not created a build for your app yet, then you will not see this option. Enter N (No) for this option.</p><p>Finally, deploy your React application with Firebase on the command line:</p><blockquote>firebase deploy</blockquote><p>Firebase will give you a unique URL where your deployed app is located.</p><p>Done! enjoy your live application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c75219841486" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create your own GitHub profile README.md]]></title>
            <link>https://snhthakare.medium.com/create-your-own-github-profile-readme-md-110262e45620?source=rss-e416f0f3ae38------2</link>
            <guid isPermaLink="false">https://medium.com/p/110262e45620</guid>
            <category><![CDATA[github-profile]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Sneha Thakare]]></dc:creator>
            <pubDate>Tue, 28 Jul 2020 14:19:17 GMT</pubDate>
            <atom:updated>2020-07-28T14:19:17.707Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5l75nKmh_4Z72Xe6oFKrg.png" /><figcaption>This image shows how my Github profile looks like with the new README.md</figcaption></figure><p>GitHub has released a feature recently that allows users to create a profile level README to display on their GitHub profile. In this article, I will walk you through how to use this awesome feature.</p><h4>Check my GitHub profile <a href="https://github.com/snehathakare">here</a></h4><p>The profile-level README feature on GitHub allows you to post more content than profile bio. A README file is to tell other people why your project is useful, what they can do with your project, and how they can use it.</p><h3>How do I create my profile README?</h3><p>The profile README can be created by creating a new repository with the same name (same letter casing) as your username.</p><p>Check the ‘Initialize this repository with a README’ option while creating the repo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrVl_uOwuiPyGwQmUYC1og.png" /></figure><p>Edit README.md file inside the new repo and play with your content to create cool designs for your profile</p><p>I used Markdown to edit my README file. You can use this <a href="https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf">cheat sheet</a> for Markdown syntax</p><p>Commit your new README directly to your repo’s master branch from GitHub’s web interface. This should allow you to see the changes immediately on your profile page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZU8SjrMGO84mgG6_HMCHg.png" /><figcaption>This is how my README.md looks like</figcaption></figure><p>I edited an image template with my content and added the file to my repo, I then used the image link inside the README file.</p><h4>You can check real cool profiles <a href="https://github.com/topics/github-profile-readme">here</a> by some amazing users !</h4><p>Tag me or comment down below with a screengrab if you create your profile after reading this! I would love to see your designs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=110262e45620" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>