Ankur અંકુર Patel
Full Stack Ruby on Rails, Frontend Web and native iOS App Developer | Author of "Hands-on Full-Stack Development with Swift" amazon.com/author/ankurpatel
Building tvOS App and things I learnt
I took a dive into building a tvOS game called Matching Pairs. This game is same as the iOS game but there were some subtle differences that I want to bring up that may help others out if they decide to build a game for tvOS.
backgroundView and selectedBackgroundView in UICollectionViewCell
Just wanted to share an interesting aspect I discovered in UICollectionViewCell that makes it very easy to build a game like matching pairs or similar in iOS while writing very minimal code to handle selection and changing the UICollectionView cell on selection and deselection.
Passing functions around in C
It has been sometime since I have used this, but back when I was taking C for C++ Programmers course in my undergraduate days, I did not know that you can pass function into a C function similar to passing functions in Javascript of other languages like Swift.
Merging Queries in Rails
Have you tried to construct a complex query in Rails to do joins and order by different columns and have fallen into writing SQL because you could not construct a query using ActiveRecord’s querying DSL, then this blog post might help.
Adding Promocodes to your Rails App
Recently I came across a problem of how to add Promocodes to an ecommerce site built using Rails. Thinking about the problem I thought of good programming practices that I can apply so that the code is clean and maintainable in the future as more different types of promocodes are...