Developer’s best practice for any project

Developer’s best practice for any project

PRACTICE IS A HABIT, ROUTINE OR ANYTHING THAT COMES BY PRACTICING. ONE OF THE BEST PROPERTIES OF PRACTICE IS THAT IT FORCES YOU NOT TO DIVERT FROM WHAT YOU USED TO DO.

Through this small article I am going to tell you some of the developer’s best practice for any web projects or software development, that can give you best results if you follow them with discipline.

Keep reading existing source code and keep practice writing them

Everyone read newspaper, article, junk writing here and there but nobody likes to read code written by others. Only few developers read others code because understanding others code is the most boring task. If you want to become a movie script writer, can you start writing good movie scripts until you have gone through various good movie scripts? So in a same way if you want to good programmers than you must go through the source code written by some good programmers. Reading source code written by others gives you opportunity to criticize the mistakes done in writing that code. You will be able to identify the mistakes other software developers have done in their source code which you should not repeat.

There are many attributes of software codes (indentation, comments, history header, function structure, etc.), which you will learn by reading existing code, specially, a code written by well-experienced software developers. Spend some time in reading others’ source code and I’m sure you would be able to write BEAUTIFUL source code in few days or few weeks and you will be able to fix the mistakes, which you were doing so far in writing the source code.

One thing to experiment, just go in the past and check the code you had written few years ago, you will definitely laugh….because you are always improving by doing practice.

Documentation is key, never ignore it.

For the best developing practice you should complete all required documents and appropriate approvals before proceeding for software coding. Keeping documents electronically doesn’t increase your project cost so why not start keeping soft documents for each and every projects.

Following defined structure is always better than creating the new one

Most of the software developing organization have their own standards created by experienced software programmers. If you are one of such organization follow them, else search the suitable standards from the internet for your project and follow them. Always keep your source code beautiful , consistent and clean so that others and you too can understand those code in future reading.

 

Always write code to be reviewed

While you are writing code for your project always keep in mind that your source code will be reviewed by other programmers and you may have to face some criticism on bellow one or many but not limited to points.

  • Poor error handling
  • Repeated code
  • Allocated memory not released
  • Too many global variable and hard coding
  • Slow performance

Always accept criticism but don’t criticize back. While writing code always think as a tester to make it bug free and give challenge to tester.

Testing is mandatory

It is necessary to test your system after every small bug fix or change in code. When you find bug in your system.

Keep your documents and code safely

If you want to be smart developers then always keep habit of backup your code and documents safely, otherwise when your machine crashes you may get crashed too. J Also be sure that multiple copies created confusion so avoid making so much copies and if you need different version from different time try to keep it in proper order.

“Leave your ego behind and always be eager to learn ”

Library module error on fedena

Library module error on fedena

Have you installed library module in fedena and have stocked in this error.

In Student Profile, When you click on library in More (Menu) is this error appearing in your application. If so then there is a slight code change in library controller to fix this.

Navigate to library module /app/controller/library_controller.rb

Find this function at line 194

def student_library_details

some codes here

def

Now just make changes for two lines and get everything fixed .

def student_library_details

@user = User.find_by_username(@student.admission_no)
@reserved = BookReservation.find(:all, :conditions=>[“user_id = #{@user.id} “])
@borrowed = BookMovement.find(:all, :conditions=>[“user_id = #{@user.id} and status != ‘Returned’”])

def

Is your problem solved now.

If you are still getting problem or have any better suggestion please drop your line on comments.

Happy coding 🙂