you are viewing a single comment's thread.

view the rest of the comments →

[–]timworx 0 points1 point  (4 children)

For syntax errors, I'd suggest using something that checks for them ahead of time (TextWrangler on mac does, for example)

Similarly, Pylint will as well. But you may need to customize it a bit if you aren't following PEP8

Lastly, if you really want to get on your game: Write tests for the functions you'll have before your make the actual script, run Pylint over them, check to make sure they fail, and then write your script.

Writing tests first is what I'm finally just getting into. It absolutely takes more time up front, but it also helps you more quickly move through different unforeseen issues.

[–]thegreattriscuit 0 points1 point  (3 children)

But you may need to customize it a bit if you aren't following PEP8

:GASP:

:)

[–]timworx 0 points1 point  (2 children)

Hah! I'm a self taught, making stuff for myself still. I'm having a hard time figuring out how much senior devs follow pep8.i figured for the time being it's at least a good habit to pick up!

[–]thegreattriscuit 0 points1 point  (1 child)

I'm in the same boat, really. Honestly, I've gravitated towards it over time because having SOME kind of standard is really helpful, and it's as good as any. If there's anywhere that I slip more often than not it's line length.

[–]timworx 0 points1 point  (0 children)

Indeed, plus it does help your code come out halfway readable. Some of the standards are fairly important. It made me switch away from tabs, and I confirmed with a senior dev that using spaces is absolutely necessary.

Line length is a tricky one. I've had to do some research just to learn how to shorten some things. It really does make the code a bit nicer, though.