Reflections

Ann Catherine Jose

Tinkering with VS Code, MacOS and C++

After a long time, I got the time to tinker with something fun and learn from it, thanks to the week-long break from work. The task at hand is to set up Visual Studio for Mac to compile/run/debug C++ programs. Why, you may wonder - for the past few months, I have been craving to learn something different and I was hooked when I saw the book Data Structures and Algorithms in C++ by Adam Drozdek. I decided to read this book and learn from it.

What do I really want

The other day I watched a TED video where the presenter urged the audience to ask the question What do you really want? That got me thinking what do I really want. It is an interesting question to ask myself, since I have tried different roles and responsibilites - broad and deep - in the last couple of years.

So I was pleasantly surprised when I found the book Data Structures and Algorithms in C++ by Adam Drozdek on my bookshelf. The book is full of code and exercises in C++, a language which I haven’t used in a while.

How to mock network requests in iOS

One of the challenges of mobile application development is to ensure that the application is resilient to various error responses from the services that are consumed by the application. Mobile devices are more susceptible to network connectivity issues, timeout etc. So we need to take extra care to make sure that we test all error scenarios and handle them in a meaningful manner.

What and Why of Mocking

Even though we are convinced about the benefits of testing server errors, these services are running in Production serving real customer requests. So it is not possible to make every service API to return these various error responses. So in order to test these scenarios, we need to simulate the server requests locally such that it returns the responses that we want to test. This is what we mean by mocking data requests. These “server” requests will not actually hit the network; the mocking code runs locally and returns the data that corresponds to success or error response.

Learn GraphQL By Example

I have been using GraphQL in my work project for a few months now and I love it. But all my learnings of this technology have been in a hurry and mainly from a consumption standpoint as a mobile developer. So I wanted to learn it much deeper, tinker with it and finally write this blog to share my learnings and cement my understanding. Finally got the time to do it this weekend.

Swift 4.2 - What's New

In this post, I would like to share what’s new in Swift 4.2. All the code displayed in this post is available at my GitHub repo my-learnings/Swift4.2.

Random Number Generation

  • Swift 4.2 added random number generator API to standard library. You can use it on Int, Double, Float, CGFloat and Bool.
  • It also provides a convenient API randomElement which returns a random element from a sequence
  • It also provides the APIs shuffle and shuffled to shuffle a sequence
1
2
let randomInt = Int.random(in: 0..<10)
let randomElement = ["one", "two", "three", "four"].randomElement()

Dynamic Member Lookup

Swift 4.2 introduces a dot syntax to access custom subscripts; this is much cleaner than the earlier square bracket calls. The compiler evaluates the subscript call dynamically at runtime, but provides a cleaner syntax.

GraceHopper 2018 Highlights

Grace Hopper Celebration 2018

I am at the Houston IAH airport waiting to board the flight to go home after 3 days of inspiration, motivation, technology, friendship and pure awesomeness. Yes, I was at Grace Hopper Celebration 2018 (aka GHC 2018), the world’s biggest gathering of women technologists. This year, GHC has 20,000 attendees representing 90 countries. It was such an inspiring experience for me that I thought I should share my experiences and learnings with you my friends. Hope you enjoy reading this and be inspired yourself. Also, if you attended GHC this year, please share your experience as well - either in the comment below or even better, write a blog and share the link!

Fastlane

Fastlane is a suite of simple yet powerful tools to automate building and releasing iOS and Android apps. It takes care of the mundane tasks of mobile application development like generating screenshots, managing provisioning profiles, code signing, beta deployments and releasing the application. It is very popular in the mobile developer community and the best part - it is completely open source.

The Toolchain

fastlane comes out-of-the-box with a set of very good tools (better known as actions) such as:

Google IO 2017

I had the wonderful opportunity to attend Google I/O last week and absolutely loved it. I learned a lot of things during the three days. Btw, it was tiring too with the continuous sessions and the sunny Sun.

This post is an attempt to share the main highlights and the announcements that I found interesting. If you attended the event or watched the sessions online, let me know if there were more things that you found interesting.

TDD in Xcode Playground

I use Xcode playground a lot in order to write code snippets - either to try out something that I read in a blog, or to demonstrate a code improvement that I want to suggest in a code review, or sometimes even to prototype a design before doing the full-blown implementation in Xcode project. During this experimentation phase, the correctness of the code was verified by analyzing the ouput displayed on the right-hand side column of the playground. This was really cumbersome and error-prone and I was hoping that there would be a better solution for this.

Realm Mobile Platform

Realm is a company that I respect a lot because of their support for mobile developers and the open nature nature of their offerings. Their easy-to-use, blazingly fast Mobile database software supports all mobile platforms - iOS, Android, React Native and Xamarin, in Java, ObjC, Swift and C#. That is why I am happy to see that today they announced Realm Mobile Platform that combines Realm client side database with server-side technology (Object Server as they call it). This platform provides the base infrastructure for mobile apps to support offline sync, that enables end users to interact with the app even when there is no network connection.