Posts

Tracking the delivery

[Sep 2018] Is it there yet?! That’s not a trivial question to answer when testing whether a given closure is one we created. The ideal way, of course, is to use objects instead of closures. In practice, the craze of closures makes them unavoidable. In which case, we have to work with an opaque type (implying no properties to introspect) with value-type copy semantics (ruling out referential equality too). Thus the outside-looking-in strategy, direct testability, is closed off. However, it’s not totally hopeless. If we reverse our strategy, we can see that a messaging-out solution is still doable. To experiment with this idea in code, I posted a gist of a testcase. I hope this sparks your interest in expanding what is testable and reach higher coverage targets.

Ecosystems

[Aug 2018] I have always been fascinated with biological ecosystems. They are a place where large number of organisms, of diverse species and behaviours, interact to weave a story of tremendous complexity. Nay, the most complex story possible, life. Or wild life, if wild means it is beyond our limited capabilities of understanding multidimensional order and realtime dynamic processes. It is, to borrow David Attenborough’s famous words, the greatest show on earth. Better still, we are an inseparable part of that show. Inspired by our larger family, I sketched a mini framework on GitHub . It awaits your connection… Link: https://github.com/HarishKataria/Ecosystem

Art Deco

[Jul 2018] Swift Decodable is a neat feature that makes working with JSON data beautifully simple and ordered, much like geometric art. Unlike the runtime mapping used by other languages, Swift’s implementation is a modern compile-time construct, one that is transparent to developers but fully type-safe. For thoughtfully-structured JSON layouts, the out-of-box solution is just awesome. In practice, however, ill constructed API are sadly not uncommon. To help navigate those troubled waters, I have shared on Github a few of my solutions. Dive in… Link: https://github.com/HarishKataria/Deco

Swirling References

[Jun 2018] Swirling looks great in soccer but in code it should be red-carded. For instance, in Swift, passing references in the capture-list and then having to sieve it through a guard check is an eyesore code that we should send off the field. I built a short framework that will help reduce such boilerplate code. Enjoy… Link: https://github.com/HarishKataria/ReferenceValet

Swift Zen

[May 2018] Sharing my experiments in simplifying Swift code with emptiness . Hope you enjoy it… Link: https://github.com/HarishKataria/Emptiness

MR Wabi Sabi

[Apr 2018] We developers easily get caught-up in the suffering of MRs battles. The wormhole of ‘what’s better’ drains the involved developers’ time and positivity. The cure is compassion for the author, and making peace with different styles and levels of accuracy. The mantras to follow are - no code is perfect, and great relationships always outperform any transient gains.

Sharing Patterns

[Mar 2018] While working on a project earlier this month, I found an opportunity to experiment with a few ideas on building complex behaviour with minimal code. It started with an almost trivial goal, and within a few iterations it became a library worth using in professional apps. I have shared it on Github ( HarishKataria/Patterns ) with the hope others can evolve it further. Enjoy… Link: https://github.com/HarishKataria/Patterns