1 Thing A Week

Weekly posts from the mind of Charanjit Chana

Apple Cancels Electric Car Project

When the next version of CarPlay was originally announced, it left me scratching my head:

If Project Titan (Apple's rumoured car project) is real, then Apple have struck an amazing deal here to be able to integrate with an unbelievable number of cars that will be hitting the road from late-2023 onwards.

Turns out both Aston Martin and Porsche announced right at the end of 2023 that cars with the new CarPlay integration were coming in 2024. I was personally surprised it happened because there seemed to be a bit of resistance to the announcement back in 2022.

This outcome seems best to me, Apple do great software and hardware and are the best at bringing both together. The premium cost for an Apple device are palatable because of their performance and longevity but Apple aren't going to sell a family car for family car money which limits it's reach.

The Apple Vision Pro might be very expensive now, but with time and great adoption, the price will surely come down to make it more accessible. That never happens in the car industry.

Link to this notable item

Week 331: Swift Playgrounds on the iPad Mini

As I mentioned previously, I am diving into SwiftUI at the moment. It's both enjoyable and frustrating. Working with PHP is very straightforward, in my opinion. Errors are obvious, configuration is easy enough and it's extremely well documented. Not that SwiftUI isn't, but I am not used to the same types of languages so there has been a learning curve.

I don't know if it makes it harder or if the form factor is irrelevant, but I am learning mostly on my iPad Mini. The device is capable but the on screen keyboard makes it tough. You can only see a handful of lines of code and the previews are mostly obscured if writing an app or working on the preset Playgrounds.

Read the post from week 331

Introducing Apple Sports, a new app for sports fans

I'm building my own, Liverpool specific, app at the moment using SwiftUI so the timing is terrible. Apple Sports in almost unbelievably basic when compared to Apple News, but it is content rich once you drill down into games.

My app is for a single club, so a smaller niche. I'll keep building anyway, it's useful for me if no one else.

Link to this notable item

A list of tautological place names

Link to this notable item

Things Unexpectedly Named After People

Of all of these, PageRank was the one that blew my mind. It was named after Larry Page! For more than 20 years I just assumed it referenced the rank of a page 🤦‍♂️.

Clicking through, I also didn't know Max Factor was named after Max Factor!

Link to this notable item

Week 330: Revisiting the world of DHTML in 2024

My first adventures with web development involved devouring DHTML books from the library and constantly browsing online for how these elements worked and interacted together. There was a good topic on DHTML from the past on HTML Hell over Christmas.

Read the post from week 330

Week 329: Yamaha YHT-1840 Review

Having recently upgraded our home theatre system, I shared the Yamaha YHT-1840 on Good Gear Club and thought it was worth a little more of an in-depth look here.

Yamaha YHT-1840 setup

Read the post from week 329

We don't need more sleep

Link to this notable item

Honda Offering Wireless Apple CarPlay Upgrade for 2018-2022 Accords

Well done, Honda. I'd love the same for my Mercedes. I've looked at dongles to make it work but not sure how reliable they would be so have stuck with the wired version for now.

Link to this notable item

Greenhouse Effect

Link to this notable item

Week 328: Getting to grips with SwiftUI

Swift Playgrounds has proved to be a very interesting app on the iPad. Armed with a Bluetooth keyboard, I went through some of the courses to learn more about Swift and it gave me a pretty good grounding in it's concepts.

Once I'd made it through the Learn to Code and Get Started with Apps guided playgrounds, I decided to see what I might be able to build out and I've been prototyping in SwiftUI for a few weeks now.

What I'm struggling most with though is how to make use of certain layouts that Apple have used. I've nailed a few things like navigation and tab based views, but haven't quite figured out lists. The main reason is that the defaults are not what Apple fall back on in their own apps. There's quite a lot of exceptions they have in their own use of SwiftUI from what I can see. Once I've figured a few of those out I think I can build out a really good app and I'd love to have it out in the App Store this year.

Watch this space!

Read the post from week 328

Why Girona winning LaLiga could be bad news for Manchester City

I for one am delighted with this revelation. I wouldn't say I oppose multi-club ownership but it's become very murky in the way that transfers occur. I think there should be a limit on how many sales can be made between clubs that share ownership. Loans too, clearly the number of players shared is going to be higher because of the underlying relationship but cap it.

If the two teams finish in the same position, the one with the highest club coefficient (City in this case) would be awarded qualification.

No club would sanction it, but in terms of avoiding a cartel, I feel that the club with the lower coefficient should be the one to qualify. They won't have to enjoyed the same windfall from being in the competition before so at a disadvantage from the start. The clubs with more money and clout should be pushed to be at their best, not to just fall back on their reputation.

via Kottke.org

Link to this notable item

Week 327: Danke, Jürgen

I already wasn't feeling my best last week only to bit hit with the news that Jürgen Klopp had decided to step down as manager come the end of the 2023/24 season.

Genuinely devastating news for Liverpool fans. I didn't know how to feel.

Jurgen Klopp wearing sunglasses and holding a bottle of bear at the Liverpool Trophy Parade in 2022. He can be seen waving at fans.

Read the post from week 327

Week 326: The Indie Web should be easier

Earlier this month, I came across a post from Gilest Turnbull titled Make The Indie Web Easier and I couldn't agree more.

we need more tools for it. We need simpler tools for it. And we need to make installing and using them trivially simple.

For building products and larger teams, additional steps make sense. Maybe it's tests, maybe it's abstraction or maybe it's a lack of trust, but whatever the reason I get why there are all sorts of tools around web development.

But if you want to kickstart an idea, it can feel like a minefield.

The example that sticks in my mind was when reviewing a candidates project that was pure front-end and technically just two pages in total. It weighed over 140MB. One hundred and forty. That wasn't the candidates fault, but the fault of the tutorial they followed or the course they had taken.

As a comparison, I couldn’t have made it much simpler to get started with a pure front-end site with just HTML, CSS and basic JavaScript than I did for my DEV #dohackathon submission site, The Neptunes. You can see the repo on GitHub but the kicker was the deployment script. That needed some digging which a developer might not want to dive into... but it did give me an insight into a deployment platform that meant less configuration overall than if I'd spun up and administered a linux box with Apache/NGINX and other bits and pieces by hand.

I would love the web to be simpler and easier than it is at the moment. Tools like HTMX and Hotwire look quite interesting as a way of simplifying how we make sites more interactive.

I'll leave you with the closing paragraph from Giles:

If we truly want to open up the web for everyone to publish on, we have to make it easier. Let’s give people choices. Let’s give people options for tools they can set up and use, with no more knowledge than the knowledge they already have.

Read the post from week 326

Lava Flows Into an Icelandic Town

Iceland is just something else. I wish I'd known more about photography when we visited in 2012.

Link to this notable item

"Late Bloomer" Trailer

About 5 years ago, Indian-Canadian YouTuber JusReign disappeared from the internet. Turns out he was off creating something new, which I saw on an Instagram story that he had hoped to deliver in 2019.

Sporadically I'd see him pop up on various other channels as a non-speaking character in a short skit or as a background character and then a couple of weeks ago it was announced his show was coming to Crave in Canada called Late Bloomer.

From the initial teasers on Instagram it didn't look like a comedy at all but this trailer makes it look a lot more fun and I hope there's a way to watch it here in the UK.

Link to this notable item

Week 325: Glowing hover effect with CSS

All inspired by a tweet from @aman684__, I wanted to look at building a hover effect that mimicked a pixelated interface that would glow as you dragged the mouse across it. Just without JavaScript and only driven by CSS. It felt like :has() would make it a breeze, but it turned out to be a bit tougher than expected.

My first attempt was with a table layout. It worked as a small demo but when I tried to build it out I turned to programatically building a long list of selectors that then caused my browser to lock up. It was an unexpected outcome.

I stopped and took some time to think and decided to go for a div based layout so that I wasn't having to work with rows and columns as separate concepts from the cells themselves. I basically ended up being able to always select n number of elements before and/or after the one being hovered. There's still a quirk where hovering too close to the left or right causes the glowing effect to appear on the opposite side. With a bit of effort, I reckon that could be overcome but I think the demo I have is a good place to pause.

The CSS explained

@function selectorBuilder($count) {
  $selector: '';
  @for $i from 1 through $count {
    $selector: $selector + "+ div ";
  }
  @return $selector;
}

A function that takes the number of items to iterate through and then append + div that many times.

.container {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  margin: 0 auto;
  width: min(100vw, 1000px);
}

.container div {
  --r: 255;
  --g: 255;
  --b: 255;
  --opacity: 0.1;
  aspect-ratio: 1;
  background-color: rgba(var(--r), var(--g), var(--b), var(--opacity));
  border: 1px solid #222;
  grid-column: span 1;
  width: 100%;
}

Create a square grid layout, using variables for building the various color values which then makes it easier to override different bits later on, depending on their visual vicinity to the square being hovered on.

.container div {
  &:has(+ div:hover),
  &:has(#{selectorBuilder(1)} + div:hover),
  &:has(#{selectorBuilder(17)} + div:hover),
  &:has(#{selectorBuilder(18)} + div:hover),
  &:has(#{selectorBuilder(19)} + div:hover),
  &:has(#{selectorBuilder(20)} + div:hover),
  &:has(#{selectorBuilder(21)} + div:hover),
  &:has(#{selectorBuilder(38)} + div:hover),
  &:has(#{selectorBuilder(39)} + div:hover),
  &:has(#{selectorBuilder(40)} + div:hover) {
    --opacity: 0.5;
  }
}

There are lots of variations of the above where I am building out the selectors. In this case, the squares that looking like they're immediately around the item being hovered on are given an opacity of 0.5.

.container div {
  &:has(#{selectorBuilder(2)} + div:hover) {
    /* properties */
  }
}

As an example, the above generates this selector:

.container div:has(+ div + div + div:hover) {
  /* properties */
}
If the div is followed by 3 divs, and the third one is being hovered, then the div (3 before the one being hovered) will be caught by the selector.

Given my first attempt used up a lot of resources, I don't think this is a production-ready solution. That's before you factor in the quirks of how it behaves at the edges. But it's something that wouldn't have been possible without :has(). I'd long wanted a parent selector, but :has() just opens up a whole world of possibilities that I hadn't really thought about before..

Read the post from week 325

Week 324: My Resolutions for 2024

Back in 2022, I set some resolutions which I didn't quite complete. I didn't really have any for last year but am kicking this year of with two.

Firstly, I want to read more and am part way through a book. I'm tracking in Google Docs my reading list and my progress so I hope to do better this year. I am also looking to keep it light and read some Roald Dahl books alongside some of the heavier stuff I have been building up.

My other resolution is to get to at least one football match this year with the family. Ideally for a Liverpool game, back up is England at Wembley and plan C is anything at all!

Read the post from week 324

Week 323: My short-term Apple Watch Ultra 2 Review

Having past the 3 month mark with my Apple Watch Ultra 2, I thought it was worth putting some thoughts down as part of a short-term review before recording a longer medium-to-long term review over on the Good Gear Club YouTube channel.

I came up to the Apple Watch Ultra 2 from the Series 2, a 7-year leap. The Series 3 introduced a more powerful processor and managed to handle OS updates for years beyond the Series 2. The Series 4 got an updated form factor with a bigger screen and the Series 5 got the always-on display. In just those 3 revisions there was already a lot that had changed and then in 2022 we got the original Apple Watch Ultra that featured days of battery life in the more rugged style.

Why the Ultra 2 and not the Apple Watch Series 9? Battery life was by far the biggest factor, but the larger size suites my wrist. I had to wait a few months before I got to see and try the Apple Watch Ultra in store. It was hard to gauge from photos if it was big or if it was huge. What actually sealed the deal for me was that I saw it on a ladies wrist in person and it looked big but it did not look huge. If it wasn't huge for her, then it would be fine for me. By then we were half way through the yearly cycle so I waited for September to roll around.

Apple Watch Ultra 2 Pros

The always-on display is the feature I've wanted most. When exercising, you might want to check the time but you can't without a tap taking you out of the flow. I'd prefer if the watch showed you more progress details at a glance, but the time alone is a game changer.

Battery life on my Series 2 was down to sub-12 hours so getting around 6x that is better than it ever was for me on the older Apple Watch. The titanium finish is really nice and very durable. My aluminium Apple Watch and screen lasted well enough, but definitely looks worn. I don't see this watch looking anywhere near as battered any time soon. The flat screen here is much nice for me, the Series 2 had the curved surface and a smaller display area but this feels right.

Double tap isn't as useful as I thought it would be. Watching the keynote, I thought it was going to be something I did daily. I've used it a handful of times as a test but I don't know if I've ever used it intentionally as a convenience. More on charging later.

Apple Watch Ultra 2 Cons

The bands for the Apple Watch Ultra are about double what other bands for the regular watches would cost. The original Ultra had a great black strap with an orange accent, but it's no longer available and it's the one I'd have bought. Not that I didn't like the strap that came with mine (it has a £99 value), but I went and got the more subtle of the Nike Sport Loops from this year's range. It's not as stiff and I think I prefer it to the Ultra's 49mm options. I don't hike, scuba, dive or follow alpine trails so it's secure enough.

The international orange buttons and accents look really orange in photos. The accent on the crown definitely is orange, but the international orange Action Button is light dependent. Rarely does it look orange. It's my favourite colour so a little dissapointing. But I am splitting hairs over a personal preference here!

So on to charging. With a USB-C charging brick and the updated puck, charging is brilliant. About an hour and the larger battery is full. Put it on an older puck and I couldn't tell you how long it takes because I gave up after 30 minutes of watching the charge go from around 20 to 25%. It's ridiculously slow. I don't have to plan as diligently as I did with the Series 2 so it's not a huge issue but I didn't expect the difference to be so stark.

I'll be putting some more thoughts into a video a few months. I'll also be following up with a post about Apple Fitness+ which I have found to be really good for getting me to exercise more effectively.

Read the post from week 323

Week 322: A new look for 1 Thing A Week

Admittedly, I cut it pretty fine and got there very late, but the new layout for 1 Thing A Week is live. It's based on SkeletonCSS and is really a work in progress, so there's more to come but for now it's more blog like than it's ever been.

As a marker of the occasion, there's a screenshot of the homepage from before I applied the update. All pages should be where they were before, just with a content focused layout. Anything functionality missing should return soon.

It was actually fairly easy to migrate across, it's the content that needs a brief update. I need to retrospectively introduce the marker for when the intro to an article has stopped for better formatting on the homepage. I also need to take care of some edge cases around tables and images. Lastly, there are pages where custom CSS was used and they need a revisit.

I haven't made a conscious effort to ignore dark mode, but there isn't one at the moment. That will come with time.

If you come across something that's out of place, please @ me.

Read the post from week 322


View more posts in the archive or discover more notable items.