twitter
rss

My Team mates in different projects

Today I completed 5 years as a Software Engineer! I had a quick retrospect in my mind to see whether I'm on track to reach where I want to be. During the retrospective I was answering so many questions to do self-evaluation. I was also devising some new plans and strategy to achieve the goals that I missed.

Below is one such question that I had asked myself during the retrospect. I wanted to share the results with you all.

Question: 'What do I consider as the biggest gain in this 5 year?'


In order to figure out the answer, I quickly came up with the below choices to analyze.

  1. Is that the programming languages, tools and technologies that I learned and expertized working for 5 years?
  2. Is that the analytical and innovative thinking skills that I got working in multiple projects for multiple clients?
  3. Is that the communication skill and professional behavioral skills I developed over this years?
  4. Is that the mental maturity I got to treat the success and failure, to handle the expectations and disappointments?
  5. Is that the money I earned over this years? (My mind immediately reminded me about the pending bank loans and my outstanding credit card bill amount :P . I immediately  identified this as a wrong answer but I'm keeping this just to increase the possible answers count :P)
  6. Is that the friends I gained and the wonderful people I worked/working with?

At this point #6, I remembered the events like Team outings, Birthday celebrations, the Treats, Conversations during lunch breaks and coffee breaks, Andhra mess lunch, chit chats and gossips during working hours, Movies watched together, Beer parties, Colleagues wedding, Colleagues farewell party, Long bike rides, Table tennis and cricket matches, Bay decorations, Pot lunch, Competitions won. When all those fun filled memories flashed in my mind, I immediately know that the answer to my question is 'The Wonderful friends and people I worked/working with'. Without this people in my professional life, I'm not sure whether I would have gained the above mentioned skills. At this moment, I would like to thank all those wonderful friends and people who made/making this journey awesome with full of sweet memories that I can cherish for my lifetime.

During the rest of my journey, I'm looking forward to gain more and more such wonderful friends across countries and cultures. Thank you!

My Bicycle

This crazy desire had its inception way back in 2007 when one of my college friend proudly told me that he had travelled more than 90km (Royapuram-SSN College-Royapuram) in his bicycle.  Since this act of him had impressed me, I too wanted to do this. After joining college, I developed a habit of tracking all my desires. So, I have added this to my desire list.  This is how this crazy desire got its place in my ever growing desire list.

Though I had added this desire to the list, I hadn't put any effort to bring a closure to this desire. In fact, I was busy in spending my time and energy in other priority desires. As time passed, the desire/goal list was growing with more priority ones. So, this cycling desire got least/no attention from me. Time flew by so fast, I graduated from college and joined as a Software engineer in a MNC. Unfortunately, the company/project I joined had lot of work and required me to support during weekends too. The amount of work and the sedentary nature of it made me a couch potato and my stamina level had decreased considerably over time. I thought that I may never able to achieve this desire, and was also concerned about my health. So, to give it a break, I shifted to an organization where there is a good work life balance. After joining the new organization, I got enough time for myself, so I was able to work on my unfulfilled desires and brought down many of them to closure in a very short time.  The cycling desire had also gained my attention soon, below is the full story of how I achieved my endurance cycling ride desire.

The Preparation:

 

In order to increase my lost stamina level I started doing some basic exercises like rope skipping, walking and work outs in orbitrack. I also took out my bicycle and test ridded to check my stamina level. I used Mytrack mobile app to track my progress. During my test ride sessions, I found it difficult to ride bicycle with bare hands, so I had bought a new biking gloves. Within 2 weeks of continuous training and exercise, I got the confidence that I am completely ready for the cycle ride that I was planning for. 

Test rides
My biking gloves and water bottle

The Plan:

  • I had chosen March 9(Monday) as the execution date and also sketched out a very detailed plan for the ride. I ran through the plan many times in my mind to make sure that the plan would work perfectly.
  •  I read the blogs of many experts experience to get tips and to know the do's and don’ts while going for an endurance ride.
  • I have also very carefully prepared my playlist. So, that the songs give the right level of spirit and motivation that is needed at the right time during the journey. For example my first song in the playlist was ‘Singa nadai pottu sigarathil eru..’. And after 1 hour I had included some motivational songs like ' Unnal mudiyum thambi thambi' and during the end of the ride, included achievement songs like 'Evan endru ninaithay ethai kaandu sirithay' to make the ride more beautiful.
  • To track my ride, I used Mytrack mobile app.

The Execution:

 

In order to avoid the Chennai traffic I started little early from home (around 7 A.M). I perfectly worked out the plan without any deviation. So, at around 8.45 A.M I reached the entrance of Ascendas IT Park. After parking my bicycle in the same location where I usually park my Scooter. I went to the restroom, freshened up and changed my clothes. I was damn hungry by the time I reached my cubicle. I turned on my laptop to check my mails but even before the OS boots up, my hungriness made me to go to the office cafeteria to grab 4 Good day biscuits and a cup of Elachi tea.  After finishing the biscuits and tea, checked my mails and started my work for the day.

Ride Map
Ride Stats

At around 5’0 clock in the evening I began my return journey to home. I took out my mobile to start the Mytrack app, the mobile battery level was down below 20%, then only I realized that I had forgot to charge my mobile battery. I realized that with this 20% battery charge level, I wouldn’t be able to record my full return journey. For a moment I even thought I would go back to my cabin, charge my mobile and then start after some time. But, I thought about the 6’0 clock traffic in Chennai, so without delaying further, I started pedaling - compromising the fact that I may not record my full journey. I thought I could escape from traffic but even at 5’0 clock, Chennai’s traffic is very high. I somehow managed the traffic and reached home safely at around 7’0 clock.

After settling down in home, I checked the calorie meter, it showed that I had burnt more than 600 kcal because of the bicycle ride, I thought that I would lose some fat also because of this cycle ride. But what I thought didn’t happen. It was ‘Sangadakara Chatthurthi’ So, mom had prepared Kesari(A sweet). Since the Pooja was over by the time I reached home, she gave me a cup of Kesari (as Prasadham) to me. Dad to his part added 3 small sized onion samosas to my plate to show his love.  The Kesari and Samosas I consumed had easily made me gain the calories I lost in the bicycle ride :-). I was very happy that I finally executed my 7 year old desire successfully…



What is Instawiki 

A single SMS application that you need to get answer for all your burning questions, may it be a simple calculation, a statistic data, people & history, weather, music, movies, and the list goes on. Yeah we basically designed an Answering Machine SMS App which will exactly find out the answer for your questions. We used Wolframalpha.com service to find out the answer for the queries you ask.

How to use this Service

Type @instawiki your_query and send it to 92433 42000 / 92665 92665 .
Ex: @instawiki Abdul Kalam.
Above request will fetch you details about Mr.Abdul Kalam, the Great Scientist of India.

Screenshots

 

 

View on Sourceforge

 

https://sourceforge.net/p/instawiki

 

View on Txtweb 

 

http://developer.txtweb.com/apps/instawiki


Feedback

Your feedback on Instawiki (hopefully constructive) is always welcome.

Disclaimer

Developer of this application is not responsible for any wrong or illegal use of this software.

JAutoclicker is a Software for automating the mouse clicks at the positions defined by you. At most you can configure 3 coordinates to automate.

 

Features

  • Detects the coordinates of the screen.
  • Automates the mouse button actions(right click,left click,middle click,double right click,double left click).
  • Configure at most 3 screen coordinates to auto click.
  • Option to set the delay between the clicks.
  • Option to configure the number of times to click in a particular screen coordinate.
  • Option to Pause and resume the clicks at any point of time.
  • Option to Hide the application in system tray and to issue commands from system tray icon.
  • Saves the last used settings while starting up the application even after the exit of the application.
  • A rich user Interface.
  • Option to integrate external library like Jintellitype to configure hot keys.

Installation


FOR USERS: -> Download the Executable jar and double click to start.
FOR DEVELOPERS: -> If you want to add hot key to this app. just uncomment the lines in Autoclicker.java and add Jintellitype jars and dll.

Screenshot

 

JAutoclicker

 

Author

@Hariraj

View on GitHub

Feedback

Your feedback on JAutoclicker (hopefully constructive) is always welcome.

 

Disclaimer

Developer of this application is not responsible for any wrong or illegal use of this software.

Since most of the testing scenarios data are in the form of table, a Data Driven testing approach can be employed for carrying out unit testing using TestNg/Junit. For Example, Consider the example of testing a simple integer division method. 


   1:      Class Divide{
   2:        public static int divide(int a, int b) {
   3:          if (b == 0) {
   4:              throw new ArithmeticException();
   5:          } else
   6:              return a / b;
   7:      }
   8:  }

For testing this simple method itself properly, we need to test the following scenarios.


Test Case Objective

Input number 1

Input number 2

Expected Result

Zero/Zero 0 0 ArithmeticException
Zero/positive 0 2 0
Zero/negative 0 -2 0
Positive/zero 5 0 ArithmeticException
Negative/zero -2 0 ArithmeticException
Positive/positive 5 2 2
Positive/negative 5 -2 -2
Negative/positive -5 2 -2
Negative/negative -5 -2 2
No/same number 5 5 1

To test the above scenarios we have to call the same method with different arguments (something like below) or need to have different method for testing each scenario.


   1:  public class TestDivide {
   2:   
   3:      @Test
   4:      public void testDivide() throws Exception {
   5:          // Zero/Zero 0 0 ArithmeticException
   6:          testDivideByZero(0, 0);
   7:          // Zero/positive 0 2 0
   8:          assertEquals(0, Divide.divide(0, 2));
   9:          // Zero/negative 0 -2 0
  10:          assertEquals(0, Divide.divide(0, -2));
  11:          // Positive/zero 5 0 ArithmeticException
  12:          testDivideByZero(5, 0);
  13:          // Negative/zero -2 0 ArithmeticException
  14:          testDivideByZero(-2, 0);
  15:          // Positive/positive 5 2 2
  16:          assertEquals(2, Divide.divide(5, 2));
  17:          // Positive/negative 5 -2 -2
  18:          assertEquals(-2, Divide.divide(5, -2));
  19:          // Negative/positive -5 2 -2
  20:          assertEquals(-2, Divide.divide(-5, 2));
  21:          // Negative/negative -5 -2 2
  22:          assertEquals(2, Divide.divide(-5, -2));
  23:          // No/same number 5 5 1
  24:          assertEquals(1, Divide.divide(5, 5));
  25:      }
  26:   
  27:      private void testDivideByZero(int a, int b) throws Exception {
  28:          try {
  29:              Divide.divide(a, b);
  30:              fail("My method didn't throw when I expected it to");
  31:          } catch (ArithmeticException e) {
  32:          } catch (Exception e) {
  33:              fail("My method throws different Exception when I expect ArithmeticException");
  34:          }
  35:      }
  36:  }
The above approach makes the Test class cumbersome and difficult for other developers to understand the test scenarios. To avoid this, We can load the test data from an Excel/CSV/WIKI and validate the output instead of running the same TestNg/Junit test method with different inputs. And also this helps in the Documentation of the test cases that we have already identified and tested.

Proposed Method :


   1:  @RunWith(Parameterized.class)
   2:  public class DataDrivenTestsWithSpreadsheetTest { 
   3:   
   4:      private int a;
   5:      private int b;
   6:      private int aDivideB;
   7:     
   8:      @Parameters
   9:      public static Collection<Object[]> spreadsheetData() throws IOException {
  10:          InputStream spreadsheet = new FileInputStream("src/test/resources/aDivideB.xls");
  11:          return new SpreadsheetData(spreadsheet).getData();
  12:      }
  13:   
  14:      public DataDrivenTestsWithSpreadsheetTest(int a, int b, int aDivideB) {
  15:          super();
  16:          this.a = a;
  17:          this.b = b;
  18:          this.aDivideB = aDivideB;
  19:      }
  20:      
  21:      private void testDivideByZero(int a, int b) throws Exception {
  22:          try {
  23:              Divide.divide(a, b);
  24:              fail("My method didn't throw when I expected it to");
  25:          } catch (ArithmeticException e) {
  26:          } catch (Exception e) {
  27:              fail("My method throws different Exception when I expect ArithmeticException");
  28:          }
  29:      }
  30:   
  31:      @Test
  32:      public void shouldCalculateADivideB() {
  33:        if(b==0){
  34:            testDivideByZero(a, b);
  35:        }
  36:        else
  37:            assertEquals(aDivideB, Divide.divide(a, b));
  38:      }
  39:  }

Advantages: 
  1.  Adding new Test scenarios is easy as it requires just adding a new row in the excel/csv/wiki.
  2. Helps in the documentation of the test cases that we have identified and tested.


To make this work, the following condition has to be satisfied.

1. Your external Non –Drupal PHP website should also be in the same domain or subdomain as your Drupal website. For Example if your Drupal website is hosted at www.example.com then the Non Drupal website which want to use drupal login to act as a single sign on option should be hosted at some address like www.example.com/nondrupalswebsite or www.nondrupalwebsite.example.com

2. You should have access to the Database where your Drupal site is pointing to. At least you should have access to User and Sessions Table of Drupal’s DB.

If you satisfy the above two conditions you should be good to go.


   1:  if(isset($_COOKIE[SESS67bbc1042a258ec17b55d8d15be4f563]) &&
   2:   isset($_COOKIE['DRUPAL_UID']))
   3:  {
   4:      
   5:      $sessionsql="select sid from sessions where sid='"
   6:  .mysql_real_escape_string($_COOKIE['SESS67bbc1042a258ec17b55d8d15be4f563']) ."'
   7:   and uid='".mysql_real_escape_string($_COOKIE['DRUPAL_UID'])."'";
   8:      $db_connect = mysql_connect($db_host, $db_username, $db_password);
   9:      mysql_select_db($db_name, $db_connect) || die(mysql_error());
  10:      $result                    = mysql_query($sessionsql) or die(mysql_error());
  11:      $found    = mysql_num_rows($result);
  12:      if ($found) 
  13:      {
  14:          //$sql="SELECT * FROM employment_v where uid=".$_COOKIE['DRUPAL_UID'];
  15:          //Logic to use drupal’s user registration info in your site may go here.
  16:      }
  17:  }

 In the above code snippet, you can see an extremely long cookie name ($_COOKIE[SESS67bbc1042a258ec17b55d8d15be4f563]). This is the name of the cookie where the drupal’s session would be stored. Each drupal site has a unique session name associate with it. The value of the session id can be got from this. In my case SESS67bbc1042a258ec17b55d8d15be4f563 is the drupal’s session name for my site. If you want to find the drupal cookie session name of your website you can use tools like firecookie or inspect the cookie stored in your browser.

The logic of the code snippet is whenever a user has been logged in to druapl site, Drupal would store minimum two cookies in browser. One is session value which I have mentioned earlier and the other is drupal id (a unique id to identify the drupal user). And also it makes an entry in the session table with the session id and the drupal id. The entry is deleted when the user is logged out. Hence querying this table with the session id and the drupal user id would tell us whether the user is authenticated or not.
Have the above logic to authenticate the user in a separate PHP file and include the PHP file in the pages that can be viewed only by authenticated user.

I hope that this would have helped. If you feel that this can be done more efficiently, kindly let me know through your comments. Thanks.

1. Firebug: A Firefox plugin that allows inspect, edit and monitor CSS, HTML, JavaScript and Net requests in any web page.

2. FireCookie : An extension for Firebug that makes possible to view and manage cookies in your browser.

3. FireShot : An Add-on to Firefox that creates screenshots of web pages entirely. The captures can be quickly annotated.

4. Page Speed :  An open-source project started at Google to help developers optimize their web pages by applying web performance best practices. If you are a Performance-minded developers and evangelists then this is a must have tool.

5. YSlow :  An Add-on for Firefox that Analyses web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.

6. Selenium IDE : An integrated development environment for Selenium scripts that is implemented as a Firefox extension, and allows you to record, edit, and debug tests.

7. Page Ruler : A lightweight ruler to measure web page elements.

8. MeasurIT : Draw a ruler across any webpage to check the width, height, or alignment of page elements in pixels.

9. FireFTP : A powerful FPT client in one tab, your work in another. Sometimes the simplest solutions can be profoundly useful. (Note: Does not as yet support SFTP).

10. FireSSH : A free, cross-platform SSH terminal client for Mozilla Firefox. Written entirely in Javascript!

11. ColorZilla : This extension allows you to pick colors from the web, paste the hex code into other programs, zoom in on pages, measure distances and utilize a built-in pallet browser. A must-have for any web designer.

12. IE Tab : Embedding Internet Explorer in tabs of Mozilla/Firefox

13. Web Developer : The Web Developer extension adds various web developer tools to a browser.

14. HTML Validator: Displays the number of found errors of the site you are viewing. It adds HTML validation inside Firefox and Mozilla.

if you feel that some other tool can also be added to this list then kindly comment below. i will update it.