{"comment":{"url":"https://api.github.com/repos/rrlkwt/Project-Euler-solutions/comments/30729055","html_url":"https://github.com/rrlkwt/Project-Euler-solutions/commit/d12c626c85d64e7c8a9daea1adb087bbe9efc182#commitcomment-30729055","id":30729055,"node_id":"MDEzOkNvbW1pdENvbW1lbnQzMDcyOTA1NQ==","user":{"login":"nayuki","id":672172,"node_id":"MDQ6VXNlcjY3MjE3Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/672172?v=4","gravatar_id":"","url":"https://api.github.com/users/nayuki","html_url":"https://github.com/nayuki","followers_url":"https://api.github.com/users/nayuki/followers","following_url":"https://api.github.com/users/nayuki/following{/other_user}","gists_url":"https://api.github.com/users/nayuki/gists{/gist_id}","starred_url":"https://api.github.com/users/nayuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nayuki/subscriptions","organizations_url":"https://api.github.com/users/nayuki/orgs","repos_url":"https://api.github.com/users/nayuki/repos","events_url":"https://api.github.com/users/nayuki/events{/privacy}","received_events_url":"https://api.github.com/users/nayuki/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"d12c626c85d64e7c8a9daea1adb087bbe9efc182","created_at":"2018-10-02T06:28:31Z","updated_at":"2018-10-02T06:28:31Z","author_association":"NONE","body":"You wrote in the commit message:\r\n\r\n> All these extra lines are absolutely useless, if you remove them it takes the computer less power to process them, and it makes your code look more elegant.\r\n\r\nBut you missed the fact that it is a framework used by the auto batch test program: https://github.com/rrlkwt/Project-Euler-solutions/blob/master/python/eulertest.py\r\n\r\nThe tester calls the `compute()` function of each problem solution. The `if __name__ == \"___main__\"` ensures that the solution program will print the solution if run as a standalone application, but will not print if called as a library.\r\n\r\n> All these extra lines are absolutely useless\r\n\r\nUnnecessary harsh tone without understanding my work.\r\n\r\n> if you remove them it takes the computer less power to process\r\n\r\nIf you don't use Python, it takes the computer less power to process. Worrying over the microseconds to process a few statements is folly. My Java solutions are 10 to 100× faster than Python. https://www.nayuki.io/page/project-euler-solutions#benchmark-timings\r\n\r\n> it makes your code look more elegant\r\n\r\nI strive to make my code elegant and functional. These goals necessitate tradeoffs, but I lean more towards elegance than the average programmer.\r\n\r\nThe way you wrote your code is definitely how I would write a standalone, one-off script to solve this Project Euler problem. But again, I have the auto tester program which calls hundreds of solution programs, and the framework is necessary."}}
{"actor":{"display_login":"nayuki"}}