Showing posts with label Software Engineering. Show all posts
Showing posts with label Software Engineering. Show all posts

Saturday, February 18, 2017

Tech Humor - A Programmer's Revenge, Deal With Frustration At Work

Hello, this is bit different blog post. Usually I write blogs on very serious stuff like solving coding issues and about technologies and careers and about latest trends on IT industries etc. Now I feel that my blog is becoming very serious so I decided to write some blogs on lighter notes. Now you will read about funny things happened while working on projects some practical jokes on programming and all. I short I am going to add bit humor on my blog. In this first post I am going explain how I took revenge on end users of my projects.



A Programmer's Revenge


A programmer is a person who is working all days long in front of computers. He has to deal with all kind of annoying stuff like funny and impractical demands of customers, anger of his boss, anger of tester, humiliation from boss and team leaders or may be from co workers. A programmer deals everyday with these and more of the other things like.

  • Sudden change in requirements
  • Rewrite entire code again
  • Work rejected by client or team leaders
  • Do extra work without any rewards
  • No credit on successful completion
  • Tight deadlines or change in deadlines
  • No help from co workers of leaders
  • No motivation from boss and team leads
So in short a programmer is always in frustration most of the times and eager to take revenge but can't do that as he is afraid of loosing job or cut pay  etc. So here are some funny ways you can take out your frustration and nobody will notice it and still you will have some kind of satisfaction that you took revenge of all the humiliations, frustrations, disappointments etc.


Add Some Funny Comments and Lines in Code


This is the most hidden way to take out your frustration as no one els is going to look at source code except you and your team. Most of the time client is not going to see the source code so they will not read comments. Here are some example of comments I have used while I was working on projects to take out my frustration.

//Function : Name of Function
//Author : Hiren Dave
//Description : Use it at your own risk. Do not come to me crying if it crashes

Exception exp = new Exception("Some idiot entered wrong data");
throw exp;

if(!isNan(maxSalary)){
      //God has given brain to all human but some idiots still enter wrong data so we have to check.
       alert('Invalid Salary.');
       return;
}

//What's in the name? Yes everything is in name. It is necessary.

//I can't take it anymore I am exhausted, will fix it later.

//I just don't know why I am writing this code. It's unnecessary but it's part of my job so doing it.

So yes these are some comments I used over the time to take out my frustrations and took my revenge. You can also try this, it will surely help you to manage with your anger and frustration.

Play Shooting And Fighting Games


This is the other way I took out my frustration. Whenever I am frustrated and angry I play shooting and fighting games and squash the opponents in games to release anger and took my revenge virtually in games. Games really help in this matter as you are just hurting virtual characters in games. Here are some games I play for sometime to take out my frustration.

Whack Your Boss
Desert Rifle
Street Fights


These ways you can took your revenge and can deal with frustrations. Hope this helps you.

Wednesday, February 15, 2017

Copy Paste - Blessing or Curse for Developers

Let's start this blog by asking a simple question to yourself.


Are you a Copy Paste Developer?


Most of the readers who are reading this post, will answer Yes for this question. We all are copy paste developer at one time. I am also a copy paste developer. I usually copy paste some lines of code from my old projects or from some blog post or from the StackOverFlow. All the developers to that at one point of the time. We do this to save our time and efforts. 

So now the questions are Does copy paste always works? Does it make your code better or worst? So in short it is blessing or curse for developers. 

Well, I would say that if you copy paste and do it wisely and with proper understanding then it's really a blessing for you but if you do it blindly you could end up in disaster. It will introduce so many other bugs in your code and eventually you have to start from scratch. 

What are the Good Things about Copy Paste?



Being a copy paster programmer at some time I would say in most of the cases copy paste is good for the developers. You don't have to rewrite entire code once again. With copy paste and little changes you can solve your problem easily. It saves your time and efforts and can solve your problems easily. 

I would like to share my experience here. When I started working on creating iOS app, I was not having enough knowledge of Objective C and all and still I created a full fledge iOS application with Copy Paste. I was working on application for motivational speaker. The requirement was to create app to list lessons of speaker and when user tap on lessons show details of lesson with videos and picture gallery. So what I did is I found open source application for food recipes. Application was very similar to what I was looking for. First of all list of recipes and then details of recipe. So I copy paste the code with views and controllers and all and instead of recipes, put motivational lessons and bingo the app is created. So here copy paste was blessing for me. I created entire IOS application in a week and with much less efforts.

So copy paste is always blessing for developers but you have to make sure certain things while doing copy paste. 

  • Understand the code which you are copy pasting
  • Modify it as per your coding standards and as per your code logic
  • Check for errors in the code before copy paste
  • Do testing after copy paste
  • Write comments in your code after copy paste

What are the Bad Things about Copy Paste?


Copy Paste could be disaster for your if you just do it blindly and you do not try to understand what you are copy pasting. Everyone copies code from StackOverflow or other forums from time to time. Hopefully, you do it sensibly, using it as a starting point for your own production code — working through what you’ve just pasted in to understand it, experimenting with it, modifying it, making it fit for your purpose rather than just blindly copy-and-pasting random code from the internet. It's possible that code which you are copy pasting may have errors or may have entirely different purpose than yours. So it can cause issues in your code and can break your code. 

So I would say only one thing, understand the code which you are planning to copy paste and then copy paste it. 

So it's up to you to turn copy paste into blessing or curse. If you do it wisely, it will always be blessing and there are very rare chance that it may turn into curse for you.

Sunday, February 5, 2017

Why I Rejected A Project Manager With 10 Years of Experience

Recently we were hiring a project manager for our company. We scheduled interviews for few candidates. There was one candidate having 10 years of experience in project management. His skills were good, he has good experience of handling mid to large projects and have worked with small to medium size team. Everything was good. I almost make up a mind to hire him but later he said something which screwed up all the things and that is.

I WILL NOT WRITE A SINGLE LINE OF CODE


That is something I feel that a manager should not do particularly when you are working with small or medium size team. I understand that a job of project manager is to manage team and setting up goals and lead the project from start to end. The main job of an engineering manager is to grow their team - by hiring good engineers and by helping each existing engineer on their team become a better engineer.

But what I feel is when you are working with small or medium size team, as a project manager sometime you may have to participate as programmer and help the team and team members. I have been working in IT industry since last 10 years and during that time I have evolved from being a developer to project manager but I still write codes while managing projects and you have to do it sometime. Particularly when you don't have efficient team members. For example once I faced this situation. There was project with tight deadline and my most experienced developers quit the job and I was not having any option to replace them immediately but the deadline is deadline, you have to deliver. You can not tell client that I don't have resources. So at this point a project manager has to act as programmer and finish the job. 

Also sometimes there is a situation due to security reasons, you are not allowed to expose source code to team members or you don't trust your team members so in in this case you have to write a code and make the necessary changes.

Also as a project manager, you have to review and correct code of your team members and this sometimes you have to do it. You can not always ask team members to correct it. Sometimes they don't understand verbal communication, you have to show them example by writing code and show them. 

Coding cannot be the primary activity of the development manager. However, development manager capable of coding influence team members much better than those with no coding skills. In smaller teams, manager should be able to review and correct the code. If required, manager should be able to write a small portion of the code.

So in my opinion, I would prefer to have project manager with coding skills and IT background and if required he shall be able to write codes and explain to team members. He should be able to manage project in difficult times like lack of resources and tight deadline. This is my opinion you may have other opinions about this. Do let me know if you have anything to add to this.