Caffeine++ 2

Monday, November 22, 2021

Caffeine++ 2 Icon

I am a regular coffee drinker, and I thought that it would be good to track how much coffee I drink, similarly to how we track steps and sleep hours. The Apple Health app allows you to do it but it only works from the phone, and you need to know how much caffeine your drink has. Some apps do this, and I tried all of them. I couldn’t find anything that I would like to use daily, so I made my own. Caffeine++ allows you to have a set of drinks you have regularly and then you can track them both from the phone and watch.

Now in addition to the existing app, I am releasing Caffeine++ 2 as a separate app. You still can download the previous version on the App Store. The old version is now “Caffeine++ Classic”, and it will be available for free. Now for just £4.49 you can own the best coffee tracker.

Here’s a full list of new features.

  • Improved setup
  • Weekly Chart on iPhone and Apple Watch
  • Tap to confirm on Apple Watch to reduce accidental input
  • New app icons
  • Dark Mode
  • Look at your daily progress on Apple Watch
  • New Apple Watch complications with a counter
  • Pull to Refresh and “Refresh Apple Watch” button on iPhone
  • Instant Coffee added to the default database
  • Updated user interface to feel at home on iOS 15
  • Additional improvements for water tracking with the use of blue colours on the chart, and in the Apple Watch interface

The weekly chart gives you an overview for a current week. The chart doesn’t move around as other calendar apps do. That’s the way I like UI to be, it’s always Monday to Sunday view, every day. The chart can be viewed from the Apple Watch complication.

In addition, I have this hidden feature called “drink log” which saves all your drinks into a local plist file. In the future this allows me to display the log in the app and export the data. The log will be collected as soon as you start using the app.

Apple Watch app was rewritten from scratch with SwiftUI. It wasn’t an easy task. I even support watchOS 6 which means you can use Caffeine++ with the Series 1 Apple Watch.

If you have favourites drinks data in Caffeine++, you won’t be able to transfer it, I advise you to manually enter your drinks into the new version. Keep Caffeine++ as a reference. Caffeine++ has much-advanced data storage logic, and writing a migration assistant would require too much of my time. Given that the app is not very popular, I decided that it’s easier to have a clean break. Because 2.0 has a much better model, it’s possible for me to add export/import functionality which will allow you to backup your data.

I know there are many features like Siri intentions and widgets which could be added. If Caffeine++ 2.0 is popular enough it will justify my time and add these requested features.

Download Caffeine++ 2.0 on the App Store or visit its web page.

Altershot 2.0

Wednesday, October 27, 2021

Apple designers have a consistently looking status bar for all the screenshots they publish. It always shows the same time and full battery. I think third-party developers which care about small details would benefit from a simple tool that would allow them to redact the status bar on the screenshots they capture. This is why I have released Altershot in 2014. I never suspected it would require so much maintenance.

For the 2.0 I have eliminated technical debt and streamlined image recognition logic. Altershot contains resolutions of 43 Apple devices. That’s all devices that can run the latest OS versions. I had to test each screen resolution manually. I even made a separate app for capturing screenshots and then later editing them in the Altershot. I have completely changed the permissions flow for the Photos access to avoid modal alerts. Many issues like incorrect thumbnail resolutions are fixed. I have removed a limit for how many photos can be selected because the Photos framework now can handle this better than in the past. I have recorded the new App Preview and rewrote all the copies from the app. The entire app is written in UIKit with Storyboards and there’s no SwiftUI, this allowed me to save time and focus on the issues above.

Altershot used to be a free app with In-App Purchase, which is now paid upfront. It’s a one-time purchase and you can expect good support. Version 2 is free to upgrade. Many of you find it useful and I received a lot of emails. This is motivated me to invest all my free time into the big 2.0 release. If you ever used Altershot or contacted me about it, thank you. Thank you for your support, you made this possible.

Buy Altershot from the App Store and support my future work. You can read release notes here.

Managing Family Sharing Subscriptions Improvements

Thursday, October 7, 2021

Most people don’t know this but the “Parent” (read:credit card holder) of a family sharing account can’t see, let alone cancel, any subscriptions a minor on the account has purchased.

This was true, however recently I got an email about IAP I made from my sons iPad. Clicking through the “Report a problem” link in the email and logging in with my family organiser Apple ID shows this new message.

Family Organisers can now review purchases charged to their shared payment method, and they can submit refund requests on behalf of family members. Family Organisers will be able to view purchases and manage requests as long as a member is part of their family group.

This is one of those changes which makes you realise it should’ve worked like this from the start.

Remembering Steve

Tuesday, October 5, 2021

I remember vividly January 15, 2008, attending a meet-up in the centre of Moscow city. I had a beer, and I was on my own but not alone, surrounded by people who had the same interest in technology and computers. There was a big-screen streaming MacBook Air event. I had a lot of joy in those 2 hours, a lot of excitement, and positive feelings towards technology. Seen Steve on the stage, alive and well. Holding MacBook Air so effortlessly and confident, just in one hand. One could only see the hardware. But it was so much more. It was a statement to the rest of the world. Your computer can be light and thin, you can take it with you more often. And I was hyped because I knew that something cool just happened, and the world has changed at that moment and was never the same since.

There’s this perception that we look at Apple as a saviour and the leader, expectations we have to the people who work for Apple to make the world a better place. I think it’s a short-sighted perception and a misguided one. I will be always grateful to Steve and the people who had the privilege to work with him, not for the products they shipped. But for the things which their products are enabling me and the rest of us to accomplish.

Thoughts on Writing Clean Code

Wednesday, September 8, 2021

I hope many developers read this because this is me speaking to you. Been a developer myself in different positions with different responsibilities, I need to challenge the status quo. The work we produce takes a lot of our time and effort. Any work which is done usually needs to have a value otherwise, why do any work at all. We as software developers or software engineers like to think that the code we write is what we do, we want it to be clean, understandable, smart, avoiding hacks or code repetition, shining away from boilerplate. You know what I mean, we want our code to be good because we value a good architecture, we care about whatever framework we want to apply to our code so it is structured in a certain way. All these qualities we can summarise as “I want my code to be as good as possible”. If this becomes your main value, you start to judge other peoples code like not clean enough, or this is using string comparison, why you won’t move this into a view model, why are you using Boolean when you could use an enum. You start to pick others to work apart. And you think that you are doing something meaningful. But what you doing is that you are trying to make the code look good. You are investing your time, other’s developers time to make your code look good.

You can do better by writing as little code as possible. If you think that you can make code better by writing more code, you are already made a tradeoff and increased your code size, potentially scope for bugs to slip through, you have increased the amount of code you have to maintain and test. Simply put, less code is better than more code. Writing more code is not a good option. Less code you have is better.

Here are good values for all developers.

  • As little code as possible to makes something happen
  • As simple as possible
  • How many classes and protocols do you need to introduce
  • Write your code with limited functionality instead of using “this does it all for you” third-party library

Think about what you doing, you are making a product for others people to use. Most of the code changes you make won’t be noticed by your client. Value your time, make sure your client is happy. Value others developers time because they have clients to make happy too. The code is not a purpose it is just a means to an end, it is a tool to make something happen, to make your product live and usable for other humans. Delivering something as quick as possible with as little code as possible, avoiding complexities, abstractions, third-party dependencies is what you should strike for. This should be your real value.

Disrespectful Design Patterns and Fall of Reddit

Wednesday, July 21, 2021

I have long stopped using Reddit’s current design, and have been using instead. A new direction is not just about looks but about increasing the number of clicks and subscribers through applying dark and grey design patterns. The website trying to silo you into their app and make an impression that an account is required to see some of the content. On top of that, a new design has less information density and is much slower to load.

I put a lot of effort into my work. After all, I want my products to offer something new and be better than alternatives because I use them myself. And I am not a minority, for every Reddit and Facebook out there there’s Patreon and Pinboard. Technology might appear like it’s all about numbers and revenue, but it only truly makes a difference when we put our users needs first. Using and loving your product is a great practice and the best thing you can do to your roadmap. Unlike A/B testing and analytics, it’s free. So let the dinosaurs grow, and die, without realising that they are on the wrong side of history.

Tabs Management

Sunday, July 11, 2021

There’s a macOS update coming with a huge Safari redesign. Some people would call it controversial. I won’t cover the Safari redesign, as I am mostly sure, Apple is going to reverse this decision either before public release or, more likely, in a subsequent major macOS update. The design of UX can change, how you use your applications can stick with you for your entire life.

One of a way I like to use any desktop operating system is having multiple windows open for a single application. Let’s take the most commonly used application, such as a web browser. Whenever I have a problem or a topic to research, I hit Command + N and start web search in the first tab, and open results in new tabs, keeping each window dedicated to a separate task. It requires management but this gives me 2 killer benefits.

  1. I never suffer from having too many tabs open
  2. I can easily close a bunch of tabs when a topic is researched, or a problem is solved

It has its problems though.

  1. Often I would open a new tab in a window that belongs to another project/task
  2. I can’t give the window a name, I have to check back the first tab with my search results if there’s any

I am curious about the tabs grouping feature in the next Safari update because it allows solving the same problem differently. And I am wondering if this way is better than managing multiple windows. I hope it can be a better solution that will stick with some of us for years and will outlive the controversial Safari redesign.


Tuesday, June 15, 2021

It’s a good feeling to have a vision, it gives your life a purpose.

I feel most happy when I realise that I am moving towards my goal. I have a habit of making long term goals and living every day with an intention. All software around us is made by someone, and it can be improved. There’s so much work, so much software we have seen which is littered with preferences, taking unnecessary system resources and disregards our right to privacy. There is software which is used inferior web technologies and compromises platform standards and expected functionality. There are apps with way too much maintenance cost like multi-platform support, CI, services, A/B testing, analytics third-party sales and tracking services, so developers ask us to subscribe and pay on monthly basis for all this crap we don’t need. It’s not nearly good enough for me, and shouldn’t be good enough for you — I am working my butt off to have a better alternative. The apps I am making have no maintenance cost, only support platforms that I use myself, and focus only on essential functionality, so the software can launch fast, take less disk space and do not bear any third-party dependencies and tracking. For example, this blog you are reading and my business web page both cost zero in hosting, have no tracking, no JavaScript, and no third-party code of any kind — which makes them faster to load for you.

I have found this Arnold Schwarzenegger’s speech to be inspirational. He says that great success requires vision, not listening to people who say that what you do is impossible, and hard work. Arnold says that a magazine with a mister universe bodybuilder Reg Park on a cover made him realise where he wants to be. I also know where I want to be, my champions are David Smith and James Thomson. I have started a software business and named it Cocoa Productions, I want a place amongst the best creators, I want my work to improve the world, to inspire others. With your support, I believe we can achieve great results and make our dent in the universe.

Swift Result

Sunday, June 13, 2021

Swift Result is great but sometimes optional error does the job.

While working on Caffeine++ 2.0, I have replaced most of my completion handlers with Result. I’m a fan of this language feature so I started to apply it everywhere. I have noticed that Result introducing an extra weight, and I like my code to be light. In many situations, like, getting HealthKit authorisation status, your result doesn’t have a value to return, which is why you can use Void, this means you need to pass ugly () for success:

// Function declaration
func authorizeHealthKit(completion: @escaping (Result<Void, Error>) -> Void) {
    // Request authorisation and call completion block

// Usage example
healthManager.authorizeHealthKit { result in
    switch result {
    case .success:
        // Handle success
    case .failure(let error):
        // Handle error
// Function declaration
func authorizeHealthKit(completion: @escaping (Error?) -> Void) {
    // Request authorisation and call completion block

// Usage example
healthManager.authorizeHealthKit { optionalError in
    if let error = optionalError {
        // Handle error
    } else {
        // Handle success

In this case, I prefer Error?, but you decide what works for you.

Deciding to Stop Tweeting

Monday, June 7, 2021

I decided that I’m better of not tweeting. I read most of the tweets from people I follow, but I don’t think that my tweeting provides any value. I would rather focus my efforts on this blog. Finishing a blog post always feels good. feels like I am doing something meaningful.

There’s Tweetbot 6 update and if you still use the official Twitter app, I recommend installing and try it. The app is now free but requires a subscription if you want to tweet. Works for me. 🙂

Update 2021.07.18

I am finding myself scrolling through Tweetbot a couple of times a week and getting a lot of good information, news and interesting opinions. I am replying to some of the tweets and I really enjoy using Twitter this way. I haven’t felt regret not be able to tweet, and I feel more relaxed because I don’t have these obligations anymore to broadcast to the entire world whatever is happening in my life or whatever I think in a moment.

Thoughts About #MythicQuest

Monday, June 7, 2021

The latest “Backstory!” episode was great and memorable, touching and dramatic. It’s a strange genre of comedy that mixes serious drama with whacky characters. I think the mix of drama and comedy gives the show potential. But it’s a hard line to walk on, I think the show might lack in its hilariousness and it’s trying to be a comedy too hard. What’s makes Mythic Quest valuable is that under the cover of comedy there’s deep drama. It’s like writers wanted to do a drama show but they were paid to make a comedy. And this mix of drama and comedy, I think it works.

The show has a confidence issue. Most of the characters are overreacting and acting hysterical, it’s like the show is afraid that you will stop watching and tries to keep your attention by making everyone shout something every minute. You can forgive this, you can get used to this eccentric overactive acting and maybe even enjoy it if you remind yourself do not take it seriously. Mythic Quest doesn’t need to fight for your attention, I think the show works, and I hope more people will enjoy it. We don’t have enough TV with a software development theme, and the show is extremely relevant and it makes fun of the current environment we have in work culture while been educative and emphatic at the same time. What works best is character development in their journey to overcome internal struggles and be a better person while working on a very successful video game with millions of users. It’s not as good as Office but it’s much much better than HBO’s Silicon Valley — Mythic Quest has an opportunity to become fantastic. Right now I feel like it still developing and writers trying different things to see what works and what doesn’t’ work. Some episodes like the 2 latest episodes and the special lockdown episode are worth watching the show. Let’s see how they manage to wrap up the second season, so far I am optimistic.

Rediscovering the Joy of Home-Cooking

Wednesday, June 2, 2021

It’s been a second week I am cooking dinners and lunches with preferably raw ingredients using as little processed food as possible. I am discovering a new hobby and it’s been a grand success so far. I was thinking how prepared food and meals which is easy to prepare can affect my life and how switching to more labour-intensive cooking can improve health, mood and even ability to stay productive. Not only I find the quality of home-prepared meals superior, but I also find it easier to stay motivated and happy when I have to put significant effort into food preparation.

Eating is something we all need on regular basis and it’s a big motivator for our brains. Historically speaking it is only recently large portions of humanity have overcome hunger and have access to all kind of food throughout the year without any kind of limit. This is especially true in developed countries where the food industry is very efficient in selling a large quantity and variety of easy to consume pre-packaged products. People use delivery services as well. All this made life easier, but does it have any cost to our ability to have a productive and happy life? I think it bears a great tall.

There’s BBC journalist spent 1-month eating ultra-processed food, you can read about his experience. Ultra-processed food makes you eat more, and more you eat — less happy you become. It’s like been a drug addict. Cooking food is different, and I think the benefits I get from cooking is proportional to the effort I put into preparation, this includes gathering ingredients myself and cleaning. Giving myself more responsibilities and chores makes me appreciate the final product more, it makes me grateful and helps me to appreciate life more.

← Newer Page 1 of 11