FixInsight vs VCL | SourceOddity


http://sourceoddity.com/blog/2015/03/fixinsight-vs-vcl/

Comments

  1. Finding possible bugs with static code analysis? How heretic! :p

    ReplyDelete
  2. Yeah, really, Roman Yankovsky  must be one of those guys who uses fancy SQL Databases instead of ISAM files. Ah the young 'uns! :D

    ReplyDelete
  3. Sometimes the "W503 Assignment right hand side is equal to its left hand side" are indeed meant to be that way, because they go through a setter and this setter triggers some hidden behaviour (like re-start a timer). It's horrible design and I saw this more than once, but the developers never document why they did it.
    When you try to resolve this issue, you suddenly open a can of worms, because this implicit behaviour is expected all over the place... :/

    ReplyDelete
  4. Lübbe Onken Agree, that's awful, but sometimes it makes sense (because of code in setter).

    But the code I mentioned in my post is not this case. I checked it. There are no setters. In Vcl.Touch.Gestures.pas it's not even a field, they assign a method parameter(!) to itself.

    ReplyDelete
  5. Their code causes me a lot of headaches. http://qc.embarcadero.com/wc/qcmain.aspx?d=108975 "Low(string) to High(Delims)" is still in System.SysUtils.pas and the developer explicitly refused to change it. Another thing is for example http://qc.embarcadero.com/wc/qcmain.aspx?d=120954 where they use ver%s and the string 280 (XE7). Well not to forget that we have current three parsers in the product and it might get one more.

    ReplyDelete
  6. Ok, I will break my NDA - Some of the the code in the article is for the upcoming quantum computing version of Delphi - That is right! You have heard it here first - Delphi is entering the quantum computing sector! :-D

    ReplyDelete
  7. Roman, when beta-testing FixInsight I ran it over some FMX code. You will have some things to write about in the next article :)

    ReplyDelete
  8. I like the warnings about format parameters, but this one is actually correct:

    Result := Format('%0:s (WParam: %1:x (%1:d), LParam: %2:x (%2:d))',
    [MsgToString(_Msg.Msg), _Msg.wParam, _Msg.LParam]);

    ReplyDelete
  9. next time, please do RTL. After that FMX. After that maybe some 3rd party vendors?

    ReplyDelete
  10. Jeroen Wiert Pluimers I found some interesting pieces of code in RTL :) Will post it next week.

    ReplyDelete

Post a Comment