Starting a software project on the right foot

Software projects are complex. Often the goal of an application looks simple, but as time progresses, the participants realise how complex the it actually is. Usually they fail to consider every type of input and the corresponding output. Fringe cases are often ignored and suddenly need to be accounted for. The most overlooked flaw is a lack of communication between the one who wants to use the software and the one who builds it. Requirements are not fully discussed and expectations are not fully set.

Most projects are difficult because they are not started the right way. The project starts in a direction that has already drifted from the desired outcome. It continues to drift until a lot of changes or even a ‘scrap and rewrite’ are needed to bring it back to course at a much later stage. In this post, I would like to discuss the points which should be taken care of so that you start a software project the right way. Continue reading “Starting a software project on the right foot”

6 practices that keep your software masterpiece from seeing the light of day

Software engineers switch between two modes: painful perfectionists and band-aid stickers. During the start of a project, software engineers discuss things to painful detail on whiteboards, Post-It notes, restaurant napkins and even glass doors. This eats away precious time that could have been spent on actual development. But as the deadline looms, the whiteboards and glass doors are rubbed, Post-It notes are torn apart and restaurant napkins are trashed. The plans are chucked in favour of anything that makes the application work.

Often, the released solution has plenty of duct tape code that holds the functionality together. After all the over-planning, duct-tape coding is the only thing possible in the limited time that the programmers leave for themselves. Software teams hardly release anything during the early phase of a software project as everything is put in meticulous detail on paper only. But as the deadline approaches, frenetic releases are made everyday or even every few hours, causing confusion among the developers, project managers, testing teams and the clients.

Continue reading “6 practices that keep your software masterpiece from seeing the light of day”

Understanding Software-as-a-Service (SaaS)

The world of software and information technology throws up jargon at an explosive rate today. It is hard to keep up with them and even harder to understand what they mean. One such term is SaaS or Software as a Service. Let me explain what it means and how it is important to you.

What is SaaS?

SaaS refers to a software that MANDATORILY has the following properties.

  1. The core of the service runs over the Internet on a server, while the user works with a bare-bones tool on his/her device.
  2. Usually nothing is installed on the user’s device and a browser is used to connect to the service. Even if something needs to be installed, it is just a small app with a user interface and a set of functions that connect to the Internet to exchange data with the service’s server. No service functionality resides inside the app.
  3. No storage happens on the user’s device. All of the user’s data is stored on the server securely.
  4. The user needs to connect to the Internet and login to an account in order to use the service and access his/her data.
  5. Due to the service being on the Internet, a user can access his/her data from any device from any location, be it on a smartphone from a car seat, on the home desktop computer or on a laptop from a resort.
  6. As a result, changes made from one device are almost immediately available on another device.
  7. Functionality can be extended on a daily basis because all the functional code is on the server. The user doesn’t have to install a new version on his/her device. In case of a web application via a browser, even the UI can be updated frequently without the user having to install anything.
The layers of SaaS
The layers of SaaS

This is contrast to a traditional desktop software application, where a huge software application with UI and all the functionality is installed on the device’s storage, all the files are stored locally on the device’s storage device and the user needs to remember to copy the files to a portable storage unit such as a thumb drive in order to transfer them from one device to another. Changes also need to be synced among devices every time. Changes to functionality are released as a new version of the application and they too need to be installed on the server.

Additional features

Apart from the above features which are mandatory, Saas MAY provide some of the following features

  1. Limited offline access to use the service when Internet is down.
  2. The ability to download files to local storage.
  3. The ability to connect one SaaS to another in order to use the features / content of one in another. E.g. Pixlr can use your Google Drive as storage.
  4. Ability to share your files with other accounts as read-only or read/write.

Examples of Saas and equivalent desktop applications

Real examples of Saas are as follows.

DesktopSaas
Microsoft WordGoogle Docs
Microsoft OutlookGMail
Adobe PhotoshopPixlr
Files and directoriesDropbox

Where SaaS fails

  1. The biggest failure of SaaS is when going for long periods of time without Internet. While some SaaSes allow you to edit your content offline, your content will not be synced to the server. So if another person makes changes to the same files from another device, there will be conflicts.
  2. An insecurely set up SaaS can cause a risk where contents can be snooped and even downloaded by unauthorised persons.
  3. All the data is in the hands of the company providing the SaaS and not in your control. A change of policy or an infrastructure collapse can lead to loss of your data.

What you need to build your own SaaS

If you are a company who wants to build your own SaaS, the following should be your technical know-how. There are further requirements such as strong policies and legal agreements which are beyond the scope of this post.

  1. Setting up your own server either in physical form or on a cloud service such as Linode, Rackspace, Amazon Web Services or Google Cloud Compute.
  2. Complete knowledge of HTTP protocol. The app on the device and the server communicate using HTTP.
  3. Securing your HTTP communications using HTTPS.
  4. Programming on the server side using one of NodeJS / Python / Java / Ruby / PHP / .NET.
  5. Using server side file system and databases for data storage.
  6. Using OAuth to validate users who log in and to reject users who are either no signed in or are using invalid credentials.
  7. Using OAuth to allow other apps and users to access a given user’s data.
  8. If you are making a web application for the user’s browser, then your knowledge of HTML, Javascript and CSS should be strong.
  9. If you are making platform-specific apps, then here are your requirements.
    1. Java / Kotlin programming for Android
    2. Swift programming for iOS
    3. .NET programming for Windows
    4. Cocoa application programming for MacOS.
    5. QT / GNOME using C++ or Python for Linux.
  10. Usage of Continuous Integration and Continuous Delivery to roll out new versions.
  11. System administration for the following requirements.
    1. Monitoring the server to make sure that things run smoothly.
    2. Frequent backing up so that data can be recovered.

Conclusion

Being the trendsetter of the last decade, SaaS is now commonplace since 2010 or so, when rich web applications, Android and iOS took the world by storm. There was a need to access apps and their data from anywhere to which SaaS provides the solution. And that need and the success of SaaS is not going away anytime soon.

Database or no database?

What do you do when your application needs to store something? Are you the type of developer or company that habitually jumps to create a database everytime you see that an application needs to store something permanently? Worse, are you the type of programmer who stores binary things like images, music, videos and ‘what not’ inside databases too?

On the other hand, are you so petrified of and averse to databases that you store everything in Excel, comma seperated or JSON files?

In this post, I put forth some rules I use to decide what goes into databases and for what type of data you should consider a different data storage.

Continue reading “Database or no database?”

Making your photos look good with post-processing

My wife Priya and I went on a year-long trip named India 360. We clicked tens of thousands of photos during the trip. We share them on our Facebook page and Instagram channel. But, we realised that the quality of the photos we shared weren’t high. Sure, the resolution was great and the most of the photos were good. But we weren’t getting the photos to look like what professional travel photographers do.

Late last year we met Aravind, my brother-in-law (Priya’s brother), who is an excellent photographer. He is also good with post-processing using software tools like Snapseed and Lightroom. In a span of half an hour, Aravind taught me how to make my travel photos look good…. really good. He didn’t fiddle with gimmicky settings, nor use jargon. He taught me 5… just 5…. steps that make every photo look great after post-processing. There was a bonus 6th step which should be used sparingly.

Since then, I have learnt from his principles and edited 100s of photos from our travel, making them look much better than the original shot. I even added some steps of my own to the process. I edit my photos from two places. On my Android phone, I use an app called Snapseed. I use neither Mac OS, nor Windows. On Ubuntu Linux, Adobe Lightroom doesn’t work. So my desktop photo-processing app of choice is Gimp. Continue reading “Making your photos look good with post-processing”

Tips from my stint as a freelancer

I decided to become a software freelancer in November 2015, after doing side gigs for six months. My stint as a freelancer has successfully progressed over the span of the last four years. It has thrived either sides of a year-long trip India 360. The number of months I have freelanced so far hasĀ  ticked to 34, which is nearly 3 years. In this article, I explore some Q&A about freelancing, answering some questions, giving tips and busting myths. If you are embarking on freelancing, then this article is for you. Continue reading “Tips from my stint as a freelancer”

Understanding the types of software around you

Software programs are like food and clothing. They come in all shapes and sizes. There are billions of programs. But all of them can be classified in a few categories. This post informs you about the different categories of software programs, what can be achieved with each, where they fall short and how you can decide which one you should build, or assemble a team for.

The topic seems very basic, but I feel that companies today are churning out too much code and too many variants of the same program for their own good. As a company, it is worth pausing and asking yourself what you really want to achieve for the users.

Let’s see the different categories of software programs with the help of a story. Continue reading “Understanding the types of software around you”

Conversations with Internet: VoIP part 2

In part 1 of this series, we saw what VoIP is and how it is synonymous to traditional phone calls. We also listed some advantages of VoIP over traditional phone networks, that it is possible to set up your own VoIP network for use within your company. Finally, we saw that VoIP calls can be automated. One day your devices, such as home protection or a stock market ticker, will make an audio or video call to you via VoIP if something interesting occurs.

In this part, we will see how a VoIP call works, using VoIP calling software / device and a network protocol named SIP (Session Initiation Protocol). Continue reading “Conversations with Internet: VoIP part 2”

Conversations with Internet: VoIP Part 1

During the 1990s, there were only two ways to transfer voice communication from one place to another. The first type was radio communication, using gadgets like walkie-talkies. The second was telephone networks. At the turn of the century, the improved speed of the Internet was begging for a way to transfer voice in real time from one desktop computer to another. Enter VoIP or Voice over Internet Protocol.

What is VoIP?

VoIP is a way to transfer sound, mainly voice, from one device to another over the Internet in as much real-time as possible, similar to the way radio or phone does. But instead of a radio frequency or a telephone exchange, the medium over which your voice is carried from your device to the recipient’s device is the Internet. Please note that this is not the same as downloading a song in MP3 form and listening to it later. This is like a phone conversation where the voice is streamed from one end to another live.

In a telephone, a connection request is indicated to the recipient by ringing his/her device. A connection is established when the receiver picks up. VoIP too has the concept of connection request and establishment. Just like both the phones have a phone number for unique identity, VoIP devices have VoIP endpoints. These usually look like email addresses. Users connect to each other using endpoints. The act of dialling, ringing, picking up and having a conversation over a phone is known as a phone call. In VoIP, the entire cycle is called a VoIP session. Like calls can be recorded in modern telephony systems, VoIP sessions can be recorded too. And just like conference calls in telephones, VoIP sessions can happen with more than two participants.

In a VoIP call, the two parties use a software app or a dedicated device that connects to a VoIP service provider’s server over Internet. This is similar to the way that your landline telephone is plugged into a wall unit using an RJ11 cable and your mobile phone contains a SIM card that connects to the nearest tower belonging to your provider. The software connection to a VoIP server is established just like your web browser connects to the server of a website or your email software (e.g. Outlook, Thunderbird) connects to an email server. Once connected, the software app can request the server that it wants to talk to another person connected to the service. The server will then send a notification to the call recipient, who can choose to receive the call. The server then manages the path and the streaming of voice between the sender and receiver apps.

Advantages of VoIP

A phone communication requires dedicated hardware. You must use a telephone with a subscribed landline connection or a mobile phone with a SIM card whose service has been enabled.

The cost of a phone call depends on the distance between the participants. There are local, national and international calls all with different tariffs.

Phone networks can only be created and maintained by licensed service providers. You cannot start your own landline or GSM networks. It is possible to set up a local telephone network, also known as an intercom, as long as all the phones are within the same building / locality. But if your office is spread around the country or the globe, you cannot simply start a landline or a mobile network of your own. It would be illegal to. You need to purchase a service from BSNL, Vodafone, Rogers, AT & T, Movistar, etc. depending on where you are.

The phone numbers you receive from phone companies cannot be fenced such that only those from your company can call you. Phone numbers are globally accessible and anyone with your number can call you, whether they work in your organisation or not.

In contrast, VoIP can be used from a laptop, desktop computer and mobile phones with Internet enabled. Even a mobile phone which has no SIM card, but has access to Internet over WiFi is ready for VoIP. All you need is a software app that can connect to the VoIP network of your choice.

Since all the calls are over the Internet, you only pay for your Internet package, whether you speak to your spouse in the next room or to your friend on the other side of the globe.

Also, it is possible to set up your own VoIP network for communication between the multiple offices owned by your company across the world. Based on your access control, the rest of the Internet may be allowed to dial into your VoIP network.

Proprietary VoIP networks

Just like any software solution, VoIP comes in proprietary and open solutions. In proprietary solutions, you need to download the software or purchase the VoIP hardware that is released by the company providing the solution. The dedicated software or hardware automatically connects to the VoIP servers of the solution-providing company, without letting you know where they connect to or without allowing you to set any parameters for the connection. Usually, proprietary solutions allow people to talk using only their software and only to those people who have joined their network and who also use their software. Cross-platform VoIP calls did work for certain companies, but the solutions didn’t last.

Some proprietary VoIP solutions

Skype (now owned by Microsoft) was one of the first VoIP solutions. They broke ground at the start of the millenium, making VoIP a household name. Other solutions followed over the next decade: Google Talk, Yahoo voice chat, etc. Other than Skype, most other solutions were simply voice add-ons to their chat applications. With the success of Android and iPhone, Viber and FaceTime became some of the earliest VoIP apps available for smart phones. The success of Viber prompted WhatsApp to add audio and video to their otherwise text-only application. Google scrapped their erstwhile Google Talk solution and rebuilt a new solution called Hangouts. Hangouts remains one of the very few VoIP offerings that works purely from a browser and does not need an app. Google have not settled for their robust Hangout app and instead confused the users of their Play Store with another app named Duo. Other companies such as Zoom started their own VoIP solutions mainly with the intention of business conference calls where multiple participants can hold meetings by signing into a pre-determined ‘meeting room’.

All of the above solutions are proprietary and incompatible with each other. Skype cannot talk to WhatsApp, whose users cannot join a Hangout, whose users cannot converse with a user over FaceTime. This dreaded situation is called ‘vendor lock-in’. A user has to either confine him/herself to talk to users who also use their solution. Or they have to download / purchase multiple solutions to include everyone. Sometimes, even that’s not possible. For instance, even if an Android user is ready to pay an arm and a leg, Apple simply will not make an Android FaceTime app.

Open solutions

How will it be if we can use an open VoIP protocol that lets us set up our own VoIP server, and one that can chat with other open VoIP servers. Instead of being tied in to specific software apps from vendors, users can have a choice of apps ranging from basic to advanced, which can be programmed to connect to any VoIP server of their choice. Why not two VoIP servers? One for family and one for work. Can we build an ecosystem of VoIP apps and providers, where a user can simply change from app to app until he / she finds one that is right for him / her and then can simply switch from one VoIP provider within that favourite app to another based on the time of the day, one for casual purposes and one for work?

Yes, we can. That is promise of two protocols named SIP (Session Initiation Protocol) and H.323, which are open protocols. We will learn more details about those protocols in part 2 of the series. In this post, I’ll simply summarise that any SIP-compliant app can connect to any SIP-compliant VoIP provider. The providers of one network may set up their servers such that the contacts and sessions of every user be accessible to other providers.

Ekiga is an example of a VoIP desktop software that can connect to any SIP-compliant VoIP server.
Ekiga is an example of a VoIP desktop software that can connect to any VoIP server that supports SIP and H.323

Conclusion

Radio communications assisted the world during the World Wars. Telephones changed the face of voice communication between the 1950s and 1990s. But VoIP has democratised the way people speak to each other, making voice and video calls available to anyone with a device that has Internet, front-facing camera and a microphone, at a very reasonable price.

With VoIP making its way into the Internet of Things, it may even be possible in the future to speak to your home’s virtual assistant to get things done while you are away. Your home’s security camera may automatically dial you with a VoIP call if it detects something fishy. It remains to be seen how much more advanced this technology will turn out to be.

How version control works: Advanced

In the last post, we saw how version control system such as Git helps three poets, i.e. Nancy, Tommy and yourself write a poem and maintain several versions of it in a secure database, so that you can go back to an older version and start over again if you wanted to. We saw how only the changes across each version is saved. We also saw how the poets commit their own changes to a local repository, push them to a central repository and pull others’s changes into their own repositories.

In this post, we will see more advanced concepts such as branching, merging and conflicts. Fear not, these hard to understand concepts will be explained in a lucid manner. Continue reading “How version control works: Advanced”