Android Apps for software developers

Here is a list of three apps I frequently make use during/for my software development activity.

3 Android apps I use are :

  1. Stack Overflow
  2. Pomodoro
  3. Twitter

Stack Overflow : It doesn’t need any introduction. If you really care about your craft try to contribute to the community. Answer the questions out there in a more human way possible. When I am not in front of my computer. I just have to see it on the app with the notification coming on the top. Thus letting know any progress in my previously answered or edited question. It helps to keep the score.

Pomodoro : Its is a time management technique. A very simple one but not easy to practice. In crisp it helps you to focus on a task for 25 minutes. Its a timer that goes of every 25 mins followed with a 5 minute break called as Pomodoro time. The apps give you a sticky note to write down your current task. The main challenge here is to focus on your working during those 25 minutes. Initially you can make a list of distractions during the Pomodoro time. Later have action plan to overcome the distraction. Find details on Pomodoro Technique.

Twitter : WHAT!! Yes you must be wondering how on earth can twitter help you become a better developer? But really if you use the tool effectively it is really helpful. It can play a role of aggregator of information. You can select people whom you want to follow, be it technical, leadership, personal development or entrepreneur. Make sure that they don’t spam your tweet feed. Also remember you can always un follow people. Go through your tweet feed when you are waiting for something. The wasted time could be converted into learning. And yes you can follow me @vikramshettyc

Also share your list of Android app on your mobile phone.

Happy learning!!!

Advertisements

One line business layer

A business layer method containing a object as parameter and just a single line of code with Data Layer call in method body is a BIG NO NO.

Some may find this very silly and have a question how is this possible. But recently I have seen code like that and it really caught me by surprise. The justification I heard was it’s a 3 Tier Architecture. I could just smile about such a deep problem in it, I too made such a mistake during my early days of programming. I was wondering how could someone make ignorance a friend. The incident was while using Asp.Net Web based application but can apply otherwise.

Even though the code file will separating Data Layer dependency from User Interface layer still it had below mentioned concerns :

  1. We have not created a good business class with specific single responsibility.
  2. We could not understood the business domain and thus not able to create related classes.
  3. There must be at least a validation check for the POCO objects that are been passed.
  4. In case of Dot Net class if the validation are done at User Interface using JavaScript then your business layer will break when browser has disabled scripting.
  5. This means that we have not understood object oriented programming. There may be instance where the methods will just call Data  Layer.
  6. There is no advantage of creating the method and its interface declaration, just to call Data Layer.
  7. Unit Test written for this method is actually calling the Data Layer method so it is redundant.

Try Catch Trap

In any programming language you have the ways to handle exception built in your language. I will explain using C# language. Developer learns the mechanics of try catch finally. If you are reading this page you must be already competent on understanding the fundamental of exception handling. Go to msdn to brush it up.

I want to talk to a beginner developer about 2 points to keep in mind if you are creating your own way of handling exception for logging the errors with maximum and accurate information. Specially if you are not using any tools like Exception Handling Application Block

Point number one : Always use throw in side catch in all methods not call directly by GUI or Web Services. The reason is it will propagate the stack trace and you will get exact error line number.

Sample pseudo code:

//some method in helper class
public void SomeHelperMethod()
{
    try{
        //some code here
    }
    catch{
        throw;
    }
}

Point number two :

Always log the error in database or file at the outer most layer from where the first call is made. Thus giving details of class and methods through which the error is traversed.

Sample pseudo code:

//some web service class / code-behind code / controller code
Public void WebMethod()
{
    try {
        //some code
    }
    catch (Exception ex) {
        Log.write(ex)
    }
}

This might not be the most elegant solution but a simple to understand and helpful solution for DevOps team.