+ 1
I was rated 5 out of 10 for this code
Any feedback for this code of odd even printing using two threads? I discussed initially and got feedback that it is only worth of 5 out of 10. Feel free to share your suggestions to improve this code. https://sololearn.com/compiler-playground/cY6n1J39OmTj/?ref=app
3 odpowiedzi
+ 1
Any point is fine. Code readability, code quality, performance enhancement etc.
One point I got is the functional paradigm and global variables. It could have been avoided
+ 1
it feels over-engineered for such a simple task. But for demonstrating thread synchronization, i think it's ok..
maybe it was rated by people who were taught using namespace std is bad. I have no problem with it. For small demo scripts, I feel it reduces the visual clutter and improves readability. Just as long as one is aware that it's a footgun for bigger codebases.
as for it being functional, it's actually a plus for me. OOP is overused and adds a lot of unnecessary boilerplate. Functional and imperative styles go straight for the problem.
0
What's the criteria?
Improve in which direction?