(gdb) break *0x972

Debugging, GNU± Linux and WebHosting and ... and ...

Would I be happy to study/debug/extend your code?

(lines starting with a @ are personal feeling, the others not so much, I hope)

The higher the best, positive ranks look like quality code.

Versioning

  • Do you use a versioning system (git, svn, cvs, ...) no=-15

  • If no, will I come to work at your desk? no=-15

    • that means email file sharing ... :-(
  • @Do you use GIT? yes=+15

  • Do you commit feature by feature? yes=+20

    • git blame is documentation!

Coding Style

  • Is your code steadily indented? no=-30

    • Python devs, skip this question ;-)
  • Is your code well spaced? no=-30

    • no doubles spaces --except indentation--, no (␣ or ␣), always ␣=␣, ...
  • Are all (max 2-3) variables more than 3-letter long? no=-15

  • Do you follow the same coding convention all over your code? no=-10

  • Do you follow an official coding convention all over your code? yes=+30

Coding

  • @Is it C/Python/LaTeX code? yes=+10
  • @Is it PHP or JS code? yes=-10

  • Do you have functions with more than 30 parameters? yes=-30

  • Do your functions have in average <6 parameters? no=-15

  • Are your function bodies < one screen of LOC? no=-15

  • Can I easily spot copied-past-adapted code blocks (<3 LOC)? yes=-5 per block

  • Can I easily spot duplicated code blocks (<3 LOC)? yes=-10 per block

    • if (test){do_a;do_z}else{do_c;do_z}

System

  • @Do you use a Linux/Unix-based OS? no=-40

    • I will not be able to use most of my favorite tools!
  • [if applies] Do you have a build system (Makefile)? no=-30

  • Can you compile in an (external) build directory? yes=+20

  • Are all of your source files text-based? no=-20

    • I can't grep, diff, ... in OpenOfficeCalc for instance
  • Do you have unit tests/non regression testsuite? yes=+30

Tuesday, December 09, 2014 - No comments

Publié dans :