Self-taught Software Developers: Why Open Source is important to us

This is a story about how my perspective for Open Source changed through time and how it’s helping me with my career.

Introduction to Open Source

About 13 years ago (at High School) a friend (Netcyrax) introduced me to Open Source community. He explained me everything about Open Source and how it works. He then gave me an Ubuntu CD and told me that Ubuntu was promoting their OS by sending free copies.

The next day, I visited www.ubuntu.com using my 56k connection and ordered 50 copies of Ubuntu. My intentions were to sell them to other people instead of giving them for free. That was the 15-year-old me who failed to understand the purpose of Open Source.

Failing to understand the purpose

Then I started programming. I was already aware of Open Source but really I couldn’t understand why I have to share my precious lines of code. Why share for free the source code of my program, which I spend months developing? What if someone stole it? What if my “competitors” use my source code to improve their products?

What I failed to understand back then, it was that I wasn’t an exceptional Software Developer and my program could be developed from scratch in few days by an experienced Software Developer (instead of months).

Using Open Source libraries is handy

It’s 2008 and I got my first iPhone (3G). Apple announces iOS 2 and iOS SDK. I decided that I will become an iOS Developer (on my free time). Since there was no one experienced with iOS SDK yet, I had to learn developing apps by myself. I created a simple app with a WebView and the business logic was inside the web app built with JavaScript.

I was pretty disappointed by the iOS SDK (Rookie Developer + Objective-C + Manual Reference Counting = Disaster), so I suspended the native iOS development for a couple of years. In the meantime, I was experimenting with hybrid SDKs like Titanium, Adobe Air-ActionScript.

When I came back (to native) at iOS 5, everything was different. In about a month I managed to build my first real app and upload it to the App Store. But what was changed(other than Automatic Reference Counting)?

Answer: Open Source community for iOS development. ASIHTTPRequest for network request and SDWebImage for downloading and caching images helped me to built my first app.

Version Control and GitHub

Most of the open source projects and libraries were hosted on Github. So I was using Github to download my libraries but since I was programming on my free time and having no experience in commercial environment, I couldn’t say the difference between Git and Github.

After building some iOS apps I was feeling confident about my skills so I decided to apply for iOS opportunities.

At some point in the first interview:

-Interviewer: What version control do you use?

-Me: What do you mean version control?

-Interviewer: I mean how you keep versions of your code base? SVN? Git?

-Me: Time machine (The backup software for OS X)!!

The reaction of the interviewer

So after having this conversation with the interviewer I decided that I want to learn more about Git (and version control in general) and that I want to use it on my own projects.

I read a lot of articles about Git and how it should be used in a team. I learned to use “Commit” and “Push” on my BitBucket repositories. I was using it as backup and versioning of my code but not as a collaborative tool.

First Pull Request

One day I was looking for a back-end library to help me manage push notifications on iOS and Android. I found a simple open source library that it was almost what I was looking for. I modified it to suit my needs and fixed some bugs. Then I sent a message to the owner of the repository letting him know about the bugs and the extra functionalities that I added to the project. The owner came back asking me to create a “Pull Request” to his repository.

Pull what?

I am pretty sure that “Pull Request” was mentioned in all of those articles that I read about Git, but since I was not using it, I forgot about it. Long story short, I did some research for “Pull Request” and by trial and error I managed to create my first “Pull Request”.

After my first “Pull Request” was approved I got excited and I was sending “Pull Requests” for each library that I was adding new functionalities.

As you can see we had a win-win situation here. I contributed and I improved an open source library and the open source community helped me to understand and correctly use collaborative tools like “Pull Request”. As self-taught and indie Software Developer I wouldn’t be able to learn how to correctly use Git on my own. I read a bunch of articles about it but that’s theoretical and I am hands on guy. Of course, I messed up a lot of my own repositories through the time but at least there were my own pet projects and not the company’s(at a later point) I am working for.

Observing how other Software Developer works

The most difficult part of being self-taught Software Developer is that you don’t have a mentor.

Early in my career, I was working as Systems Engineer and I was lucky enough to have two of the best mentors I could had. Who am I considering as excellent mentors? The ones who had deep technical understanding and helps you by giving you hints (not the solution) and then correct you when you messed things up.

Since there is no one to guide us, we need to guide ourselves. So for every open source project I am using, I am observing the source code (especially the small projects). Then I do a small research about things that I didn’t understand or methodologies that triggered my curiosity. Even better is when I am contributing and I am forced to use that kind of new methodologies.

Thanks to open source we have access to some big projects like Mozilla Firefox for iOS or Wordpress for iOS. Being curious and observing projects like these will help you to evolve as Software Developer.

Creating open source libraries

At some point I created a custom UIAlertView that I was using to my projects and I decided to make it open source. So I modified it, to be more dynamic and uploaded it to GitHub. I also wrote my first documentation explaining to other developers how to use it on their projects.

Probably nobody ever used it because it was a simple project but I was feeling good about my contribution.

Even though she has no idea what programming means

One day I was working on my pet project called IT Buddy and I needed to add a new feature. That feature would scan then network (that the mobile device is connected) and would show all available devices in the network. That’s very useful tool for Network/Systems Engineers when they are troubleshooting.

Because that’s a lot of work to do, I searched for an open source library and unfortunately I didn’t find any decent library. I found an old one which was solving a part of the problem (scan only /24 networks, show only IP of the host). Also, it was slow and was blocking the main thread of the app. So I forked that library and modified it.

I added some features like:

  • Shows MAC Address of the device
  • Shows Brand of device based on MAC Address
  • Shows hostname (if available) of the device
  • Scan any subnet (not only /24)

I then created a new repository on GitHub and created my own network scanner for iOS called MMLanScan (The reason I didn’t create a pull request back to original project it’s because it was abandoned).

A few days later, the repository got its first stars, a couple of forks and some issues where opened. That feedback encouraged me to constantly maintain my repository.

The MMLanScan V2.0

There was a huge improvement from the old repository, but I still wasn’t satisfied with the performance. So it’s was time for the V2.0 of the MMLanScan.

I created a new branch and started from scratch. Having in mind how other libraries works, I tried to keep the same API, so when the developers will update the library, they won’t have to change their code.

In order to improve the performance, I had to use background threads for the operations (ping and retrieve MAC Address from 254 hosts if it was the common case of /24 network). I was familiar with multithreading since I was using GCD for simple tasks but for this project, NSOperation & NSOperationQueue seems to be the ideal API. I experimented in the past with NSOperations but not in a real project.

To ping the available hosts I used Apple’s SimplePing. SimplePing was having issues to work with GCD and NSOperation so I reported a bug at Apple. They came back explaining that it wasn’t a bug and gave me a hint how to solve this issue (RunLoops).

After a few days, I rewritten MMLanScan, with huge performance boost (500% faster), better structure and of course more accurate results.

Again we have a win-win situation here. I created an open source library for scanning hosts in device’s network (I know it’s not the next SDWebImage but some people will find it useful) but I learned a ton of new things.

What I learned from this project:

  • Keeping the same API to make the update procedure easier.
  • Creating “Tags” for library versions in Git.
  • Working with High and Low level multithreading tools.
  • Writing a good documentation for the project.
  • Interacting with Apple’s Engineers.
  • Making an Objective-C library compatible with Swift.
  • Experimenting with Swift in order to create the demo project.

Summarise

I believe that Open Source community makes our life easier. Software Developer from all over the world are collaborating to create any kind of libraries, used by millions of people.

Personally, I feel that Open Source community offered me a lot of things and it’s time to give something back.

Also as self-taught Software Developer, you have to keep up with the other Software Developers from all over the world. If you are active at Open Source community then you will be able to keep up with the best Software Developers or even better, to collaborate with them on a project.


If you enjoyed this article check out our publication Rock n Null about mobile and technology!