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.
Recent content on Pastey's Blog
Sometimes I see one thing in code, and it bugs me. An excessive love for Swift extensions. We extend everything left, and right.
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…
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.
This is the story about PATH , /usr/local/bin and a little bit about Homebrew .
We’ve got a bug. The pen tool didn’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’t know if a…
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’ve got a strange ticket: file list view in Select mode would sometimes deselect all previously selected items. I…
This is the story about the cunning Equatable in Swift. Let’s start as advertised. Everything’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 :…