Friday, 27 May 2016

Good Programming Practices

One thing that I felt was lacking in the courses in bioinformatics that I attended was how to write clean and easily readable code. Although the course "Applied Bioinformatics" touched upon the subject, I feel like it would be a good idea for me to read up a bit on it. Whilst searching for somewhere to do this I found "The Hitchhiker's Guide to Python" which is a site describing best practices for many different aspects of Python, from installation and configuration to daily usage.

I started with reading through the part regarding which version of Python to use, having a look at some of the links as well, and I concluded that the best thing for me would be to use Python3 rather than 2.7. I reached this conclusion mainly because although I first learnt Python in 2.7, I don't feel like I have a great attachment to any particular version, and I'd rather work with the version that is part of the future rather than the past.

I then moved on to the part called "Writing Great Python Code". Although a lot of this section was quite technical and perhaps more directed to people with a background in computer science, I found much of the information really helpful, especially the part on code style. I think the main thing I should focus on as a novice should be to keep my code as simple and readable as I can, and this site gave a lot of good examples on how to do that.

The next step for me will be to start writing some code. I'll start with trying to solve some simple tasks while keeping what I have learned about writing good code in mind and then I'll move on to working on more advanced problems.

No comments:

Post a Comment