<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Web Development on jeffyang.io</title>
    <link>https://www.jeffyang.io/tags/web-development/</link>
    <description>Recent content in Web Development on jeffyang.io</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>Jeff Yang</copyright>
    <lastBuildDate>Sat, 18 Dec 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.jeffyang.io/tags/web-development/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A Practical Application of Redis Cache</title>
      <link>https://www.jeffyang.io/posts/practical-application-of-redis-cache/</link>
      <pubDate>Sat, 18 Dec 2021 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/practical-application-of-redis-cache/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/qsjqvjzqqbs14eenm259a/thumbnail.png?rlkey=s5u6ao93lajafrka9snbii45v&amp;amp;st=do23ngs6&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Recently, I&amp;rsquo;ve been working on a side project - a web application (&lt;a href=&#34;https://www.inretrospect.finance&#34;&gt;inretrospect.finance&lt;/a&gt;) that lets users record their investments with notes for future reference. The whole project is built on top of a fantastic API from &lt;a href=&#34;https://www.alphavantage.co/documentation/&#34;&gt;Alphavantage&lt;/a&gt; that provides detailed financial data on public companies. While it would have been great if it were possible to make unlimited API requests - their free tier plan only allows for 5 requests per minute and 500 requests per day. This obviously is a significant bottleneck, so I needed to find a solution. After putting some thought into this, I decided to &lt;em&gt;cache&lt;/em&gt; API requests so that whenver there&amp;rsquo;s a &lt;em&gt;cache hit&lt;/em&gt;, a request to the actual API endpoint is not made, therefore cutting down the number of requests to the API service. With that context in mind, let&amp;rsquo;s dive in.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resize Images Stored in AWS S3 with AWS Lambda (feat. Docker)</title>
      <link>https://www.jeffyang.io/posts/aws-s3-and-lambda/</link>
      <pubDate>Mon, 27 Apr 2020 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/aws-s3-and-lambda/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/qbtro69g2uuqrn5ijp4vy/aws_lambda_s3.png?rlkey=51nom6dbfiyt3rcz4x25mdhn9&amp;amp;st=cn2a7w1m&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Note: An AWS Account and a basic knowledge of their services are assumed throughout this blog post&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I have been working on a &lt;a href=&#34;https://www.sublets.nu&#34;&gt;team project&lt;/a&gt; for the past couple of months. The idea is to build a platform for off-campus room search, specifically geared towards students of Northwestern University. Django doing the heavy-lifting as the main engine to power the application, we were able to develop such a platform quite rapidly on our local development environment. We soon migrated our work to Heroku for production testing, and started serving media files from AWS S3 buckets. While user testing in preparation for a full launch of the application, a few non-trivial issues were found. As a room searching platform, our site needs to handle image requests adequately. However, our site suffered from a significant performance issue due to slow loading speed. Photos taken with the iPhones or the Samsung Galaxies these days typically are well over 2 MB in file size. Considering the fact that multiple photos are associated with a single room post and that multiple room posts need to be loaded on a single page, such an enormous file size quickly becomes prohibitive. We needed a solution to scale down large image files, without compromising image quality too much. Luckily, AWS already had advanced cloud computing services to help us achieve our goals: &lt;em&gt;AWS Lambda&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Django Channels 2.0, Postgres, Daphne, and Heroku</title>
      <link>https://www.jeffyang.io/posts/deploy-django-on-heroku/</link>
      <pubDate>Mon, 20 Apr 2020 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/deploy-django-on-heroku/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/gw50hu2ix7raiydd5618e/heroku_django.png?rlkey=gg4gupvuzqu81ar9p6uc400lw&amp;amp;st=azmvi3ra&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;Disclaimer: This blog post is largely a quarantine coding production.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I already have a blog post on how to deploy a very simple Flask application on Heroku. In this blog post, I will explore more details of Heroku deployment, but this time with Django. I have been working on a Django &amp;amp; Channels side project, a web platform to enhance off-campus room searching experience for Northwestern students. As the application development was almost over and user testing seemed like the logical next step to take, I turned my eyes to Heroku (largely for their known simplicity compared to other services such as AWS or Linode). It turned out that there were a few curveballs thrown at me, largely due to Channels using an ASGI server rather than a traditional Python WSGI server. I hope this blog post serves as a future reference for myself, and for a few other friends out there that may be facing similar problems that I did.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tweet Bot with Tweepy and Flask</title>
      <link>https://www.jeffyang.io/posts/tweet-bot/</link>
      <pubDate>Thu, 14 Nov 2019 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/tweet-bot/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/povejfo6ngw42evk2x736/tweetbot.png?rlkey=lgs3b2wkaq97qza0pkebqaohp&amp;amp;st=tsjeb7gf&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;According to recent research conducted by USC and Indiana University affiliates, the &lt;em&gt;conservative&lt;/em&gt;&#xA;estimate for the number of Twitter bots is somewhere around 15% of all active accounts, suggesting&#xA;that automated account activity is in fact prominent across the Twitter ecosystem. In fact, your&#xA;daily interactions on Twitter may very well include interactions with bots! Despite the negative&#xA;connotations surrounding the term &lt;em&gt;Twitter Bots&lt;/em&gt;, the qualitative judgement shouldn&amp;rsquo;t be so&#xA;simplistic. The usage of Twitter bots can vary from being as helpful as disseminating information on&#xA;natural disasters, to being as harmful as cultivating terrorist recruitment propaganda. Leaving that&#xA;value judgment up to you, in this blog post, I&amp;rsquo;ll be writing about how to make a fully functional&#xA;Twitter bot that Tweets simple sentences composed of three words - hence the &amp;ldquo;Three Word&#xA;Philosopher.&amp;rdquo; Hop on!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go Live With Your Flask Application on Heroku</title>
      <link>https://www.jeffyang.io/posts/deploy-flask-application-on-heroku/</link>
      <pubDate>Fri, 01 Nov 2019 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/deploy-flask-application-on-heroku/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://www.dropbox.com/scl/fi/0c7awb6o1548mxuj2wmuq/heroku_flask.png?rlkey=cx8blppmcykm8gleoc6m86h9w&amp;amp;st=mrp8hnbo&amp;amp;raw=1&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;You worked for hours on your project, maybe days, or maybe even weeks or months. Regardless of the magnitude of your project, you probably want to share your work somewhere online so others can see it, right? At least for me, the urge to share my work online is something natural. An application is as good as dead if no one else can see your project, and is just sitting there on your local machine. Many inexperienced programmers go through that disheartening moment of thinking &amp;ldquo;How in the world do I host this application up on the internet?&amp;rdquo; If this sounds like you, this post is meant for you (because I know so very well how hopeless that feels), so follow along!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Build Your Own Website with Flask</title>
      <link>https://www.jeffyang.io/posts/build-a-flask-website/</link>
      <pubDate>Sat, 26 Oct 2019 00:00:00 +0000</pubDate>
      <guid>https://www.jeffyang.io/posts/build-a-flask-website/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://www.jeffyang.io/static/images/build-a-flask-website/flask_md.png&#34; alt=&#34;Blog Post Thumbnail&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: &lt;em&gt;I have migrated my personal website since I wrote this post back in 2019, and moved away from the blog written with Flask. This website that you are on currently is built with Gatsby, and is hosted on Netlify. Regardless, for those of you interested in creating a simple personal website with Flask, read on!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hello World! This is a post that was on my mind for a while now, and I&amp;rsquo;m so glad to finally write this post on this personal portfolio site I created! I previously had a Wordpress site that got me a good-looking fancy website up and running in no time. With all the beautiful Wordpress blog templates out there for a bargain, a sleek looking website was just a few clicks away. Nevertheless, something kept telling me to build a website myself - let me tell you why. Most importantly, the Wordpress site was beautiful on the outside, but rather bulky inside. I wanted to build a faster and a more light-weight website. Wordpress offered thousands of useful plugins (which is great), but having to update them constantly (for security purposes) was another downside of owning a Wordpress site. Last but certainly not the least, I thought &amp;ldquo;why not take this chance to brush up my web development skills?&amp;rdquo; This portfolio site is by no means greatly complex, but it still has all the basic structures of a full-fledged web application. So this simple site came to be, and for its creation, I mainly utilized Python&amp;rsquo;s microframework, Flask (and some BootStrap4 to make things look decent effortlessly).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
