Skip to main content
Topic: Sensiolab insight (Read 3237 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sensiolab insight

I think I ignored all the issues that may require refactoring and as such are pointless until we reach that point and left only those that may help:
https://insight.sensiolabs.com/projects/2666c48a-7be4-4934-8838-1ed822442bef
and this is the current last analysis:
https://insight.sensiolabs.com/projects/2666c48a-7be4-4934-8838-1ed822442bef/analyses/125

There are some issues that are still quite difficult to get rid of and may require huge changes, but there are also many that are either very easy and can be a way to start playing with the code if anyone is interested or useful to fix and nice to have fixed.
Bugs creator.
Features destroyer.
Template killer.

Re: Sensiolab insight

Reply #1

I read but can't understand anything at this juncture. Are you aiming to get some medal or certification from that sensiolab or something? ::)

Re: Sensiolab insight

Reply #2


Oops:

QuoteThis project has too many violations to be displayed in the analysis report.

 :o

Re: Sensiolab insight

Reply #3

Quote from: ahrasis – I read but can't understand anything at this juncture. Are you aiming to get some medal or certification from that sensiolab or something? ::)
Insight analyse the code looking for potential bugs, code that is prone to problems, coding standard "violations", and other stuff.
Mostly is to help enforce good coding practices.
Like with scrutinizer, the point is not the medal or the "reward", but the fact that if you get a medal it means your code is usually better written and gets all the benefits coming with well written code. :)

Quote from: Jorin – Oops:

QuoteThis project has too many violations to be displayed in the analysis report.

 :o
Yup, and that is code that has already been improved *a lot*!
Try to guess what the situation was a couple of years ago when we started! ;D
Bugs creator.
Features destroyer.
Template killer.

Re: Sensiolab insight

Reply #4

To determine one is a bug, one thing, and to rewrite the code while eliminating it is another. While it should sound simple to the experts in coding, it is not so simple, at least for people like me. Moreover people with no coding knowledge or experience.

Even trying to add an option to install a new variant from admin CP seems difficult enough for me unless I have a lot of time for it.

While doing it, I can also see most code have changed from 1.0 to 1.1 making it more difficult to understand and keep up with.

So, unless "the very easy things" are specifically outline, like may be in a sticky post, for general coders they may feel like finding a needle in a hay stack, which they do not have time for.

If listed, I think they can surely be sorted out gradually, one by one.

Re: Sensiolab insight

Reply #5

Quote from: emanuele – I think I ignored all the issues that may require refactoring and as such are pointless until we reach that point and left only those that may help:
https://insight.sensiolabs.com/projects/2666c48a-7be4-4934-8838-1ed822442bef
and this is the current last analysis:
https://insight.sensiolabs.com/projects/2666c48a-7be4-4934-8838-1ed822442bef/analyses/125

There are some issues that are still quite difficult to get rid of and may require huge changes, but there are also many that are either very easy and can be a way to start playing with the code if anyone is interested or useful to fix and nice to have fixed.
how insightful...
LiveGallery - Simple gallery addon for ElkArte

Re: Sensiolab insight

Reply #6

Could probably fix 25% of them just by not analyzing install and upgrade php  O:-)

Re: Sensiolab insight

Reply #7

Sounds like those two are so egregious that no one wants to refactor them.  Hmm... sounds familiar...

The one and only time I debugged SMF's upgrader, I chased many a wild goose in the form of spaghetti code only to realize that the fix was in a single line of Javascript.
LiveGallery - Simple gallery addon for ElkArte

Re: Sensiolab insight

Reply #8

I know that feeling ... in 1.0 some goodness was applied to the installer to improve it somewhat, but like you said it was such spaghetti that it took a bunch of time just to try and figure out what and how it was doing anything ... fragile code that was poorly commented / documented, lots of legacy fixes that were difficult to track history, bit of tribal knowledge was required.

emanuele did a bunch of refactoring for 1.1, broke things down into individual groups https://github.com/elkarte/Elkarte/commit/38ae97f089422cacb2150975233c56b3679c7092 so its at least underway :D

Even with all that, it seems like during install you end up doing certain things more often like die/exit/@/sleep that sets code review tools ablaze with fuel.

Re: Sensiolab insight

Reply #9

Install and upgrade are two huge P.I.T.A.
What I did so far is basically just a moving around things and splitting down to try to understand what the various parts do (the two files ToRefactorCore.php and LegacyCode.php are an example of the early state of the work).
Anyway, even only the fact that now install and upgrade use the db abstraction layer is a major step forward. nods
Bugs creator.
Features destroyer.
Template killer.