Last time, we went over what the Composition API is and why it is better than the Options API in Vue. This time, I wanted to explore the subject a little more. Let’s start with an array of 30 3-ingredient cocktails that I had ChatGPT generate. Each cocktail has a name, ingredients list, preparation instructions, and a list of characteristics. Let’s see what we can do with this. In this simple app, we declare the list of cocktails as const cocktails = ref([]) and then we use the onMounted(() => {} lifecycle hook to populate it with delicious cocktails. Lifecycle...
Learning the Composition API
This past month, I visited the local Hack & Tell to write a web app that uses Vue.js‘s Composition API. I have written 41 posts involving Vue on this blog but the Composition API is new here. If you are the “eat your dessert first” type, you can check out the result at https://joes-job-tracker.web.app. I want to spend this article reviewing the composition API, though.
The 2023 Bader Rutter Chili Cook Off
There is a Chili Cook-Off at work tomorrow and I agreed to bring something that I plan to call <Chili><Con Carne /></Chili>. So, what is the plan? I plan to start with a nice stout, thick-ground beef, 1 chopped yellow onion, a habanero or two, and a few chopped-up strips of bacon until the meat is browned and the onion is soft. Next, I’ll stir in chopped tomatoes, tomato paste, and garlic. After that, I’ll add parsley, basil, chili powder, paprika, cayenne pepper, oregano, salt, and pepper. At that point, I’ll add the kidney beans and then thicken it as...
New Blog Day!
I started this blog over 12 years ago. Over the years, I have changed where it was hosted, what the URL was, and generally how I used it. A few weeks ago, I got the idea to both move hosts and change the URL again. The last time I did that was over 5 years ago. Almost three years ago, I started posting very regularly to the blog (for a year it was at least weekly). I don’t intend to return to that but I promise a solid attempt at monthly posts. You can follow along here of course but...
I picked up another hobby
While in India last year, an intriguing conversation I had with a fellow traveler planted the seed of motorcycling in my mind. It was during my travels through Rajasthan, where this individual spoke about their own motorcycle expedition around the golden triangle. Hearing their tales of adventure, I couldn’t help but think, “If they could do it, why can’t I do the same?” I wasn’t necessarily going to return to the same area but Laos, Cambodia, or Vietnam might be good places to do something similar.
What kind of shinanigans can you get up to with a .zip or .mov TLD?
This spring, Google introduced eight new TLDs, and two of them are creating a little bit of a stink online. The top-level domain “.zip” is also an extension for archive files employing the compression format known as “zip.” Similarly, the TLD “.mov” is also the file format extension “.mov”. So, how can this be abused?
How to use Mapbox to convert from coordinates to address and back again
Back in January, I promised that a future post would cover how to go from a street address to latitude / longitude coordinates. Previously, we have covered how to get the user’s street address, using navigator.geolocation and MapQuest and more recently, we covered converting addresses to latitude and longitude but that wasn’t an actual street address and we have never done this with Mapbox, before.
How I get my news, these days
I will readily admit that I got too much of my news from Twitter, before the implosion. After twitter went away, there was a slight hole in my daily news diet. I started filling that hole with Inoreader and PressReader. Inoreader has a $20/yr “supporter” plan and the app syncs your feeds from device to device. PressReader is free with a Milwaukee County Federated Library card and gets you access to over 7000 magazines and newspapers on up to five devices. PressReader includes the Milwaukee Journal Sentinel, which is good. It doesn’t include the Washington Post or the New York...
How to autofill an address using mapbox
I have been poking at the Milwaukee County Trasit System (MCTS) APIs over the past few weeks. A few years ago, I tried to write a bus app using Angular and it just didn’t work out well. I figured that I would try it again, using what I have learned since then. The first step was to build out a data infrastructure using Cloudflare Workers and Cloudflare KV. The end-result of that is what drives the MCTS mastodon bot. The workers JSON api returns every bus stop in the system, along with the route, direction, and location. The next step...