Posts

WMO Codes

Image
Periodic Table of WMO Weather Condition Codes Unlike some other " periodic tables ," this one uncovers several patterns in the WMO weather condition codes. How can you express the 28 (Open Meteo) WMO weather condition codes as distinct icons and colors? The Open Meteo documentation gives a short description of each code, but the best way to graphically visualize this information in a weather app is not obvious. Open Weather, another weather API, simply hands you everything on a single page . The previous version of my weather app used Open Weather. (My app’s icons were actually from DarkSky, one of the best weather API’s until they were acquired by Apple.) However I was not satisfied with just mapping the 9 icons onto Open Meteo’s 28 different conditions . Open Meteo provides more information, and I wanted to expose it all! Organizing the Codes There are actually 100 unique WMO codes , but Open Meteo only reports a subset of these. Open Meteo groups the codes

Automatic Inbox Cleanup with Two Simple Filters/Rules

Image
Automatic Inbox Cleanup with Two Simple Filters/Rules Only 47 important emails reached my inbox out of 1,236 total emails received in October 2023. Last month I received 1,236 emails, but only 47 emails reached my inbox. These were the truly important emails I wanted to see, mostly sent from real people. These are the only emails that triggered a notification on my phone as soon as they hit my inbox. The other 96% of the emails were silently and automatically filed into other categories/labels without a single notification. About once a day, I take a few seconds to check them in bulk. I just scan the subjects and senders to mark a few bulk/automated emails that interest me. Then two keystrokes marks all of them as read. Ten, twenty, a hundred at a time! How can you have your email sorted like this? You just have to add a few custom email filters/rules. Instructions and downloadable Gmail filter files are at the end of this article! TL;DR (Quick Instructions) Instruction

More Performant, Testable Code with Functional Programming. (FP language optional!)

Image
Valve Software , CC BY-SA 4.0 , via Wikimedia Commons Is functional programming worth learning? Functional programming can make code in your favorite language more succinct, testable, performant, and maintainable. (Functional programming language optional!) First, let’s quickly define functional programming (FP): A programming paradigm that avoids mutation and side effects. Notice FP does not require a functional programming language. FP is a way of thinking: you can do FP in your favorite languages like Python, JavaScript, Java, C, etc… (Of course, languages designed for FP make it easier with built-ins like first-class functions and immutable data structures.) So how does avoiding mutation and side-effects improve your code? FP results in more performant code. Functions without side-effects (interactions with external mutable state) are trivial to parallelize. Reading/writing to a global variable results in side-effects. So does all I/O: logging to the

Applying to the Recurse Center: Things I Wish I Knew Beforehand

Image
  The Recurse Center application process is well-documented and implemented well. However there were some undocumented details I wish I had been aware of before applying. These are notes for myself before I re-apply. It may help other hopeful Recursers, too~ Written Application The text area form inputs are automatically linkified. Markdown formatting is not supported and probably better to avoid. You may view/edit your application after submitting. Keep a log of "fascinating things" if you have trouble remembering, like me. (Or pick an "evergreen" thing.) The Conversational Interview Some questions I was not prepared for: Describe a time you had trouble programming. How did you overcome it? What is your greatest programming strength? What is your greatest programming weakness? Describe the ideal fellow Recurse batch member; someone you'd want to pair program with. The Pairing Interview For some reason Zoom screen sharing introduced a lag where there was a sign

UltraWeather (Development of 2021 version)

Image
Quick note: my tech stack of choice has evolved since I wrote this draft in 2021. UltraWeather 2023 will be developed with the following technology: Development/hosting platform: Vercel JS framework: SvelteKit Language: TypeScript Templates: Vanilla HTML Chart library: ChartJS JS package manager: PNPM UltraWeather was originally named HyperWeather after HyperDev, the platform it was developed on. (Now known as  Glitch ). I had a certain way I wanted to see the weather forecast that no weather service provided. Glitch helped me implement my vision by providing: A simple (and free) method of hosting server-side code Motivation with a contest Server-side code was needed to proxy API calls;  DarkSky did not allow direct calls from the browser . So, I figured out how to used the Express server on HyperDev. Along the way, I also discovered some other nifty tech based on the Glitch samples I started with. I renamed HyperWeather to UltraWeather as I ported it to a new platform. “Ultra”

UltraWeather (Original HyperWeather Post)

Image
Screenshots of HyperWeather (previous version of UltraWeather). What is UltraWeather? UltraWeather (formerly HyperWeather) gives user-friendly, actionable weather forecasts. At a glance, you can quickly decide: "Is it warm enough for short sleeves?" "Do I need sunscreen? An umbrella?" UltraWeather also helps you get an intuitive sense of the temperature. Numerical temperatures are difficult to judge especially if you travel to a country with a different climate and/or different unit of temperature (Fahrenheit/Celsius). Why another weather app? Most weather apps jam as much information as possible onto the screen. UltraWeather takes a different approach and gives you the executive summary: Current conditions and temperature Forecast for the next few days (highs & lows + conditions) Historical weather for the past few days (highs & low + conditions) If you need more details than this, a link at the top leads to the full DarkSky forecas

How to Display the Temperature Properly

Image
Naver has one of the best graphical temperature visualizations. Simple, clean, with the right amount of information. You can probably figure it out even if you can't read Korean or don't use Celsius. Web sites in Korea are usually usability disasters, but every so often I come across a true UX gem. Take Naver's visualization of temperature over time , f or example.  I've seen many other temperature graphs, but Naver adds one tiny feature that makes theirs immensely more usable: the temperature from yesterday and the day before. That extra little bit of historical information makes the current temperature and forecast temperature much easier to read.