RSSAmplifier

Blog

In Pursuit of Simplicity

Recent content on In Pursuit of Simplicity

ramsayleung.github.ioRSS feed ↗10 posts

Latest posts

A Genius AI Product design: Reddit translation

1 The Universal AI Craze Since OpenAI released ChatGPT, there has been a massive rush to jump on the AI bandwagon. Over the past two years, it seems every website and application has been desperate to embrace AI. Music apps have AI, for example Spotify launched AI playlists 1 ; the programming Q&A site Stack Overflow introduced AI Assist 2 ; browsers are integrating AI (Firefox, Chrome 3 );…

The Essence of Prompt Engineering is the Art of Asking Questions

1 Introduction In today’s AI-driven world, “Prompt Engineer” has become a buzzword. AI enthusiasts are eager to share prompts, study token control, and tweak temperature parameters. The classic meme from Linux founder Linus Torvalds Talk is cheap. Show me the code. has evolved into: Code is cheap. Show me the prompts. Original tweet:…

A Story About Bypassing Air Canada's In-flight Network Restrictions

1 Prologue A while ago, I took a flight from Canada back to Hong Kong - about 12 hours in total with Air Canada. Interestingly, the plane actually had WiFi: However, the WiFi had restrictions. For Aeroplan members who hadn’t paid, it only offered Free Texting , meaning you could only use messaging apps like WhatsApp, Snapchat, and WeChat to send text messages, but couldn’t access other…

A Telegram Spam Blocker Bot Based On Bayesian Algorithm

1 Preface I spent a weekend building a Telegram spam blocker bot based on Bayesian Algorithm @BayesSpamSniperBot ( https://t.me/BayesSpamSniperBot ). The project is open-sourced at: https://github.com/ramsayleung/bayes_spam_sniper 1.1 Telegram Telegram is a popular instant messaging application, similar to Snapchat and WhatsApp, with over 1 billion users. It supports many powerful features like…

Reflections on Ten Years of Programming

1 Preface Malcolm Gladwell’s “10,000-hour rule” suggests that continuous investment of 10,000 hours of effort is sufficient to reach expert level in any field. Based on 20 hours of practice per week, this requires about 3 hours of daily investment, taking roughly ten years to achieve this goal. Since I wrote my first line of C code, more than ten years have passed. During this…

TIL: Git Blame with Following

Developers usually use git blame in GUI tools like GitHub Blame or using GitLens blame in VSCode: Even though GUI tools is intuitive, but the Git CLI has much more powerful tooling for finding something closer to the real story behind your code. There are many scenarios that CLI is valuable, the first is ignoring the whitespace changes. For example, if you formatted your C++ codebase with…

TIL: Git Conditional Configs

Every Git user will have probably been asked to set up their Git at the first time: 1 2 git config --global user.name "Ramsay Leung" git config --global user.email ramsayleung@gmail.com The above command will simply add the user.name and user.email value into your ~/.gitconfig file 1 2 3 4 5 6 7 8 > cat ~/.gitconfig [ user ] name = Ramsay Leung email = ramsayleung@gmail.com [ core ] quotepath =…

Rewind your Github summary

1 Goodbye 2023 As I farewelled to 2023, a year marked by numerous changes and personal evolution, I find myself recollecting the multitude of experiences that unfolded. My 2023 journey was nothing short of fascinating and exciting, prompting me to revisit the year from various angles. After seeing hoards of posts in social media generated by Github Contributions Chart , I thought I could also…

How to share resource between CDK stacks

1 Introduction 1.1 IaC Infrastructure as code(IaC) is the managing and provisioning of infrastructure through code instead of manual processes, for example, clicking button, adding or editing roles in AWS console. 1.2 AWS CloudFormation AWS CloudFormation is the original IaC tool for AWS, released in 2011, which uses template files to automate and mange the setup of AWS resources. 1.3 AWS CDK AWS…

Topological Sort

1 Definition In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertx v , u comes before v in the ordering. It sounds pretty academic, but I am sure you are using topological sort unconsciously every single day. 2 Application Many real world situations can be modeled as a…