6

i adore compiler based programmers. yesterday i changed a bit of python code without being able to run it only to find out later i wasn't even able to spell True and False correctly.

Comments
  • 1
    Is there no unit test that should have caught that?
  • 5
    @alexbrooklyn "Not since the QA department was replaced by our clients, no"
  • 5
    Oh I'm a compiler based programmer!
  • 4
    What about using a linter?
  • 0
    @sbiewald not in np++ in a totally non dev environment
  • 0
    @ScriptCoded sorry not a native speaker. what would be the better term?
  • 0
    I also curse python often for that very reason.

    One thing I use with some software is pre-compiling my code before depolyment. Catches a good portion of errors that would'be been only caught when your file would'be been imported for execution.

    There is a preinstalled module called py_compile. It basically creates the .pyc files you get in __pycache__ or whatever that tmp directory is usually called. Just run the function compile on your files to test them.

    I even have a script that compiles all files with that and replaces all .py files with .pyc files. Sourcecode is kinda obfuscated, comments gone and you can run everything the same.
  • 0
    thank you for the suggestions. i was unclear: i could not run the script to test it because lack of python on the computer. later at home the linter cried a bit.
Add Comment