Skip to main content

A developer's sacrifice - why did I say bye to my first love

I love writing code and during my undergraduate studies I had a chance to write code in many programming languages and while I enjoyed working with all of them, there was one language that I fell in love with. I call it first love and thankfully I had a chance to code in that language for most of my career after I finished uni. I worked with it for years and years, it would be my language of choice for any new project...until recently. In the last 12 months, certain (almost unavoidable) circumstances lead me to a choice which meant, I had a part ways with my first love for this particular project. In this post I will talk about what my first love was, the circumstances that made me part ways with it and what did I use instead of it.

My First love


During my undergraduate studies and when I was learning about programming, I was exposed to C++, Java and C. I did not mind C so much, C++ I did not like it at the time and I loved working with Java. Yes yes, I know it's very verbose and all but hey you know what they say "love is blind". Thankfully Java was something that I used in most(75+%) of the projects in my past jobs, hence I could still be in touch with my first love. However I was involved in 2 small projects which had me use Django(Python).

p.s. I did not like C++ until I worked with it extensively during my post graduate research on computer vision.

What project caused me to part ways with my first love?

Hmm where do I begin? ahh well, let's start from the very beginning;

It all started with Apple introducing Swift at WWDC2014, which got me curious and when I looked it, it was awesome and I wanted to work with it and what better way to learn it than learn it to make iOS apps. Up to this point I had avoided learning how to make iOS apps because I hated the look of Objective-C, I mean to me it was just a really bad combination of C and C++. Swift looked awesome, it felt like C++, Python, Javascript had a big party where they got smashed, got intimate and had a baby...which was Swift! Writing code in Swift felt awesome, nay, it felt TOTALLY AWESOME!!!!

My love affair with Swift continued on and about 15 months later, my first iOS app (My Day To-Do) happened i.e. I released it. Why did it take so long? well I have already written about that in a few of my previous posts (here's another one), so I will just avoid that discussion here.


Ok what does my app do? the full description on the app store paints a clearer picture of it. In summary, the primary goal of the app is to be something that can wake you up in the morning and tell you what you need to know for your day i.e. information relevant to you for the day. At this point, it does so by reading(speaking) out what you have to do (your tasks) for the day and what the weather is like where you live. I have been updating my app ever since it's initial release and one of the updates required that I build a RESTful backend.

Building the RESTful backend

Naturally when I came across this problem my first instinct was to build a Java based RESTful backend, and that is exactly what I did. I had a working backend ready in no time, all seemed to work according to plan. Until....I thought about deploying my RESTful backend so my app can access the API, which meant I was looking for options to host Java web apps and I am on a tight budget so I couldn't afford some of the more expensive hosting options. There was AWS and Heroku  that I knew off at the time but none of the 2 seemed to be a suitable option,

  1. they both had a bit of a learning curve and 
  2. their free options are not very suitable

At this point, I thought "hmmm can I build backend with some other tech that's easily deployable?" which lead to another thought "well I have worked with Django before and it is very easy to get going with it and it maybe deployable to shared web hosting too?" The factors that I had to consider for this new tech were,

  1. How hard is it to deploy it?
  2. How hard is it to learn?
  3. How long will it take me to re-write my existing Java code in it?

I mean sure PHP can be easily deployed to shared web hosting but having worked with both PHP and Django in the past, I prefer Python more than PHP and building something in Rails was not an option - no way I am investing my time on learning that. Thus I re-wrote my simple Java backend in Django in relatively short time and I found and signed up with A2Hosting from the Django friendly web hosts page and BOOM! Problemo solved!! My backend was deployed and ready for my app to use.

Moral of the story


Let aside your personal bias and stop being a total nerd when a situation demands otherwise. I am really proud of myself for letting go of my nerd bias when a situation asked for it. At the time it was important for me to solve my problem in the most feasible way possible rather than keep coding in my favourite language and let it consume more of my time and resources. I mean one can argue that what if my app gets too big and it requires the API to be more complex than what I have now. Then I may not be able to make changes to the API to make it more complex to meet demands. My answer to that? well if my app gets too big, the following solutions are probable,

1) I have enough money to hire a programmer smarter than me to look after this
2) I have earned enough money to afford AWS or something like it

Do I miss my first love?

You know what they say "absence makes the heart grow fonder" so yes, I do miss writing Java code on a daily basis. Not sure if this is the best way to talk about it? Just the other day, I was just mucking around with some Spring framework stuff and it was so much fun to work with it again. Spring was something I worked (a lot) with in my last job 10 months ago. Until I get the next opportunity to work with Java again......

Finally

The best way to sum it up is that, I now feel old, very old. It is no longer about working with tech I love but it's more about solving problems with whatever tech best solves the problem at hand.

Comments

Popular posts from this blog

Upload to AWS S3 from Java API

In this post, you will see code samples for how to upload a file to AWS S3 bucket from a Java Spring Boot app. The code you will see here is from one of my open-source repositories on Github, called document-sharing. Problem Let’s say you are building a document sharing app where you allow your users to upload the file to a public cloud solution. Now, let’s say you are building the API for your app with Spring Boot and you are using AWS S3 as your public cloud solution. How would you do that? This blog post contains the code that can help you achieve that. Read more below,  Upload to AWS S3 bucket from Java Spring Boot app - My Day To-Do (mydaytodo.com)

Addressing app review rejections for auto-renewing subscription in-app purchase (iOS)

The ability to know what the weather is like while planning your day is a feature of  My Day To-Do  Pro and as of the last update it’s also a part of the  Lite version . Unlike the Pro version it’s an auto-renewing subscription based  in-app purchase (IAP)  in the Lite version. What means is that when a user purchases it, the user only pays for the subscription duration after which the user will be automatically charged for the next period. Adding an  auto-renewing  subscription based IAP proved to be somewhat challenging in terms of the app store review i.e. the app update was rejected by the App Review team thrice because of missing information about the IAP. Therefore in this post I will share my experiences and knowledge of adding auto-renewing IAP in hopes to save someone else the time that I had to spend on this problem. In-App purchase This year I started adding IAPs to My Day To-Do Lite which lead to learning about different types of IAP...

Getting started with iOS programming using Swift (Part 1)

I have not been too fond of Objective-C, which was the primary reason for me to stay away from making iOS apps till now. So what changed? Well Apple has done something very interesting recently and that is the introduction of a new programming language i.e. Swift. Swift is awesome, it almost feels like Python, C++ and Objective-C had a baby with some of their good parts in them. So I have been getting to know Swift and it is an awesome language to program in. What I am going to share with this and a series of blog posts are solutions to some problems that i have encounter while i am trying to finish my first iOS app. The one hurdle that I have encountered while getting started on developing an iOS app is that a majority of the solutions for iOS specific problems provide solutions to them using Objective-C. Which is fair, because Swift has not been around for that long. Anyway let us get started with a few basics, A few basics I would highly recommend having a read of this book...