4 ms·
I think Excel has something to do with it. In Excel, you're usually forced to do computations in small steps and look at the intermediate results. In traditiona
by civilized 5y ago
I think Excel has something to do with it. In Excel, you're usually forced to do computations in small steps and look at the intermediate results. In traditional coding, you don't see anything but the final result (unless you ask to see it). It's much easier to assume everything is working as intended when it's not.
Excel has its problems too. Different tools for different jobs. Tech boosters need to understand this and not just cynically assume that spreadsheet lovers are old fogeys who are afraid of their jobs being automated away.
- catgary 5y agoI think you’re just describing poor coding practices
- dkersten 5y agoCertainly if you do traditional TDD or something like REPL-driven development, you see the intermediate results and validate the correctness of your code as you go.
- civilized 5y agoThose are great! But they are coding disciplines one must choose to follow, and continue following every step of the way. You aren't inherently following them because that's how the tool works. Sometimes the tool-enforced discipline has advantages.
- cpeterso 5y agoHow would one write tests for a complex, mission-critical Excel spreadsheet? Or use version control? Spreadsheets often mix the data and code/formulas and the formulas are hidden behind the sheet view and sprinkled across many cells. At least Python scripts separate the code from the data so you can write tests using known good or fuzzing data. And you can use version control to track and review code changes.
- civilized 5y agoI agree that, in the hands of a hypothetical ideal person, Python should be better than Excel for almost everything. But as my story above shows, even people you'd expect to be experts, seemingly following best practice, don't end up being very close to this ideal person.
- catgary 5y agoHonestly, your story just indicates that someone senior needs to have a discussion with the applied mathematician about their coding practices (and they may even need a bit of training in that regard).
- civilized 5y agoHis code style is fine. His problem is that he is short on the discipline and focus to validate his results in meaningful ways. An exhortation to follow some vague "coding practices" won't fix that - he'll respond e.g. by writing lots of tests, none of which catch the problem his code actually has. The two ways I know to get correct work out of him are (1) review it and kick it back to him when problems are found, (2) have him implement what he's trying to do in Excel.
- catgary 5y agoIt just sounds like he was never actually trained to program, and letting these bad habits persist isn’t doing him any favours.
- civilized 5y agoI'm not sure I understand the idea that people who are "trained to program" manage to avoid these mistakes. What specific bad habits do you think can be addressed? I know it's hard to diagnose anything from some forum posts, but I'll take your speculation as to what he should maybe work on.