robinandeer / software-development

General guidelines and style guide for software development
http://www.robinandeer.com/software-development/
1 stars 0 forks source link

More Python best practises #4

Open robinandeer opened 9 years ago

robinandeer commented 9 years ago

Steal stuff from @guillermo-carrasco:

https://github.com/guillermo-carrasco/BestPracticesWorkshop/blob/master/DOCS/styling.md

robinandeer commented 9 years ago

Well at least I started... :dizzy_face:

This is a lot more comprehensive than I first imagined :smile: (even if some examples are just copied from the official PEP8 proposal).

guillermo-carrasco commented 9 years ago

Most of them are! Why to change something that is good :-P

robinandeer commented 9 years ago

Well I guess it's just my obsession with the DRY principle, hehe :sweat_smile: Copy-pasting content when I feel like I could link to the original source doesn't come easy.

guillermo-carrasco commented 9 years ago

That is very true :-)

Is just that I wanted a reduce subset of PEP8, not the whole thing, basically for two reasons:

  1. I don't completely agree with the whole PEP8
  2. For the aim of that course, I thought it was better to have those styling "rules" summarised with the rest of the course material

kudos for this repo!

robinandeer commented 9 years ago

Thank you!

It did make more sense in context of the course to aggregate the PEP8 subset in a single document, I agree. For this project it would be better to accept PEP8 completely with some clarifications I think.

If you have time I would be interested in what points you disagree with PEP8?

guillermo-carrasco commented 9 years ago

hmm okay I'm going to be honest here: I may have read PEP8 rule too long ago, because I read them back now (to answer your question) and... well basically I agree on everything. Or at least it is how I think I code so... nah, forget my first point! (the second one still holds though)

robinandeer commented 9 years ago

Memories of the course are starting to come back to me... For example @vals talking about how he used to go over his code replacing all list comprehensions with generator comprehensions. That made a big mark on me.

BTW: can I find this document, mentioned in the README, somewhere? "Development workflow at Science For Life Laboratory"

guillermo-carrasco commented 9 years ago

Yeah I just pushed a commit fixing the broken link link. Here you go