Author Topic: [Python] Looking For Some Good Examples  (Read 15369 times)


  • Rogueliker
  • ***
  • Posts: 259
  • Karma: +0/-0
    • View Profile
    • pyherc
Re: [Python] Looking For Some Good Examples
« Reply #15 on: February 19, 2016, 09:44:53 AM »
Probably I'm not the best person for judging the code - as I said in my first post, I started new project recently just for learning 'good coding' techniques. I'm not the python guru - these roguelikes which was generally mentioned earlier usually have code that looked very bad at / from first glance. You know, Writhing Mass of Code :) But if you want to I could give a glace at pyherc code, no problem.

It would be great. Especially since you aren't a Python guru. My hunch is that it's easier to write code that is readable by very experienced programmers than by not very experienced programmers. And different set of eyes is always a different set of opinions and ideas, which is what I'm really after. If you're willing, there's also some ramblings at: where I tried to maintain more or less up to date documentation about overall structure of the code and various parts.

Not claiming to be the best person for the job nor claiming guru status, when it comes to Python I consider myself a journeyman/retired hobbyist.  However, I dropped by your repo and poked around. 

I liked what I saw.  Good commenting, seems to have good test coverage, the unit tests looked useful, the code base is organized, and it uses good solid Pythonic practices as far as I can see.  If I spent enough time I could probably nitpick something :)  There was nothing that jumped out at me as being "NO! WRONG!".  All in all, looks better than some of my own work.

Thanks, it's always nice to hear that your codebase isn't an eldritch horror :) There's always something that can be done better of course, but it's good to keep those things as small as possible.

PS: couple of suggestions to consider; you might want to include the target version of Python in the file header info, and along the same lines, you might want to note somewhere a new Python programmer might see that the .hy files are for the lisp extension.  Newcomers probably aren't aware of the various add on file extensions that they might run across, pyx files, hy files, etc.

Right, good call. The project probably isn't the easiest to start hacking because of all different file types and such. I'll write an extra paragraph in readme for things like that.
Everyone you will ever meet knows something you don't.
 - Bill Nye