<?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 Steven Wu on Medium]]></title>
        <description><![CDATA[Stories by Steven Wu on Medium]]></description>
        <link>https://medium.com/@stevenwubc?source=rss-bdc0ada61bbe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zM3cCGwMDCpIs4gX6Kz4fA@2x.jpeg</url>
            <title>Stories by Steven Wu on Medium</title>
            <link>https://medium.com/@stevenwubc?source=rss-bdc0ada61bbe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:48:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stevenwubc/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[What are NFTs? Is It Worth Anything?]]></title>
            <link>https://stevenwubc.medium.com/what-are-nfts-is-it-worth-anything-16e3ff5c425?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/16e3ff5c425</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 29 Aug 2021 20:49:32 GMT</pubDate>
            <atom:updated>2021-08-29T20:49:32.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ck4sj9tGrCDJibPCgMpNlQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@executium?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Executium</a> on <a href="https://unsplash.com/s/photos/ethereum?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Crypto prices has been up 40% since last month and steadily holding, mostly due to the recent resurgence in the popularity of NFTs again.<br>Let’s talk about this new technology that lives on popular blockchain platforms such as Ethereum.</p><h3>What is a NFT?</h3><p><a href="https://ethereum.org/en/nft/"><strong>N</strong>on <strong>F</strong>ungible <strong>T</strong>okens</a> are unique tokens produced on a blockchain such as Ethereum. NFTs are essentially digital assets that can contain unique data such as photos, text, audio clips, gifs and other forms of data that aren’t too big on size.</p><p><em>Non fungible Tokens </em>means that the tokens you are getting are unique compared to other Ethereuem coins where you can exchange one fungible Ethereum coin for another fungible Ethereum coin since they have the same value, so Non fungible token are priced at what you are subjectively willing to pay for that specific coin.</p><p>For example, look at this 1972 penny coin that’s been double died, it’s approximate value is at $500 and although it’s a a penny coin, due to it’s rarity and the market need for it, it’s subjectively worth more than 1 cent. And it’s basically the same with a Ethereum NFTs, Ethereum can mint a Eth coin that holds different data, instead of it’s usual code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*qGNhqsERhNaPeC0VGq5a3Q.png" /><figcaption><a href="https://www.thesprucecrafts.com/most-valuable-coins-in-pocket-change-768897">The Most Valuable U.S. Coins Found in Circulation Today (thesprucecrafts.com)</a></figcaption></figure><p>NFTs has been around for since 2015 but has only recently gained popularity in March 2021 due to the sale of a NFT art piece by <a href="https://www.nytimes.com/2021/03/11/arts/design/nft-auction-christies-beeple.html">Mike Winkelmann aka. Beeple for a grand total of $69.3 million dollars</a> and I suspect that roughly $200–300 million dollars has been spent on NFTs since 2015.</p><p>The big question in the room is how NFT tokens are worth anything? When you can easily view them online for free with a quick google search or even just download them out right. <br>Well look at it like this, you can always google “Van Gogh starry night hd” and you will get a perfect copy of the image of the famous art piece… but that doesn’t mean you own it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rL1VcYV9ItQh6P_oEUfyvQ.jpeg" /><figcaption>Hey look I have a Van Gogh!!!</figcaption></figure><p>That is why NFTs are used primarily as a form of art nowadays. since it’s minted on a digital ledger, you can always prove ownership of the original Non Fungible token. However, that Doesn’t mean NFTs can’t be stolen, they are stored in a Eth wallet which can be stolen from if you expose your password keywords but many crypto users argue that traditional physical art has been stolen and counterfeited as well throughout history.</p><h3>Are NFTs Worth Anything?</h3><p>As a developer, I personally don’t think NFTs are good replacement investments for the long haul due to issues like hacking, NFT issuers, and longevity of the platform that it’s hosted on. If I buy a Van Gogh piece and stash it in my family safe somewhere, I know my grandkids will be able to access it a hundred years from now but I just don’t see a NFT token lasting over a hundred years, there’s just a lot of variables that can go wrong with holding digital assets for future generations.</p><p>However, I do think NFTs do have their value in our current culture and I can see it going up in price in the next few years or so. I am a firm supporter of the Ethereum platform and I do see it becoming a viable currency for decades to come, I just don’t know if a Token on the current platform will last hundreds of years. Who knows what will happen to our current tokens when Eth 9.0 comes out?</p><p>As a gamer and general nerd, I think NFTs will have it’s value in a memorabilia business stand point, I’m thinking like trading cards games such as baseball, Pokemon or even a Yu-gi-Oh battling NFT business.</p><p>But then again, what do I know? I’m personally am not an art investor with loads of money to back up my words and there seems to be a great want for it in the public opinion. Look at the previous example of the Beeple art piece for almost <a href="https://www.nytimes.com/2021/03/11/arts/design/nft-auction-christies-beeple.html">$70 million dollars</a>, or Jack Dorsey of Twitter selling a NFT of his first tweet for for almost <a href="https://www.cnbc.com/2021/03/22/jack-dorsey-sells-his-first-tweet-ever-as-an-nft-for-over-2point9-million.html">$3 million dollars</a>, or the sold out web series called Stoner Cats from Mila Kunis worth<a href="https://www.theblockcrypto.com/post/113239/stoner-cats-nft-sale-rakes-in-over-8-million-despite-technical-cat-astrophes"> $8 million dollars</a>… Anways, you get my point. I’m just speaking my mind and not offering financial advice in anyway.</p><h3>How to Buy NFT<strong>s</strong></h3><p>If you happen to be a Jack Dorsey fanboy and you want to buy his whole collection of NFTs of his tweets, I highly recommend you do your research on the marketplace you are buying your NFTs. You would have to get a Eth wallet first to store your NFTs and for a marketplace I would recommend using <a href="https://opensea.io/">OpenSea</a> which is the biggest platform for NFT trading.</p><h3>Conclusio<strong>n</strong></h3><p>That’s it for this week’s blog, hopefully you guys enjoyed this blog and you got some knowledge on what NFTs are and how they work. As a crypto enthusiast, I am very happy to see the growth of NFTs on the Ethereum platform and glad to see such widespread adaptation of digital assets. I personally don’t own any NFTs or will probably buy any time soon but I love to see any support on cryptocurrencies.</p><p>Stay tuned for next week’s piece and as always:</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16e3ff5c425" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to MongoDB Atlas]]></title>
            <link>https://stevenwubc.medium.com/intro-to-mongodb-atlas-2590e28b57f8?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2590e28b57f8</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 22 Aug 2021 22:33:01 GMT</pubDate>
            <atom:updated>2021-08-22T22:33:01.518Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*T7Xtk-f17ZP3iT2MmJOYqA.jpeg" /></figure><p>As some of you may know I’ve been building MERN app and I’ve been really enjoying Mongo Atlas as a developer and today I will get into What Atlas is and how you can start using it.</p><p>Mongo Atlas came out in 2016 and it gave us an effortless way of storing our Mongo Database in the cloud, rather than the traditional option of running a Database server on your own hardware, Mongo Atlas can also be run on a hybrid system where your Database is stored in the cloud and your own environment machine. One main factor of why I’m using Mongo Atlas is the flexibility on their system, price and accessibility.</p><h3>How to</h3><p>First you would need a MongoDb account. Here’s the register page of <a href="https://www.mongodb.com/cloud/atlas/register">Mongo</a> <a href="https://www.mongodb.com/cloud/atlas/register">Atlas</a>, you can log in through the portal on the top right if you already have an Mongo account.</p><p>After you log in the web UI will prompt you for some meta data, you can always skip for now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3W6pPXF_Zrj0BLC-561MMg.png" /></figure><p>Next step would be choosing what kind of DB cluster you want to create. I would start with the free option of a shared DB so we can learn the system first without having to spend a dime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gJJSs2Mah62kGHwERUtZZQ.png" /></figure><p>Next up is your choice for a cloud provider, default option is AWS but I went with Azure just because I’m a Microsoft fan boy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wjpOZqUUOmzG1NSbIsLFfw.png" /></figure><p>Next up is the cluster size options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vyAuy75IfRzkseLf4Q3pEQ.png" /></figure><p>The basic free option comes with 512MB of storage and a maximum of 500 connections, which in my opinion is quite enough for a starter app. You can easily change this in the provided Atlas cloud manager.</p><p>The free cluster option does not include any backup options. You will have a daily backup on your cluster if you choose any of the paid options for storage.</p><p>Below the additional settings is a text-field to input your cluster name. Just keep in mind that the Cluster name can’t be changed after creation, so choose your name wisely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*baTWIV_FhosFeRwNURkt5Q.png" /></figure><p>After a few minutes, your cluster will be created and the next step would be connecting to your db</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HGG-z-LDCKGqlzxW1LqHew.png" /></figure><p>Click connect and it prompt you for some security settings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNNJj8TeRTNwm1k0dtdItg.png" /></figure><p>For security purposes, you should only add IP access from your environments.</p><p>Make sure you remember this password for a user access account since this is how you will connect with your cluster on your code. If you forget your user and password, you can always go to the cloud manager to add new privileges.</p><p>Next you have a few options on ho you want to connect to your DB. The Connect your application option is what I will be using today</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgJ6V9SNDdiXfqDgNlpt-A.png" /></figure><p>I’m currently using a Node Express server but you can select other drivers for other languages and frameworks.</p><p>Mongo Atlas provides you with all the boilerplate code if you click the “Include Full Driver Sample” and just hit the copy button and you can paste it into your server code.</p><p>Just keep in mind the code sample will generate the username you created before but it does not provide your password for security reason. Make sure you replace the &lt;password&gt; placeholder with your actual password in order for this to work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tar0j5l6fFUmfm98Up30Xg.png" /></figure><p>That’s it! You’re connected to your Mongo Atlas cluster. This is quite a lengthy subject so I will be writing a Pt.2 to the Mongo Atlas guide sometime next week and we will explore how you can set up CRUD functions and search your DB as well, stay tuned for that and in the meantime here’s a <a href="https://www.mongodb.com/developer/quickstart/cheat-sheet/">Mongo cheatsheet</a> for any built-in Mongo methods you want to try for now.</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2590e28b57f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL vs NoSQL: What’s The Difference?]]></title>
            <link>https://stevenwubc.medium.com/sql-vs-nosql-whats-the-difference-939a0fb11914?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/939a0fb11914</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Mon, 16 Aug 2021 01:07:34 GMT</pubDate>
            <atom:updated>2021-08-16T01:07:34.176Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*4UA9jHjtQKeFLq2lULz82Q.png" /></figure><p>I’ve been building an app with the MERN stack and this is my first time using a NoSQL database like MongoDB, It is quite different from my experience with SQL databases such as PostgreS and SQLite and in today’s article I will be breaking down the key differences and what are my thoughts on these database platforms.</p><h3>SQL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kn2d699zQmsKr_Q9fdMOPw.png" /></figure><p>SQL databases are the traditional way to use a <strong><em>S</em></strong>tructured <strong><em>Q</em></strong>uery <strong><em>L</em></strong>anguage to create a schema table for inputing and manipulating relational data. In case you haven’t read my <a href="https://medium.com/geekculture/my-first-year-of-software-engineering-5baa4951acc">previous blog</a>, it’s been one year since my programming journey and for the most part I’ve been using SQL for the past year to handle data in my apps and specifically PostGreSQL databases ran on Ruby on Rails backend servers.</p><h4>Pros</h4><ul><li>Due to having a predefined schema table, data can be accessed really fast because we would know exactly what row or column to manipulate any data.</li><li>Been in use with programming for decades, which offers great community knowledge and support.</li><li>SQL follows the ACID properties making the data very accurate and easy to navigate in the DB.</li></ul><h4>Cons</h4><ul><li>It has drawbacks with scaling, since you would have to redefine the database scheme if you want to add something simple such as a user’s favorite color or some other random data that you might have to assign in the future.</li><li>Can be troublesome converting data objects with correct data due to placement of database rows &amp; columns</li><li>Just not very user friendly in my opinion, SQL as a language wasn’t too hard to learn but the clunky interfaces that DB companies offers, are just not very good.</li></ul><h3>NOSQL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Po5fhDsk9r8rWQQ3OCOWSQ.png" /></figure><p>NoSQL databases come around during the mid-late 2000s and are more flexible and modern and can be made with less structure for assigning data. There are different types of NoSQL database, it can be column based, graph based or document based which is what I’ve been using with MongoDB in conjunction with a Node Express server.</p><h4>Pros</h4><ul><li>Great with scaling, due to being able to create and manipulate data freely in an unstructured way thus being able to add more attributes to data along the way.</li><li>You can start creating a database without having to predefine a scheme structure, which is great in my opinion.</li><li>Very flexible since it isn’t confined by rows or column, NoSQL store data in “documents” which each can have it’s own properties and attributes.</li></ul><h4>Cons</h4><ul><li>Not great for complicated queries since the document format is less structured compared to traditional SQL schema tables.</li><li>NoSQL is becoming more and more popular these days but it still lacks the community support that SQL can offer due to years in practice.</li><li>Can become costly once it scales and the file system becomes too big if you aren’t properly handling the duplication of data.</li></ul><h3>When to use each</h3><p>Both SQL and NoSQL are great and come with their own pros and cons. I personally prefer using MongoDB at the moment due to it’s flexibility and scalability but I would go back to a SQL database if I’m building some sort of app with a more advanced complex query for data, SQL relational schemas can be annoying to build out but once it’s done, it offers great speed through structure.</p><h3>Conclusion</h3><p>NoSQL are becoming more and more standardized these days and I’m really enjoying MongoDB but just keep in mind of what type of app you want to build and you will have a great time down the line.</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=939a0fb11914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum’s EIP 1559 upgrades are live!]]></title>
            <link>https://stevenwubc.medium.com/ethereums-eip-1559-upgrades-are-live-2bbde76c8e7a?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bbde76c8e7a</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 20:23:33 GMT</pubDate>
            <atom:updated>2021-08-08T21:13:09.295Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LbNraBIx4MWVrVCT7_Bc_Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@executium?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Executium</a> on <a href="https://unsplash.com/s/photos/ethereum?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The crypto market has seen a resurgence over the past few days. I think it’s due to Ethereum’s highly anticipated EIP 1559(Codename London) went live on block #12,965,000 which was Thursday, Aug 5th. <br>The EIP 1559 upgrades changes Ethereum’s PoW model drastically to help with network congestions since the Ethernet has seen a huge increase of network activity due to more users on the platform, also due to NFTs(Non Fungible Tokens)becoming widely popular over the past year.<br>The “London” hard fork also doubled the block size of Ether but aren’t using the extra space?</p><h3>Fee Changes</h3><p>Prior to the EIP 1559 upgrade, Ethereum’s PoW model required users to go into a auction-style bidding system where you pay a if you offer more fees, the faster it will take since miners are more inclined to process your transactions first since that makes them more money through those fees.<br>EIP 1559 changed that system and now those transaction fees are calculated through an algorithm where the fees are higher if there is more network activity. And instead of the fees going to the miners, those calculated fees are burned instead(sent to inactive ether address, so it’s out of rotation) but you can still choose to “tip” miners to provide incentives for miners to pick up your transaction first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Dh8NLvu-V46iHZtDqGQNA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@amir_arabshahi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Amir Arabshahi</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Okay, it sounds like users can still prioritize transactions with extra fees(tip) so what’s the big difference for users?<br>While the transaction formula is seems practically the same, this change provides casual users a much easier process. Prior to the upgrade, users would have to constantly do mental math on how much fees to provide but with the new system, the Eth system will automatically set your fee based on the network activity.<br>This upgrade is also an attempt to make Ether more deflationary by burning off some supply every time new Ether are minted in the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ny7bosSttaMbRU_qOC6ag.png" /><figcaption>Total of 13694.8 Eth($41,544,271.38) burned in 4 days -etherchain.org</figcaption></figure><p>$41 million USD worth of Eth burned seems like a lot but not really if you consider that there’s almost $30 Billion USD worth of Eth in rotation today.</p><p>Only time will tell if this new system will make it deflation proof but at the moment it seems to be working.<br>From my research, the Ether network Hashrate has not dropped at all, which tells me the fee system change hasn’t scared off any miners yet.</p><h3>Big Block Energy</h3><p>Another major upgrade included with EIP 1559 is the new increased block size. However, that doesn’t mean Ethereum can process more transactions. The new block size is sort of a support implementation for the new fee system. By having more available block space, the system can handle any overflow transactions and this is to prevent network congestion which typically causes the fees to skyrocket due to people needing to run their transactions asap for whatever reasons that might be. This provides the new fee system with predictable network activity data which then they can charge fees accordingly.</p><p>Here’s the link for the full EIP 1559 change log that goes into detail about all the new implementations:</p><blockquote><a href="https://www.eips.ethereum.org/EIPS/eip-1559">https://eips.ethereum.org/EIPS/eip-1559</a></blockquote><p>All the upgrades seemed to have went off smoothly and Ethereum was able to maintain their network hashrate even though miners are at a 23% profit lost but as a gamer who casually mines Eth, I haven’t seen much difference due to the fact that the price of Eth has also gone up which kind of just balances it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQCO3RExL1HzItCuwsisSA.png" /></figure><p>This Eth upgrade has also shown that big miners are also willing to adapt to new industry standards since they had to update their mining software for the EIP 1559 upgrade. This will be a major key for when Eth 2.0 comes out next year which will switch their current PoW model to a PoS model, which aims to cut down energy consumption by 80%.</p><p>As a coder and a crypto enthusiast, I am happy to see Ethereum evolve and grow and continue to adopt more users and investors to the platoform.</p><p>If you are interested in the Eth 2.0 upgrade, you can read my post here:</p><blockquote><a href="https://medium.com/nerd-for-tech/eth-2-0-is-coming-1ab212708ec8">ETH 2.0 is coming!. What you need to know about the… | by Steven Wu</a></blockquote><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bbde76c8e7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Year Of Software Engineering]]></title>
            <link>https://medium.com/geekculture/my-first-year-of-software-engineering-5baa4951acc?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/5baa4951acc</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nyc]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Mon, 02 Aug 2021 00:29:55 GMT</pubDate>
            <atom:updated>2021-08-03T07:00:27.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DeEseDozFEJbpNfyWSxQAw.jpeg" /><figcaption>My class/office/playground</figcaption></figure><p>It has been one year since I’ve decided to learn how to code and today I will be writing about my journey from where I started and where I’m at today.<br>There has been many ups and downs along the way but ultimately, I’m glad I made that choice and how much I’ve learned.</p><p>I remember when I was seven years old, my uncle had come to visit and he saw how bored I was at my grandma’s house. He then asked me <em>“</em><strong><em>You done with your homework?</em></strong><em>”</em>, I replied with <em>“</em><strong><em>You think grandma would let me sit around if I wasn’t done with my homework</em></strong><em>”</em>. He looked at my grandma and laughed out loud for a solid good few minutes. My uncle must’ve thought that was really funny because he took a liking to me after that, he later rewarded me by buying me a GameBoy Color with a copy of Pokemon Red and that was how I got introduced to digital technology and the day I became a tech geek. I later moved on to PCs where I logged countless hours on titles such as : <strong>Starcraft</strong>, <strong>RuneScape</strong>, <strong>Counter-strike</strong> and <strong>Maplestory</strong>. As a PC gamer, newer titles require newer hardware, so at the age of eleven, I started modding my own PC and that is when I knew I wanted to get into the technology field as a career.</p><p>Fast forward a few years and BOOM! I got into my preferred school which is the <strong>New York City College of Technology</strong> in Brooklyn. HURRAY! This was one giant step closer to my childhood dream of owning an internet cafe where I can just hang out and tinker with PCs. But then life happens and due to certain circumstances, I had to drop out and work full time to support myself.</p><p>I’ve been blessed my whole life and I had a great career in the restaurant industry after I dropped out of college and eventually became a restaurant manager for a chain of restaurants in my hometown of NYC.</p><p>Fast forward to March 2020. The COVID-19 Pandemic was at the height of it’s prime and like many others, I was forced to close down all three of my restaurants due to employees getting sick and the overall decline of business. These were some really dark times for me, since my cousin who was working for me had just been hospitalized from COVID and I was concerned about the coworker’s lives and career in the future.</p><p>Thanks to good old Uncle Sam, this issue was solved in a form of pandemic relief payment, opportunity came calling. I knew the lockdown wasn’t gonna clear up any time soon, so I handed in my resignation letter to my boss and used my stimulus check as a down payment to enroll in the Flatiron School for web development.</p><h3>Month 0</h3><p>Enrolling back to school was very daunting at first, since I’ve been out of school for over a decade and simply didn’t know if I was still capable of learning something as complex as software engineering. But with the love and support from my close ones, it gave me the confidence to study my ass off for a month before the Flatiron entrance code challenge with some free resources such as:</p><p><a href="https://www.codecademy.com/">Learn to Code — for Free | Codecademy</a></p><p><a href="https://www.freecodecamp.org/">Learn to Code — For Free — Coding Courses for Busy People (freecodecamp.org)</a></p><p><a href="https://www.edx.org/course/introduction-computer-science-harvardx-cs50x">CS50’s Introduction to Computer Science | edX</a></p><p>Using these free platforms I was able to learn Basic HTML and CSS with a little Python that I had picked up on my own. Thanks to the hardworking people who created these amazing free tools, I was able to pass the Flatiron School entrance code challenge.</p><h3>Month 2</h3><p>We did it! I got into Flatiron and was assigned with the most amazing cohort. Together, we worked tirelessly day in and day out for the next four months of the program.</p><p>For the first month we learned programming basics such as Object Oriented Programming with Ruby and learned how to build conditional CLI apps using Ruby.</p><p>In the second month, we learned functional programming along with how to build out backend servers using the MVC model with Ruby on Rails.</p><p>The third month was pure Javascript and how HTTP requests work over the internet and how as web developers, we all need to make fetch happen.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FlszAB3TzFtRaU%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FlszAB3TzFtRaU%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FlszAB3TzFtRaU%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc8d048978d18bf120e5c701b41e2d64/href">https://medium.com/media/bc8d048978d18bf120e5c701b41e2d64/href</a></iframe><p>The fourth and final month was spent learning frontend frameworks such as React and how to use Redux for state management and for the final week of class, we were assigned to work on our capstone project where we can build whatever we like and we graduate depending if we do a good job.</p><h3>Month 6</h3><p>Success! My capstone project came out great, I built a full stack gaming blog site(<a href="https://youtu.be/x1XqqEM3NuE">check out the demo here</a>)and I was able to graduate with my web app along with a perfect 4/4 score on my monthly code challenges. Although I never regretted dropping out of college, I got TONS of slack through out the ages from my dear old Asian mother but this time I was proud to phone her the good news.</p><h3><strong>Month 8</strong></h3><p>After graduation, I took month seven off and took a nice little road trip with my girlfriend since regulations were easing up from the pandemic lockdown. We did the most covid responsible vacation we can think of by renting a van and traveling across the the country staying at national park campgrounds. Great recommendation by the way!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxfGP114Du86c336Tg86JQ.jpeg" /><figcaption>Nothin like the crisp air of the great outdoors.</figcaption></figure><p>I later spent my whole eighth month self educating and learned a bunch of new frameworks and libraries such as Hooks to replace Redux as my state management and Sass to bolster my frontend knowledge. Here are the links if you wanna check it out.</p><p><a href="https://stevenwu91.medium.com/getting-sassy-with-my-css-%EF%B8%8F-b98c9b288be8">Getting Sassy with my CSS💁‍♂️. Beginner’s guide on Sassy CSS | by Steven Wu | Jun, 2021 | Medium</a></p><p><a href="https://stevenwu91.medium.com/hooked-on-react-hooks-e7d93ec7f258">Hooked on React Hooks🪝. A simple guide on React hooks | by Steven Wu | Medium</a></p><h3>Month 9</h3><p>Game time! By month nine, I have officially started my job search and I was knee deep in job applications and spent most of my time learning data structures and algorithms through websites such as :</p><p><a href="https://leetcode.com/">LeetCode — The World’s Leading Online Programming Learning Platform</a></p><p><a href="https://www.hackerrank.com/">Dashboard | HackerRank</a></p><p>At this point a few of us at our cohort got hired already and we were all vaccinated so we all decided to have a get together before some of us move away from New York for work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ex91GtvKpTv2o__Hm5lbw.jpeg" /><figcaption>Miss these guys 😢</figcaption></figure><h3>Year 1</h3><p>Here we are today. It has been exactly one year since my software engineering journey started and although I have yet to find a job in the recent months, I am hopeful it is coming soon and I’m happy to report most of my cohort mates are employed already.<br>Within one year I am now capable of building out full stack web apps and I am quite happy with how much I’ve learned in the past year. The past few months has been pretty tough grinding algo questions but I have finished my <a href="https://stevenwu.netlify.app/">portfolio site</a> and even learned how to build out the classic <a href="https://stevens-pong-app.herokuapp.com/">Pong game</a> in HTML &amp; Javascript with my newly acquired knowledge.</p><p>I personally believe this has been one of my better decisions in life and I am grateful for all the devs that I’ve met along the way that has shared their knowledge with me.</p><p>And I also want to thank all my viewers that have been following my blogs since my first month of the Flatiron program.</p><p>If you enjoyed this article, please follow or leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5baa4951acc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/my-first-year-of-software-engineering-5baa4951acc">My First Year Of Software Engineering</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Pong with Javascript]]></title>
            <link>https://stevenwubc.medium.com/building-pong-with-javascript-c0dd0ab79c9c?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0dd0ab79c9c</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 25 Jul 2021 22:45:18 GMT</pubDate>
            <atom:updated>2021-07-29T01:51:17.906Z</atom:updated>
            <content:encoded><![CDATA[<p>A how-to guide on building out Pong with nothing but HTML,CSS and JS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJi0WsDQpWU8UB-MFMt3tg.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/startupstockphotos-690514/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=593354">StartupStockPhotos</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=593354">Pixabay</a></figcaption></figure><p>As I am a recent software graduate, I have been busy spending my time applying to jobs, networking and learning new technologies. This weekend I decided to do something fun and stay relatively productive to my job search so I built a pong game using vanilla JS and I had a BLAST doing it.</p><p>I documented the code from start to finish so I can share with my fellow devs that loves to game like I do and created this guide if you want to learn how to build Pong using nothing but HTML,CSS and JS.</p><p>Let’s get started!</p><h3>Installation</h3><p>Let’s start by using the terminal to create a folder with our boilerplate files</p><pre>mkdir pong-app<br>cd pong-app<br>touch index.html<br>touch game.js<br>touch game.css</pre><p>Next we go into our HTML file and if you’re using VScode like me, you can simple type html and emmet will build out the html boiler plate for you, we then add a link to our stylesheet in the html head and add the game.js script to our body</p><pre>&lt;!DOCTYPE html&gt;</pre><pre>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;</pre><pre>&lt;meta charset=&quot;UTF-8&quot;&gt;<br>&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;<br>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>&lt;title&gt;Pong Game&lt;/title&gt;<br>&lt;link rel=&quot;stylesheet&quot; href=&quot;game.css&quot;&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;script src=&quot;game.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><p>Next we set some simple css code</p><pre>//css code</pre><pre>body {</pre><pre>margin: 0;</pre><pre>background-color: rgb(39, 39, 39);</pre><pre>display: flex;</pre><pre>justify-content: center;</pre><pre>font-family: &quot;Courier New&quot;, Courier, monospace;</pre><pre>width: 100vw;</pre><pre>height: 100vh;</pre><pre>}</pre><p>I chose this gray for my background but if you want a different color scheme, you can always change the values of the app background color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XoEorPeLhdt0hc1-wtmDIQ.png" /></figure><p>Time to start coding, the next step would be creating a canvas for our game, you can check out the code below and lets see the results.</p><p>If you aren’t familiar working with canvas you can always check out this <a href="https://www.w3schools.com/graphics/canvas_reference.asp">doc</a> from W3School.</p><pre>const { body } = document</pre><pre>//canvas code</pre><pre>const canvas = document.createElement(&#39;canvas&#39;)</pre><pre>const context = canvas.getContext(&#39;2d&#39;)</pre><pre>const width = 500</pre><pre>const height = 700</pre><pre>const screenWidth = window.screen.width</pre><pre>const canvasPosition = screenWidth / 2 - width / 2</pre><pre>const isMobile = window.matchMedia(&#39;(max-width: 600px)&#39;)</pre><pre>//generating canvas</pre><pre>const renderCanvas = () =&gt; {</pre><pre>    context.fillStyle = &#39;black&#39;</pre><pre>    context.fillRect( 0, 0, width, height)</pre><pre>}</pre><pre>const createCanvas = () =&gt; {</pre><pre>    canvas.width = width</pre><pre>    canvas.height = height</pre><pre>    body.appendChild(canvas)</pre><pre>    renderCanvas()</pre><pre>}</pre><pre>createCanvas()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BZiQWrxyEkcmzykP13SgAw.png" /></figure><p>This is looking great! we got our canvas rendering correctly now.</p><p>Next we want to write the logic for the paddles such as the size and positioning .</p><pre>//paddle code</pre><pre>const paddleHeight = 10<br>const paddleWidth = 50<br>let paddleBottomX = 225<br>let paddleTopx = 225</pre><p>This should handle our paddle for the canvas by setting the paddle size and positioning it to the middle, remember since the paddle has a width of 50 so the middle of 500 width would be 225 with that 50 offset from the paddle.</p><p>Next let’s go fill in the canvas with out paddles in the render function</p><pre>const renderCanvas = () =&gt; {</pre><pre>//canvas background<br>context.fillStyle = &#39;black&#39;<br>context.fillRect( 0, 0, width, height)</pre><pre>//paddle color<br>context.fillStyle = &#39;white</pre><pre>//player paddle<br>context.fillRect(paddleBottomX, height - 20, paddleWidth, paddleHeight)</pre><pre>//bot paddle<br>context.fillRect(paddleTopX, 10, paddleWidth, paddleHeight)</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiMZB3b0PDaJuc_CJlTf5A.png" /></figure><p>Voila! we have our paddles, next we want to set the middle point of the canvas by setting a stroke path from the left to the right.</p><pre>//render function</pre><pre>//middle line<br>context.beginPath()<br>context.setLineDash([4])<br>context.moveTo(0, 350)<br>context.lineTo(500,350)<br>context.strokeStyle = &#39;lime&#39;<br>context.stroke()</pre><p>Here I set the line positioning to the middle of the canvas and set the color to a retro lime green.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2zfHIB3Fqdjmlw_lpsvSXQ.png" /></figure><p>Next we create our ball logic in the global variables since the ball’s x and y coordinates will change up. We then update our render function to render a round ball for us.</p><pre>//global variables</pre><pre>let ballX = 250<br>let ballY = 350<br>const ballRadius = 5</pre><pre>// in render function</pre><pre>//ball</pre><pre>context.beginPath()<br>context.arc(ballX, ballY, ballRadius, 2 * Math.PI, false)<br>context.fillStyle = &#39;white&#39;<br>context.fill()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2EYOQcAkHoDLK1FfCo8Rg.png" /></figure><p>Now that the ball is rendered, Iwill set a default score for both the player and our bot and set the winning score as well in the global variables.</p><pre>//globally<br>// score</pre><pre>let playerScore = 0<br>let botScore = 0</pre><pre>const winningScore = 7</pre><pre>//in render function<br>// score</pre><pre>context.font = &#39;32px Courier New&#39;<br>context.fillText(playerScore, 20, canvas.height / 2 + 50)<br>context.fillText(botScore, 20, canvas.height / 2 - 30)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgZNd76Ptb3n3CQtd-xKvQ.png" /></figure><p>Now that the canvas is done, I went back to refractor a little and created a start game function that resets the scores and start the canvas function and the animation function as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*evrsOF3QXXFnfki0DCViaQ.png" /></figure><p>You can see the updated code on the left and the canvas is still there so we know it’s working properly.</p><p>Next we want to work on the game logic, we start by setting the ball speed globally.</p><pre>//global variable</pre><pre>let speedY = -1<br>let speedX = speedY<br>let computerSpeed = 3</pre><p>Next we write out a function to make the ball move and call it within our animate function.</p><pre>const ballMove = () =&gt; {<br>// Vertical Speed<br>ballY += - speedY</pre><pre>// Horizontal Speed<br>if (playerMoved &amp;&amp; paddleContact) {</pre><pre>  ballX += speedX</pre><pre>  }<br>}</pre><p>Next we make a ball reset function for the game.</p><pre>const ballReset = () =&gt; {</pre><pre>ballX = width / 2</pre><pre>ballY = height / 2</pre><pre>speedY = -3</pre><pre>paddleContact = false</pre><pre>}</pre><p>Next we move on to the ball boundaries for deciding if the player gets the score or your bot does and call this function within the animate function as well</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b2ea5ec2a8ce8e6d5ba86e065ff63de/href">https://medium.com/media/4b2ea5ec2a8ce8e6d5ba86e065ff63de/href</a></iframe><p>Next we want to build out the botAI and we can do that by making a simple function to make the bot follow the ball.</p><pre>const botAI = () =&gt; {</pre><pre>  if (playerMoved) {</pre><pre>    if (paddleTopX + paddleDiff &lt; ballX) {</pre><pre>      paddleTopX += computerSpeed</pre><pre>    } else {</pre><pre>      paddleTopX -= computerSpeed</pre><pre>    }</pre><pre>  }</pre><pre>}</pre><p>Once you are done building out the game logic, your animate function should contain the game logic we just built and how often to run this, next we can use the window.requestAnimationFrame to call our animate function once every frame which comes out to 60 frames a second. This wouldn’t be a gamer built game without that 60fps smoothness.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfUesL95boiOsBHfQRK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FfUesL95boiOsBHfQRK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FfUesL95boiOsBHfQRK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a2db1114fe4682195d895f604c213b2/href">https://medium.com/media/3a2db1114fe4682195d895f604c213b2/href</a></iframe><p>And voila! The ball is animating correctly! our next step is to finish the game logic by writing the game over logic.</p><p>First we want to globally declare that the game is a new game and a game start/finish logic.</p><pre>///global variables<br>//score<br>let isNewGame = true<br>let isGameOver = true</pre><p>Next we add in ‘<em>isGameOver = false’</em> within our startGame function to set the game as running when the game starts.</p><p>Next we want to write a game over function to stop the game when the winning score is reached and we call this in the animate function.</p><pre>const gameOver = () =&gt; {</pre><pre>  if(playerScore === winningScore || botScore === winningScore) {</pre><pre>    isGameOver = true</pre><pre>  }<br>}</pre><p>Now if you test the game, it will stop once the player or bot reaches a score of 7.</p><p>Next we create a empty div by creating a element on our document that will contain our game over message.</p><pre>const gameOverDiv = document.createElement(&#39;div&#39;)</pre><p>Next we create a show game over message function that hides our canvas and add another div with a victory message and we also create a button with a onclick listener to run the game again once it’s clicked.</p><pre>const showGameOverMsg = (winner) =&gt; {</pre><pre>//hide canvas</pre><pre>canvas.hidden = true</pre><pre>gameOverDiv.textContent = &#39;&#39;</pre><pre>const title = document.createElement(&#39;h1&#39;)</pre><pre>title.textContent = `${winner} Wins!!!`</pre><pre>const playAgainBtn = document.createElement(&#39;button&#39;)</pre><pre>playAgainBtn.setAttribute(&#39;onclick&#39;, &#39;startGame()&#39;)</pre><pre>playAgainBtn.textContent = &#39;Play Again&#39;</pre><pre>gameOverDiv.append(title, playAgainBtn)</pre><pre>body.appendChild(gameOverDiv)</pre><pre>}</pre><p>Now that’s done we have to finish adding the game over logic inside of our startGame function.</p><pre>//inside startGame function</pre><pre>if (isGameOver &amp;&amp; !isNewGame) {</pre><pre>body.removeChild(gameOverDiv)</pre><pre>canvas.hidden = false</pre><pre>}</pre><pre>isGameOver = false</pre><pre>isNewGame = false</pre><p>That’s it! we are all done! Took awhile but if you followed this article correctly everything should be working. You can see my deployed sample <a href="https://stevens-pong-app.herokuapp.com/">here</a>, my current deployed pong game is a little buggy on mobile but it should run fine on desktop, let’s go pc master race! It might look slight different than yours depending on how you do the CSS and here is the <a href="https://github.com/StevenWuTG/pong-game-js">github repo</a> if you need to check out the code.</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0dd0ab79c9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using TypeScript with React]]></title>
            <link>https://stevenwubc.medium.com/using-typescript-with-react-561d41548bf0?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/561d41548bf0</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 18 Jul 2021 20:43:12 GMT</pubDate>
            <atom:updated>2021-07-18T20:43:12.304Z</atom:updated>
            <content:encoded><![CDATA[<p>Intro guide to using TS with React</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*rRKv9aoZVvKfXQpKoJSDqA.png" /></figure><p>As i’ve said before said before using typescript with pre-existing projects can be a hassle due to the need of going back through the whole app to declare typing but if you are a React dev like me, here’s a quick guide on using TypeScript with React.</p><p>This guide might not be for everyone since this is only for React developers but if you are a React dev and want to learn Typescript, you can check out my previous guide on typescript basics.</p><p><a href="https://medium.com/geekculture/is-typescript-the-future-of-javascript-f121aa875464">Is TypeScript the future of JavaScript? | by Steven Wu | Geek Culture | Jul, 2021 | Medium</a></p><h3>Installation</h3><p>React has TypeScript support so you all you need to do is just run your normal create React app command with the TS template flag</p><pre>npx create-react-app &lt;app-name&gt; --template typescript</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AeCnvhBZWk-u4coYw64XSg.png" /></figure><p>Using the TS template flag creates a similar looking React boilerplate app but if you look again your files with .js &amp; .jsx extensions are replaced with .ts &amp; .tsx instead and additionally a json file named tsconfig.json which like the name suggests, contains your configurations for the TS compiler, .</p><h3>Counter example</h3><p>For my example I will be building out a simple counter app. After the React boilerplate is finished installing, I created a a component folder within the src directory and created two components( Count.tsx &amp; Counter.tsx) and replaced the React boilerplate code in the App.tsx with my code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9QWrQ6HsBTLyOQ5xFJMGg.png" /></figure><p>First Let’s look at the Count component</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9bfqxqo0lwwxkHJl46yoDw.png" /></figure><p>TS and React are so compatible these days, you can simply declare the typing of Count as a React functional Component that takes in a prop which will be this component’s count prop with the typing of number. This is really important for using TypeScript with React, this is greatly useful in a real world scenario where other developers might work on your code in the future and they randomly try to add in numbers as strings. I find this to be great a developers since this will throw an error before the product ever gets in the hands of the customer.</p><p>Next, let’s look at our next example of a react class component now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q01FzXTdEJbMA9Jv_bw4MA.png" /></figure><p>You can see in the above example that I’ve simple declared the Props interface that can take in any data and the State interface that only has a count with the typing of number.</p><p>That’s it! I hope this article gave you enough insight on wether or not to use Typescript with React. I personally would be using TS with React in the future due to its flexibility. It’s great that you can catch simple errors by predefining types to your components or simple choose not to define it’s typing in the case of using props where you want the flexibility of passing any thing as a prop down the node tree.</p><p>Explaining TS with React will be too long of an article for one sitting. I will be starting a series of React articles that will teach all the concepts going from beginner to advanced.</p><p>If you enjoyed this article, please follow or leave a comment and check out my other articles on Medium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=561d41548bf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ETH 2.0 is coming!]]></title>
            <link>https://stevenwubc.medium.com/eth-2-0-is-coming-1ab212708ec8?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ab212708ec8</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 11 Jul 2021 21:29:56 GMT</pubDate>
            <atom:updated>2021-07-15T09:37:06.817Z</atom:updated>
            <content:encoded><![CDATA[<p>What you need to know about the upcoming Ethereum upgrade</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*270ez-TzeX8uxRIQsgoJCw.png" /></figure><p>As a coder and a blockchain enthusiast, I want to briefly write about the upcoming upgrades to the Ethereum network. If you are interested but don’t really know anything Blockchain, you can check out my previous post <a href="https://medium.com/geekculture/what-is-blockchain-technology-simply-explained-3e71d56ae415">here</a> if you want a quick explanation on Blockchain and Cryptocurrencies.</p><h3>What it is</h3><p>ETH 2.0 aka project “serenity” is a set of upgrades to the Ethereum network to make it more scalable, more secure and more energy efficient as well.</p><p>Currently Eth can only supports around 15 transactions per second which is already twice the speed of Bitcoin but ETH 2.0 aims to become even more scalable by increasing the speed to up to 1000 transactions per second</p><p>ETH2.0 aims to become more secure by making it harder to perform 51% attacks by changing from proof of work to proof of stack. 51% attacks will still be possible in ETH 2.0 but controlling 51% of staked ETH seems a lot harder since you need to actually own that much ETH instead of the current proof of work system where you are able to perform an attack on the network with 51% of the mining power.</p><p>The current proof of work consensus model used by ETH requires too much energy as it requires more and more miners as the network grow and ETH2.0 aims to become more energy efficient by adopting proof of stake.</p><h3>Proof Of Stake</h3><p>The upcoming change from proof of work to proof of stake will eliminate the need of miners to validate new block, instead the Ethereum network will pay ETH owners to stake a minimum of 32 ETH to be on standby to validate new transactions on the network if they are picked. This is great for energy efficiency since it only requires the computational power of one ETH staker that is picked to validate transactions instead of using the computational power of multiple miners to validate one transaction.</p><h3>Sharding</h3><p>Sharding is a common concept in programming which splits the database into multiple databases containing only portions of the whole database. ETH2.0 aims to use this concept to split their blockchain into 64 shard chains upon upgrade and this will allow multiple transactions to run on each individual shard chains. This is great for scalability since the new ETH network can potentially handle thousands of transactions per section depending on how large the network grows.</p><h3>Beacon Chain</h3><p>The Beacon Chain is proof of stake system and once ETH 2.0 is released, the Beacon chain will become a shard chain that governs all of the other shard chains . The other shard chains will handle transactions while the Beacon chain will be responsible for important stuff such as assigning random ETH stakers to validate new transactions, transferring state data between different shard chains and paying out validators.</p><h3>The Merge</h3><p>Formally known as “Docking”. This will be the final phase when the ETH developers will merge the Beacon chain with the current Ethereum mainnet becoming the first shard chain and signifying the start of ETH 2.0. This is when proof of work ends and hopefully it will invite new users with the new scalability factor and be energy efficient enough for the Doge lord himself, Elon Musk.</p><h3>Conclusion</h3><p>As a Ethereum user I love all the upcoming upgrades to the Ethereum network and I can’t wait to see it’s performance when it will be released in Q1 of 2022.</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding and tech content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ab212708ec8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is TypeScript the future of JavaScript?]]></title>
            <link>https://medium.com/geekculture/is-typescript-the-future-of-javascript-f121aa875464?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/f121aa875464</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 23:18:42 GMT</pubDate>
            <atom:updated>2021-07-05T16:54:05.979Z</atom:updated>
            <content:encoded><![CDATA[<p>Exploring TypeScript and why it’s popular.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*erVqlTKQ7b1wnZhdBRMNKQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ffstop?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Fotis Fotopoulos</a> on <a href="https://unsplash.com/s/photos/programming?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>As a recent Software Engineering graduate. I see more and more companies are seeking TypeScript experience on their job listing and today I will get into a brief explanation of what TypeScript is and why employees are seeking for TypeScript developers.</p><h3>What is TypeScript?</h3><p>TypeScript is a programming language designed by Microsoft in 2012, it originated from the shortcomings of JavaScript development for large scale applications. TS(TypeScript) is basically a superset of Javascript that adds optional static typing to specify objects in programming. TS uses a compiler to compile TS code into JS(JavaScript). Due to the added features and efficiency, TypeScript has exploded in the programming community since their debut in 2012. According to Github language Data in 2020, TypeScript’s popularity has overtaken languages such as C++/C# and Ruby and the demand is still increasing by the day.</p><h3>Why use TypeScript?</h3><p>There are many reasons to use TypeScript but here is a list of my Pros and Cons for using TypeScript</p><h4>Pros</h4><ul><li><strong><em>TypeScript Compiler-</em></strong>This is probably my favorite reason to use TS. With TypeScript, you can use the TSC(TypeScript Compiler) to choose a target version of ECMAScript to translate your TS code into. This is super helpful in the case if you know your target customer base won’t have a modern browser, you can simply set your TSC to compile your code into older versions of JS that can be run on older browsers.</li><li><strong><em>Static Typing-</em></strong>Javascript is dynamically typed and won’t know what type a variable is until the code is ran at run-time. TypeScript adds the option to specify types to variables which will help catch a lot of type based errors at the IDE level instead of a run-time error for cases such as adding a string of “1” to a variable instead of the number 1.</li><li><strong><em>IDE Support-</em></strong>It offers a lot of built-in info related to your code since TypeScript is developed by Microsoft, it is widely supported by Visual Studio &amp; VS code and various IDEs such as Atom and Sublime editor.</li><li><strong><em>Super Set of JavaScript-</em></strong>TypeScript is a super set of JavaScript, making it super easy for JS developers to adapt to TS syntaxes since you are just writing JS code with added functions and features</li><li><strong><em>Cross Platform</em></strong>-The TypeScript compiler can be installed on popular operating systems such as Windows, MacOS and Linux.</li></ul><h4>Cons</h4><ul><li><strong><em>Extra code-</em></strong>You will have to spend more time writing code, if you have to specify the Typing of a bunch of variables in a big project. This Con is also kind of a Pro in my opinion, you might have to spending a little extra time writing code today but the value of preventing small future errors is a pretty good trade off.</li><li><strong><em>Learning Curve-</em></strong>Since TypeScript is a super set of JavaScript, there can be quite a bit of a learning curve since you ultimately HAVE to learn JS in order to use TS.</li><li><strong><em>Compiling Time-</em></strong>Since TypeScript needs to compile the code into JS, that can take time depending on the size of the project and the strength of your CPU which can cause a bit of lag while live coding.</li><li><strong><em>Project Conversion-</em></strong>Due to its complexity of strict typings, it can be troublesome and time consuming to convert larger older JavaScript applications into modern TypeScript applications.</li></ul><h3>How to install TypeScript</h3><p>You can simply install TypeScript with your package manager such as yarn or npm</p><pre>npm install -g typescript</pre><p>What this command does is install the TypeScript Compiler to your local environment. After the installation is complete, you can create .ts files and compile them with the tsc command.</p><pre>//Example</pre><pre>tsc app.ts</pre><p>Once the compiler is complete, you will see a .js file along with your .ts file that was just compiled.</p><p><strong>Resources to learn basic TypeScript</strong></p><ul><li><a href="https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html">TypeScript: Documentation — TypeScript for the New Programmer </a><a href="https://www.codecademy.com/learn/learn-typescript">Learn</a></li><li><a href="https://www.codecademy.com/learn/learn-typescript">TypeScript | Codecademy</a></li><li><a href="https://www.freecodecamp.org/news/learn-typescript-in-5-minutes-13eda868daeb/">Learn TypeScript in 5 minutes — A tutorial for beginners</a></li></ul><h3>Conclusion</h3><p>The official slogan for TypeScript is <strong>“JavaScript that scales” </strong>and I find this to be really appropriate for this programming language. Since I am a JavaScript developer myself, I personally love switching over to TypeScript and it’s new features and functions that it brings to traditional JavaScript.</p><p>I am currently working on a personal big scale project with TypeScript and I will be providing future blogs on how to use TypeScript, so stay tuned!</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and follow for more coding content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f121aa875464" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/is-typescript-the-future-of-javascript-f121aa875464">Is TypeScript the future of JavaScript?</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Must Know Terminal Commands For Mac Devs]]></title>
            <link>https://stevenwubc.medium.com/10-must-know-terminal-commands-for-mac-devs-21ee04890e18?source=rss-bdc0ada61bbe------2</link>
            <guid isPermaLink="false">https://medium.com/p/21ee04890e18</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Steven Wu]]></dc:creator>
            <pubDate>Sat, 26 Jun 2021 14:11:53 GMT</pubDate>
            <atom:updated>2021-06-26T14:11:53.879Z</atom:updated>
            <content:encoded><![CDATA[<p>Visiting some must know Terminal Commands for Mac Developers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*qt7fqkpFQbYTYAXzxBIo9w.jpeg" /><figcaption><a href="https://appleinsider.com/articles/19/01/31/how-to-use-the-terminal-to-change-the-look-of-your-mac-and-speed-up-your-work">-Photo cred: Apple Insider</a></figcaption></figure><p>Welcome to another <em>how to</em> article! A lot of you guys are enjoying this format, so today I will go into my top 10 favorite terminal commands for Mac users.</p><p>As developers it’s becoming more and more user friendly as newer frameworks and programming languages are introduced every year but we cannot forget our trusty built in command line terminal.</p><h4>Change Directory</h4><pre>Command: cd &quot;path&quot; or &quot;path/subpath&quot;</pre><p>By default your terminal will open in your root directory. To change your directory, you simply use the cd command. You can also chain multiple paths with the cd command.</p><h4>Print Working Directory</h4><pre>Command: pwd</pre><p>This command stands for “Print Working Directory”. This is used to check what directory you are currently in your terminal if you ever change directories too much and forget where you are.</p><h4>Listing Directory</h4><pre>Command: ls</pre><p>The ls command is used to see what files are in your current directory. This is quite a useful command since you would need to know what files you are working with.</p><h4>Make Directory</h4><pre>Command: mkdir &quot;path&quot;</pre><p>The mkdir command is used to make a new directory. Basically when you right click on the desktop and hit “New Folder”, the desktop GUI is just entering this command in the background for you.</p><h4>Remove Directory</h4><pre>Command: rmdir &quot;path&quot;</pre><p>The rmdir command is used to remove a directory. However, this command cannot remove directories that has files inside. This brings us to the next command.</p><h4>Remove Directories &amp; -recursive flag</h4><pre>Command: rm -R &quot;path&quot;</pre><p>The rm command is used to remove a file. When used with the recursive -R flag on a directory, your terminal will delete everything in that directory. This is quite a powerful tool, so use at your own discretion because files deleted this way is irreversible.</p><h4>Super User Do</h4><pre>Command: sudo &quot;file&quot;</pre><p>The sudo command stands for “Super User Do”. This command is used to open files but with administrator privileges, your terminal will prompt you for your password to double check your credentials. Due to the nature of this command, please do not use it to open files you acquired from unreliable sources.</p><h4>Copy file Command: cp &quot;file&quot; &quot;new-file&quot;</h4><pre>Command: cp &quot;file&quot; + &quot;new-file&quot;</pre><p>The cp command is used to simply copy a file. This command requires two arguments, the first argument is what file you would like to copy and the second argument is what you want to name the new file.</p><h4>Move file to Directory</h4><pre>Command: mv &quot;file&quot; + &quot;path&quot;</pre><p>The mv command is used to move a file to another directory. This command is used similarly to the cp command, you will need to specify what file you want as the first argument and the directory path as the second argument.</p><h4>Clear Terminal</h4><pre>Command: clear</pre><p>The clear command is used to clear all commands from your terminal ui to give you a clean slate to work from. This command can also be triggered by simply using the CMD + K shortcut.</p><p>That’s it! I hope you’ve enjoyed my little guide on my favorite Mac terminal commands. It is also important to remember you can always use the ../ prefix with your path arguments to point your terminal up one level in your current path.<br>The terminal is quite a powerful tool and it has a lot more <a href="https://www.makeuseof.com/tag/mac-terminal-commands-cheat-sheet/">commands</a> but I’m sure if you master the commands in this guide, you can get up and running on any framework or language.</p><p>Thank you for reading and please leave a comment if you‘ve enjoyed and please follow for more coding content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21ee04890e18" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>