Cocoa Switch
About Archive Photos Replies Also on Micro.blog
  • Subscriptions are not fun

    Marco Arment in the latest ATP episode said something along the that the reality is that an indy iOS app can’t exist without people subscribing to it. The obvious reality is that software maintenance is not free, and if people expect free updates forever, companies will go out of business. We suddenly discovered this new way of life where we rent software and it never dies. Even version numbers are changing to something which looks like either a large counter or a date. But I tell you this, I’d rather buy applications 10 times, all over again when there’s a major update rather than subscribe to it. It is better for me because it gives me a choice – run the obsolete version or switch to the new version. I can even run both versions at the same time. It is so much better. Like it or not, Marco, being able to choose a version of software you want to run, means you own it. What the subscription model takes from us is this choice. We are forced to always be on the latest version. It especially doesn’t make sense when an app is not tied to any backend and works offline.

    Subscriptions might work right now for some financially, but in the long term, I think this model corrupts the development process like money corrupts politicians who are too long in power. This is not a problem for all apps and depends on the developer, but for some, it makes development dependent on a continuous flow of subscribers' money. Forces roadmap to serve features which transform application into a service, with non-necessary changes added and work to be shipped just for the sake of shipping. I mean come on, you don’t need to ship an update every 2 weeks. Maybe some apps need it, but most of them – don’t. What happened to the culture of shipping something great and then moving to a new thing? Why do we have to dwell on some projects to exist forever and capture more and more functionality? Subscriptions are to blame for what happened to Evernote which started to add more and more features, eventually, every app would want to be the only app you use and run all day. Becoming an ecosystem of its' own. That’s not the world I want to be part of. 1Password – we have been friends since the start, but this year I am transitioning the entire family to iCloud Keychain.

    Subscriptions are not good for consumers as well. If you agree that owning a property is better than renting, you know what I mean. Yes, I want to own hardware I buy, I don’t replace it every couple of years. I don’t use phone contracts, I use my phones for 5 to 7 years, Macs even longer. I treat software the same. Paid upfront with Free Trial is the best thing that happened to the software, and it is achievable on iOS with 1 time non-consumable In-App Purchase. Yes, we do need iOS paid upgrades badly. We shouldn’t give up. What’s changed? We became lazier and greedier. We want safety, we avoid risks. That’s not fun at all.

    β†’ 9:32 PM, May 19
  • Why Visual Studio Code is not for me

    Today I spent some time with Visual Studio Code. Just started the app for the first time and it picked the wrong colour scheme1, moreover, it doesn’t even offer the “Auto” mode for switching between Dak and Light appearances in macOS.

    The menu bar

    I admit the menu bar functionality is better than I expected. However, it fails the simple test of selecting a file and searching for “Finder”. Apps like BBEdit and even Music show the command “Revel in Finder”. In Visual Studio it’s in the context menu but not in the menu strip. They want you to use their command panel which only works with the keyboard. πŸ™„

    Settings

    Settings controls are also not accessible through the menu bar and look very much like Chrome settings. The more I use BBEdit settings, there more used I become, I can change most of my preferences without using the search. With Visual Studio settings, I won’t even try, I will only rely on search.

    Conclusion

    Visual Studio Code is popular right now and possibly is the most popular code editor to this day. I don’t have any problems with it. It’s just not for me. And I doubt it will survive 30 years mark. Does anyone remember Sublime Text?


    1. I prefer the Light Appearance during the day. ↩︎

    β†’ 8:27 PM, May 19
  • Beef (Netflix)

    I have issues with this show:

    • The Bitcoin crash theme is cut short, it looks like it was filmed just for the trailer and it has no impact on the story
    • There’s no motivation for the parking lot fight between 2 brothers
    • Characters acting weird, like throwing university letters, I don’t believe that Danny would do something like that

    Otherwise, it’s a good watch.

    β†’ 10:47 PM, May 5
  • Stop over-apologizing at work

    I have found this tweet, with some good phrases which can be used instead of “sorry”.

    • Thanks for flagging!
    • Good catch - I will make the updates/changes.
    • Many thanks for noticing the error, (name), we will (verb)
    • Thank you for bringing this to our attention. We will (verb)
    β†’ 9:10 AM, May 4
  • Productivity crisis

    I am journaling since primary school, running OmniFocus for 12 years, tracking every event in my life since the university, I am having dedicated time for email, I am using the most advance knowledge management apps and even working on my own, I bought Due and yet… Sometimes I don’t look into OmniFocus for weeks, and skip daily journaling and weekly review for months, I miss events and meetings, I keep forgetting, I am missing most important life-changing emails, I loose information and spend time looking for it, I am slacking on my chores.

    Just when starting working on this blog post I caught myself.

    • Thinking about changing my wallpaper
    • Checking random Telegram channel
    • Fiddling with the Music app
    • Playing with CSS

    I feel like for all the advantages tech gave us in the creative work field, there’s something it took, and we have zero gains, instead of a revolution similar to what other industries experienced – industrial revolution, advances in chemistry… We as knowledge workers continue to work with the same output our ancestors did, and even worse, Telegraph recently wrote an article about idleness at work became an epidemic that is wrecking Britain.

    How can we fix this

    I don’t want to sound pessimistic, because I think eventually there will be a revolution and progress, and we will triumph, we will lead by example, the rest of us will follow, and we will lead the way. I see people care about productivity, especially since I learned a lot from the the Focussed podcast. Here are some quick takes for you, something I found useful and something I would like you to share.

    • Say no a lot, focus on fewer projects/tasks
    • When you start working, do the hardest tasks first
    • Do not send Slack messages or emails if the issue can’t be resolved with a single reply, that’s what meetings are for
    • Every meeting needs agenda
    • Default meeting duration should be 30 minutes, not 1 hour
    • Dedicate separate time for messaging and social media
    • Learn about gratitude journaling and meditation, whatever works

    Adwise for developers

    And here are some advice for programmers, I don’t know how it is useful for you, but here is something I need to do myself

    • Reading code is hard, but it pays off, read every line and do not skim
    • Trust no one
    • Especially do not trust code, yours or someone elses
    • Only trust your intuition, if peace of code makes you feel tingly, do not ignore it
    • Make sure that solution you are building will make your team happy, communicate often and share your plans and work process early

    I find the last point especially difficult, because different members of a team have different things which they prioritise, and it’s impossible to make everyone happy. But it’s possible to find communication gaps and bring the differences in opinions during meetings. Healthy teams work towards the same goals.

    β†’ 10:12 PM, May 2
  • “NFT, huh? Hey, I got an NFT for ya. No fucking thanks.”

    Mythic Quest, Apple TV+.

    β†’ 7:47 PM, Apr 28
  • Divinity - Original Sin 2

    I keep coming back to this game, and it looks like I am going to finish it. It’s a long game, with no obvious story, rich in content and opportunities to explore and learn. It’s RPG but plays almost like a strategy game, units positioning and strategy are more important than your level and the items you have. I enjoy modern open-world aspects, you are free to choose your path and do quests in any order. Dialogues answers make a difference.

    I learned that making mistakes is unavoidable, Quick Save is part of gameplay. I play on medium “Classic” difficulty but at some points needed to use the “Explorer” option. There’s also no shame in referring to walkthrough and tips, I consider research as part of the gameplay.

    It runs well on my MacBookPro 16 M1 Max (32 GB, 24 GPU). It handles 60 FPS at native resolution, but I prefer to play at 1728 Γ— 1117 because this gives much more battery life and the laptop doesn’t run hot or noisy. I also can’t play at native resolution because it makes the cursor size twice the size it should be.

    β†’ 8:46 PM, Apr 27
  • Why some brits do not wash their fruits? πŸ“πŸš°
    Please don’t ignore package instructions. πŸ”Ž

    β†’ 3:11 PM, Apr 27
  • Found macOS alert with incorrect button roles. rdar://FB12144447

    Alert in Stocks app - Your subscription to Apple
News+ has expired. 2 options. Renew and No Thanks, with Renew appearing first. Annotaton: buttons need to be swapped

    β†’ 8:54 PM, Apr 25
  • Tagliatelle with asparagus and parma ham

    Rarely I can find a recipe which is healthy, easy to cook, tasty and filling at the same time. This is one of them. I am recently cooking more pasta, and this dish especially shines with freshly made one. Yum! You can add more than one clove of garlic. I have replaced “Parma ham” with “Prosciutto crudo”.

    a plate with pasta and a fork

    The recipe page (Telegraph)
    Download PDF

    β†’ 7:29 PM, Apr 22
  • Staff owned companies

    Worker-owned businesses are relatively new practice. For example, most podcasts and podcast networks are owned by their hosts, and that’s a great thing. As well as indy software publishing houses. I think it works great in this new digital job field where the company size is small.

    Interestingly, my beloved John Lewis and Waitrose are also a co-op. The company became successful in the traditional capitalist model and then transitioned into the co-op. The company is in trouble now, and the co-op nature is likely the negative factor.

    And yet very few worker-owned companies have succeeded in the long term. We saw that with the experiments in industrial democracy in this country in the 1970s, when the likes of the Meriden motorcycle co-operative were backed with government money and state-supported soft loans, but still eventually collapsed.

    We have seen it with the repeated turmoil at the Co-op retail empire (the Co-op is owned by its customers and local societies rather than the staff, but the principle is much the same).

    And we have seen it in the failure of countless similar initiatives in most major developed economies. The only really successful worker’s co-op in the world is the Spanish industrial conglomerate Mondragon, but even that has had its fair share of challenges to cope with.

    None of the world’s major companies are owned by the workers.

    These businesses are very resistant to change. The staff are inevitably very conservative about their own roles and working practices. They don’t want to have to learn new skills and they definitely don’t ever want to be made redundant.

    β†’ 7:29 AM, Apr 19
  • Is this a norm on all PC keyboards? The arrows are not aligned.

    β†’ 11:46 AM, Apr 18
  • Another example – Short Circuit page. The bottom of the app is hidden on all App Store screenshots.

    β†’ 9:40 PM, Apr 17
  • What makes Waitrose different

    Waitrose is my favourite places to shop. Just after we moved into the UK, their shop in Oxford stood different to other shops. This picture I took this from my local Waitrose in Wimbledon. It’s still my favourite place to buy groceries.

    Waitrose entrance showing green shelves and lack of people shopping

    I like to spend time there and enjoy good typography and design, friendly relaxed staff, great quality, free coffee and magazines. One of the things I love about the place is the lack of cheap toys which are strategically placed to grab kids' attention. Waitrose has more profitable margins than Lidl so they can afford to focus on long-term profitability, instead compensating with shady schemes like temporary sales which create a fake sense of urgency, rotating stocks of overpriced low-quality toys and irrelevant goods, specifically placed to waste your time. Did I mention Β£1 egg machines and candy dispensers? Waitrose still doesn’t have these, and that’s why I prefer shopping there, especially with kids. Their shop has a great design, toilets are placed at a comfortable distance, for example. It’s never overcrowded, there are never long queues, and the staff is friendly and helpful. They also have by far the best-tasting bakery, sushi and dinner kits. Almond croissants are legendary.

    There are some cracks in the facade showing. I am glad to see the coffee is back, but I couldn’t notice the appearance of kids' magazines with cheap toys attached to them. And it’s a big warning sign. Looking at this chart from the Telegraph, Waitrose is not doing well financially as well, and it makes me sad.

    Waitrose sales slip shows negative number while Aldi and Lidl is leading with 25%-30% advantage

    I also shop at other supermarkets. I don’t go to Waitrose because of the cheap prices, for that there’s Lidl. The current marketing push on the essentials is not a winning strategy for Waitrose. They need to embrace what made them different in the first place and try to stay different. I will be rooting for them.

    β†’ 12:56 AM, Apr 11
  • It’s a poor choice to include device bezels in App Store screenshots. Why would you shrink your interface? Looks especially awful on the Mac App Store. For me, it’s one of the indicators of what developers I trust.

    β†’ 12:26 PM, Apr 9
  • I have finally found that iCloud tabs are now live in the new tab interface. I think it’s a little bit less intuitive, but I’m just happy it still exists.

    β†’ 7:04 PM, Apr 8
  • Safari 16.4 improved typography

    Safari 16.4 update is big. WebKit team is killing it. Read the blog post summarising new features and fixes. I respect how performance and battery life are priority number one. I also like that Safari is leading industry in typography and layout. I used to work as a web developer and working with CSS and HTML is something I am enjoying doing, I am especially interested in new CSS tags.

    My favourite new feature is font-size-adjust, I already added this to this blog, so if you run the new version of Safari you can benefit from improved typography. Here’s the before and after. So far Safari is the first browser to support this tag.

    Text with a mix of 2 fonts, before and after, with the after having proportional sizes
    β†’ 11:19 AM, Apr 7
  • Working with file system on macOS. Part 2

    Since my last post I kept tinkering with file system APIs.

    Download full project

    You can access the sample project on GitHub.

    Learning materials and examples

    Most of my questions are about the use of NSDocument, how to read it and how to write text files. Supporting desktop-class features in your iPad app is an excellent help and contained almost everything I need. There’s another example project which uses NSDocument: Developing a Document-Based App. For those who need to work with UIKit in addition to AppKit, I will repeat, the OSDocument approach from Nick Lockwood. There’s entire open source iPad code editor which I have found helpful as well/

    I can read the content of any text files without using FileManager, by overriding NSDocument methods and storing text in the document.

    Because I am not yet using NSTextEditor, I have to keep track of the changes using SwiftUI operators:

    .onChange(of: text) { _ in
        save()
    }
    

    The save function can be implemented in many different ways. Here’s a working approach which seems to have no side effects. I also experimented with the autosave function but it didn’t work for me in the end, I would like to know why and what makes these 2 functions different. You also can use FileManager, but I think it defeats the purpose. The NSDocument also has a write function, luckily documentation says that it’s meant to be overridden and not called. Only the save function updates the file’s modification date properly, which allows OS to track changes.

    file.updateChangeCount(.done)
    file.save(self)
    

    External changes

    It is necessary to know about file content updates, likely, from a user using another text editor. NSDocument can detect when a file was modified externally and show the native dialogue.

    Alert This document's file has been changed by another application since you opened or saved it Save or Don't Save

    There’s also a different version of this dialogue with “Revert” and “Save As…” options. In my sample application only the “Save Anyway” button works. Reverting does nothing, and “Save As” causes a hang. I suspect it is somehow related to the autosave.

    DispatchSource issue

    My sample project uses DispatchSource to watch changes made in the root folder and changes made in the file itself. It works well for me when a name can change or when a file is deleted. However, monitoring content changes is not that reliable. Unlike the FileWatcher library, it stops working after some time, and the only fix is to select the root folder in the open dialogue and save a new secure bookmark.

    The save dialogue allows me to ignore content changes and let the user override changes which were made externally with the “Save” button.

    Permission issues

    I had this one issue which caused writing errors.

    Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file β€œmarkdown” in the folder β€œnew”." UserInfo={NSFilePath=/Users/boris/Pictures/new/markdown.md, NSUnderlyingError=0x60000031d950 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

    After trying various things, I have found the root cause in the Signing & Capabilities project settings. All I needed to change is to set the User Selected File to “Read/Write” instead of “Read”.

    Xcode target preferences File Access User Selected File Read/Write
    β†’ 7:49 PM, Apr 6
  • The Quarry

    Just finised playing The Quarry last night. It’s the best couch co-op you can play with another adult. We had lots of fun and achieved multiple endings. It’s hard to keep everyone alive but the game is friendly to non-gamers and teaches you everything you have to do as part of the story. I love how almost real facial expressions look like in this game, the difference is almost as big as Half-Life 2 and everything that came before. I am not up to date with the most recent games and only starting to appreciate these developments now. The game is made by Supermassive Games studio based in the UK.

    β†’ 12:05 PM, Mar 26
  • Chorizo and spinach paella

    Good inexpensive and filling dish, easy to cook and very tasty. You can add prawn or seafood if you fancy but it is great with just chorizo, and you need just a little bit. I have found it on Tesco’s website and cooked it twice already. The ingredients were easy to find in any shop in the UK, in my case it was Morrisons.

    Cooking chorizon Paella topped with spinach

    Download the PDF as a backup in case page goes down.

    β†’ 8:06 PM, Mar 25
  • Working with file system on macOS

    In my spare time, I continue to practice with AppKit and SwiftUI for macOS. My current goal is to subscribe to changes in a folder with text documents and other nested folders. Current version of LinkEdit uses small library called FileWatcher, which relies on File System Events. One issue with File System Events is they only work on the Mac and the API is hard to understand because it’s a low-level API. I would like to understand the code I ship, so it’s easy to add tweaks.

    I have found an alternative. I have a working project where I can monitor file deletions, creations, rename or moving at specified path using DispatchSource. That’s good to drop a dependency, even a small one, but there’s another benefit is that the new solution should work on iOS as well.

    Like with other problems I had to work on when writing for the Mac, there are much fewer code examples on the web. I have to thank open source “Code App” for a working example which nudged me towards trying DispatchSource and even showed some working code already used in production. There’s also an article which I found later.

    The project which I named FileBrowser has the following functionality:

    • Bookmark selected “root” folder
    • Display list of markdown and txt files in this folder
    • Allow selecting a document and displaying its content
    • Allow editing the content of a file, as well as renaming, deleting and moving
    • Any file system changes should be reflected in the app
    • The app is 100% SwiftUI and should run on Mac and iPad

    It’s going to be a foundation for the LinkEdit 1.2 update. The project is not in a finished state, I am combining different approaches to see what works for me. I still have many questions with no answers. Apple makes it easy to write “a document-based app”, but if you try to do it yourself with your own custom behaviour and file browser, it’s getting complicated.

    One of the problems I need to solve is to write code which works both on Mac and iPad. There’s an interesting technique which I am borrowing from Nick Lockwood, it’s based on #if canImport(UIKit) macros. I am using OSDocument (thanks Nick), and I can use them for initialising files and displaying their names, but I am yet to find out how it can be used for reading and saving file contents without errors.

    There’s even more grey area.

    • What are the benefits when using NSDocument subclass insteaf of custom class?
    • How FileWrapper fits into this?
    • Should I use NSDocumentController and “open” files before reading them? Does it allow other apps to know that content of a file can change?
    • What is the best way to write changes to a file, renaming, or moving it? I can do it already with FileManager, but is there a higher-level API I should be using? Maybe NSFilePresenter?
    • And what about NSFileCoordinator?

    I hope there will be part 2 with more answers and news. So far I am trying to find out what works.

    Part 2.

    β†’ 11:31 PM, Mar 14
  • PS5 first impressions

    There are PS5 ads everywhere in London and it’s available for sale. I can’t believe it’s been 2 years since the launch, it feels like yesterday. I have sold a bunch of old techs and accumulated around Β£250 worth of vouchers. Even sold my old 5G router for a whopping Β£100, didn’t know it has so much value. I couldn’t resist buying a used PS5. Don’t do that, Cex still charges more than Sony which is a crime for a used console, even in perfect condition.

    I am liking the console so far and feel like now all my gaming needs should be satisfied. I like the PSVR2 potential and watching new game releases closely anticipating Half-Life Alyx the most. Because I skipped PS4, I have tons of great exclusives to catch up on, and PS5 is the best console for playing PS4 games. I am currently playing through all Uncharted games, and it’s been non-stop action and relaxing puzzle breaks. The games all take less than 10 hours each, so I can complete 4 of them and it would take less time than the average modern open-world RPG.

    I find the Switch Pro controller superior to the PS5 option. It’s lighter and the layout is ergonomic. I especially felt the difference after playing on PS5 and then holding the Pro controller, it is much more comfortable. I don’t think that overengineered haptics bring much to the experience, it’s a nice addition but I could enjoy games the same with regular DualSense feedback. I don’t like the extra weight and bulk of the PS5 controller. We use the Pro controller a lot, to the point it started drifting recently.

    We continue to play on Switch more as a family and it has an excellent library of games for all ages, single console co-op and upcoming hits I am going to enjoy with my kids like Pikmin 4 and Kirby Return to Dreamland Deluxe. Even the excellent Astro Bot demo which is included with PS5 is harsh and punishing, it takes 1 hit or fall and you have to start from a checkpoint. I am finding often completing difficult parts for my kids because the game is just too punishing.

    I recommend the disk version because the price of disks in the UK is less than digital versions, even for very old games. Plus, you can exchange disks with friends and sell them back even. Unfortunately BlueRays are much more fragile than neat Switch cartridges. I am collecting Switch games but I have no desire to collect disks.

    Update

    Removed any mentions of PS5 region lock, because it isn’t.

    β†’ 2:03 PM, Mar 5
  • From a developer perspective, I am most interested in SwiftUI improvements, file system handling, TextEditor view and more AppKit features available in SwiftUI.

    β†’ 12:34 PM, Mar 4
  • I began the slow process of switching from 1Password to iCloud Keychain, for now, the most thing I miss is being able to change the URL and add multiple addresses. I am most interested in iCloud Keychain improvements this WWDC, and I am optimistic.

    β†’ 12:31 PM, Mar 4
  • iOS 16.4 Beta 2 Re-Adds Page Turning Animation to Apple Books – MacRumors. πŸ‘πŸ»πŸ‘πŸ»πŸ‘πŸ»

    β†’ 9:16 PM, Mar 1
Page 1 of 5 Older Posts →
  • RSS
  • JSON Feed
  • Surprise me!