Song 9: Analyse

September 23, 2020 • 9:24 PM

Day 9: 一首让你感到开心的歌。

小红莓的 Analyse 是一首从里到外透着高兴的歌。连主唱在采访的时候都是这么描述这首歌的:

Analyse is the typical song I wrote at my house with an acoustic guitar. It has that optimistic and happy sound. Is like waking up and say: “This is going to be a great day.”

Apple Music

Let’s stay in touch!

Sign up for the weekly updates of anything that appears on this blog. You will read about my outdoor life around British Columbia, technical discussions as a Data Analyst & App Developer, as well as other random discoveries and thoughts.

Song #8: Follow

September 22, 2020 • 11:13 PM

Day 8: 一首关于毒品(药物)或酒精的歌。

饶舌歌手 Lu1 的炮房歌曲《Follow》自然少不了酒精(和药物?)的煽风点火。一男一女回到房间里的心思被 Lu1 的歌词演绎的淋漓尽致——

所以我们 Netflix and chill
看 2046
和助燃的酒,谈论着那些有的没的
就让酒精融化那些规则
最多三个回合

喜欢 Lu1 不仅是因为他的真实和对你我都有的心思的细腻描写,更是因为他在中英文之间自由转换切换韵脚的自如。这首《Follow》听上去就像极了他手里的那杯 Whisky,又烈又柔,喝下去胃里服服帖帖。

Apple Music

今天陪 MX 去苹果店里试了一下新的表和表带。我们俩人可以预约一个 15 分钟的 shopping session,有一个专门的 Apple Genius 提供问询和导购服务。

Genius 拿来的是红色银色和蓝色三款 44 mm 表壳,然后抽出了手里的一个贴了膜的苹果表卷尺来测量我们的 Single Loop 号码。(卷尺是专门设计的一次性纸,Genius 把两层膜揭开,中间封着的是卷尺。卷尺一头是带有不粘胶的手表圆角矩形,按照戴表的模样贴在手臂上,绕一圈就能看见自己的尺寸了。)我是 6–7 号之间。

正如想象般的那样,两款表带弹性十足,却没有橡皮筋那种不稳定容易扯坏的感觉。意外的是表带大部分张力似乎停在最开始的拉扯,尤其是编织款表带,穿脱要比硅胶款容易一些。两款表带都能带来让人很舒服的拉扯感,但是戴上之后丝毫不觉得紧绷。我的 6 号基本上是贴合在胳膊上,甩动胳膊手表也不会有任何滑动;如果手掌作张开姿势、撑大手腕,也没有普通表带的紧绷感,这很难得。如果你也和我一样是骑在两个号码中间,选择小一号总是没错的。

我也很好奇这个 Single Loop 表带的物流执行(数据分析师上线)——这么多的表带型号会让 SKU 执行起来很困难,第三方难免要有很多冗余备货。在交易时,苹果大概是将表壳和表带自由组合进行包装,但是恐怕第三方零售商现有的系统都不兼容这样的组合——10个尺寸、12个颜色/材质、两个表壳尺寸、五个表壳颜色,1,200 个 SKU 估计大部分第三方零售商都吃不消,要么选择更新自己的系统,要么干脆不卖一些表带组合,大概最后都是选择了后者,把最全的选择留给了苹果官方直营店。扯远了扯远了。

Sidebar: 新款的 Apple Watch S6 的深灰色要比我的 S5 颜色浅一些。

本来 MX 要买的,结果心仪的 Nike 款店里没货,我们就过两天再说吧—— Genius 小哥说估计这周晚些时候就会补货,店里从周五开卖 S6 开始还没补过货呢。

Song #7: I Would Walk 500 Miles

September 21, 2020 • 8:46 AM

Day 7: 一首适合开车时听的歌

来自看 How I Met Your Mother 的时光——这首歌没有任何悬念是适合开车时听的歌第一名。

Apple Music

Song #6: Party Poison

September 20, 2020 • 10:40 PM

Day 6: 一首想让你尽情跳舞的歌。

来自 2010 年十一月的 My Chemical Romance 的绝唱专辑 Danger Days 简直就是支撑我高三生活背景音。整张专辑就是一本颜色绚烂的漫画书,剧情上的悲剧结局在 MCR 戏剧化的演绎下显得一点都不重要,就是要这样没心没肺向前走,走向或成功或死亡的结局。

Party Poison MV。

Party Poison 基本上也是这张专辑里最躁的一首歌,大家一起向前冲的节奏从头带到尾,也是最适合一边写化学作业、写数分作业、写国际金融学作业、写 Optimization 503 作业的时候听的东西了。

Apple Music

iOS 14, watchOS 7, Apple Watch S6, and iPad Air

September 18, 2020 • 4:07 PM

随意整理一下前两天苹果发布会+新发布的 iOS 14 和 watchOS 7 的想法。

iOS 14 依然是未完工的状态

已经用了好几个月了,我对 iOS 14 基本无感。每一个 beta 版本都有 bug 被解决,也有新的 bug 被引入。现在 beta 8 等到 GM 和正式版,结果一些基本的 UI bug 都没有解决,也就算了吧。估计等 iOS 14.2(没错,14.1 的beta版本被跳过了——估计是为 iPad Air 和 iPhone 12 系列准备的)就能解决一些问题。

我就不说苹果针对开发者做的一系列蠢事了。Xcode GM seed 发布了 12A7208 版本后 20 分钟替换成了 A7209,很多人下载完要重新下载才能提交审核。

不过好在这两天审核速度莫名的快。我还从来没见过提交审核十分钟就进入审核状态,二十分钟发版的审核时间。

Animoji 表盘也太可爱了

每个动物都有自己的动作,比如熊和狮子会打哈欠,鸡会对着屏幕摇头乱看,老虎会摆出 “嗷” 的表情,独角兽会蹦迪左右摇摆,熊猫一直在嚼嚼嚼……Animoji 的表情绝对不是瞎做着玩的,真的也是苹果下了很多工作的作品。(当然了,哪年的新表盘都不是瞎做着玩的,比如当时的液态金属和烟雾表盘还特意制作道具录像……)

Song #4: 北京咳嗽

September 18, 2020 • 12:08 AM

Day 4: 一首让你想起你宁愿忘记的人的歌

听小老虎的《色弱》最多的就是回国工作的那半年,每天从家、健身房到单位一共没两步路,翻来覆去这张专辑听了得有百遍。

专辑第一首歌《北京咳嗽》写出了我对北京的很多感慨,包括当时那段时间里的遗憾和成长。

无能为力 这里最后的甜蜜
我不会把心给你
我用肺来爱着你

Apple Music

Song #3: Port of Morrow

September 16, 2020 • 11:27 PM

Day 3: 一首让你想到夏天的歌曲。

夏天在我的记忆里永远是和空调绑在一起的。北京春脖子短,对我这种怕热的人来说可能四月中旬到十月中旬都叫夏天。还在人大上学的时候,四五月就会和同学室友相约图书馆,当时有无数个室外炎炎的白天都是和申某许某沈某在图书馆背单词、准备GMAT(他们是GRE),或者备考专业课。

那时候常听的就是 The Shins 的 Port of Morrow 专辑,非常迷幻的嗑药后的感觉,但是旋律连贯婉转总也是听不够。整张专辑也是难得是和从头到尾顺序听完的专辑,就像一幕歌剧,有开场,有念白,还有最后的谢幕。

今天推这张专辑里的同名歌曲,专辑里的收尾歌曲 Port of Morrow。当时那个夏天能听这么多次也是颇有共鸣吧,站在毕业前一年的申请季节点,我们也不知道自己在向哪飘去,全是迷茫,但也什么都不怕地在往前走。现在有人出国留了下来,有人失意回国就业,有人追着当时的女朋友奔波求学留下工作,现在终于修成夫妻……人生啊,向前看都是看不懂的。

Apple Music

Song #2: 出道四年

September 16, 2020 • 12:16 AM

Day 2: 一首歌名带有数字的歌曲。

第二天是提交 App 送审的一天。垃圾苹果留了不到 24 小时让开发者打包上传 App 并提供审核,中间还闹了个假 GM 版本 Xcode 的乌龙。就当开发者年费喂狗了。

今天推 GALA 乐队的《出道四年》——

情愿这样快乐简单 妈妈觉得我同性恋 其实我是个男子汉 出道四年 梦未改变 多少人一网就被打尽 多少人一决雌雄不辨 多少人一蹶再也不振

算是为自己加油了,只是我要做一个男子汉同性恋。

Apple Music

Song #1: Some Days I’m Golden All Night

September 14, 2020 • 11:20 PM

最近 App 忙着赶进度,工作上也有忙了起来天天好多事情要做,写东西就搁置了。刷推看到了 30 天歌曲分享觉得是个不错的主题,不如就来试试好了。

Day 1: 带有颜色的歌曲,分享独一无二的 Josh Rouse 当年的回归曲目《Some Days I’m Golden All Night》。

Apple Music

Some days I’m golden Other days I’m bad It all depends on my wallet And the drinks I have

“Time Flies.”

September 8, 2020 • 9:02 PM

“Time Flies,” says Apple. It truly hits home.

Staying home messes up your sense of time. You’d feel this pandemic is taking forever to end; you’d look back at the onset of all this as if it were just yesterday.

It’s been fully half a year since I last worked in the office. Seasons changed, and the days got longer and is not shrinking back into what winter has to offer. Hamilton, Tenet, and Mulan happened. WWDC happened, and I’ve found new leads in my apps. One of my friends at work has just left and will be starting at another company. Now this Time Flies event.

It’s nice that there are things like these to keep me in check with the passage of time, progress, and growth.

Enumerated Custom Errors in R

September 4, 2020 • 11:58 AM

When designing a complex Shiny app in R, you might want to present different kinds of errors that you expect your users to encounter. These errors should have a summary to show the user what went wrong. There should also be a longer description to give the user more information about the error, as well as possible steps to troubleshoot.

You would also want your custom errors enumerated, so that the messages are in one place for easy management and update. This is critical as your app grows in complexity, and it’s really just good practice. In this post, we will explore just that: design your own custom error cases to display helpful error messages in Shiny apps.

Home Plants

September 2, 2020 • 9:10 PM

Sometime during the pandemic, we decided to “adopt” some real plants to supplement all the fake ones we had bought from IKEA. In just a few weeks, we mail ordered one snake plant from plantsome.ca, bought some peace lily from the florist’s down the block, and picked up a pot of calla lily, some succulents, and a ZZ plant from IKEA and Home Depot.

Now the entire summer has passed. The calla lily has died from overwatering1, but the rest are thriving — the ZZ plant is still giving out new growth; the snake plant is now a lot taller. Peace Lily is the best and the blossoms are still strong.

Sometime after we got the plants, we decided to try growing mint. We started out by rooting 4 pieces of mint branches bought from T&T. Now, three months later, they fill the entire pot and are flowering. We are quite amazed at the mint: they just can’t die.

The mint responses so quickly to your care. Water them and they’d grow an inch overnight. Snip the flower on the top and the next morning, you’d see new growth on the leaf nodes.

The mint is also resilient. Soak the pot in water for a week, and they would keep growing. Leave them dry for 10 days (as we did when we traveled to Banff and Jasper) and they persevere despite the sun.

They are also quite rewarding — no more buying grocery store mints! Now the mint plants are beginning to grow bark and I’m sure they will go strong into the winter.

  1. We were under the impression that Calla Lily are quite water-hungry — and the plant pot would dry within days of a thorough round of watering. But as the blossoms wither, we should have scaled back on watering and let the plant go dormant. We just didn’t know better. (But now we do!) 

Conditional View Modifiers in SwiftUI

September 2, 2020 • 8:59 AM

Federico Zanetello:

The most common solution is to define a new if View extension:

extension View {
	@ViewBuilder
	func `if`<Transform: View>(
		_ condition: Bool,
		transform: (Self) -> Transform
	) -> some View {
		if condition {
			transform(self)
		} else {
			self
		}
	}
}

This function will apply transform to our view when condition is true, otherwise it will leave the original view untouched.

Going back to our example, this is one way to use it:

struct MyView: View {
	var body: some view {
		myView
			.if(X) { $0.padding(8) }
			.if(Y) { $0.background(Color.blue) }
	}
}

This is perfect.

Obligatory Photos in Banff

August 31, 2020 • 11:36 PM

Just wrapping up the collection here.

Downtown Banff.

Banff Viewpoint. A quick drive zigzagging up Cascade Mountain only minutes from the town of Banff.

Getting Touristy on the Grouse

August 31, 2020 • 11:07 PM

We are no strangers to Grouse Mountain, but had never come up here as out-of-town tourists. Last Sunday, we booked our time for the gondola (for free, with our annual pass) and decided to just chill.

Obviously, the gondola was the most “closed space” for the whole trip, and masks are (thankfully) required. Despite the recent price drop of Grouse Gondola, the visitors could barely pack the now 30-people gondola.

Rainbow Lake Trail

August 31, 2020 • 7:19 PM

August 22 — We had high hopes for the hike to Rainbow Lake near Whistler. Comments on All Trails said that the hike was “the most scenic trail” in B.C., and boy did that build our hopes up.

The trail was not bad, to be fair — I can’t even complain about it. It’s very well maintained in the BC Parks system with washrooms dotted along. The trail was not muddy and mostly free of gravels. The trailhead has well-marked maps with notice on the condition of the trail (extending beyond Rainbow Lake into the back country), as well as warnings on bear activities.

This is as much view as we got from along the trail. It’s honestly not bad; we just had our hopes way up.

The “I’m An Adult, And I Don’t Pay My Taxes” Argument

As a small developer for iOS myself, I found Apple’s 30% cut high, but somewhat acceptable. With it, I’m not worrying about monetary transactions (sales, fraud detection, refund handling, money deposit); I don’t need to find a place to host my app for download; I don’t need to tell people where to find it, as long as they know the name or have a link.

Plus, with Apple doing a good job with the OS updates, supporting legacy systems are the least of my worries. With a nice and properly scoped idea, it’s easy to have an app up and running within literally hours.

So, I’m happy to pay that 30% tax, and just focus on my apps. This is from me, someone who makes a few hundred bucks a month from the App Store.

August 14, 2020 • 6:47 PM

If you’re using an iPhone running iOS 14 beta, you’re more than welcome to try out my next app, code named “Grammable.”

Grammable makes your photos OK for Instagram, without cropping out anything. It adds borders to your photos to make then conform to Instagram’s aspect ratio requirements (the tallest is 4:5 portrait, and the widest is 1.88:1 landscape). There’s adaptive colour to make the borders look in harmony with the picture.

Since it’s built with iOS 14’s new features such as Photo Picker and SwiftUI 2.0, Grammable will not be available to the store until later in September. But it’s good! This will give me time to finalize on the name, the icon, and the overall tone of the design. (Grammable sounds like an app that checks your spelling and grammar…)

So Long, Setapp

August 12, 2020 • 11:25 PM

What goes up must come down.

After 5 long months of using Setapp for my Mac app needs, they’ve decided to creep to iOS. To use an app in iOS, you’d have to register your iOS device as an “extra seat.” What used to work on iOS “for free” — such as Ulysses — will stop working unless you register your iOS device. So that’s $15 for my Mac, iPhone XS, and iPad Pro.

All my installed apps, before I did the cleanup and account cancellation.

This new pricing model also made me give a hard look at what I’ve been getting out of Setapp:

  • Ulysses is definitely the No. 1 app I use regularly. To replace Setapp, Ulysses is US $6 / month, or US $50 / year.
  • Timing Pro will rank No. 2 — it gives me a good sense of how much time I spend on each project. However, I have an old license that would work on a previous version indefinitely.
  • CleanShot X — something I’d miss but can totally live without.
  • IconJar — something I’m prepare to pay upfront. It’s €30 or about US $45, or $2 a month assuming it lasts me two years.
  • Paste, ToothFairy, Bartender 3, MindNode, Downie — I’ve paid for them before and they continue to work. (The old version of Paste is actually bug-free and is rid of the cloud sync bullshit, so that’s actually a step-up.)
  • The rest are either tool apps that can be replaced with a webpage (Regex builders, text-based calculator), things that are not up to my taste or standard (Espresso, the website developer tool, has no dark mode support; CodeRunner 2 looks great until you realize how stupid their indentation algorithm is).

This is also a good reflection of the lineup of Setapp’s offerings: there are a few very good niche apps you’d be willing to pay big bucks for; then there are the rest: small, “clever” tools that only shines with their fully skinned user interface.

I’m done 🙂️