Categories
Development Reviews

Mac Mini M1

disclaimer: I started writing this in Nov 2021 but I totally forgot about it until now, but it’s such a waste to throw it away so I’m still publishing it and adding my experiences with it so far.

I bought a Mac Mini M1 on 26 October 2021; with this new addition, I’ve been fully assimilated into the Apple Ecosystem.

  • iPhone 11
  • Apple Watch SE
  • iPad Pro 2018
  • Air Pods Pro
  • Macbook Pro 2020 (work)

I’ve achieved the level of integration where one phone call causes all my devices to ring and sing for my attention. If anyone knew me before, they would’ve known that I’m really not that much of an Apple fan. Each Apple devices that I own are the first Apple I’ve bought in their category. At this point you might be asking why did I go for an Apple desktop, and at this point, “why not?

Okay I do have legit reasons for buying it other than this whimsical “why not” argument.

  • I want to edit videos, and I really like Final Cut Pro
  • I want to do more development and I’m more comfortable coding on MacOS
    • or any *nix environment but.. I’m sure you can agree that macos is way more polished than any linux distribution
  • I don’t really game much on my windows desktop these days
  • my table is small, a small computer makes sense
  • the M1 chip is really efficient and I like to save electricity if possible

Predicting the questions a reader might have

Why didn’t I wait for the M2 chip?
I waited almost a year hoping the the Mac Mini will get refreshed but it didn’t. Rumours is that it’ll come out mid of 2022 and, there’s no point waiting so long for performance between M1 and M1 Pro.
(edit: it’s Feb 2023 and Apple finally announced M2 option for the Mac Mini, I’m extremely glad I didn’t bother waiting for it.)

Why didn’t I get the new M1 Pro/Max Macbooks?
Have you seen the price on those puppies?! Sorry, starting from $2,999 is too much for a home computer that I don’t plan to do any intense work on it.
(edit: if I have to make the choice again now, I will strongly consider the M2 Macbook Air.)

3 weeks experience

The first thing that stood out to me is how quiet the Mac Mini is, it’s honestly quite hard to tell if it’s on without going 20cm next to it and hear the quiet whoosh of the fans spinning.

The second thing was the performance, it has been extremely snappy in doing day to day operations. What got me extremely excited was when I timed the start up times of my [[ZSH]] shell after installing all my usual plugins and settings. An average start up time of 0.004 seconds.

Try running this function on your shell to have a nice comparison of how crazy 0.004 seconds is.

timezsh() {
  shell=${1-$SHELL}
  for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done
}

I have not run into any software compatibility issues with any of my tools, which I’m super pleased with. This is inline with what all the reviewers have been saying, Rosetta 2 is pretty damn amazing. Then again, it has been a year so most of the kinks have already been worked out, and all the tools I use have already been updated; so gains the triple S rating of super smooth sailing.

Photo Editing

I decided to try out Luminar AI instead of Lightroom this time round, purely because I’m not really a fan of Adobe’s subscription pricing, and all the demos of the tasty AI assisted effects has tempted me. Since it’s my first time using Luminar AI, I have no idea how much of the performance is the software, and how much is the hardware, but it is reasonably speedy.

Compared to my current desktop running Lightroom on an Intel i7 8700 w/ GTX 1050TI, I would say that the Mac Mini is a hair faster for photo edits.

Edit: 2023, I have actually switched back to using Adobe Lightroom because I’m just more familiar with it and the controls made more sense to me. It’s not exactly “quick”, but it’s definitely more than capable for editing pictures.

Video Editing

2023: Well, I had every thought and intention to use it for video editing but with Covid cutting off travel, and procrastination in shooting videos meant that I haven’t exactly completed a video edit since I bought it. x⸑x

After using it for over a year

Since I don’t really game much, I didn’t feel I’ve missed out much ever since switching over to the Mac Mini M1. Performance is more than enough for daily tasks, and I haven’t felt the urge to upgrade it yet.

Storage is an issue though as I’m running out with the paltry 500GB. Initial plans were to attach a dock with external storage, but yet another thing that I haven’t got around to doing.

Streaming

I did use it to do some light streaming/recording tasks and it handled it beautifully. No observable lags, but to be fair, it’s just recording of my desktop plus 1 camera, plus some code compilation at the same time, so it’s not a particularly intensive workload.

Development

Only used it for personal projects so it’s not really anything intensive. But running docker and some node applications at the same time with hot reload was smooth and changes were nearly instant. I don’t recall a situation where I thought “why are the changes not complied yet”.

Summary

The Mac Mini is such a compelling option for anyone who doesn’t game. The performance to price ratio is unbeatable. And the M2 option improves on this point again while bringing the price down.

If you’re just looking for a no-frills desktop computer, I can 100% recommend this.

Categories
Development Learning Optimization Productivity Thoughts

Productive 2 weeks in reservist

One of the duties as a Male in Singapore is to serve the national service, and we are called back between 1-3 weeks every year for our “reservist” until we reach MR or “operational ready”.

The past 2 weeks was my turn, and I decided to bring in a cheap $200 android tablet and a keyboard to see how far I could push it. In other words, I want to see what else I could do with it other than just consuming media.

Local VS Code in a browser
ARM64 CPU running Linux packages on an Android tablet

It started with curiosity of finding out how close to Linux I can get Android to be. Termux is an awesome terminal emulator that provides an almost desktop-like experience. I will have a separate write up on how I customized it.

Categories
Development Thoughts

Gitlab MR Bot

I’ve recently write a simple merge request “bot” for my team. To be honest it’s more of a glorified reminder but hey, it works! I’ve done a slightly more technical write up at dev.to.

Summary: It’s a bot that will collate all the open Merge Requests we have on our private and public Gitlab repositories, that have the Review Me label, but don’t have at least 2 reviewer labels yet, and send it to our Slack channel.

It’s been running since 3rd August, and in this post, I just want to note down my observations for the past 20 days.

The Positives

More people are actively taking on the role of reviewing the MRs. Before the bot our scrum master has to manually collect them and bring awareness to the team that there are MRs that needs people to take ownership of. But for the past 3 weeks, it seemed to have improved. Most of the times when someone ask for reviews on their MR, we usually have 2 people who take them up before the next reminder*.

*the reminders are set to run at 11am and 3pm (4 hours apart)

The team seemed to be quite receptive of the bot reminding them about the open MRs, the little easter eggs of encouragement seems to help with the team morale from time to time as well.

The Negatives

Hard to quantify, but the time taken for an MR to get approved seems to have shortened, which may indicate that people are more eager to approve and may not review as thoroughly. Case in point, I approved one MR that contains relatively inefficient code, that was pointed out my my colleague when she was working on that section.

People are taking on the role of reviewing but sometimes it slips under their radar and forget to approve even when all the issues have been resolved. I guess this is something that the bot can improve on but don’t really have a clear idea of what can be done about it yet.

Overall

I’m glad that I wrote it. It didn’t really take a long time, just some inspiration and inconvenience that prompted it. I am carefully considering adding metrics for how long an MR stays open for and all that. But I feel like this might create unwanted attention into our work so it’s something that I haven’t explore deeply into yet. But I think it would be pretty interesting!

Categories
Development Learning Weekly

Weekly: MySQL benchmarking

Been busy with work and life that did not have the time to explore new things. Or maybe I did just that I forgot. Either way, the plan for the weekends is to explore Caddy as an automated way for me to deploy my portfolio/landing page, either that or cheating and using Netlify instead. The current flow I’m using relies on Ansible to deploy the page, which is a little bit manual in a sense. Hoping to change that.

We started doing benchmarking on our DB because one of our search queries has been slowing down significantly lately, and it’s affecting our user experience. In order to optimize the performance, we need a way of measuring the changes that we were going to implement.

Categories
Development DevOps Weekly

Weekly: building CICD pipelines

The past week has been spent trying to build a centralized Gitlab CICD repository for all services to bootstrap and standardize on.

I’m happy to announce that it has been open sourced! https://gitlab.com/mycf.sg/central-cicd

What’s a centralized CI? It’s basically a template repository for CI pipelines. In this case, it’s for Gitlab because I’m familiar with it and it’s what I’m working with day in day out.

This idea started with my previous project team, but is slowly maturing as I figure out the various cases that it might be used/useful and tweak it accordingly. What it has currently is more of a MVP and POC that it can be used across various projects on Gitlab. You know that because the versioning currently only support patch and not minor/major bumps. It has something to do with how my current team does versioning but it’s the top of my list for things to improve.

Currently there are 4 repositories relying on the CCI, 2 of which are external but still within my control. Features will be incrementally added onto it, and I hope that this could really be something that would help people reduce the amount of time/complexity to build pipelines.

Categories
Development Learning Weekly

Weekly: SG calculator

This is a side project that I’ve been working with my friend since last year but haven’t gotten many hours into it because … procrastination. But hey we finally have a MVP deployed onto Netlify and for the rare few people who somehow stumbled upon my blog, this is something you can check out.

TLDR; this is a quick calculator online designed to answer complicated questions regarding CPF and HDB (tbd).

https://sg-calculator.netlify.app

Even though I call it MVP it’s really still an early alpha and we’re still trying to figure things out and add more features to it. So there’s a high chance that things will just break from time to time.

Inception

We decided to work on this because planning for finance and housing in Singapore is quite a pain. While there are many calculators online that can give you numbers that you’re looking for, nothing is as simple or specific as, “How much do I have to save to retire with XYZ sum at the age of N?”.

Categories
Development Learning

New personal pet project: Telegram Bot

So technically I have been working on my own personal projects now and then but haven’t really written about it for a variety of reasons. But mainly because there are stuffs that I prefer to do a grand unveiling of, or that I don’t really feel like it’s interesting/special enough for me to share.

Finally I have some inspiration to do something new and interesting (personally), with the inspiration coming mainly from work and the workshops that I’ve been to lately.

What I plan to do, is basically a extremely personalized assistant that would basically alert me whenever my services does something automatically.

The first of which is my automated torrent/flexget setup that has been working beautifully for over 2 years now. I also want a really easy way of sending new torrents for my server to download through the bot.

Secondly, I want scheduled information that would be useful for my daily routine. For example, since I go to work around the same time everyday, I would like it if the bot automatically tells me about the next bus timings without me having to check it. This could be extended with a custom app that can trigger actions base on my location. The whole point of this is just to reduce the amount of apps I need to open to get the information I want.

Lastly, I want to have important weather information alerting me when it happens. E.g. if there’s >XX% chance of rain, or if the haze goes beyond a certain PSI level.

For the weather one, technically the app I use already does it, and I know a lot of people have already done it. But this also means that there’s plenty of information to teach me how to do it, and it wouldn’t be that hard to implement it, right?

Oh and of course it will at least be slightly interactive, so being able to send some commands to get the information I want on demand. So there’s a pretty simple list of requirements and I would try to update the progress here as I build along.

So to be honest, it wouldn’t be that hard if I just go about doing this normally, but that wouldn’t be that much fun. Which is why I am determined to make most of this server-less, especially the API controlling the telegram bot. I’ve already sketched out some designs for the architecture which I’ll talk about it the next post!

Categories
Development Learning

Things I’ve been exploring

Haven’t updated this blog for half a year because… I was actually writing it in a private blog. It’s mostly incoherent ramblings on the new frameworks/languages that I’ve been learning, trying to sort out my thoughts the whole time.

But there are a few key takeaways from the past couple of months since I’ve started working at Govtech.

The project that I’m working on utilizes the micro-service architecture. Which everyone know it’s a buzzword these days. However, to actually implement it in the way that works out as well as the bigger players like Netflix, Twitter, etc; is a heck a lot more difficult than I naively imagined it to be. (will probably have a separate post about micro-services cause it’s too much to write about in a single post)

Here’s the list of technologies that we are using, and pretty much all of them require me to pick up from scratch.

StackPurpose
Spring bootBackend framework
React Redux SagaFrontend framework
ELKLogging/monitoring
GitlabCI/CD
AWSInfrastructure
TerraformInfrastructure as Code
AnsibleIT automation
Kubernetes/DockerContainer orchestration
AirflowScheduler (haven’t dive in yet)

Because of what I’ve been working on, I have decided to revamp my January home server setup again. It’s still in progress because I can’t get my Kubernetes cluster to initiate correctly and it has been driving me bananas.

In this period of time I have also revamped my portfolio page to be more modern and doesn’t have slight misalignment that the previous layout had. The reason it turned out well is probably because I got tired of trying to do everything from scratch by myself and just used a well-known framework, Bootstrap. (Fun fact: It was built with pure CSS grid layout and ES6 generator functions)

In any case, I think I will make an effort to write here more often instead of dumping everything on a private blog. After all, sharing is caring right?

Categories
Development Optimization

Landing Page

Even though there are exams and what not, a geek can still eek out a little bit of time here and there for passion projects. It used to be blogger hosting all of my blog posts but ever since switching over to WordPress, I now have a “free” domain waiting to be used.

www.lordofgeeks.com

I finally created a portfolio site for myself, even though I’m not quite sure what to put on it yet. In fact, most of it is still work in progress but I thought it would make more sense to have this rather than a page that isn’t working at all.

Since there are only 3 pages, I wrote it entirely in HTML, hoping to convert it to some form of static NodeJS page in the future. However, I’ve employed all the new techniques I’ve recently, as well as some concepts that I’ve learnt in school.