[{"content":"Update I have been useing the udpated zsh for a while and went through a new Macbook setup process again recently, i relized that iTerm2 is not something mandatory.\nThe minimal set up that i found useful and efficient are:\nzsh (default for new Mac) oh-my-zsh plugins: git (default plugin for oh-my-zsh) zsh-autosuggestions zsh-syntax-highlighting theme: powerlevel10k Detailed Installation Guide\nTip: powerlevel10k theme requires special fonts that can be installed via brew.\nI recently reinstalled my macOS and spent some time reconfiguring the shell environment. Admittedly, the default macOS Terminal looks outdated and lacks some important productivity features.\nPrerequisites Homebrew Homebrew is a popular package manager for macOS, specifically for the terminal environment. The App Store may suffice for regular users, but Homebrew is a must-have for people doing engineering work on macOS.\nInstall Homebrew:\n1 /bin/bash -c \u0026#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\u0026#34; Zsh Zsh (Z shell) has replaced Bash as the default shell since macOS Catalina.\nmacOS includes zsh by default, but you can update it via Homebrew:\n1 brew install zsh iTerm2 Terminal According to iTerm2:\niTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.\nIt brings many convenient modern features. Some of my favorites are:\nSplit panes Hotkey window 24-bit color and 256 color mode Global search Password manager Install iTerm2 with Homebrew:\n1 brew install --cask iterm2 Oh-My-Zsh According to the Oh My Zsh site:\nOh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout\u0026hellip;\nInstall with curl:\n1 sh -c \u0026#34;$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\u0026#34; Install with wget:\n1 sh -c \u0026#34;$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)\u0026#34; Zsh itself is a framework and allows you to configure and customize your shell environment, particularly with themes for appearance and plugins for functionality.\nPersonally, I use the Pure theme and a few plugins I find useful:\ngit (included with oh-my-zsh) zsh-autosuggestions — provides command suggestions as you type, based on your history. zsh-syntax-highlighting — highlights commands as you type, making it easier to spot errors. web-search — facilitates quick web searches directly from your terminal. ","permalink":"https://justinhu.org/engineering/supercharge_zsh/","summary":"\u003ch2 id=\"update\"\u003eUpdate\u003c/h2\u003e\n\u003cp\u003eI have been useing the udpated zsh for a while and went through a new Macbook setup process again recently,  i relized that iTerm2 is not something mandatory.\u003c/p\u003e\n\u003cp\u003eThe minimal set up that i found useful and efficient are:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003ezsh\u003c/strong\u003e (default for new Mac)\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eoh-my-zsh\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eplugins\u003c/strong\u003e:\n\u003col\u003e\n\u003cli\u003egit (default plugin for oh-my-zsh)\u003c/li\u003e\n\u003cli\u003ezsh-autosuggestions\u003c/li\u003e\n\u003cli\u003ezsh-syntax-highlighting\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003etheme\u003c/strong\u003e: powerlevel10k\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eDetailed \u003ca href=\"https://curiousmints.com/setting-up-powerlevel10k-with-oh-my-zsh/\"\u003eInstallation Guide\u003c/a\u003e\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eTip: powerlevel10k theme requires special fonts that can be installed via brew.\u003c/p\u003e\n\u003c/blockquote\u003e","title":"Supercharge and Beautify your Zsh environment on Mac"},{"content":"Elora is a village community in the township of Centre Wellington (Wellington County) in the Province of Ontario, Canada. It is well known for its 19th-century limestone architecture and the geographically, historically, and culturally significant gorge.\nElora is famous for the Elora Gorge and various water activities in the gorge. We visited in late winter/early spring, and the Elora Gorge was not open yet. It’s recommended to visit Elora Gorge in summer.\nElora Mill Restaurant is another popular destination in Elora, as it offers a stunning view over the Grand River flowing through Elora.\nA bridge over the Grand River, Elora\nThe bridge, Elora\nThe Grand River, Elora\nA chair in the Bissell Park, Elora\nElora Lions Club is the local club of Lions Clubs Internation, a memebership-based service club/organization\nKnox Presbyterian Church, Elora\nKnox Presbyterian Church, Elora\nA traffic stop, Elora\nA hanging pair of shoes, Elora. Shoe throwing can have various meanings: roadside memorial, gang messaging, the presence of drug dealing, or simply playfulness\nStunning sunset clouds\nTraffic on Highway401, Toronto\n","permalink":"https://justinhu.org/travel/elora/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Elora,_Ontario\"\u003eElora\u003c/a\u003e is a village community in the township of Centre Wellington (Wellington County) in the Province of Ontario, Canada. It is well known for its 19th-century limestone architecture and the geographically, historically, and culturally significant gorge.\u003c/p\u003e\n\u003cp\u003eElora is famous for the \u003ca href=\"https://www.grandriver.ca/outdoor-recreation/conservation-areas/elora-gorge/\"\u003eElora Gorge\u003c/a\u003e and various water activities in the gorge. We visited in late winter/early spring, and the Elora Gorge was not open yet. It’s recommended to visit Elora Gorge in summer.\u003c/p\u003e","title":"Elora"},{"content":"If you’re diving into the world of databases, you’ve likely heard of MongoDB. It’s one of the most popular NoSQL databases out there, and for good reason—it’s flexible, scalable, and developer-friendly. In this MongoDB 101 guide, we’ll break down what MongoDB is, how it works, and why it might be the right choice for your next project.\nWhat is MongoDB? MongoDB is an open-source, document-oriented NoSQL database designed to handle unstructured or semi-structured data. Unlike traditional relational databases (like MySQL or PostgreSQL), which store data in rigid tables with rows and columns, MongoDB uses a more dynamic, JSON-like structure called BSON (Binary JSON). This makes it ideal for applications where data doesn’t fit neatly into a predefined schema. Launched in 2009 by MongoDB Inc., it’s become a go-to solution for startups, enterprises, and developers who need a database that can scale horizontally and adapt to changing requirements.\nKey Concepts of MongoDB To understand MongoDB, you need to grasp a few core concepts:\nDocuments\nDocument is the basic unit of data in MongoDB is a document, which is a set of key-value pairs, similar to a JSON object.\nFor example:\n1 2 3 4 5 { \u0026#34;name\u0026#34;: \u0026#34;Alice\u0026#34;, \u0026#34;age\u0026#34;: 29, \u0026#34;city\u0026#34;: \u0026#34;New York\u0026#34; } Each document can have a unique structure—no need for every document to follow the same schema.\nCollections\nDocuments are grouped into collections, which are analogous to tables in a relational database. However, collections don’t enforce a fixed structure, so documents within a collection can vary widely.\nDatabases\nA MongoDB instance can host multiple databases, each containing its own set of collections.\nBSON\nMongoDB stores data in BSON, a binary representation of JSON. This format supports additional data types (like dates and binary data) and makes querying faster.\nWhy Use MongoDB? So, why choose MongoDB over a traditional relational database? Here are some compelling reasons:\nFlexibility No strict schema means you can evolve your data model as your application grows. Add new fields to documents without breaking anything. Scalability MongoDB is built to scale horizontally by adding more servers (sharding), making it perfect for handling large datasets and high traffic. Speed Its document-based design allows for fast reads and writes, especially for complex queries. Developer-Friendly With support for languages like JavaScript, Python, and Java, and a syntax that feels natural to modern developers, MongoDB fits seamlessly into many tech stacks. How Does MongoDB Work? At its core, MongoDB is all about storing and retrieving data efficiently. Here’s a quick rundown of how it operates:\nInstallation: You can download MongoDB from its official site and run it locally, run it in containerized way, or use a cloud-hosted version like MongoDB Atlas. CRUD Operations: MongoDB supports Create, Read, Update, and Delete (CRUD) operations. For example: Create: db.users.insertOne({\u0026quot;name\u0026quot;: \u0026quot;Bob\u0026quot;, \u0026quot;age\u0026quot;: 25}) Read: db.users.find({\u0026quot;age\u0026quot;: 25}) Update: db.users.updateOne({\u0026quot;name\u0026quot;: \u0026quot;Bob\u0026quot;}, {\u0026quot;$set\u0026quot;: {\u0026quot;age\u0026quot;: 26}}) Delete: db.users.deleteOne({\u0026quot;name\u0026quot;: \u0026quot;Bob\u0026quot;}) Indexing: To speed up queries, MongoDB uses indexes, much like a book’s index helps you find pages faster. Aggregation: MongoDB’s aggregation pipeline lets you process and transform data—like grouping, filtering, or calculating averages—directly in the database. When to Use MongoDB? MongoDB shines in scenarios like:\nContent Management: Storing articles, user profiles, or comments with varying structures. Real-Time Analytics: Handling large volumes of data from IoT devices or user interactions. E-Commerce: Managing product catalogs with diverse attributes (e.g., a phone has a \u0026ldquo;camera\u0026rdquo; field, but a shirt doesn’t). Prototyping: Quickly building apps without worrying about a rigid schema upfront. However, it’s not a silver bullet. If your application relies heavily on complex transactions or relationships (like banking systems), a relational database might be a better fit.\nGetting Started with MongoDB Ready to try it out? Here’s a simple example:\n1. Install MongoDB Multiples ways to install MongoDB:\nLocal Installation: Download it from mongo website and install it Container App: Pull an image of Mongo from Docker\u0026rsquo;s Container Hub and run the service Cloud: use MongoDB Atlas for a cloud setup. Here we use the container app approach to download a MongoDB docker image from the Docker Hub. 2. Run the Service Once we have pulled mongo image to local environment, we can run the container with the docker run button with Docker GUI or with the commmand:\n1 docker run --name mongo-test -d mongo:latest we should see a mongo container running: Exec into the container and use ps command to verify if mongodb is running:\n3. Connect Use the MongoDB shell or a GUI DB tool like MongoDB Compass to interact with Mongo\nMongoDB Shell\nTo connect to a MongoDB deployment running on localhost with default port 27017, run mongosh without any options from the shell of the container:\nmongosh\nIt\u0026rsquo;s equivalent to the following command:\nmongosh \u0026quot;mongodb://localhost:27017\u0026quot; MongoDB Compass\nAn GUI tool that is easy to use. 4. Experiment Create a database, add some documents, and play with queries. For example, in the MongoDB shell:\n1 2 3 use mydb db.people.insertOne({\u0026#34;name\u0026#34;: \u0026#34;Charlie\u0026#34;, \u0026#34;hobby\u0026#34;: \u0026#34;coding\u0026#34;}) db.people.find() Dive deeper into MongoDB Shell Commands.\nWrapping Up MongoDB is a powerful tool in the modern developer’s toolkit, offering a flexible and scalable alternative to traditional databases. Whether you’re building a startup app, managing big data, or just experimenting, MongoDB is a great starting point. As you dig deeper, you’ll discover features like replication, sharding, and geospatial queries that make it even more versatile.\n","permalink":"https://justinhu.org/engineering/mongodb_101/","summary":"\u003cp\u003eIf you’re diving into the world of databases, you’ve likely heard of \u003ca href=\"https://www.mongodb.com/\"\u003eMongoDB\u003c/a\u003e. It’s one of the most popular NoSQL databases out there, and for good reason—it’s flexible, scalable, and developer-friendly. In this MongoDB 101 guide, we’ll break down what MongoDB is, how it works, and why it might be the right choice for your next project.\u003c/p\u003e\n\u003ch2 id=\"what-is-mongodb\"\u003eWhat is MongoDB?\u003c/h2\u003e\n\u003cp\u003eMongoDB is an open-source, document-oriented NoSQL database designed to handle unstructured or semi-structured data. Unlike traditional relational databases (like MySQL or PostgreSQL), which store data in rigid tables with rows and columns, MongoDB uses a more dynamic, JSON-like structure called BSON (Binary JSON). This makes it ideal for applications where data doesn’t fit neatly into a predefined schema.\nLaunched in 2009 by MongoDB Inc., it’s become a go-to solution for startups, enterprises, and developers who need a database that can scale horizontally and adapt to changing requirements.\u003c/p\u003e","title":"MongoDB 101: A Beginner’s Guide to NoSQL Databases"},{"content":"The Kawartha Lakes are a chain of lakes (about 18 - 25 lakes) in south-central Ontario. The city of Kawartha Lakes is named for them, but more than half of the Kawartha Lakes are located in Peterborough County. The Trent-Severn Waterway makes it way through many lakes. Together with the Kawartha Conservation, which is located in the Ken Reid Conservation Area, they make a great destination for a brief escape from the city, especially in the summer.\nLindsay is a small community on the Scugog River located in the City of Kawartha Lakes. It\u0026rsquo;s weirdly popular as a driver\u0026rsquo;s license exam destination among some new immigrants, as it has a county highway with a maximum speed of 80 km/h, making it easier to pass. In contrast, the 400s highways have a 100 km/h limit and way more traffic.\nLindsay The Trent-Severn Waterway, Lock 33 at Lindsay\nKawartha Lakes The Ken Reid Conservation Area\n","permalink":"https://justinhu.org/travel/lindsay_and_kawartha_lakes/","summary":"\u003cp\u003eThe \u003ca href=\"https://en.wikipedia.org/wiki/Kawartha_Lakes_%28Ontario%29\"\u003eKawartha Lakes\u003c/a\u003e are a chain of lakes (about 18 - 25 lakes) in south-central Ontario. \u003ca href=\"https://en.wikipedia.org/wiki/Kawartha_Lakes\"\u003eThe city of Kawartha Lakes\u003c/a\u003e is named for them, but more than half of the Kawartha Lakes are located in \u003ca href=\"https://en.wikipedia.org/wiki/Peterborough_County\"\u003ePeterborough County\u003c/a\u003e. The \u003ca href=\"https://en.wikipedia.org/wiki/Trent%E2%80%93Severn_Waterway\"\u003eTrent-Severn Waterway\u003c/a\u003e makes it way through many lakes. Together with the Kawartha Conservation, which is located in the \u003ca href=\"https://www.kawarthaconservation.com/conservation-areas/ken-reid-conservation-area/\"\u003eKen Reid Conservation Area\u003c/a\u003e, they make a great destination for a brief escape from the city, especially in the summer.\u003c/p\u003e","title":"Lindsay and Kawartha Lakes"},{"content":"Static Site Generator Choosing the right static site generator(SSGs) from the wide range of options available for technical writing can be daunting, whether it\u0026rsquo;s for blogs, personal websites, or open-source project documentation.\nOver the years, I\u0026rsquo;ve used multiple static site generators, primarily for my website. I started with writing on blogging platforms and gradually transitioned to a self-hosted and self-managed approach. Initially, I utilized dynamic website solutions like WordPress, then moved on to static site generators like GitHub Pages, and ultimately Hugo.\nRecently, I came across a few project documentation sites built with Docusaurus, which sparked my interest in writing a summary and a comparative breakdown of these popular static site generators on the market.\nIt’s not surprising that there are outstanding articles discussing the differences among some of the most popular static site generators: Jekyll, Docusaurus, Sphinx, and Hugo. Furthermore, tools like ChatGPT, Grok, and DeepSeek simplify the process of writing this article even more.\nTakeaways Choose the best SSG tool that fits your project requirements and your team’s expertise. Unintentionally, this post has become more like an LLM comparison than a static site generator comparison. LLM tools like ChatGPT, Grok, and DeepSeek have made writing and image generation much easier. (This article is a perfect example) LLM tools fundamentally changed how people get information from the internet, drastically reducing the need for search. (Bad news for Google who dominates the search market) Grok has the most comprehensive, to some extent even verbose, answer to this specific question; whereas ChatGPT and DeepSeek offer a more concise one. Grok has the worst Markdown support. I need to manually add all Markdown formatting, which is tedious, especially for those tables. Answers from ChatGPT and DeepSeek can be directly copied and pasted to a Markdown file. ChatGPT Writing Here’s a comparison of Jekyll, Docusaurus, Sphinx, and Hugo, focusing on their use cases, features, and pros/cons.\nFeature Jekyll Docusaurus Sphinx Hugo Primary Use Case Blogs, personal sites, documentation Documentation, blogs Documentation, technical writing Blogs, documentation, fast static sites Language Ruby JavaScript (React) Python Go Ease of Use Moderate Easy Moderate Easy Performance Moderate Moderate Slower Fast Customization High Medium Medium High Markdown Support Yes Yes Yes (reStructuredText primarily, Markdown with plugins) Yes Templating Liquid React/MDX Jinja2 Go templates Built-in Search No (requires plugins) Yes Yes No (requires plugins) Plugin Support Yes Yes Yes Yes Hosting GitHub Pages, Netlify, Vercel GitHub Pages, Netlify, Vercel ReadTheDocs, GitHub Pages GitHub Pages, Netlify, Vercel Best For Simple blogs, personal sites Modern documentation sites Technical documentation (especially for Python projects) Lightning-fast blogs and static sites Detailed Breakdown 1. Jekyll Best For: Blogs and personal sites Strengths: Strong integration with GitHub Pages, Liquid templating system, good plugin ecosystem. Weaknesses: Written in Ruby, so setup can be complex for non-Ruby users. 2. Docusaurus Best For: Documentation sites, especially for developer tools and projects. Strengths: Uses React and MDX, easy versioning, great for interactive documentation. Weaknesses: React-based, so build times can be slower compared to Hugo. 3. Sphinx Best For: Technical documentation, especially for Python projects. Strengths: Supports reStructuredText, powerful cross-referencing, ReadTheDocs integration. Weaknesses: reStructuredText has a steeper learning curve compared to Markdown. 4. Hugo Best For: High-performance blogs, documentation, and static sites. Strengths: Extremely fast build times, written in Go, flexible templating. Weaknesses: Go templates can be difficult for beginners. Which One Should You Choose? For a blog or personal site → Jekyll or Hugo (Hugo is faster, Jekyll is simpler for GitHub Pages users). For a modern documentation site → Docusaurus (especially if you need React/MDX support). For highly technical documentation → Sphinx (great for Python projects and complex docs). For a blazing-fast static site → Hugo (ideal for large-scale static sites). Grok Writing When choosing a static site generator or documentation tool, the decision often depends on your specific use case, technical expertise, and project requirements. Below is a detailed comparison of Jekyll, Docusaurus, Sphinx, and Hugo, focusing on their features, use cases, strengths, and weaknesses.\n1. Overview of Each Tool Tool Purpose Language Primary Use Case License Jekyll Static site generator Ruby Blogs, portfolios, simple websites MIT Docusaurus Documentation generator JavaScript Technical documentation, open-source MIT Sphinx Documentation generator Python API docs, technical manuals BSD Hugo Static site generator Go Blogs, portfolios, complex websites Apache 2.0 2. Feature Comparison Feature Jekyll Docusaurus Sphinx Hugo Ease of Setup Moderate (requires Ruby knowledge) Easy (Node.js-based) Moderate(Python-based) Easy (single binary) Performance Moderate Good Good Excellent (very fast) Customization High (Liquid templates) High (React components) Moderate (Jinja2) High (Go templates) Themes/Plugins Many themes/plugins Limited themes, extensible plugins Limited themes, extensible plugins Many themes/plugins Search Functionality Basic (requires plugins) Built-in (Algolia) Basic (requires plugins) Basic (requires plugins) Versioning Manual (via plugins) Built-in (doc versioning) Manual (via plugins) Manual (via plugins) Markdown Support Excellent Excellent Good (reStructuredText preferred) Excellent Multi-language Manual (via plugins) Built-in Manual (via plugins) Built-in Community Support Large Growing Large (Python-focused) Large Integration GitHub Pages native Open-source friendly Strong Python ecosystem Flexible hosting 3. Strengths and Weaknesses Jekyll Strengths: Native integration with GitHub Pages, making it ideal for hosting simple sites. Large ecosystem of themes and plugins. Great for blogs, portfolios, and small to medium-sized websites. Lightweight and easy to extend with Liquid templating. Weaknesses: Performance can be slow for large sites due to Ruby’s processing overhead. Setup can be tricky for non-Ruby developers. Limited built-in features for documentation-heavy projects (e.g., versioning, search). Docusaurus Strengths: Designed specifically for technical documentation, especially for open-source projects. Built-in features like versioning, search (via Algolia), and multi-language support. Uses React, making it highly customizable for JavaScript developers. Modern, user-friendly interface out of the box. Weaknesses: Not ideal for general-purpose websites (e.g., blogs, portfolios). Requires familiarity with JavaScript/React for advanced customization. Smaller ecosystem of themes compared to Jekyll or Hugo. Sphinx Strengths: Industry standard for Python-based documentation (e.g., Python, NumPy, Django). Excellent support for reStructuredText and technical documentation features (e.g., API docs, cross-references). Highly extensible with plugins for code documentation (e.g., autodoc). Strong integration with Python ecosystems. Weaknesses: Steeper learning curve, especially for non-Python developers. Limited support for Markdown (reStructuredText is the default). Not suitable for general-purpose websites or blogs. Themes and styling options are more limited compared to others. Hugo Strengths: Extremely fast build times, even for large sites, thanks to Go’s performance. Great for blogs, portfolios, and complex websites. Large ecosystem of themes and plugins. Built-in support for multi-language sites. Single binary deployment (no dependencies required). Weaknesses: Not specifically designed for documentation, so it lacks features like versioning or search out of the box. Go templating can be less intuitive compared to Liquid or React. Smaller community compared to Jekyll, though still active. 4. Best Use Cases Tool Best For Jekyll Blogs, personal websites, portfolios, GitHub Pages-hosted projects. Docusaurus Open-source project documentation, product docs, developer guides. Sphinx Technical documentation, API docs, Python-based projects. Hugo High-performance websites, blogs, portfolios, multi-language sites. 5. Technical Expertise Required Tool Technical Expertise Needed Jekyll Basic Ruby, HTML/CSS, Liquid templating. Docusaurus JavaScript, React, Node.js. Sphinx Python, reStructuredText, Jinja2 templating. Hugo Basic Go templating, HTML/CSS. 6. Hosting and Deployment Tool Hosting Options Jekyll GitHub Pages (native), Netlify, custom servers. Docusaurus Netlify, Vercel, GitHub Pages, custom servers. Sphinx ReadTheDocs, Netlify, custom servers. Hugo Netlify, Vercel, GitHub Pages, custom servers. 7. When to Choose Each Tool Choose Jekyll if: You want a simple static site generator for blogs or portfolios. You’re already using GitHub Pages for hosting. You prefer a mature ecosystem with many themes and plugins. Choose Docusaurus if: You’re building technical documentation for an open-source project or product. You need built-in features like versioning, search, and multi-language support. You’re comfortable with JavaScript/React. Choose Sphinx if: You’re working on a Python-based project or need high-quality API documentation. You prefer reStructuredText over Markdown. You need a tool tightly integrated with the Python ecosystem. Choose Hugo if: You need a high-performance static site generator for large or complex websites. You want built-in multi-language support. You value speed and simplicity in deployment. DeepSeek Writing When comparing Jekyll, Docusaurus, Sphinx, and Hugo, it\u0026rsquo;s important to consider their primary use cases, ease of use, flexibility, and community support. Here\u0026rsquo;s a detailed comparison:\n1. Jekyll Primary Use Case: Static site generation, particularly for blogs and personal websites. Language: Ruby Ease of Use: Moderate. Requires knowledge of Ruby and Liquid templating. Flexibility: High. Can be customized extensively with plugins and themes. Community Support: Large and active community. Many themes and plugins available. Documentation: Comprehensive and well-maintained. Performance: Good, but can be slower for very large sites. Hosting: Can be hosted on GitHub Pages, Netlify, etc. Best For: Bloggers, developers who prefer Ruby, and those who want a simple, flexible static site generator. 2. Docusaurus Primary Use Case: Documentation websites, especially for open-source projects. Language: JavaScript (React) Ease of Use: Easy, especially for those familiar with React. Flexibility: Moderate. Designed specifically for documentation, so less flexible for other types of sites. Community Support: Growing, especially within the open-source community. Documentation: Excellent, with a focus on ease of use for documentation. Performance: Good, optimized for documentation sites. Hosting: Can be hosted on GitHub Pages, Netlify, Vercel, etc. Best For: Open-source projects, technical documentation, and teams familiar with React. 3. Sphinx Primary Use Case: Documentation generation, particularly for Python projects. Language: Python Ease of Use: Moderate to difficult. Requires knowledge of reStructuredText or Markdown. Flexibility: High, especially for technical documentation. Supports extensions and custom themes. Community Support: Strong within the Python community. Documentation: Comprehensive, but can be complex for beginners. Performance: Good, optimized for large documentation sets. Hosting: Can be hosted on Read the Docs, GitHub Pages, etc. Best For: Python projects, technical documentation, and developers comfortable with reStructuredText. 4. Hugo Primary Use Case: Static site generation for a wide range of websites, including blogs, portfolios, and documentation. Language: Go (Golang) Ease of Use: Easy to moderate. Uses Go templates, which can be learned quickly. Flexibility: Very high. Extremely fast and supports a wide range of content types. Community Support: Large and active community. Many themes and plugins available. Documentation: Comprehensive and well-maintained. Performance: Excellent, known for its speed even with large sites. Hosting: Can be hosted on GitHub Pages, Netlify, AWS, etc. Best For: Developers who need fast build times, large sites, and those who prefer Go. Summary Table Feature Jekyll Docusaurus Sphinx Hugo Primary Use Blogs, Personal Sites Documentation Documentation General Static Sites Language Ruby JavaScript (React) Python Go (Golang) Ease of Use Moderate Easy Moderate to Difficult Easy to Moderate Flexibility High Moderate High Very High Community Large Growing Strong (Python) Large Documentation Comprehensive Excellent Comprehensive Comprehensive Performance Good Good Good Excellent Hosting GitHub Pages, Netlify GitHub Pages, Netlify Read the Docs, GitHub GitHub Pages, Netlify Best For Bloggers, Ruby Devs Open-source, React Devs Python Projects Fast, Large Sites, Go Conclusion Jekyll is great for bloggers and those who prefer Ruby. Docusaurus is ideal for documentation, especially for React-based projects. Sphinx is the go-to for Python projects needing detailed documentation. Hugo is versatile and fast, suitable for a wide range of static sites, especially large ones. ","permalink":"https://justinhu.org/engineering/popular_static_site_generator/","summary":"\u003ch2 id=\"static-site-generator\"\u003eStatic Site Generator\u003c/h2\u003e\n\u003cp\u003eChoosing the right \u003ca href=\"https://en.wikipedia.org/wiki/Static_site_generator\"\u003estatic site generator\u003c/a\u003e(SSGs) from the wide range of options available for technical writing can be daunting, whether it\u0026rsquo;s for blogs, personal websites, or open-source project documentation.\u003c/p\u003e\n\u003cp\u003eOver the years, I\u0026rsquo;ve used multiple static site generators, primarily for my website. I started with writing on blogging platforms and gradually transitioned to a self-hosted and self-managed approach. Initially, I utilized dynamic website solutions like \u003ca href=\"https://en.wikipedia.org/wiki/WordPress\"\u003eWordPress\u003c/a\u003e, then moved on to static site generators like \u003ca href=\"https://pages.github.com/\"\u003eGitHub Pages\u003c/a\u003e, and ultimately \u003ca href=\"https://gohugo.io/\"\u003eHugo\u003c/a\u003e.\u003c/p\u003e","title":"Popular Static Site Generator Comparison: Jekyll, Docusaurus, Sphinx, Hugo"},{"content":"Niagara Falls is a popular tourism destination in the Greater Toronto Area and Canada, especially in summer. This post offers the unique views of Niagara Falls in winter times, whereas a previous post Niagara Falls explores the beauty it provides during summer.\nThe Niagara Parks Butterfly Conservatory operated by the Niagara Parks Commissions was opened in December 1996. It has over 2,000 tropical butterflies from over 45 different species. Some useful knowledge I learned after the visit is that you should wear bright clothes, move slowly, and wear perfume or cologne if you want butterflies to land on you.\nNiagara Falls in Winter Butterfly Conservatory ","permalink":"https://justinhu.org/travel/nagara_falls_in_winter/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Niagara_Falls,_Ontario\"\u003eNiagara Falls\u003c/a\u003e is a popular tourism destination in the Greater Toronto Area and Canada, especially in summer. This post offers the unique views of Niagara Falls in winter times, whereas a previous post \u003ca href=\"/travel/niagara_falls/\"\u003eNiagara Falls\u003c/a\u003e explores the beauty it provides during summer.\u003c/p\u003e\n\u003cp\u003eThe \u003ca href=\"https://en.wikipedia.org/wiki/Niagara_Parks_Butterfly_Conservatory\"\u003eNiagara Parks Butterfly Conservatory\u003c/a\u003e operated by the Niagara Parks Commissions was opened in December 1996. It has over 2,000 tropical butterflies from over 45 different species. Some useful knowledge I learned after the visit is that you should wear bright clothes, move slowly, and wear perfume or cologne if you want butterflies to land on you.\u003c/p\u003e","title":"Niagara Falls in Winter"},{"content":"Intro In today\u0026rsquo;s fast-paced world, people often need to juggle dozens—or even more—tasks simultaneously within a short period of time.\nThe advent of instant messaging tools (e.g., Slack, Teams, and WebEx) has further exacerbated this situation. The corporate world\u0026rsquo;s expectations have shifted from responding to dozens of emails within hours to replying to hundreds of instant messages within minutes.\nThis environment is distracting, exhausting, and counterproductive. To thrive, we must adopt better strategies to manage our workload.\nThis post explores how to prioritize tasks using the Importance and Urgency Matrix and how to evaluate whether your job aligns with your long-term goals and values.\nPrioritization Based on Importance and Urgency Matrix Basic Idea Importance: Activities that have a long-term impact on your goals, values, and mission. These tasks are typically not urgent, allowing you to approach them calmly and rationally. Urgency: Activities that demand immediate attention. These tasks often put you in a reactive mode—defensive, hurried, and narrowly focused. The definition of importance varies from person to person and team to team. What’s important to one individual may be trivial to another. Similarly, priorities evolve over time; what matters in your 30s may differ significantly from your 20s. Some introspection is necessary to gain clarity on what truly matters to you.\nThe Matrix General guidelines:\nHandle urgent, important tasks first. Schedule and reserve time for important but not urgent tasks. Delegate urgent but not important tasks whenever possible. Deprioritize tasks that are neither important nor urgent. For individuals who lack the authority to delegate tasks (e.g., non-management roles), urgent activities (categories 1 \u0026amp; 3) will need to be addressed first.\nEvaluate the Job Interestingly, the same Importance and Urgency Matrix can be applied to evaluate your job. This helps determine whether your role contributes to your long-term goals, values, and mission, and whether it is sustainable in the long run.\nA good job should allow you time to focus on important but not urgent tasks. If most of your time is consumed by urgent activities—constantly putting out fires—leaving no room for important, non-urgent work, the job may not be beneficial or sustainable for you in the long term. In such cases, a job change might be necessary.\nEvaluate Projects Similarly, the matrix of importance and complexity can be used to evaluate and prioritize projects. Among all those projects, how should we prioritize and allocate resources effectively?\nImportance and Complexity Matrix The Importance and Complexity Matrix is a framework that helps you assess and prioritize projects based on two key dimensions:\nImportance: The value or impact a project has on achieving your goals. Complexity: The level of effort, resources, or time required to complete the project. Guidelines for Prioritization High Importance, Low Complexity: Prioritize these projects first as they deliver the most value with minimal effort. High Importance, High Complexity: Focus on these next, as they are critical but require significant planning and resources. Low Importance, Low Complexity: Address these only if time and resources permit. Low Importance, High Complexity: Deprioritize or eliminate these projects to avoid wasting resources. By applying this matrix, you can allocate resources effectively and ensure that your efforts align with your strategic goals.\nConclusion The Importance and Urgency Matrix is a powerful tool for managing tasks and evaluating your job. By focusing on what truly matters and managing urgent distractions effectively, you can achieve greater clarity, productivity, and long-term satisfaction in both your personal and professional life.\nSimilarly, the Importance and Complexity Matrix provides a structured approach to project prioritization, enabling you to maximize impact while minimizing wasted effort.\n","permalink":"https://justinhu.org/business/prioritization_importance_urgency_and_complexity/","summary":"\u003ch2 id=\"intro\"\u003eIntro\u003c/h2\u003e\n\u003cp\u003eIn today\u0026rsquo;s fast-paced world, people often need to juggle dozens—or even more—tasks simultaneously within a short period of time.\u003c/p\u003e\n\u003cp\u003eThe advent of instant messaging tools (e.g., Slack, Teams, and WebEx) has further exacerbated this situation. The corporate world\u0026rsquo;s expectations have shifted from responding to dozens of emails within hours to replying to hundreds of instant messages within minutes.\u003c/p\u003e\n\u003cp\u003eThis environment is \u003cem\u003e\u003cstrong\u003edistracting, exhausting, and counterproductive\u003c/strong\u003e\u003c/em\u003e. To thrive, we must adopt better strategies to manage our workload.\u003c/p\u003e","title":"Prioritization: Importance, Urgency, and Complexity"},{"content":"Port Dover Port Dover is an unincorporated community and former town located in Norfolk County, Ontario, Canada, on the north shore of Lake Erie.\nIt has a population of about 8000 people, according to the 2021 Census.\nGeneral Impressions Port Dover is a lovely small beach town. The town is quite small, quiet, and beautiful. It has a rich history of fishing unsurprisingly, and pottery surprisingly.\nIt’s about an hour\u0026rsquo;s drive from Hamilton. It would be a good neighborhood to raise a family.\nThe drive through Highway 6 offers a great view of southern Ontario.\nThe Beach And Lighthouse I visited Port Dover on a rainy day; the view of the lake and beach should be much better on a sunny day.\nPort Dover Harbour Museum Port Dover has a cute little Museum and it’s a great place to learn about the town\u0026rsquo;s rich history.\nWho thought that Port Dover once had a booming business of exporting alcohol to the U.S.(Erie, Pennsylvania)? 😜\n","permalink":"https://justinhu.org/travel/port_dover/","summary":"\u003ch2 id=\"port-dover\"\u003ePort Dover\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Port_Dover\"\u003ePort Dover\u003c/a\u003e is an unincorporated community and former town located in Norfolk County, Ontario, Canada, on the north shore of Lake Erie.\u003c/p\u003e\n\u003cp\u003eIt has a population of about 8000 people, according to the 2021 Census.\u003c/p\u003e\n\u003ch2 id=\"general-impressions\"\u003eGeneral Impressions\u003c/h2\u003e\n\u003cp\u003ePort Dover is a lovely small beach town. The town is quite small, quiet, and beautiful. It has a rich history of fishing unsurprisingly, and pottery surprisingly.\u003c/p\u003e\n\u003cp\u003eIt’s about an hour\u0026rsquo;s drive from Hamilton. It would be a good neighborhood to raise a family.\u003c/p\u003e","title":"Port Dover: Beach, Lighthouse, and the Harbour Museum"},{"content":"Algonquin Provincial Park Algonquin Provincial Park is Ontario’s oldest provincial park which was established in 1893.\nIt has an astonishing size of 7,653 km2, making it larger than Canada’s smallest province: Prince Edward Island (5660 km2). It’s also about the same size as the US states of Delaware and Rhode Island combined, according to this FAQ on the park’s official website.\nGeneral Impressions It\u0026rsquo;s big. It\u0026rsquo;s gigantic with amazing views. So many different lakes, creeks, trails, and forests in the park. Driving through Algonquin (Highway60) is a great joy. Enjoy the peace in beautiful nature. The Lookout Trail Algonquin is still amazingly beautiful in late fall/early winter; a different type of beauty.\nAlgonquin Logging Museum Algonquin has about 200 years of history of logging. It started as a logging destination and later expanded to recreational usage as a provincial park. Logging before the modern invention of mechanic saw and truck was a hard job and many people died logging in Algonquin. The Algonquin Logging Museum, which is a lovely outdoor trail, explains the history of logging in Algonquin and it\u0026rsquo;s 200 year\u0026rsquo;s evolution and development.\n","permalink":"https://justinhu.org/travel/algonquin_park/","summary":"\u003ch2 id=\"algonquin-provincial-park\"\u003eAlgonquin Provincial Park\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Algonquin_Provincial_Park\"\u003eAlgonquin Provincial Park\u003c/a\u003e is Ontario’s oldest provincial park which was established in 1893.\u003c/p\u003e\n\u003cp\u003eIt has an astonishing size of 7,653 km2, making it larger than Canada’s smallest province: \u003ca href=\"https://en.wikipedia.org/wiki/Prince_Edward_Island\"\u003ePrince Edward Island\u003c/a\u003e (5660 km2). It’s also about the same size as the US states of \u003ca href=\"https://en.wikipedia.org/wiki/Delaware\"\u003eDelaware\u003c/a\u003e and \u003ca href=\"https://en.wikipedia.org/wiki/Rhode_Island\"\u003eRhode Island\u003c/a\u003e combined, according to this \u003ca href=\"https://www.algonquinpark.on.ca/visit/general_park_info/faqs.php#:~:text=Q%3A%20How%20big%20is%20Algonquin,%281%2C045%20square%20miles%29%20combined.\"\u003eFAQ\u003c/a\u003e on the park’s official website.\u003c/p\u003e\n\u003ch2 id=\"general-impressions\"\u003eGeneral Impressions\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003eIt\u0026rsquo;s big. It\u0026rsquo;s gigantic with amazing views.\u003c/li\u003e\n\u003cli\u003eSo many different lakes, creeks,  trails, and forests in the park.\u003c/li\u003e\n\u003cli\u003eDriving through Algonquin (\u003ca href=\"https://en.wikipedia.org/wiki/Ontario_Highway_60\"\u003eHighway60\u003c/a\u003e) is a great joy. Enjoy the peace in beautiful nature.\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"the-lookout-trail\"\u003eThe Lookout Trail\u003c/h2\u003e\n\u003cp\u003eAlgonquin is still amazingly beautiful in late fall/early winter; a different type of beauty.\u003c/p\u003e","title":"Algonquin: Lookout Trail and Logging Museum"},{"content":" The Current CI/CD tooling for our company is moving away from Jenkins and towards GitHub Actions. Learn some basics about GitHub Actions as a reulst.\nWhat\u0026rsquo;s Git Actions According to Github:\nGitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that run tests whenever you push a change to your repository, or that deploy merged pull requests to production.\nIf you have experience with CI/CD tooling, potentially with Genkins, you can view Github Actions as a similar but better tool to achive the same purpose.\nSimilarly, GitHub Actions can be used for:\nbuild and test deployment publish packges manage github(issues, lablels) and so so A Quick Example 1. Create a Github Action Workflow YAML File In your repository on GitHub, create a workflow file called github-actions-hello-world.yml in the .github/workflows directory.\n2. Copy and Paste the Following Hello World YAML Content 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 name: GitHub Actions Hello World run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - run: echo \u0026#34;🎉 The job was automatically triggered by a ${{ github.event_name }} event.\u0026#34; - run: echo \u0026#34;🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!\u0026#34; - run: echo \u0026#34;🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.\u0026#34; - name: Check out repository code uses: actions/checkout@v4 - run: echo \u0026#34;💡 The ${{ github.repository }} repository has been cloned to the runner.\u0026#34; - run: echo \u0026#34;🖥️ The workflow is now ready to test your code on the runner.\u0026#34; - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo \u0026#34;🍏 This job\u0026#39;s status is ${{ job.status }}.\u0026#34; Commit the YAML File to the Repo Committing the workflow file to your branch\nView the Workflow Reulst On GitHub, navigate to the main page of the repository. Under your repository name, click Actions. In the left sidebar, click the workflow you want to display Compare GitHub Actions with Jenkins GitHub Actions Impressions easy to learn and get started highly integrated with Github and developer friendly SaaS solution and team can choose to not maintain servers for CI/CD. Market place for sharing and reusing workflows Jenkins open source software and plug-ins to extend functionality team need to maintain the servers for jenkins and jenkins agents not locked to one source code management platform(Github) and can have code on any repository, including Github, Gitlab, BitBucket, and others. learning curve is more steep ","permalink":"https://justinhu.org/engineering/github_actions_101/","summary":"\u003cblockquote\u003e\n\u003cp\u003eThe Current CI/CD tooling for our company is moving away from Jenkins and towards GitHub Actions. Learn some basics about GitHub Actions as a reulst.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"whats-git-actions\"\u003eWhat\u0026rsquo;s Git Actions\u003c/h2\u003e\n\u003cp\u003eAccording to \u003ca href=\"https://docs.github.com/en/actions/writing-workflows/quickstart\"\u003eGithub\u003c/a\u003e:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eGitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that run tests whenever you push a change to your repository, or that deploy merged pull requests to production.\u003c/p\u003e\n\u003c/blockquote\u003e","title":"GitHub Actions and Why It's Gaining Popularity over Jenkins as Default CI/CD Tool "},{"content":"Infrastructure as Code Challenge of Provisioning Cloud Resources Manual Provisioning of infrastructure at scale is slow and cumbersome. Provisioning infrastructure through point-and-click GUIs is error-prone, inefficient, and doesn\u0026rsquo;t scale. The cloud was built for automation, but writing custom scripts for every service and every use case is time-consuming and costly for development teams.\nSolution Infrastructure as Code(IaC) to automate infrastructure provisioning on any cloud. Multi-cloud provisioning should be automated with declarative infrastructure as code. There should be a simple, easy to learn configuration language to allow people to define infrastructure resources such that infrastructure can be codified, shared, versioned, and executed with a consistent workflow across all environments.\nTerraform There are dozens of different tools for infrastructure as code, and Terraform, developed by HashiCorp, is one of the most popular IaC tool in the industry now.\nAlternatively, OpenTofu is an open-source tool forked from terraform 1.5.6 and offers similar features and interfaces.\nTerraform Quick Start How Terraform Works Terraform relies on different service providers to actual manage infrastructure resources on different platforms. Service provider is actually a module that use upstream platform APIs to provision resources.\nThere are 5 steps to deploy infrastructure with Terraform:\nScope - Identify the infrastructure for the project Author - Write the configuration for the infrastructure Initialize - Install the plugins Terraform needs to manage the infrastructure Plan - Preview the changes Terraform will make to match your configuration Apply - Make the planned changes Install Terraform CLI Use Homebrew to install Terraform on Mac\n1 2 brew tap hashicorp/tap brew install hashicorp/tap/terraform Verify the Installation\n1 2 3 4 5 6 7 8 9 terraform -help Usage: terraform [-version] [-help] \u0026lt;command\u0026gt; [args] The available commands for execution are listed below. The most common, useful commands are shown first, followed by less common or more advanced commands. If you\u0026#39;re just getting started with Terraform, stick with the common commands. For the other commands, please read the help and docs before usage. Terraform Provisions a NGINX server via Docker Prerequisite Docker Desktop Installed and Running Terraform Installed Create a director for the project Create and navigate to a director for the project\n1 2 mkdir learn-terraform-docker-container cd learn-terraform-docker-container Create Terraform configuration file In the working directory, create a fill named main.tf with the following configuration\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 terraform { required_providers { docker = { source = \u0026#34;kreuzwerker/docker\u0026#34; version = \u0026#34;~\u0026gt; 3.0.1\u0026#34; } } } provider \u0026#34;docker\u0026#34; {} resource \u0026#34;docker_image\u0026#34; \u0026#34;nginx\u0026#34; { name = \u0026#34;nginx\u0026#34; keep_locally = false } resource \u0026#34;docker_container\u0026#34; \u0026#34;nginx\u0026#34; { image = docker_image.nginx.image_id name = \u0026#34;tutorial\u0026#34; ports { internal = 80 external = 8000 } } Initialize the Project 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 terraform init Initializing the backend... Initializing provider plugins... - Reusing previous version of kreuzwerker/docker from the dependency lock file - Using previously-installed kreuzwerker/docker v3.0.2 Terraform has been successfully initialized! You may now begin working with Terraform. Try running \u0026#34;terraform plan\u0026#34; to see any changes that are required for your infrastructure. All Terraform commands should now work. If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary. This will install the required plugins for the providers in the configuration.\nPlan and Apply the config 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 terraform plan Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # docker_container.nginx will be created + resource \u0026#34;docker_container\u0026#34; \u0026#34;nginx\u0026#34; { + attach = false + bridge = (known after apply) + command = (known after apply) + container_logs = (known after apply) + container_read_refresh_timeout_milliseconds = 15000 + entrypoint = (known after apply) + env = (known after apply) + exit_code = (known after apply) + hostname = (known after apply) + id = (known after apply) + image = (known after apply) + init = (known after apply) + ipc_mode = (known after apply) + log_driver = (known after apply) + logs = false + must_run = true + name = \u0026#34;tutorial\u0026#34; + network_data = (known after apply) + read_only = false + remove_volumes = true + restart = \u0026#34;no\u0026#34; + rm = false + runtime = (known after apply) + security_opts = (known after apply) + shm_size = (known after apply) + start = true + stdin_open = false + stop_signal = (known after apply) + stop_timeout = (known after apply) + tty = false + wait = false + wait_timeout = 60 + healthcheck (known after apply) + labels (known after apply) + ports { + external = 8000 + internal = 80 + ip = \u0026#34;0.0.0.0\u0026#34; + protocol = \u0026#34;tcp\u0026#34; } } # docker_image.nginx will be created + resource \u0026#34;docker_image\u0026#34; \u0026#34;nginx\u0026#34; { + id = (known after apply) + image_id = (known after apply) + keep_locally = false + name = \u0026#34;nginx\u0026#34; + repo_digest = (known after apply) } Plan: 2 to add, 0 to change, 0 to destroy. This will preview what kind of changes terraform will apply. If everything looks good, we can proceed to apply it. It will require an input of \u0026lsquo;Yes\u0026rsquo; to confirm\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 terraform apply Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # docker_container.nginx will be created + resource \u0026#34;docker_container\u0026#34; \u0026#34;nginx\u0026#34; { + attach = false + bridge = (known after apply) + command = (known after apply) + container_logs = (known after apply) + container_read_refresh_timeout_milliseconds = 15000 + entrypoint = (known after apply) + env = (known after apply) + exit_code = (known after apply) + hostname = (known after apply) + id = (known after apply) + image = (known after apply) + init = (known after apply) + ipc_mode = (known after apply) + log_driver = (known after apply) + logs = false + must_run = true + name = \u0026#34;tutorial\u0026#34; + network_data = (known after apply) + read_only = false + remove_volumes = true + restart = \u0026#34;no\u0026#34; + rm = false + runtime = (known after apply) + security_opts = (known after apply) + shm_size = (known after apply) + start = true + stdin_open = false + stop_signal = (known after apply) + stop_timeout = (known after apply) + tty = false + wait = false + wait_timeout = 60 + healthcheck (known after apply) + labels (known after apply) + ports { + external = 8000 + internal = 80 + ip = \u0026#34;0.0.0.0\u0026#34; + protocol = \u0026#34;tcp\u0026#34; } } # docker_image.nginx will be created + resource \u0026#34;docker_image\u0026#34; \u0026#34;nginx\u0026#34; { + id = (known after apply) + image_id = (known after apply) + keep_locally = false + name = \u0026#34;nginx\u0026#34; + repo_digest = (known after apply) } Plan: 2 to add, 0 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only \u0026#39;yes\u0026#39; will be accepted to approve. Enter a value: yes docker_image.nginx: Creating... docker_image.nginx: Still creating... [10s elapsed] docker_image.nginx: Still creating... [20s elapsed] docker_image.nginx: Creation complete after 26s [id=sha256:a72860cb95fd59e9c696c66441c64f18e66915fa26b249911e83c3854477ed9anginx] docker_container.nginx: Creating... docker_container.nginx: Creation complete after 3s [id=89fb0fe9d56082357e1059cf4229dee92979154d73402b2758c872ffda0cf104] Verify Nginx Container Being Created 1 2 3 4 docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 89fb0fe9d560 a72860cb95fd \u0026#34;/docker-entrypoint.…\u0026#34; About a minute ago Up About a minute 0.0.0.0:8000-\u0026gt;80/tcp tutorial visit localhost:8000 in the browser:\nTerraform Provisions Azure Cloud Resource Prerequisite Terraform installed An active Azure subscription (a free subscription would work) Azure CLI installed (brew install for MacOS) 1 brew update \u0026amp;\u0026amp; brew install azure-cli Authenticate using Azure CLI Login 1 az login or using this command with non default browser\n1 az login --use-device-code Set the Subscription 1 az account set --subscription \u0026#34;your-subscription-id\u0026#34; Create a Service Principal A Service Principal is an application within Azure Active Directory with the authentication tokens Terraform needs to perform actions on your behalf.\n1 2 3 4 5 6 7 8 9 10 az ad sp create-for-rbac --role=\u0026#34;Contributor\u0026#34; --scopes=\u0026#34;/subscriptions/\u0026lt;SUBSCRIPTION_ID\u0026gt;\u0026#34; Creating \u0026#39;Contributor\u0026#39; role assignment under scope \u0026#39;/subscriptions/your-subscription-id\u0026#39; The output includes credentials that you must protect. Be sure that you do not include these credentials in your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli { \u0026#34;appId\u0026#34;: \u0026#34;xxxxxx-xxx-xxxx-xxxx-xxxxxxxxxx\u0026#34;, \u0026#34;displayName\u0026#34;: \u0026#34;azure-cli-2022-xxxx\u0026#34;, \u0026#34;password\u0026#34;: \u0026#34;xxxxxx~xxxxxx~xxxxx\u0026#34;, \u0026#34;tenant\u0026#34;: \u0026#34;xxxxx-xxxx-xxxxx-xxxx-xxxxx\u0026#34; } Set the Environment Variables 1 2 3 4 export ARM_CLIENT_ID=\u0026#34;\u0026lt;APPID_VALUE\u0026gt;\u0026#34; export ARM_CLIENT_SECRET=\u0026#34;\u0026lt;PASSWORD_VALUE\u0026gt;\u0026#34; export ARM_SUBSCRIPTION_ID=\u0026#34;\u0026lt;SUBSCRIPTION_ID\u0026gt;\u0026#34; export ARM_TENANT_ID=\u0026#34;\u0026lt;TENANT_VALUE\u0026gt;\u0026#34; Create a Project Folder 1 2 mkdir learn-terraform-azure cd learn-terraform-azure Create Terraform CConfiguration Create a file named main.tf with the following content\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # Configure the Azure provider terraform { required_providers { azurerm = { source = \u0026#34;hashicorp/azurerm\u0026#34; version = \u0026#34;~\u0026gt; 3.0.2\u0026#34; } } required_version = \u0026#34;\u0026gt;= 1.1.0\u0026#34; } provider \u0026#34;azurerm\u0026#34; { features {} } resource \u0026#34;azurerm_resource_group\u0026#34; \u0026#34;rg\u0026#34; { name = \u0026#34;myTFResourceGroup\u0026#34; location = \u0026#34;westus2\u0026#34; } Initialize and Apply Terraform Configuration Initialize\n1 terraform init Format the config\n1 terraform fmt Validate the config\n1 terraform validate Apply the config\n1 terraform apply Inspect your state\n1 2 3 4 5 6 7 8 terraform show azurerm_resource_group.rg: resource \u0026#34;azurerm_resource_group\u0026#34; \u0026#34;rg\u0026#34; { id = \u0026#34;/subscriptions/c9ed8610-47a3-4107-a2b2-a322114dfb29/resourceGroups/myTFResourceGroup\u0026#34; location = \u0026#34;westus2\u0026#34; name = \u0026#34;myTFResourceGroup\u0026#34; } 1 2 3 terraform state list azurerm_resource_group.rg 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 terraform state Usage: terraform state \u0026lt;subcommand\u0026gt; [options] [args] This command has subcommands for advanced state management. These subcommands can be used to slice and dice the Terraform state. This is sometimes necessary in advanced cases. For your safety, all state management commands that modify the state create a timestamped backup of the state prior to making modifications. The structure and output of the commands is specifically tailored to work well with the common Unix utilities such as grep, awk, etc. We recommend using those tools to perform more advanced state tasks. Subcommands: list List resources in the state mv Move an item in the state pull Pull current state and output to stdout push Update remote state from a local state file replace-provider Replace provider in the state rm Remove instances from the state show Show a resource in the state Terraform Language Terraform language is an easy to learn and simple to use language to declare infrastructure resources. Can read about it in details at: https://developer.hashicorp.com/terraform/language\n","permalink":"https://justinhu.org/engineering/terraform_and_infrastructure_as_code/","summary":"\u003ch2 id=\"infrastructure-as-code\"\u003eInfrastructure as Code\u003c/h2\u003e\n\u003ch3 id=\"challenge-of-provisioning-cloud-resources\"\u003eChallenge of Provisioning Cloud Resources\u003c/h3\u003e\n\u003cp\u003eManual Provisioning of infrastructure at scale is slow and cumbersome. Provisioning infrastructure through\npoint-and-click GUIs is error-prone, inefficient, and doesn\u0026rsquo;t scale. The cloud was built for\nautomation, but writing custom scripts for every service and every use case is time-consuming\nand costly for development teams.\u003c/p\u003e\n\u003ch3 id=\"solution\"\u003eSolution\u003c/h3\u003e\n\u003cp\u003eInfrastructure as Code(IaC) to automate infrastructure provisioning on any cloud.  Multi-cloud provisioning\nshould be automated with declarative infrastructure as code. There should be a simple, easy to learn\nconfiguration language to allow people to define infrastructure resources such that infrastructure can be codified,\nshared, versioned, and executed with a consistent workflow across all environments.\u003c/p\u003e","title":"Terraform and Infrastructure as Code"},{"content":"SSL Certificate Securing your website or application has become increasingly crucial in today\u0026rsquo;s digital landscape where cyber crimes become ever more pervasive.\nOne common way to achieve security is through encryption. Symmetric and asymmetric encryption have been heavily studied in the field of Cryptograph and are widely used in the industry to help secure digital systems. SSL certificates, which build on top of asymmetric encryption, are often used to secure websites by ensuring data in transit between clients and web server are encrypted, thus private and secure.\nBusinesses,organizations, and developers usually get SSL certificates from public CA(Certificate Authority) who act as the Source of Trust for the internet. It might be necessary to create self-signed SSL certificates in some cases,such as testing, learning, development, or internal purposes.\nThis article serves as a simple guide on how to generate self-signed SSL certificates using OpenSSL.\nStep-by-Step Guide 1: Install OpenSSL There are tons of information available on the internet on how to install OpenSSL.\nFor Ubuntu or Debian-based system: 1 sudo apt install openssl For CentOS, Fedora, or RHEL-based systems: 1 sudo yum install openssl For MacOS 1 brew install openssl 2: Generate a Private Key 1 openssl genrsa -out test.key 2048 Run the command to generate a 2048-bit RSA private key (replace test.key with your file name):\n1 2 3 4 Generating RSA private key, 2048 bit long modulus (2 primes) ..............+++++ .............+++++ e is 65537 (0x010001) 3: Create a Certificate Signing Request A Certificate Signing Request(CSR) includes all information about your application and organization. Then a CSR can be used to generate the SSL certificate.\n1 openssl req -new -key test.key -out test.csr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter \u0026#39;.\u0026#39;, the field will be left blank. ----- Country Name (2 letter code) [AU]:CA State or Province Name (full name) [Some-State]:Ontario Locality Name (eg, city) []:Toronto Organization Name (eg, company) [Internet Widgits Pty Ltd]:Test Organizational Unit Name (eg, section) []:Test Common Name (e.g. server FQDN or YOUR name) []:test.com Email Address []:test@test.com Please enter the following \u0026#39;extra\u0026#39; attributes to be sent with your certificate request A challenge password []: An optional company name []: 4: Request the Self-signed SSL Certificate 1 openssl x509 -req -days 365 -in test.csr -signkey test.key -out test.crt Command options and usage can be found at: https://www.openssl.org/docs/man1.1.1/man1/x509.html\n1 2 3 Signature ok subject=C = CA, ST = Ontario, L = Toronto, O = Test, OU = Test, CN = test.com, emailAddress = test@test.com Getting Private key 5: Configure HTTPs Web Server A self-signed SSL certificate is generated and can be used by the web server.\nA popular choice is Nginx. And here is the example configuration of nginx HTTPs:\n1 2 3 4 5 6 7 8 9 server { listen 443 ssl; server_name www.example.com; ssl_certificate www.example.com.crt; ssl_certificate_key www.example.com.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5; ... } ","permalink":"https://justinhu.org/engineering/how_to_self_signed_ssl_certificates/","summary":"\u003ch2 id=\"ssl-certificate\"\u003eSSL Certificate\u003c/h2\u003e\n\u003cp\u003eSecuring your website or application has become increasingly crucial in today\u0026rsquo;s\ndigital landscape where cyber crimes become ever more pervasive.\u003c/p\u003e\n\u003cp\u003eOne common way to achieve security is through encryption.  Symmetric and asymmetric encryption have been\nheavily studied in the field of \u003ca href=\"https://en.wikipedia.org/wiki/Cryptography\"\u003eCryptograph\u003c/a\u003e and are widely used in the industry to help\nsecure digital systems. SSL certificates, which build on top of asymmetric encryption,\nare often used to secure websites by ensuring data in transit between clients and web\nserver are encrypted, thus private and secure.\u003c/p\u003e","title":"How to Create Self-Signed SSL Certificates"},{"content":"Diary of a Roman Emperor The Meditations is a diary written by Roman Emperor Marcus Aurelius to himself. Actually, the long-established title Meditations is kind of misleading and not original.\nThe book doesn\u0026rsquo;t have an emphasized and coherent argument but instead some recurring themes. A few topics are mentioned and discussed multiple times throughout the book. For example, the sense of mortality pervades the work. Marcus contemplates the topic of death and continually reminds himself that death is a natural process that is not to be feared, part of the continual change that forms the world. Not surprisingly, reading the Meditations for long periods can be conducive to melancholy.\nOther recurring themes include how to get out of bed in the mornings, how to restrain anger, how to deal with pain, how to live a proper life, how to cope with evil people\u0026hellip;etc,.\nThe Meditations, and the philosophy it represents, fundamentally is a philosophy of resisting pain, a remedy to human shortcomings and a defense against negative things such as pain, irritation, and suffering. Marcus does not offer us any means of achieving happiness in the book.\nStoicism Marcus Aurelius is a stoic philosopher and a Roman Emperor. The Meditations, therefore, has its philosophical foundation in Stoicism.\nThe core doctrine of Stoicism is the conviction that the world is organized rationally and coherently, by an all-pervading force called logos. Logos operates both in individuals and in the universe as a whole. In individuals, it is the faculty of reason. On a cosmic level, it is the rational principle that governs the organization of the universe. In this sense, it is synonymous with nature, Providence, or God.\nAll events are determined by the Logos. Stoicism is thus a deterministic system that appears to leave no room for human free will or moral responsibility. According to the Stoicism definition, free will is a voluntary accommodation to what is in any case inevitable. Man is like a dog tied to a moving wagon. The dog appears capable of making choices, but ultimately it will move along with the wagon.\nThree core disciplines are presented again and again in the book.\nThe discipline of Perception: to perceive objectively without personal value judgment; The discipline of Act: to act justly to things in our control The discipline of Will: to accept indifferently to things outside our control Marcus never defines what he means by justice, but it approximates to live as nature requires.\n","permalink":"https://justinhu.org/essay/meditations_review/","summary":"\u003ch2 id=\"diary-of-a-roman-emperor\"\u003eDiary of a Roman Emperor\u003c/h2\u003e\n\u003cp\u003eThe \u003ca href=\"https://en.wikipedia.org/wiki/Meditations\"\u003eMeditations\u003c/a\u003e is a diary written by Roman Emperor \u003ca href=\"https://en.wikipedia.org/wiki/Marcus_Aurelius\"\u003eMarcus Aurelius\u003c/a\u003e to himself.\nActually, the long-established title \u003cem\u003eMeditations\u003c/em\u003e is kind of misleading and not original.\u003c/p\u003e\n\u003cp\u003eThe book doesn\u0026rsquo;t have an emphasized and coherent argument but instead some recurring themes.\nA few topics are mentioned and discussed multiple times throughout the book.  For example,\nthe sense of mortality pervades the work. Marcus contemplates the topic of death and continually\nreminds himself that death is a natural process that is not to be feared, part of the continual change that forms the world.\nNot surprisingly, reading the Meditations for long periods can be conducive to melancholy.\u003c/p\u003e","title":"Meditations: Stoicism and a Roman Emperor's Defense against Human Shortcomings"},{"content":"What is FastAPI? According to its official website,\nFastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.\nHello World with FastAPI Installation Requirements Python3.8+\nInstall FastAPI 1 pip install fastapi Install ASGI Server 1 pip install \u0026#34;uvicorn[standard]\u0026#34; Define a FastAPI app Create a file main.py with:\n1 2 3 4 5 from typing import Union from fastapi import FastAPI app = FastAPI() Create API Endpoints In main.py add the following 2 endpoints implementation\n1 2 3 4 5 6 7 8 @app.get(\u0026#34;/\u0026#34;) def read_root(): return {\u0026#34;Hello\u0026#34;: \u0026#34;World\u0026#34;} @app.get(\u0026#34;/items/{item_id}\u0026#34;) def read_item(item_id: int, q: Union[str, None] = None): return {\u0026#34;item_id\u0026#34;: item_id, \u0026#34;q\u0026#34;: q} API Endpoints with Automatic Validation final code looks like this:\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Book(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get(\u0026#34;/\u0026#34;) def home(): return {\u0026#34;Hello world\u0026#34;: \u0026#34;Dec 1st 2023\u0026#34;} @app.get(\u0026#34;/book/{book_id}\u0026#34;) def read_item(book_id: int, q: Union[str, None] = None): return {\u0026#34;book_id\u0026#34;: book_id, \u0026#34;q\u0026#34;: q} @app.put(\u0026#34;/book/{book_id}\u0026#34;) def update_item(book_id: int, book: Book): return {\u0026#34;book_id\u0026#34;: book_id, \u0026#34;book_name\u0026#34;: book.name} Test Run the server with\n1 uvicorn main:app --reload INFO: Will watch for changes in these directories: [\u0026rsquo;/Users/xxx/PycharmProjects/pythonProject\u0026rsquo;]\nINFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\nINFO: Started reloader process [99265] using WatchFiles\nINFO: Started server process [99267]\nINFO: Waiting for application startup.\nINFO: Application startup complete.\nOpen it in the browser and test the endpoints defined above.\nAPI Documentation FastAPI has interactive API docs built-in by default.\nInteractive Docs Powered by Swagger UI Go to /docs, we can the interactive API docs:\nAutomatic API doc with ReDoc Go to /redoc, we can see another automatic API documentation:\nGeneral Thoughts FastAPI is generally a lightweight framework to develop APIs with Python. Some attractive advantages of FastAPI for me compared to a comprehensive framework like Django:\nfast to set up; fast to build APIs, prototypes, and POCs automatic validation with Pydantic Automatic API docs I would definitely consider FastAPI to be my first option if I want to test some ideas quick, and honest I think it\u0026rsquo;s also quite attractive to build production systems as well, given more and more web applications are single page applications with React, Vue, or Angular that only requires APIs from backend. Django is a little too heavy for such case.\n","permalink":"https://justinhu.org/engineering/fastapi101/","summary":"\u003ch2 id=\"what-is-fastapi\"\u003eWhat is FastAPI?\u003c/h2\u003e\n\u003cp\u003eAccording to its official website,\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e\u003ca href=\"https://fastapi.tiangolo.com/\"\u003eFastAPI\u003c/a\u003e is a modern, fast (high-performance), web framework for building APIs with\nPython 3.8+ based on standard Python type hints.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"hello-world-with-fastapi\"\u003eHello World with FastAPI\u003c/h2\u003e\n\u003ch3 id=\"installation\"\u003eInstallation\u003c/h3\u003e\n\u003ch4 id=\"requirements\"\u003eRequirements\u003c/h4\u003e\n\u003cblockquote\u003e\n\u003cp\u003ePython3.8+\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch4 id=\"install-fastapi\"\u003eInstall FastAPI\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cdiv class=\"chroma\"\u003e\n\u003ctable class=\"lntable\"\u003e\u003ctr\u003e\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode\u003e\u003cspan class=\"lnt\"\u003e1\n\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode class=\"language-shell\" data-lang=\"shell\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003epip install fastapi\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003ch4 id=\"install-asgi-server\"\u003eInstall ASGI Server\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cdiv class=\"chroma\"\u003e\n\u003ctable class=\"lntable\"\u003e\u003ctr\u003e\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode\u003e\u003cspan class=\"lnt\"\u003e1\n\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode class=\"language-shell\" data-lang=\"shell\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003epip install \u003cspan class=\"s2\"\u003e\u0026#34;uvicorn[standard]\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003ch3 id=\"define-a-fastapi-app\"\u003eDefine a FastAPI app\u003c/h3\u003e\n\u003cp\u003eCreate a file \u003cem\u003emain.py\u003c/em\u003e with:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cdiv class=\"chroma\"\u003e\n\u003ctable class=\"lntable\"\u003e\u003ctr\u003e\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode\u003e\u003cspan class=\"lnt\"\u003e1\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e2\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e3\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e4\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e5\n\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"kn\"\u003efrom\u003c/span\u003e \u003cspan class=\"nn\"\u003etyping\u003c/span\u003e \u003cspan class=\"kn\"\u003eimport\u003c/span\u003e \u003cspan class=\"n\"\u003eUnion\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"kn\"\u003efrom\u003c/span\u003e \u003cspan class=\"nn\"\u003efastapi\u003c/span\u003e \u003cspan class=\"kn\"\u003eimport\u003c/span\u003e \u003cspan class=\"n\"\u003eFastAPI\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"n\"\u003eapp\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"n\"\u003eFastAPI\u003c/span\u003e\u003cspan class=\"p\"\u003e()\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003ch3 id=\"create-api-endpoints\"\u003eCreate API Endpoints\u003c/h3\u003e\n\u003cp\u003eIn \u003cem\u003emain.py\u003c/em\u003e add the following 2 endpoints implementation\u003c/p\u003e","title":"FastAPI 101"},{"content":"Hamilton Hamilton is a port city in the Canadian province of Ontario.\nGeneral impressions:\na beautiful small city McMaster University Dundurn Castle Red Hill Valley Trail ","permalink":"https://justinhu.org/travel/hamilton/","summary":"\u003ch2 id=\"hamilton\"\u003eHamilton\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Hamilton,_Ontario\"\u003eHamilton\u003c/a\u003e is a port city in the Canadian province of Ontario.\u003c/p\u003e\n\u003cp\u003eGeneral impressions:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003ea beautiful small city\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://en.wikipedia.org/wiki/McMaster_University\"\u003eMcMaster University\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"dundurn-castle\"\u003eDundurn Castle\u003c/h2\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_1.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_2.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_3.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_4.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_5.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_6.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/dundurn_7.jpeg\" title=\"Dundrun Castle\"\u003e\u003c/p\u003e\n\u003ch2 id=\"red-hill-valley-trail\"\u003eRed Hill Valley Trail\u003c/h2\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/redvalley_1.jpeg\" title=\"Red Hill Valley Trail\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/redvalley_3.jpeg\" title=\"Red Hill Valley Trail\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Hamilton\" loading=\"lazy\" src=\"/travel/hamilton/redvalley_3.jpeg\" title=\"Red Hill Valley Trail\"\u003e\u003c/p\u003e","title":"Hamilton"},{"content":"Montreal Montreal is located by the riverside of the St. Lawrence River and is the second most populous city in Canada. Of course, French is the city\u0026rsquo;s official language.\nGeneral Impressions:\nDowntown Montreal is built on hills; so a lot of uphills and downhills while wandering around in the city center; Montreal gives people a feeling of cleanness; the homeless issue is less severe compared to other major cities like Toronto and Ottawa; There are a lot of stunningly beautiful churches in the city; Unlike Ontario, vehicles in Montreal only have a rear plate; A lot of pedestrians don\u0026rsquo;t follow traffic lights when crossing the roads; Saint-Catherine St is a pedestrian-only street with tons of shops, bars and restaurants and is a good place to visit; Notre Dame Basilica of Montréal As one of the oldest churches in Canada, the Notre Dame Basilica of Montreal is located in the heart of Old Montreal and is a must-visit.\nPort of Montreal McGill University McGill University is a public research university founded in 1821 and bears its name from James McGill.\nChina Town Montreal also has an old-style stereotypical China Town.\nOne interesting fact that the old Chinese translation of Montreal used by old immigrants is 满地可.\n","permalink":"https://justinhu.org/travel/montreal/","summary":"\u003ch2 id=\"montreal\"\u003eMontreal\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Montreal\"\u003eMontreal\u003c/a\u003e is located by the riverside of the \u003ca href=\"https://en.wikipedia.org/wiki/St._Lawrence_River\"\u003eSt. Lawrence River\u003c/a\u003e and is the second\nmost populous city in Canada. Of course,  French is the city\u0026rsquo;s official language.\u003c/p\u003e\n\u003cp\u003eGeneral Impressions:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003eDowntown Montreal is built on hills; so a lot of uphills and downhills while wandering around in the city center;\u003c/li\u003e\n\u003cli\u003eMontreal gives people a feeling of cleanness; the homeless issue is less severe compared to other major cities like Toronto and Ottawa;\u003c/li\u003e\n\u003cli\u003eThere are a lot of stunningly beautiful churches in the city;\u003c/li\u003e\n\u003cli\u003eUnlike Ontario,  vehicles in Montreal only have a rear plate;\u003c/li\u003e\n\u003cli\u003eA lot of pedestrians don\u0026rsquo;t follow traffic lights when crossing the roads;\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.mtl.org/en/what-to-do/heritage-and-architecture/sainte-catherine-street\"\u003eSaint-Catherine St\u003c/a\u003e is a pedestrian-only street with tons of shops, bars and restaurants and is a good place to visit;\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cimg alt=\"Montreal\" loading=\"lazy\" src=\"/travel/montreal/St_James_United_Church.jpeg\" title=\"St. James United Church\"\u003e\u003c/p\u003e","title":"Montreal"},{"content":"Ottawa, the capital city of Canada, is located at the confluence of Ottawa River and Rideau River.\nOttawa My general impressions of the city:\nOttawa is a much smaller city, compared to Toronto, understandably; Ottawa is full of the PRIDE vibe; rainbow flags and crossings can be seen frequently, at least when I visited the city; Ottawa, like other cities, also has a severe homeless crisis, which damages the city\u0026rsquo;s image; Ottawa is little boring since the economy is mainly driven by the Canadian government, which happens to be the largest employer in Ottawa; Ottawa\u0026rsquo;s public transit, OC Transpo, is still developing; good news is that it accepts Presto or Visa/Mastercard credit card; Ottawa is a more bilingual city and French is more widely used, compared to Toronto which is a more English city; Parliament Hill Parliament Hill is one of the most iconic landmarks in Canada, standing out with its unique Gothic Revival style.\nThe parliament has threes buildings:\nThe Centre Block: the Senate, the Library of the parliament, the peach tower; The East Block: ministers\u0026rsquo; and senator\u0026rsquo;s offices, meeting rooms, and other administrative spaces; The West Block: now the interim House of Commons, house offices for parliamentarians, a branch of the Library of the Parliament, committee rooms; It was firstly built between 1859 - 1876 after the Confederation of Canada.\nIn 1916, a fire almost destroyed the whole Center Block and the then it took 11 years to rebuilt it. The Centre Block and the East Block are undergoing renovations since 2019.\nWe can also tour inside the parliament buildings.\nTo do so, tickets can be booked at the official website of the parliament. The ticket is free, but a ticket and security check are required.\nNotre Dame Cathedral Basilica (Ottawa) The Notre Dame Cathedral Basilica is the oldest church in Ottawa and one of the oldest churches in Canada.\n","permalink":"https://justinhu.org/travel/ottawa/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Ottawa\"\u003eOttawa\u003c/a\u003e,  the capital city of Canada, is located at the confluence of Ottawa River\nand Rideau River.\u003c/p\u003e\n\u003ch2 id=\"ottawa\"\u003eOttawa\u003c/h2\u003e\n\u003cp\u003eMy general impressions of the city:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003eOttawa is a much smaller city, compared to Toronto, understandably;\u003c/li\u003e\n\u003cli\u003eOttawa is full of the PRIDE vibe; rainbow flags and crossings can be seen frequently, at least when I visited the city;\u003c/li\u003e\n\u003cli\u003eOttawa,  like other cities,  also has a severe homeless crisis, which damages the city\u0026rsquo;s image;\u003c/li\u003e\n\u003cli\u003eOttawa is little boring since the economy is mainly driven by the Canadian government, which happens to be the largest employer in Ottawa;\u003c/li\u003e\n\u003cli\u003eOttawa\u0026rsquo;s public transit, \u003ca href=\"https://www.octranspo.com/en/\"\u003eOC Transpo\u003c/a\u003e, is still developing; good news is that it accepts \u003ca href=\"https://www.prestocard.ca/en/\"\u003ePresto\u003c/a\u003e or Visa/Mastercard credit card;\u003c/li\u003e\n\u003cli\u003eOttawa is a more bilingual city and French is more widely used, compared to Toronto which is a more English city;\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cimg alt=\"Ottawa\" loading=\"lazy\" src=\"/travel/ottawa/OttawaRiver.jpeg\" title=\"Ottawa River and the East Block in Renovation\"\u003e\u003c/p\u003e","title":"Ottawa"},{"content":" To compare the summer views with winter views: Niafara Falls in Witer\nNiagara Falls is one of the most famous waterfalls in the world, spanning the border between Ontario in Canada and New York in the United States. It comprises three falls (from right to left): Horseshoe Falls, Bridal Falls, and American Falls.\nImpressions:\nCanada side has the best view; The Rainbow bridge connecting Canada and the U.S. is not misnamed cause there are rainbows; Be prepared to get wet; it\u0026rsquo;s like a heavy rain for the water drops more than 50 meters and a lot of water droplets bounce back; Parking is expensive; it costs $35 dollars for 3 hours parking at 6635 Niagara River Pkwy, which is the closest parking lot to the fall ","permalink":"https://justinhu.org/travel/niagara_falls/","summary":"\u003cblockquote\u003e\n\u003cp\u003eTo compare the summer views with winter views:  \u003ca href=\"/travel/nagara_falls_in_winter/\"\u003eNiafara Falls in Witer\u003c/a\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Niagara_Falls\"\u003eNiagara Falls\u003c/a\u003e is one of the most famous waterfalls in the world, spanning the border between Ontario in Canada\nand New York in the United States. It comprises three falls (from right to left): Horseshoe Falls,  Bridal Falls,  and American Falls.\u003c/p\u003e\n\u003cp\u003eImpressions:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003eCanada side has the best view;\u003c/li\u003e\n\u003cli\u003eThe Rainbow bridge connecting Canada and the U.S. is not misnamed cause there are rainbows;\u003c/li\u003e\n\u003cli\u003eBe prepared to get wet; it\u0026rsquo;s like a heavy rain for the water drops more than 50 meters and a lot of water droplets bounce back;\u003c/li\u003e\n\u003cli\u003eParking is expensive; it costs $35 dollars for 3 hours parking at 6635 Niagara River Pkwy, which is the closest parking lot to the fall\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_1.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_2.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_3.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_4.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_5.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_6.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_7.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_8.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_9.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_10.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_11.jpeg\" title=\"Niagara Falls\"\u003e\u003cbr\u003e\n\u003cimg alt=\"Niagara Falls\" loading=\"lazy\" src=\"/travel/niagara_falls/niagarafalls_12.jpeg\" title=\"Niagara Falls\"\u003e\u003c/p\u003e","title":"Niagara Falls"},{"content":"Wasaga Beach is a small town in the southern end of the Georgian Bay. It\u0026rsquo;s about 1.5h drive from Toronto, so not very far.\nMy biggest impressions of Wasaga:\ngreat beach great winds and tides ","permalink":"https://justinhu.org/travel/wasaga_beach/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Wasaga_Beach\"\u003eWasaga Beach\u003c/a\u003e is a small town in the southern end of the Georgian Bay. It\u0026rsquo;s about\n1.5h drive from Toronto, so not very far.\u003c/p\u003e\n\u003cp\u003eMy biggest impressions of Wasaga:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003col\u003e\n\u003cli\u003egreat beach\u003c/li\u003e\n\u003cli\u003egreat winds and tides\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cimg alt=\"Wasaga Beach1\" loading=\"lazy\" src=\"/travel/wasaga_beach/wasaga_1.jpeg\" title=\"Wasaga Beach\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Wasaga Beach2\" loading=\"lazy\" src=\"/travel/wasaga_beach/wasaga_2.jpeg\" title=\"Wasaga Beach\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Wasaga Beach3\" loading=\"lazy\" src=\"/travel/wasaga_beach/wasaga_3.jpeg\" title=\"Wasaga Beach\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Wasaga Beach4\" loading=\"lazy\" src=\"/travel/wasaga_beach/wasaga_4.jpeg\" title=\"Wasaga Beach\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Wasaga Beach5\" loading=\"lazy\" src=\"/travel/wasaga_beach/wasaga_5.jpeg\" title=\"Wasaga Beach\"\u003e\u003c/p\u003e","title":"Wasaga Beach"},{"content":"Setting Goals is the first step to achieving them.\nProper goals can help identify weaknesses, provide vision and guidance, and most importantly hold us accountable to the goals. Therefore, goal-setting is a crucial skill in both our professional life and personal life. Mastering the proper goal-setting skills is vital to achieving a successful and fulfilling life.\nSMART Goals SMART is an acronym for a widely used goal-setting technique. Its criteria are commonly attributed to Peter Drucker\u0026rsquo;s Management by Objectives concept.\nTo make sure your goals are clear and reachable, your goal should be:\nSpecific What you will achieve? What you will do? Be specific, avoid being general Measurable What data/criteria will you use to decide whether you\u0026rsquo;ve met the goal? Achievable Is the goal realistic? Are you sure you can do this? Do you have the right skills and resources? Relevant Does the goal matter to you? Is the goal meaningful to you? Does the goal align with your strategies/missions? Time-bound What is the deadline for accomplishing the goal SMARTER Goals SMART is an effective tool that provides the clarity, focus, and motivation to accomplish your goals. But it doesn\u0026rsquo;t include the important part of assessment and feedback. Some authors have extended it into SMARTER to include extra focus areas.\nA. Evaluated\nTo evaluate the progress of accomplishing the goal regularly The evaluation policy (like when and how frequently) should be included in goal-setting. B. Reviewed\nTo review the goal and its accomplishing status after the deadline To draw lessons that can be learned from this goal, including its setting and completing, so that improvements can be made for future goals ","permalink":"https://justinhu.org/business/smarter_goals/","summary":"\u003cp\u003eSetting Goals is the first step to achieving them.\u003cbr\u003e\nProper goals can help identify weaknesses, provide vision and guidance, and most importantly hold us accountable to the goals.\nTherefore, goal-setting is a crucial skill in both our professional life and personal life. Mastering the proper goal-setting skills\nis vital to achieving a successful and fulfilling life.\u003c/p\u003e\n\u003ch2 id=\"smart-goals\"\u003eSMART Goals\u003c/h2\u003e\n\u003cp\u003eSMART is an acronym for a widely used goal-setting technique. Its criteria are commonly\nattributed to Peter Drucker\u0026rsquo;s \u003ca href=\"https://en.wikipedia.org/wiki/Management_by_objectives\"\u003eManagement by Objectives\u003c/a\u003e concept.\u003c/p\u003e","title":"SMARTER Goals"},{"content":"Kafka Introduction Apache Kafka is heavily used in my work now. Therefore, I thought it would be useful and helpful to write a post about it.\nKafka is an event streaming platform. Apache Kafka defines event streaming as the following:\nTechnically speaking, event streaming is the practice of capturing data in real-time from event sources like databases, sensors, mobile devices, cloud services, and software applications in the form of streams of events; storing these event streams durably for later retrieval; manipulating, processing, and reacting to the event streams in real-time as well as retrospectively; and routing the event streams to different destination technologies as needed. Event streaming thus ensures a continuous flow and interpretation of data so that the right information is at the right place, at the right time.\nInstallation and Hello World with Kafka For how to install and run Kafka on other systems, please refer to the official documentation: https://kafka.apache.org/quickstart\nI am using Mac. Homebrew is a very nice tool to install and manage packages on Mac, quite similar to apt-get on Ubuntu. The App store on macOS is enough to install, upgrade, and update applications for normal users, but definitely not sufficient for developers. Honestly, I think Apple should acquire Homebrew and integrate it into macOS.\nInstall Java 1 2 brew install java java --version Install Kafka 1 brew install kafka Start Zookeeper Open a new terminal, run the command to start ZooKeeper, because Kafka leverages ZooKeeper to manage clusters.\n1 zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties Start Kafka Note: Edit /usr/local/etc/kafka/server.properties to change listeners to listeners=PLAINTEXT://localhost:9092\nOpen a new terminal, run the command to start Kafka:\n1 kafka-server-start /usr/local/etc/kafka/server.properties Create Kafka Topic Create a test topic with replication-factor=1(no extra replicas) and partition=1(only 1 partition)\n1 kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test Initialize 2 Kafka Producers Open 2 other terminals and run the command to start Kafka producers:\n1 kafka-console-producer --broker-list localhost:9092 --topic test Write 4 messages in the following sequence:\nproducer1 \u0026ndash;\u0026gt; message 1 producer2 \u0026ndash;\u0026gt; message 1 producer1 \u0026ndash;\u0026gt; message 2 producer2 \u0026ndash;\u0026gt; message 2 (base) xxxx@MacBook-Air-2 ~ % kafka-console-producer \u0026ndash;broker-list localhost:9092 \u0026ndash;topic test producer1 message 1\nproducer1 message 2\n(base) xxxx@MacBook-Air-2 ~ % kafka-console-producer \u0026ndash;broker-list localhost:9092 \u0026ndash;topic test producer2 message1\nproducer2 message2\nStart a Kafka Consumer Open a terminal and run the command to initialize a kafka consumer:\n1 kafka-console-consumer --bootstrap-server localhost:9092 --topic test --from-beginning And we will the 4 messages written before:\n(base) xxxx@MacBook-Air-2 ~ % kafka-console-consumer \u0026ndash;bootstrap-server localhost:9092 \u0026ndash;topic test \u0026ndash;from-beginning\nproducer1 message 1\nproducer2 message1\nproducer1 message 2\nproducer2 message2\nKafka is using Pub-Sub pattern. We can create multiple producers and consumers for a certain topic to play with it.\nA Comparison between Kafka and RabbitMQ By design Kafka is an event streaming platform while RabbitMQ is a message queue.\nHere are some of their major differences between Apache Kafka and RabbitMQ:\nKafka RabbitMQ Message Ordering provides message ordering thanks to its partitioning. Messages are sent to topics by message key. N/A Message Retention Policy-based (e.g., 30 days) Kafka is a log, which means that it retains messages by default. You can manage this by specifying a retention policy. Acknowledgment basedRabbitMQ is a queue, so messages are done away with once consumed, and acknowledgment is provided. Message Priorities N/A In RabbitMQ, you can specify message priorities and consume message with high priority first. Routing Publish/Subscribe based Multiple exchange types: Direct, Fan out, Topic, Header-based Generally, Kafka retains messages while RabbitMQ doesn\u0026rsquo;t; RabbitMQ offers more complex and flexible ways of routing messages and prioritizing messages, while Kafka supports a simple Pub-Sub pattern.\nRegarding performance, both systems can be scaled to process millions of messages per second. Some benchmarking results suggest that:\nGiven same resource configuration, Kafka has higher throughput than RabbitMQ; RabbitMQ delivers lower message latency than Kafka Conclusion Both Apache Kafka and RabbitMQ are great systems. When complex routing and prioritizing of messages are required, RabbitMQ is the preferred option; when message ordering and retention are needed, Kafka is the choice.\nIn terms business cases, RabbitMQ is more used for transactional systems and is perfect for routing message between clusters of microservices whereas Kafka is more used in analytical systems such as data streaming and pipelines.\n","permalink":"https://justinhu.org/engineering/kafka_and_comparison_with_rabbitmq/","summary":"\u003ch2 id=\"kafka-introduction\"\u003eKafka Introduction\u003c/h2\u003e\n\u003cp\u003eApache Kafka is heavily used in my work now. Therefore, I thought it would be useful and helpful to\nwrite a post about it.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://kafka.apache.org/documentation/\"\u003eKafka\u003c/a\u003e is an \u003cem\u003e\u003cstrong\u003eevent streaming\u003c/strong\u003e\u003c/em\u003e platform. Apache Kafka\ndefines event streaming as the following:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eTechnically speaking, event streaming is the practice of capturing data in real-time from\nevent sources like databases, sensors, mobile devices, cloud services, and software\napplications in the form of streams of events; storing these event streams durably for\nlater retrieval; manipulating, processing, and reacting to the event streams in\nreal-time as well as retrospectively; and routing the event streams to different\ndestination technologies as needed. Event streaming thus ensures a continuous\nflow and interpretation of data so that the right information is at the right place,\nat the right time.\u003c/p\u003e\n\u003c/blockquote\u003e","title":"Apache Kafka and A Comparison with RabbitMQ"},{"content":"Python is a popular programming language, especially in scripting, web development, data analytics, and ML/AI domains.\nAccording to TIOBE Programming Language Index, Python has become the most popular programming since 2022, exceeding good old C: Python has gained popularity because of its flat learning curve (compared to other languages such as C/C++), human-readable code, and thriving ecosystems. However, Developers have always complained about python not being fast or even slower than other interpreting languages like JS or Lua.\nPython 3.11 Python 3.11 has been released today (Dec 3, 2022), bringing enormous performance improvement:\nPython 3.11 is between 10-60% faster than Python 3.10. On average, we measured a 1.25x speedup on the standard benchmark suite\nIn short, Python 3.11 introduces improvements in the CPython compiler and interpreter, so it\u0026rsquo;s faster.\nIf you want to learn more details, there is a fascinating interview done by Guido van Rossum and Lex Fridman, discussing why Python 3.11 is so fast:\nHigh-Performance Python Roadmap There is more good news for the python community. Python 3.11 is a significant improvement, and it\u0026rsquo;s not the whole picture but rather an important milestone.\nThere is a roadmap for evolving towards high-performance python:\nStage 1 \u0026ndash; Python 3.10 The key improvement for 3.10 will be an adaptive, specializing interpreter. The interpreter will adapt to types and values during execution, exploiting type stability in the program, without needing runtime code generation.\nStage 2 \u0026ndash; Python 3.11 This stage will make many improvements to the runtime and key objects. Stage two will be characterized by lots of \u0026ldquo;tweaks\u0026rdquo;, rather than any \u0026ldquo;headline\u0026rdquo; improvement. The planned improvements include: Improved performance for integers of less than one machine word. Improved peformance for binary operators. Faster calls and returns, through better handling of frames. Better object memory layout and reduced memory management overhead. Zero overhead exception handling. Further enhancements to the interpreter Other small enhancements.\nStage 3 \u0026ndash; Python 3.12 (requires runtime code generation) Simple \u0026ldquo;JIT\u0026rdquo; compiler for small regions. Compile small regions of specialized code, using a relatively simple, fast compiler.\nStage 4 \u0026ndash; Python 3.13 (requires runtime code generation) Extend regions for compilation. Enhance compiler to generate superior machine code.\nConclusion As a Python user, I am happy for the Python community with the release of Python 3.11. Python will become faster and better as a JIT compiler will be introduced in Python3.12 and Python3.13.\n","permalink":"https://justinhu.org/engineering/faster_python/","summary":"\u003cp\u003ePython is a popular programming language, especially in scripting,  web development,  data analytics, and\nML/AI domains.\u003c/p\u003e\n\u003cp\u003eAccording to \u003ca href=\"https://www.tiobe.com/tiobe-index/\"\u003eTIOBE Programming Language Index\u003c/a\u003e, Python has become the most popular programming since 2022, exceeding good old C:\n\u003cimg alt=\"programming language ranking\" loading=\"lazy\" src=\"/engr/programming_language_ranking.png\" title=\"programming language ranking\"\u003e\u003c/p\u003e\n\u003cp\u003ePython has gained popularity because of its flat learning curve (compared to other languages such as C/C++), human-readable\ncode, and thriving ecosystems. However, Developers have always complained about python not being fast or even slower than other\ninterpreting languages like JS or Lua.\u003c/p\u003e","title":"Faster Python: Python 3.11 Release and Future Roadmap"},{"content":"A fun fact is that the name of this website comes from the book: Logicomix: an Epic Search for Truth.\nThis article is more or less a review of the book.\nLogicomix is a graphic novel(or a comic book) depicting the life of the renowned British mathematician, philosopher, logician, writer, and public intellectual Bertrand Russell, particularly Russell\u0026rsquo;s quest for fundamental and absolute truth by attempting to establish a new rigid and provable foundation for mathematics.\nThe book discusses a bunch of intriguing ideas.\nThe Quest of Solid Foundations Russell considers the whole subject of mathematics, which dates back to Ancient greek, to be a house built on sand, a home without a solid foundation. Russell thinks that all human mathematical knowledge is unreliable because they are derived from axioms and postulates, self-evident and true but haven\u0026rsquo;t been proved mathematically.\nFor instance, Euclid, the father of geometry, builds this branch of mathematics upon axioms and postulates.\nEuclid\u0026rsquo;s Axioms\nThings which are equal to the same thing are also equal to one another If equals be added to equals, the wholes are equals. If equals be subtracted from equals, the reminders are equals. Things which coincide with one another are equal to one another The whole is greater than the part Euclid\u0026rsquo;s Postulates\nTo draw a straight line from any point to point. To produce a finite straight line continuously in a straight line. To describe a circle with any center and distance. That all right angles are equal to one another. That if a straight line falling on two straight lines makes the interior angles on the same side less than two right angles, the straight lines, if produced indefinitely, will meet on that side on which the angles are less that two right angles. Therefore, Russell describes the foundation of mathematics as a Shaky World Turtle, as illustrated in the image:\nIn his decade-long search for a solid foundation in mathematics, Russell completed The Principles of Mathematics and Principia Mathematica, during which He started to realize intuitively that\nIt\u0026rsquo;s an endless journey to pursue a solid foundation in math because new axioms need to be introduced to prove an existing axiom. The process goes on and on, never stopping!\nAs depicted vividly by the following image:\nThe Incompleteness of Mathematics Although Russell had an intuitive realization that it\u0026rsquo;s impossible to get rid of axioms and have a rock-solid foundation for math, it was another mathematical genius Kurt Gödel proved mathematically that\nThere will always be unanswerable questions and unprovable statements; therefore, arithmetic, and thus any system based on it, is, of necessity, incomplete.\nThe finding is called Gödel\u0026rsquo;s First Incompleteness Theorem. Combined with his Second Incompleteness Theorem, Gödel proved mathematically\nthe limits of provability in formal axiomatic theories.\nRussell\u0026rsquo;s intuition and Godel\u0026rsquo;s Incompleteness theory confirm one vital point: there will always be unknown and unanswerable questions in mathematical systems and in science and technology built upon mathematics, resonating with Billy Graham\u0026rsquo;s idea that technology can\u0026rsquo;t solve human shortcomings as well.\nPacifism Russell is a pacifist and an opponent of violence of any kind, primarily due to his close encounter with the consequence of wars as a kid.\nThe public heavily criticized him and even imprisoned him for this.\nRussell\u0026rsquo;s situation is quite relatable to us in 2022, with the raging war between Russia and Ukraine and pacifist people, including Elon Musk, being attacked and criticized.\nI am not in any position to judge, but I just find it very interesting that:\nPeople are generally against war when they have encountered the outcomes of battles, directly or indirectly.\nNewer generations tend to be subject to nationalistic or other ideological influences and long for wars.\nHistory witnesses the weird cycle of generations of pro and against wars.\nLogic and First Principle Thinking What is logic?\nLogic is new and necessary reasoning!\nHow should we view and approach logic?\nLogic is an essential and powerful tool of human minds.\nMeanwhile, we should be aware of the limitation of such tools and the finity of science and technology. Then, use logic, like other tools in life, to make life better.\nFirst principle thinking\nWith logic, we can reason through first principles for vital questions.\n","permalink":"https://justinhu.org/essay/logic_reason_and_incompleteness_of_mathematics/","summary":"\u003cp\u003eA fun fact is that the name of this website comes from the book: \u003ca href=\"https://www.amazon.ca/Logicomix-search-truth-Apostolos-Doxiadis/dp/1596914521\"\u003e\u003cem\u003eLogicomix: an Epic Search for Truth\u003c/em\u003e\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThis article is more or less a review of the book.\u003c/p\u003e\n\u003cp\u003eLogicomix is a graphic novel(or a comic book) depicting the life of the renowned British mathematician, philosopher, logician,\nwriter, and public intellectual \u003ca href=\"https://en.wikipedia.org/wiki/Bertrand_Russell\"\u003eBertrand Russell\u003c/a\u003e, particularly Russell\u0026rsquo;s quest for fundamental and absolute truth\nby attempting to establish a new rigid and provable foundation for mathematics.\u003c/p\u003e","title":"Logic, Reason, and the Incompleteness of Mathematics"},{"content":"Billy Graham probably is the greatest evangelist of the 20th century, and his teaching is ever-lasting, timeless, and of fundamental truth. I feel I am so glad our world had such a great preacher like Billy Graham, a living proof of God\u0026rsquo; grace and glory.\nSpeaking at TED in 1998, Billy Graham discussed the power of modern technologies to improve lives but pointed out three problems technology can’t solve:\nHuman evil, suffering, and death.\nIn the end, only Jesus Christ can save humanity from those shortcomings. I believe so more and more as I grow older and older, witness and experience all different kinds of things in life.\nHis Full Speech:\n","permalink":"https://justinhu.org/essay/technology_human_shortcomings_and_faith/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Billy_Graham\"\u003eBilly Graham\u003c/a\u003e probably is the greatest evangelist of the 20th century,\nand his teaching is ever-lasting, timeless, and of fundamental truth. I feel I am so glad our world had such a great preacher\nlike Billy Graham, a living proof of God\u0026rsquo; grace and glory.\u003c/p\u003e\n\u003cp\u003eSpeaking at TED in 1998, Billy Graham discussed the power of modern technologies to improve lives but\npointed out three problems technology can’t solve:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eHuman evil, suffering, and death.\u003c/p\u003e\n\u003c/blockquote\u003e","title":"Technology, Human Shortcomings, and Faith"},{"content":"Boring and Plainness of Modern Cities I often find modern cities not beautiful, sometimes even ugly.\nI held such feelings while I was in China. At that time, I thought it was understandable that China didn’t possess many classical and beautiful buildings, given most old buildings in China used wood and were vulnerable to fires, not to mention the intentional demolishing of old buildings during the Cultural Revolution.\nI was expecting something different from Canada but was quite disappointed by the harsh realities. From an architectural perspective, Toronto is nothing but an identical replica of modern cities in China: skyscrapers after skyscrapers, office buildings after office buildings.\nA Harsh Comparison York University One thing I dislike about York University is its plain and ugly campus, especially when compared to the University of Toronto.\nAs shown in the images, all buildings at York University are typically modern and postmodern, which are far from beautiful.\nOn the contrary, the University of Toronto has some of the most beautiful architecture in Toronto.\nThe University of Toronto possesses some very classical Renaissance and neoclassical style buildings.\nOf course, one sad thing about the University of Toronto is that its new campus has a typically modern and postmodern style and no longer has the same beauty.\nThe Missing of Beauty The problem with modern cities and buildings lies in the underlying philosophy of Modernism, which emphasizes that form should follow function, embraces functionalism and minimalism, and rejects ornament.\nModern cities are built upon such Modernism idea and naturally lacks the focus on beauty in architecture.\nWhile some may find modern buildings convenient and even attractive, I firmly believe there is value in beauty itself. I prefer buildings with both functional and artistic values.\n","permalink":"https://justinhu.org/essay/the_grotesqueness_of_modern_cities/","summary":"\u003ch2 id=\"boring-and-plainness-of-modern-cities\"\u003eBoring and Plainness of Modern Cities\u003c/h2\u003e\n\u003cp\u003eI often find modern cities not beautiful, sometimes even ugly.\u003c/p\u003e\n\u003cp\u003eI held such feelings while I was in China. At that time, I thought it was understandable that China didn’t possess many\nclassical and beautiful buildings, given most old buildings in China used wood and were vulnerable to fires,\nnot to mention the intentional demolishing of old buildings during the Cultural Revolution.\u003c/p\u003e\n\u003cp\u003eI was expecting something different from Canada but was quite disappointed by the harsh realities.\nFrom an architectural perspective, Toronto is nothing but an identical replica of modern cities in China:\nskyscrapers after skyscrapers, office buildings after office buildings.\u003c/p\u003e","title":"The Grotesqueness of Modern Cities"},{"content":" Your browser doesn't support iframes! ","permalink":"https://justinhu.org/visited_places/","summary":"\u003ciframe src=\"https://www.google.com/maps/d/u/0/embed?mid=1g9FSghwPSnpOvGU-cVUIMmHCAgsCmO0\u0026amp;ehbc=2E312F\" style=\"position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;\"\u003e\n    Your browser doesn't support iframes!\n\u003c/iframe\u003e","title":""},{"content":"The Turing test has been an essential and influential concept in the philosophy of artificial intelligence ever since Alan Turing introduced the test in 1950 to test whether a machine is intelligent.\nThe Turing test itself is simple, but the underlying reasoning process of Turing is profound.\nThinking vs. Acting Can machines think? If computers can reason, how can we tell?\nAre trees intelligent? Can they think as well? How can we tell?\nHow about stones?\nWell, the answer is we cannot tell. By common perception, trees are not intelligent and can\u0026rsquo;t think. What if trees and stones actually can think, but in a frequency that humans can\u0026rsquo;t understand and on a timescale beyond human comprehension?\nTuring approached this question differently because thinking is challenging to define and measure. Instead of asking whether a machine can think, measuring a machine\u0026rsquo;s behavior is more manageable and realistic. If a device acts and behaves intelligently, then it is intelligent.\nHumanly vs. Rationally Now that we have established the acting and behavior of machines as the measure of intelligence, a follow-up question naturally emerges: What is intelligence? What do we mean when we say a machine is intelligent?\nIntelligence itself is a generic word without rigorous definition. According to Merriam-Webster, Intelligence has the following meanings:\nthe ability to learn or understand or to deal with new or trying situations the ability to apply knowledge to manipulate one\u0026rsquo;s environment or to think abstractly as measured by objective criteria (such as tests) We have a general sense of intelligence. But what do we mean when we say artificial intelligence?\nA quick response would be just like a human. If a machine behaves humanly, then we say it is intelligent.\nThe same ambiguity arises with acting humanly as with thinking. How do we define behave humanly for billions of people living on earth? And individuals behave differently, subject to their cultural, social, and economic situations.\nGiven that acting humanly is challenging to define, it\u0026rsquo;s reasonable to replace it with acting rationally, which generally means making optimal decisions with given inputs, a well-defined and researched field in math.\nPlane vs. Bird Modern people are used to airplanes and birds.\nAn interesting question is \u0026lsquo;why do planes look differently from birds?\u0026rsquo;.\nWhy don\u0026rsquo;t we design planes by mimicking the appearance of birds?\nThe goal is to design a machine that can fly rather than a machine that looks like a bird? The appearance of birds is just superficiality, whereas aerodynamics is the underlying truth.\nThe End There are some fundamental truths in the designing of the Turing test and the designing of airplanes:\nJudge an object or a person by its behaviors instead of thoughts. Be cautious with words. Avoid being naive. Avoid superficiality and seek fundamental truth. ","permalink":"https://justinhu.org/ai/turing_test_and_human_judgement/","summary":"\u003cp\u003eThe \u003ca href=\"https://en.wikipedia.org/wiki/Turing_test\"\u003eTuring test\u003c/a\u003e has been an essential and influential concept in the philosophy of artificial\nintelligence ever since Alan Turing introduced the test in 1950 to\ntest whether a machine is intelligent.\u003c/p\u003e\n\u003cp\u003eThe Turing test itself is simple, but the underlying reasoning process of Turing is profound.\u003c/p\u003e\n\u003ch2 id=\"thinking-vs-acting\"\u003eThinking vs. Acting\u003c/h2\u003e\n\u003cp\u003e\u003cem\u003eCan machines think?\u003c/em\u003e If computers can reason,  how can we tell?\u003c/p\u003e\n\u003cp\u003eAre trees intelligent?  Can they think as well? How can we tell?\u003c/p\u003e","title":"Turing Test and Human Judgement"},{"content":"Comment Guidelines We love comments about our articles, and we want to hear what you respectfully have to say. Remember to:\nBe nice, courteous, and stay on topic;\nNo profanity, name-calling/personal attacks, or inappropriate content;\nIf you harass others or joke about tragedies, you will be blocked;\nNo spam posts, or posts trying to sell anything.\nThe primary rule here is pretty simple: Treat others with the same respect you’d want for yourself. Trolling and posting inappropriate content will lead to you being banned, and we don’t want that. Play nice.\nOur moderators do their best not to delete comments, we feel that the community has individual, often strong opinions and points of view. We do, however, reserve the right to remove comments for the reasons mentioned above, as well as:\nanything that violates our Privacy Policies;\nanything derogatory based on race, religion, color, national origin, disability, sexual orientation and/or otherwise derogatory in any perceived way;\nany other comments that are detrimental to the community.\nOur moderators try to catch inappropriate content, but we also hope that our community will help us police it as well. If you see a comment that is inappropriate, you can click on the small flag to mark it for us. We’ll review the comment, and determine whether it should stay or go.\nThese guidelines are not intended, and may not be relied upon to (and does not) create any right enforceable by any party other than our business. It doesn’t require our business to take (or even not take) any action.\nOur business will sometimes change the technologies that run our websites. These include different software, hardware, and even web hosting. Some comments, especially older ones, may not be available in future versions of our sites.\nCan’t find your comment on the site? We do occasionally run into technical difficulties, and your comment may not have made it to our site.\nWe may not have approved it because it broke one of those rules listed above.\nWe may have deleted it because it violated the comment guidelines.\nWhy am I blocked from commenting? While we do our best to let everyone have a voice in our online communities, sometimes commenters step over the line. We sometimes block and ban commenters who break the rules. Banning procedures use various technologies and information to enforce the block, including emails, IP addresses, and any other available information.\nThis stops the abusive commenter from commenting on the site in the future, even if later or other comments are not abusive. Depending on the software we are using at the time, banning might cause other previous comments from the abuser to disappear as well.\n","permalink":"https://justinhu.org/comment-policy/","summary":"\u003ch2 id=\"comment-guidelines\"\u003eComment Guidelines\u003c/h2\u003e\n\u003cp\u003eWe love comments about our articles, and we want to hear what you respectfully have to say. Remember to:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eBe nice, courteous, and stay on topic;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eNo profanity, name-calling/personal attacks, or inappropriate content;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eIf you harass others or joke about tragedies, you will be blocked;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eNo spam posts, or posts trying to sell anything.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThe primary rule here is pretty simple: Treat others with the same respect you’d want for yourself. Trolling and posting inappropriate content will lead to you being banned, and we don’t want that. Play nice.\u003c/p\u003e","title":"Comment Policy"},{"content":"If you appreciate my content, please consider donating to charities or nonprofits to make the world a better place.\nHere are some of my recommendations:\nWikimedia Foundation\nThe Wikimedia Foundation operates the world’s most extensive free knowledge base Wikipedia. Wikipedia is a multilingual free online encyclopedia written and maintained by a community of volunteers through open collaboration and a wiki-based editing system.\nSupport Wikimedia Foundation\nApache Software Foundation\nThe Apache Software Foundation is an American nonprofit corporation supporting many open-source software projects, including ActiveMQ, HTTP Server, Kafka, Lucene, Maven, etc. Here is the list of all Apache Software Foundation projects.\nOpen-source software powers a large portion of today\u0026rsquo;s technology, which has significantly improved the efficiency and productivity of societies and changed people\u0026rsquo;s lives.\nSupport Apache Software Foundation\nLinux Foundation\nThe Linux Foundation is a nonprofit technology consortium founded in 2000 as a merger between Open Source Development Labs and the Free Standards Group to standardize Linux, support its growth, and promote its commercial adoption. A free, open-sourced, and high-performance operating system like Linux is the bedrock of the whole tech industry.\nSupport Linux Foundation\nUNICEF UNICEF, in full originally called the United Nations International Children\u0026rsquo;s Emergency Fund, now officially United Nations Children\u0026rsquo;s Fund, is an agency of the United Nations responsible for providing humanitarian and developmental aid to children worldwide.\nSupport UNICEF\n","permalink":"https://justinhu.org/donate/","summary":"\u003cp\u003eIf you appreciate my content, please consider donating to charities or nonprofits\nto make the world a better place.\u003c/p\u003e\n\u003cp\u003eHere are some of my recommendations:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eWikimedia Foundation\u003c/strong\u003e\u003cbr\u003e\nThe Wikimedia Foundation operates the world’s most extensive free knowledge base\nWikipedia. \u003ca href=\"https://en.wikipedia.org/wiki/Main_Page\"\u003eWikipedia\u003c/a\u003e is a multilingual free online encyclopedia written and maintained\nby a community of volunteers through open collaboration and a wiki-based editing system.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://wikimediafoundation.org/support/\"\u003eSupport Wikimedia Foundation\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eApache Software Foundation\u003c/strong\u003e\u003cbr\u003e\nThe Apache Software Foundation is an American nonprofit corporation supporting many open-source software projects,\nincluding ActiveMQ, HTTP Server, Kafka,\nLucene, Maven, etc. Here is the \u003ca href=\"https://en.wikipedia.org/wiki/List_of_Apache_Software_Foundation_projects\"\u003elist\u003c/a\u003e\nof all Apache Software Foundation projects.\u003cbr\u003e\nOpen-source software powers a large portion of today\u0026rsquo;s technology, which has significantly\nimproved the efficiency and productivity of societies and changed people\u0026rsquo;s lives.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.apache.org/foundation/contributing.html\"\u003eSupport Apache Software Foundation\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eLinux Foundation\u003c/strong\u003e\u003cbr\u003e\nThe Linux Foundation is a nonprofit technology consortium founded in 2000 as a merger\nbetween Open Source Development Labs and the Free Standards Group to standardize \u003ca href=\"https://en.wikipedia.org/wiki/Linux\"\u003eLinux\u003c/a\u003e,\nsupport its growth, and promote its commercial adoption.\nA free, open-sourced, and high-performance operating system like Linux is the bedrock of the whole\ntech industry.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.linuxfoundation.org/donate/\"\u003eSupport Linux Foundation\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eUNICEF\u003c/strong\u003e \u003cbr\u003e\n\u003ca href=\"https://www.unicef.org/\"\u003eUNICEF\u003c/a\u003e, in full originally called the United Nations International Children\u0026rsquo;s Emergency\nFund, now officially United Nations Children\u0026rsquo;s Fund, is an agency of the United Nations\nresponsible for providing humanitarian and developmental aid to children worldwide.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://secure.unicef.ca/page/31858/donate/1\"\u003eSupport UNICEF\u003c/a\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e","title":"Donate"},{"content":" 1 2 3 4 5 6 7 8 9 class Me: def __init__(self): self.name = \u0026#34;Justin Hu\u0026#34; self.MBTI = \u0026#34;INTJ\u0026#34; self.location = \u0026#34;Toronto, ON, CA\u0026#34; self.master = \u0026#34;MBA, Schulich School of Business, York U\u0026#34; self.bachelor = \u0026#34;Engineering of Automation, Xiamen University\u0026#34; self.hobbies = \u0026#34;hiking, road tripping, kayaking, swimming, reading\u0026#34; self.languages = \u0026#34;English, Mandarin, Python, Java, C, C++, Javascript\u0026#34; 1 2 3 4 5 6 7 8 9 class ThisSite: def __init__(self): self.name = \u0026#34;LogischerMix\u0026#34; self.framework = \u0026#34;Hugo\u0026#34; self.theme = \u0026#34;PaperMod\u0026#34; self.version = \u0026#34;3.1.0\u0026#34; self.comment_system = \u0026#34;giscus\u0026#34; self.hosting = \u0026#34;Cloudflare Pages\u0026#34; self.objective = \u0026#34;A place to allow me to learn systematically and share\u0026#34; Archives Tags ","permalink":"https://justinhu.org/about/","summary":"\u003cdiv class=\"highlight\"\u003e\u003cdiv class=\"chroma\"\u003e\n\u003ctable class=\"lntable\"\u003e\u003ctr\u003e\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode\u003e\u003cspan class=\"lnt\"\u003e1\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e2\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e3\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e4\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e5\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e6\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e7\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e8\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e9\n\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"k\"\u003eclass\u003c/span\u003e \u003cspan class=\"nc\"\u003eMe\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e    \u003cspan class=\"k\"\u003edef\u003c/span\u003e \u003cspan class=\"fm\"\u003e__init__\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"p\"\u003e):\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ename\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Justin Hu\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003eMBTI\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;INTJ\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003elocation\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Toronto, ON, CA\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003emaster\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;MBA, Schulich School of Business, York U\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ebachelor\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Engineering of Automation, Xiamen University\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ehobbies\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;hiking, road tripping, kayaking, swimming, reading\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003elanguages\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;English, Mandarin, Python, Java, C, C++, Javascript\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003cdiv class=\"highlight\"\u003e\u003cdiv class=\"chroma\"\u003e\n\u003ctable class=\"lntable\"\u003e\u003ctr\u003e\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode\u003e\u003cspan class=\"lnt\"\u003e1\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e2\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e3\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e4\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e5\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e6\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e7\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e8\n\u003c/span\u003e\u003cspan class=\"lnt\"\u003e9\n\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd class=\"lntd\"\u003e\n\u003cpre tabindex=\"0\" class=\"chroma\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"k\"\u003eclass\u003c/span\u003e \u003cspan class=\"nc\"\u003eThisSite\u003c/span\u003e\u003cspan class=\"p\"\u003e:\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e    \u003cspan class=\"k\"\u003edef\u003c/span\u003e \u003cspan class=\"fm\"\u003e__init__\u003c/span\u003e\u003cspan class=\"p\"\u003e(\u003c/span\u003e\u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"p\"\u003e):\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ename\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;LogischerMix\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003eframework\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Hugo\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003etheme\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;PaperMod\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003eversion\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;3.1.0\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ecomment_system\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;giscus\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003ehosting\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;Cloudflare Pages\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e        \u003cspan class=\"bp\"\u003eself\u003c/span\u003e\u003cspan class=\"o\"\u003e.\u003c/span\u003e\u003cspan class=\"n\"\u003eobjective\u003c/span\u003e \u003cspan class=\"o\"\u003e=\u003c/span\u003e \u003cspan class=\"s2\"\u003e\u0026#34;A place to allow me to learn systematically and share\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003cdiv class=\"buttons about-links\"\u003e\n    \u003ca class=\"button\" href=\"/archives/\"\u003e\n        \u003cspan class=\"button-inner\"\u003eArchives\u003c/span\u003e\n    \u003c/a\u003e\n    \u003ca class=\"button\" href=\"/tags/\"\u003e\n        \u003cspan class=\"button-inner\"\u003eTags\u003c/span\u003e\n    \u003c/a\u003e\n\u003c/div\u003e","title":"About"}]