Tuesday, 2 December 2014

JSON serialisation/deserialisation with snake_case naming conventions

GitHub (NuGet package source)
GitHub (Usage example)
Nuget Package

JSON is quickly becoming the norm for data transfer along the HTTP protocol and for many of us it is a daily task to serialise into and from JSON.

The problem with JSON, however, is the fact that there is no standard associated with its naming conventions. Let me give you an example.

Below is a snipet of JSON from the Twitter API:

 {  
   "id": 85011021,   
   "id_str": "85011021",   
   "name": "Raph",   
   "screen_name": "RaphHaddadAus",   
   "location": "Sydney",   
   "profile_location": null  
 }  

And here is JSON from the Google + API:

 {  
    "objectType": "person",  
    "id": "104264388447663009734",  
    "displayName": "Raphael Haddad"  
 }  

As you can see there is no consistency between the property names in each of the examples. This issue is quite widespread and some providers have their properties as snake_case, others are camelCase and others are PascalCase

What makes things even more complicated is that there are different standards within some naming conventions as well. Let's take snake_case as an example:

Below are two naming conventions that can be written in snake_case:
  • page_section2
  • page_section_2

So how do we serialise to and from objects in C# while maintaining statically typed classes with proper C# naming conventions?

Monday, 17 November 2014

My first couple of weeks at Readify

So now I've been at Readify for a few weeks and it has been great. If you gave me a few words to describe Readify I would say:
  • Quality
  • Learning
  • Smart
  • Agile

Wednesday, 8 October 2014

Leaving CSB Engage :(

What a journey it has been!

Whether it be developing SIG using the Facebook and Instagram APIs or managing huge data sets (close to 1 billion). CSB Engage has been a wonderful place to work. It had flexibility and a great culture. The best thing would probably be the Monday lunches. This is where one person from the team would bring lunch from home and we would eat together. I'm proud that I've seen CSB Engage grow from Endless Rewards, to its merger with OnitMedia and I've been there every step of the way.

Tuesday, 1 July 2014

The missing piece in social media (digital) strategy - SIG

The new breed of digital marketers are here! They are called "Social Media Strategists". Social media strategy involves businesses generating social media actions (likes, tweets, checkins etc) on their own business page (Facebook Fan page, Twitter account or Instagram account). The reason? to ensure that a business page receives adequate attention on the news feed of social media users.

These strategies include devising plans to post rich content that will enable loyal customers to perform social media actions and hence provide a mechanism for customers to tell their friends about a certain company.

Now all this is well and good. But the customer loop is incomplete here, as loyalty is only being properly provided by the customer, not the business. For example: a certain customer may be liking a business' posts once a day, but he/she is not getting anything back. Until now...let me introduce - SIG.

Tuesday, 10 June 2014

Free Nexus 5 from Google

I had broken my Samsung Galaxy S2 on my European trip. So as soon as I got back home I started to look for a new phone. I decided that I would just invest in an expensive smart phone and be ultra careful with it (I am not the type of person to care much about the protection of phones....or sun glasses)

I purchased a Nexus 5 from the Google play store. About 5 minutes latter I found an old HTC in my drawer and decided that I needed the cash I used to buy the phone. So I cancelled the order.  About a week after that, I received a package at work. It was the Nexus 5.

At first I was confused. I thought I canceled the order. So I checked the Google play store and my credit card statements. All seemed to confirm that I didn't pay for the phone.

Wednesday, 26 March 2014

Front-end development responsibilities as a (back-end) software engineer

What seems to be predominant in the industry today is a fixation on a software engineer simply creating (yes creating, maybe we'll discuss the importance of this verb for another blog post) products that solve a specific business problem (or requirement). While this is good from the outset. It raises several questions of the responsibility of a software engineer to begin with.

Before I get into the real content of this blog post, I would like to share with you my current working environment, so you can analyse any predisposed prejudices I may or may not have. My responsibilities at work are primarily of a back-end nature. That is, I do not do much front-end development. Although I have done front-end development in the past, my time and concentration has now focused on social media engineering. Nevertheless, I still maintain that a back-end software engineer should be able to provide the front-end developer with the flexibility, robustness and confidence to create the sexiest and most enjoyable product to use on the market. Let's face it. We can have a product that employes the latest of technologies. Whether it be voice recognition, deep machine learning, social media integration or QR Codes. And solves the most complicated business problems in the world. But if this product is not enjoyable for the user, that is, if it does not provide the best user experience. Then the product simply wont sell in the market.

Tuesday, 25 February 2014

BFS and DFS with Python

GitHub

So I've found myself in a situation where I have had to revise simple Data Structures from my Software Engineering Degree. I have not done this for several years, so naturally my first step in this process was looking at the workings of various structures on Google (then subsequently Wikipedia). After refreshing my memory, I decided that the best thing to do was code up these algorithm.

In this blog post, I will show you the BFS (breadth first search) and the DFS (depth first search) in Python.

Unfortunately many of the already Python implementations of these algorithms on the web are either over complicated or have readability issues or don't emphasise the difference between the two algorithms.

I will attempt to explain both, and give a readable and understandable explanation of both. Targeted towards first year Computer Science or Software Engineering students.

Friday, 21 February 2014

Instagram API filtering (or querying)

GitHub

Instagram's APIs are well written, well documented, RESTfull and simply a breeze to use.

I myself prefer them to the Facebook APIs, however the Facebook Graph API does have an advantage over that of the Instagram API - namely filtering. The question I will answer in this blog post is whether there is an efficient way to filter the Instagram API.