Short Blog
It’s been 3 days not reading any news, no social media, using computer just for coding. Feels great. While reading my RSS feed today, I realized that you can just write short blog as well. Thanks Seth Godin !
Recent content on Orchard Lab
It’s been 3 days not reading any news, no social media, using computer just for coding. Feels great. While reading my RSS feed today, I realized that you can just write short blog as well. Thanks Seth Godin !
I have a problem. A problem that has bothered me for a long time: not finishing the side projects I started. No matter how big or small the project is, I always manage to give up at the very last minute. Whether the excuse is chasing so-called perfection or finding it’s not useful for myself anymore. Not to mention you could use the fancy term “sunk cost” to justify it. I am sick…
I’ve been using fly.io since 2021. But I never realize I can deploy multiple environments ( staging , production ) easily as well. In this post I will share how can you add a staging environment in 5 minutes. Assuming you already have a fly.toml in your project, something like this: app = 'example-production' primary_region = 'lax' [ build ] [ env ] APP_ENV = 'production' AWS_REGION =…
This is an article on how to create a Elixir wrapper of Rust crate. If you are more care about using the final library to extract dominant colors, head over to 29decibel/dominant_colors or reference this Livebook gist I found this very nice Rust library called kmeans-colors which can extract dominant colors from a given image. It based on k means clustering algorithm. It even comes with a binary.…
Over the past weekend, I created a web app called VoidInbox using Phoenix and Elixir. Which can let me receive newsletters or other not so important emails, and read them there. It looks like this: Why am I building this With the flourishing of the thousands of newsletters. I’ve always found myself lost in the pile of emails in my inbox. Not only it messes with my “actual”…
I came across a great book called The Socratic Method by Ward Farnsworth, which was recommended by Rich Hickey in his talk Design in Practice . It’s an amazing book, easily the best one I’ve read this year. The ideas in the book have helped me to connect many thoughts I had before on “questions”. The Socratic method is a style of thought and a method of inquiry that…
I just can’t stop having fun using bun I have an old postgresql database backup. I need to quickly inspect the tables/models in the database and then extract data from it. Spin up postgres After having the backup sql ready output-backup.sql . I created a docker-compose.yml file to quickly spin up a postgres instance. version : '3.1' services : postgres : image : postgres:latest environment :…
I love tmp folder driven development, it gives me the freedom to experiment without worrying about polluting things. tmp folder driven development: Start with tmp folder and messing around libraries or scripts before put it into the actual project. Recently I’ve had a great time using bun : Develop, test, run, and bundle JavaScript & TypeScript projects—all with Bun. Bun is an all-in-one…
With every single sophisticated tool nowadays, we are constantly measured by numbers: how well we perform, how well we accomplish certain tasks, how effective we were in our training. However, we still rarely measure how we actually feel. The first time I encountered this question was actually from my Suunto watch. By the end of the running workout, on top of showing the running summary, it will…
Great tools enable us to focus and unleash our creativity. They either allow us to do things we couldn’t do before or provide us with new perspectives we hadn’t considered. Here are a couple of tools that have stayed with me for a long time, and I am grateful to have them. I am a macOS user, so some of these tools are only available on this platform. However, you can find alternatives…
I remember the early days of Rails when people often criticized the Java world, or the J2EE world to be more specific, for being too complex and over-engineered, even for simple projects. Slowly, the whole industry is now shifting more towards bootstrapping, being lean, and scrappy. Any time people try to set up a solid foundation, they are accused of wasting time; any time people try to create…
Such a great read on Jason Fried’s Two visions of the future . Though, I am not sure how I feel about either of them. Sometimes I wish there were more easy to use UIs to get things done. Sometimes I wish all I needed to deal with was text, instead of learning all kinds of fancy UIs from your designers. The best computers are the ones that disappear or blend into your life. This is even often…
We [at Apple] feel that, for some crazy reason, we’re in the right place at the right time to put something back. And what I mean by that is, most of us didn’t make the clothes we’re wearing, and we didn’t cook or grow the food that we eat, and we’re speaking a language that was developed by other people, and we use a mathematics that was developed by other people. We are constantly taking. And…
Art is about the maker Its aim: to be an expression of who you are. You are creating the work that best represents you. Wanting to outperform another artist or make a work better than theirs rarely results in true greatness. Nor is it a mindset that has a healthy impact on the rest of our lives. As Theodore Roosevelt pointed out, comparison is the thief of joy. Besides, why would we want to create…
If we can tune in to the idea of making things and sharing them without being attached to the outcome, the work is more likely to arrive in its truest form. Rick Rubin The Creative Act: A Way Of Being
10/30/2022
3/26/2023 3/26/2023
I am really tired of the unnecessary ceremonies of writing a new article using my beloved static site generator: open terminal find the folder create a new file with the title open editor to log down my thoughts git add , git commit and git push Instead of doing all of these, how about something which you can just open , write and publish (while still using the greatest static generator). Yeah,…
I promised to share what will be my next journey. But before that, I want to share 3 personal stories. Story 1 In 2015, while I was living in Foster City Bay Area, I met my neighbor Robin. At that time, I started running on and off, but unfortunately in the every possible wrong way (this simple sport seems not simple at all). Turns out he’s a seasoned ultra and sub-3 marathon runner, most…
I’ve never imagined that I could stay at one company for almost 8 years, let alone Amazon. But here I am, last week I finished my longest career tenure at Amazon. It was a grateful, intensive yet fulfilling journey. Over the years, I’ve realized that how much time you spent on one place is not about that company, but more about people around you. I felt so lucky to have a great(best)…
There are books which its title can’t justify the greatness of its content. The legendary coach Phil Jackson ’s book Eleven Rings - The Soul of Success is definitely one of those. I’ve known about Phil Jackson since middle school while watching NBA playoffs of Bulls and Lakers, he had coached the best basketball players like Micheal Jordan and Kobe Bryant, lead Bulls and Lakers…
Sometimes, not knowing something exists is a blessing. How many times have you got discouraged once you know your “ awesome idea ” already being implemented by others, maybe also better in every other ways than yours as well. When I was a junior software engineer, I always hope I could’ve known more. Hopping that I could’ve known there are already solutions to the problems…
Notes: This is a documentation-driven-development series I am currently experimenting. So most likely the code doesn’t exists yet before publishing this article. What I am hoping is that even if the project eventually can not be finished, the idea could still live in somewhere.🤞🏼 Static site generators are a blessing. Since Jekyll and Github pages, the world had been moving towards static…
This is the start of the story. Unfortunately, this is the end of the story too. About two months ago, this the above screen popped up in my Tesla. I thought, well, look how smart this car is. It can even tell me the tire’s wear conditions without using coins or special tools to measure. Software is amazing! I took the car to the dealer, as expected, they replaced two brand new tires on the…
We are living in a world of saturated SaaS products. There is always a service for that. Every single tool we’ve used to install on our machine now have a version in the cloud. From notes taking (Notion) to photo editing (Adobe) to designing tools (Figma) to even coding (VS code in the cloud). I think it’s fair to say, SaaS services pushes the instant gratification of getting things…
Story 1 Back in 2005 when I was still in college. Friends found me a part time job developing a desktop application for a barber shop. .NET and C# pretty much on the headlines news everyday, it’s also a modern way of writing desktop application at that time. So I choose C# to development the application. Microsoft makes the development process as easy as drag and drop controls and then…
Someone sent me a CR the other day. And the code went something like this: function validateInputLanguage ( input : InputOptions ) : void { // checking input is valid if ( input . language ) { // .... // we are good return ; } else { input . language = defaultLang ; } } The code here doesn’t matter that much though. I read the CR, put the following comments: I would recommend to not mutate…
While I mentioned how great to do pattern match in Elixir. It’s surprisingly good to do this in TypeScript thanks to the ts-pattern . Here is what I did to grab the content of different RSS feeds using Elixir: def get_item_content (%{ 'content' => %{ 'value' => value } }) when is_binary ( value ), do : value def get_item_content (%{ 'content' => content }) when is_binary ( content ), do :…
I still vividly remember the days when BackboneJS came out, it might not the first Single Page Application framework, but probably the most notable one at that time. Before that, I was doing lots of Rails development for building web apps. BackboneJS for sure gave me a feel of fresh air when developing web UIs. Everything related to UI just became so lightweight to develop. Yes we would need to…
Parser There are so many RSS parser out there. I’ve tried lots of them, including JavaScript, Elixir and Rust versions. So far the most reliable one I’ve tested is the Rust version from rust-syndication . There is even a Elixir fast_rss wrapped on top of the rss . The wrapper is pretty lightweight rustler makes the whole interop with Rust with Elixir so much easier and straightforward.…
I’ve been using RSS reader for almost more than 15 years. Right start from graduated from college. It’s amazed to see all kinds of different forms product on top of this open (while also chaotic) format. There are native apps, AI based, open source web apps. We’ve never been at a time lacking of RSS readers. While bother creating another one? First of all, I love working on open…
TLDR Gist link for the changes to make this happen Why While there were few options to integrate Svelte into existing Phoenix app. But I still don’t find any of them to be particular simple. What I really want is something that I can understand, as minimal as possible, no heavy Node tooling involved. After play with different options, I finally found a sweet spot for me to use Svelte while…
https://www.youtube.com/watch?v=AdNJ3fydeao Wether or not you are a front end developer or even a software engineer. This talk worth your time either from a inspirational perspective on how can we create more accessible things, or from a marketing perspective, I’ve never saw a better “marketing talk” for a front end framework, watching this talk constantly reminds me of Apple or…
VS code is awesome, sometimes too good . I used to writing pretty much everything from work to side projects, from Ruby to JavaScript exclusively using Vim. But I noticed that I’ve slowly transited using VS Code 90% of the time for the recent years. It’s been great, it helped me caught lots of bugs because of the smart auto completion, it prevent me from writing so many typos because…
When I say “good” here, I am more talking about the non-utilitarian part. I am not talking about using computer to pay your bills, making an important phone call, or using maps for directions. I am more talking about “the others”. I was touring a school with my son the other day. While we were in the computer class room. I was attracted by all the printed art made by…
I’ve been a software developer for about 15 years. Along the way, I’ve been writing software using different tools and technologies (mixing languages and frameworks in my head): .NET, C#, Ruby (On Rails), JavaScript, Scala, Clojure, Go, Swift, TypeScript, Elixir. It’s hard to describe in one or two sentences what I learned along the way from all these languages and frameworks. I…
I have been building a web app product using Phoenix LiveView recently, it’s been very pleasant experiences for me. Since I was a long time Ruby (On Rails) developer since 2011 and then got my brain washed on functional programming (Clojure, ClojureScript) in 2014, so Elixir turns out a perfect fit for me (especially my brain). It has the dynamic language feeling but also comes with compiler…