Swift meetup

After a long time attended a meetup. And this was on the topic which I work on day to day – Swift programming language.

The meetup overall was good. Got to learn couple of new things – DispatchGroups, Swift Runtime and the thing that we can have our own Swift’s virtual environment just like virtualenv in Python, for swift its called virtualswift.

The most useful talk for me was on measuring performance in swift by Mayur Dhaka in which I can use immediately is DispatchGroups.

DispatchGroup primarily avoids the code shifting to right while using nested blocks like completion handlers.

From what I understood is DispatchGroups are the thing which can be used to group a logical set of background operations into one unit. It has very few APIs. According to Apple :

DispatchGroup().enter() – to indicate the block has entered the group.

DispatchGroup().leave() – to indicate the block in the group has completed.

DispatchGroup().notify(...) – to schedule a block or a work item to be submitted to a queue when a group of previously submitted block objects have completed.

DispatchGroup().wait(...) – waits synchronously for the previously submitted work to complete.

Basically DispatchGroup is to synchronize and track a set of tasks which are logically grouped and executed according to your requirements.

Hope this gist will help you get to know something new and explore more if interested.



The 5 minute series

As mentioned in my previous blogpost the first among my targets this year is to start a 5 minute series to get introduced to anything. With this post I am listing down my initial set of topics which I will be writing on. This list will grow periodically and also will be updated with the links to each 5 minute series.

Following are the topics for which I am planning to do 5 minute introductions this year

I will be adding more to this list I finish each one.

This is the first time I am doing a 5 minute series. So your comments and suggestions are very very important to me. All criticism is taken up for improvement of such tutorials.

iOS Keyboard Shortcuts

Do you want to save time typing the same phrases again and again? Yes!

Especially on your phones where you have a cluttered keyboard and for the ones who are used to desktops typing on phones can be really really cumbersome.

Here’s a saver for you. There are many apps which can create shortcuts for you. But the one which comes by default in iOS: ‘Text Replacement‘.

Where to find this and how do I set the shortcuts:

  1. Go to Settings app
  2. General → Keyboard → Text Replacement
  3. Go to top right corner and tap on the + icon to create new shortcuts.
  4. Add the phrase and shortcut text you can remember
  5. Use this in anywhere in the device wherever you can type

I use this while replying on linkedin with “Thanks for the opportunity. I am not looking for a change…” I use “lnkdthnks” as shortcut. A real time saver!!

Another place I use this is when my friend, Gourav, asks me to keep reminding him about creating videos etc., For the text “Gourav when is the video coming out?” I have added the shortcut ‘galert‘. Timesaver, right?

Hope this helped!

Keep following for more tricks and tips on All things tech!

Hola 2018!

Hellos fellows!!

Its been a while now wanting to write a blog. I thought of writing at least one blog per week in 2018 amounting to at least 52 blogs at the end of the year if am consistent enough.

Following are the things I want to be consistent in 2018.

  • The <Anything> in 5 minutes series
  • Simple tips and tricks of technology
  • Go live on YouTube programming anything
  • 50+ blog posts in 2018
  • Read a book a month – 12 books this year

Apart from these publicly visible things I will be going to do few side projects to learn something new in a field apart from my work. Learn about Machine learning, create couple of android apps. Build a wunderlist clone as its fortunately or unfortunately acquired by microsoft.

Do yoga and practice guitar are 2 more things I forgot.

That’s pretty huge for a lazy me. But looking at my first 2 weeks of 2018 I am pretty much consistent, I will do this. I am gonna achieve this for sure.

Here is my first blog post of 2018.

Have a rocking year. \m/