RSSAmplifier

Blog

Pastey's Blog

Recent content on Pastey's Blog

pastey.github.ioRSS feed ↗7 posts

Latest posts

Over-Extended Types. On the overuse of Swift Extensions.

Sometimes I see one thing in code, and it bugs me. An excessive love for Swift extensions. We extend everything left, and right.

Don't trust your eyes when looking at weak pointers

We have some really old piece of code. It’s basically a proxy for an NSTimer retained by the timer instead of our precious View Controller that shows the PDF file. The code was written in the manual reference counting times, then semi-automatically translated to ARC and left for good. Turned out that all these years, since the translation to ARC, it had a bug that led to a leak that went…

Remove a Git tag. Mission impossible

Sure, you can do git tag -d <tagname> and then git push --delete origin <tagname> . But chances are high that the tag will resurrect soon. Keep reading if you want to know more.

Journey HOME

This is the story about PATH , /usr/local/bin and a little bit about Homebrew .

An unexpected human-machine interaction peculiarity in an iOS app

We&rsquo;ve got a bug. The pen tool didn&rsquo;t work on M2 iPad with the Wrist Protection setting enabled. Our Wrist Protection was added long ago when we were making Remarks – the note-taking app based on our PDF library. Pen was the main tool in that app. In our testing, we found that quite often the palm laying on the iPad screen would produce some touches. Our code didn&rsquo;t know if a…

UIBandSelectionInteraction vs. UICollectionViewCell background color

One of my colleagues (kudos, Nik) added the proper support of the pointer at iPad OS during our Ship It days (approximately once a month we can do any feature/improvement we want). After some time the team jumped in and we all were preparing it for release. When it came to QA, we&rsquo;ve got a strange ticket: file list view in Select mode would sometimes deselect all previously selected items. I…

A sad story about Swift Equatable

This is the story about the cunning Equatable in Swift. Let&rsquo;s start as advertised. Everything&rsquo;s cool, everything works: class Person : Equatable { let name : String init ( name : String ) { self . name = name } static func == ( lhs : Person , rhs : Person ) -> Bool { Swift . print ( '>> Person operator == called' ) return lhs . name == rhs . name } static func != ( lhs : Person , rhs :…