-
Notifications
You must be signed in to change notification settings - Fork 53
Code review #15
Comments
No, it wasn't helpful. And I wonder why spending your time doing that? :) 'a "perfect" team, that followed all these good design principles and practices' would be code oriented more than business oriented with all the consequences. Feature quality is incomparably much more valuable. Personally I wouldn't suggest anyone to become part of code oriented team. Everything is measured by result. And I consider as good code the one that has created a good feature, not the one that just looks shining. Do you advertise an automatic code brushing solution or want to help making code better? I am for it. :) I don't mind to have shining code after all, if it doesn't steal feature development time. Or you JUST pointing out that the code is not perfect, because you could write better? :) |
No, it wasn't helpful. And I wonder why spending your time doing that? :) I consider as good code the one that has created a good feature, not the one that just looks shining. Do you advertise an automatic code brushing solution I'll be back (but with some code metrics of your solution) :) |
More to add. |
Well, great! I see that you are very knowledgeable in code quality area. And I see that you really want to help, not just to ridicule. And since this is open-source project, you can make your contribution! Next time you have a half of hour to spend around this code, please improve a function or two. Please don't forget to run the tests, they are in "test_*.sh/bat" |
Default pylint config shows the following: |
Hey guys!
Some time ago I asked a question to myself if there was a "perfect" team, that followed all these good design principles and practices.
So I decided to do a small research/comparison of the code quality of open-source code of different large, well-known companies like Microsoft, Intel, JetBrains and etc.
I just want to know where is the best place to work from the perspective of good software design.
I want to give some feedback on your code.
Taking into account that there are some stars and forks of your repository I assume the product itself is useful and investing time into its quality and design will give you lots of benefit, flexibility and etc.
I believe my criticism should have some positive results :)
I was really execited to read some of you code, examples:
https://github.com/01org/IntelSEAPI/blob/master/runtool/sea_runtool.py
https://github.com/01org/IntelSEAPI/blob/master/runtool/importers/osx.py
https://github.com/01org/IntelSEAPI/blob/master/runtool/importers/etw.py
https://github.com/01org/IntelSEAPI/blob/master/runtool/importers/pprof_importer/profile.py
https://github.com/01org/IntelSEAPI/blob/master/runtool/decoders/SteamVR.py
https://github.com/01org/IntelSEAPI/blob/master/runtool/decoders/MSNT_SystemTrace.py
https://github.com/01org/IntelSEAPI/blob/master/sea_itt_lib/sea_itt_lib.cpp
https://github.com/01org/IntelSEAPI/blob/master/sea_itt_lib/ETLRelogger.cpp
...
So, just after opening these files I got a sense that you, guys, totally ignore some basic principles of software design - naming, code splitting and etc.
Just looking at filesizes I understand that something goes wrong here. Most functions span hunderds of lines! (at my work, I write functions of up to 20 lines of code, no more, on daily basis and I believe there is no problem splitting them into the smaller ones, no matter what programming language do you write code in).
There is no common code style (this is most noticable in C++ code, there I see inclusions of c-like code with a mix of code contating higher-level abstractions).
Doing some very simple refactorings like extract method, decompose conditional, rename variable, rename method, convert method to method object can significantly improve the quality of code.
I do really recommend you reading some related literature to find info on the topics like:
Code Smells, Refactoring, SOLID (especially SRP, OCP), KISS, DRY, GRASP, Code Complexity, Code cohesion, LCOM metric.
Something below can help you:
https://refactoring.guru/en
https://martinfowler.com/books/refactoring.html
http://www.cvc.uab.es/shared/teach/a21291/temes/object_oriented_design/materials_adicionals/principles_and_patterns.pdf
https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882
You would say, "send me a PR", but as I said, I just do a research and review work :) DIY
Hope my review will be helpful to you :)
The text was updated successfully, but these errors were encountered: