Skip to main content

As a developer, what offends you the most?




As a developer, the most toughest thing that I found was to read other people’s code. And I think if you want to learn quickly and with less harm to your brain work, then read other people’s code. And I think that’s the best thing in programming community, We share our work too much, there are so many open source work, that you can look at.
Please write smaller functions
So while reading other people’s code, what I find most irritating is when people write larger function, recently I had to find the bug in a project that had more than 50 modules, each modules could have been created easily, but lack of pre-planning or lack of experienced programmer made it worse. There are some functions which 200 lines long.
Use loops or separate function to avoid repetition in your code.
The person who writes same code again and again is not a proper programmer or not a professional at all. People don’t use loop, instead using their brain to find a short code for a large problem they tend to start without contemplating, and result a buggy code, and complex also. Repetitive task and all. which also generates larger functions.
Variable Name
This doesn’t bother me much, but still of people will write correct names of the variable other person will be able to understand your intention of declaring that variable by just declaring the name.
for ex-
all_employees
former_employees
makes more sense than
a_emp
f_emp
although I myself write second one most of the time, but that’s not a good practice.
Try and catch can solve a lot of time
I don’t know why still so many people while writing OOP method, they don’t use try catch. And most of the time it hurts when you find such functions in REST Api’s because in that case you don’t find visuals. well Postman gives you the visual of the error. but why bother if you can find the reason of problem by just adding four more line to your code.
try{
}catch(Exception e){
print(e->getmessage());
}
There are more, I can write book on it, and I think I should :P
Happy coding ;)

Source- My quora

Comments

Popular posts from this blog

Wallflower's Diary 1

I like people laughing. I like people smiling. I like everyone around me to stay happy. It bothers me most of time when I see anyone struggling with their fate. Usually its hard to keep everyone happy. But It is possible to keep them satisfied. satisfy every one by truth and right that's what I think is an easy task to do.                      It become easy to stay happy when you attach your happiness with others. Then not only you , but everyone around you will help you to keep you happy, cause they will work for keeping themselves happy. World would have a better place without jealousy , money , greed . We all know this still we are unable to detach ourselves with these things. Anyway never stop hoping. Cause that is the only tool we got to face uncertainty of world. We all knows that money is not going to help us fighting with our future problems. May be for a while money will work , but later we need people to help us. Its ne...

StartUP

                                               StartUP Here I am Nitin Tiwari again for sharing some of my experience. Well for your kind information I am not that much experienced. I am just 19 years old but as Steve Jobs Sir says that age is irrelevant to experience. You gain experience by mistakes and events you encountered. And age is a thing you cannot control it will keep running until death will put a full stop at the end.                                                                             So this time I am thinking about my start up. I haven't started up yet. I am working under my father right now. But now I do 30 percent of his work, like i look after his shop...

Daughter is a daughter till the end of life

                        Each Girl deserve to live free A saying has became very famous "Son is son till he gets his wife, daughter is daughter till the end of life." We all have heard lots of things about humiliating behavior of men towards women/girls. First of all I would not declare them men although , but sometimes god also do mistakes. What kind of mentality those people have who doesn't understand a girls's importance to us.                                                                                   I don't need to explain anything, all of us knew the importance. From our birth to death girls make a great role. We get birth from our mother and after death the person who bury or burn us also took birth from ...