Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Logical statements shown vertically

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
foxmuldr Posted - Jan 07 2014 : 10:20:03 AM
Consider:
if (lnI == 0 || (lnI < 200 && (tnFontSize + lnI) < (tnFontSize * 3) && lrc.bottom < tnHeight && lrc.right < tnWidth))


It's hard to read. Consider drawing the same with vertical guides on the trigger items which cause a new layer. This would appear as a popup, or following a keystroke pressed when in the middle of something that's highlighted with brace matching:
if (lnI == 0 || (lnI < 200 && (tnFontSize + lnI) < (tnFontSize * 3) && lrc.bottom < tnHeight && lrc.right < tnWidth))
             ||
        ==      (                                                                                                  )
    lnI    0    |          &&                                       &&                       &&                    |
                |    <     |                     <                  |             <          |            <        |
                 lnI   200 |  (                )   (              ) |  lrc.bottom   tnHeight |  lrc.right   tnWidth
                              |           +    |   |           *  |
                              |tnFontSize   lnI|   |tnFontSize   3|


I would be willing to provide the logic for this to VA as I'm adding it to my own debugger as part of a "Bool View" feature which, when enabled, continually parses the editor's caret position and shows in a separate window or popup this type of display if it is available. I can also completely draw the item for the popup and return an HBITMAP which is a DIBSection that can be displayed by VA if necessary.
12   L A T E S T    R E P L I E S    (Newest First)
jay.carlton Posted - Feb 21 2014 : 4:02:17 PM
That sounds like a really interesting project. I like the idea of dynamically generating representations of logical statements from code or plain text into other forms. I tend to agree that it sounds like a useful addin in its own right.
foxmuldr Posted - Jan 13 2014 : 09:13:15 AM
Yes. Will do. Give me a bit of time.
Dusan Posted - Jan 12 2014 : 08:51:01 AM
quote:
Originally posted by foxmuldr

It's hard to envision in a text format. The actual format uses colors and is interactive. No biggie. The word-wrapped form is easy to read. I would not use it because takes up too much vertical space, and it removes direct alignment with the original statement when written out horizontally.


Could you please post processed picture of your if statement? I am really interrested in result, since my friend is also dislexic, so I'll ask him if it could help more than word wrapped code. If so, I would once perhaps not have to split my if statements for him :)
But as far as I can say now, he always preffered word wrapped code.
foxmuldr Posted - Jan 11 2014 : 4:23:37 PM
It's hard to envision in a text format. The actual format uses colors and is interactive. No biggie. The word-wrapped form is easy to read. I would not use it because takes up too much vertical space, and it removes direct alignment with the original statement when written out horizontally.
feline Posted - Jan 11 2014 : 3:45:16 PM
I have certainly seen some very complex and hard to read if statements, so your idea does make sense. Personally I am actually finding your vertical presentation harder to read, not easier to read.

The word wrapped if statement seems a lot clearer to me personally. You are right, when working with existing code reformatting the if statements so they are easier to read does not work very well.

Is the word wrapped version also fairly clear and easy to read for you? I am wondering if this would make more sense in general to our users.
foxmuldr Posted - Jan 10 2014 : 08:35:41 AM
I offered to do that above, "I would be willing to provide the logic for this to VA ... I can also completely draw the item for the popup and return an HBITMAP which is a DIBSection that can be displayed by VA if necessary."
Dusan Posted - Jan 10 2014 : 01:29:03 AM
Why do not you create your own addin?
foxmuldr Posted - Jan 09 2014 : 4:41:27 PM
quote:
Originally posted by DusanDusan

I would write it as follows
[snip]
And it is absolutely clear, what it does :) even without comment




Yes. But that requires the code be written that way. I'm looking for the GUI to enhance my developer experience. As I've mentioned before, I have dyslexia. It is difficult for me to read through source code like my example in certain cases. This type of "Bool View" view would allow code that's made like that to be visualized without reformatting it to consume multiple source code lines and lots of vertical screen space.

It's no biggie. I am introducing it into my own editor. It would be nice to have it in Visual Studio as well... but that's just a desire, not a need.
foxmuldr Posted - Jan 09 2014 : 4:36:18 PM
quote:
Originally posted by feline
Have you turned on VA's highlight matching brackets?
http://docs.wholetomato.com/default.asp?W182




Yes.
Dusan Posted - Jan 09 2014 : 1:51:52 PM
I would write it as follows:

if 
(
  lnI == 0 
  || 
  (
    lnI < 200 
    && 
    (tnFontSize + lnI) < (tnFontSize * 3) 
    && 
    lrc.bottom < tnHeight 
    && 
    lrc.right < tnWidth
  )
)
{

}


And it is absolutely clear, what it does :) even without comment
feline Posted - Jan 09 2014 : 1:40:53 PM
Personally this is why I split any complex if statement across more than one line, so I can group and structure it, to make it more clear what is happening.

Have you turned on VA's highlight matching brackets?

http://docs.wholetomato.com/default.asp?W182

this helps a lot in situations like this, especially if you have set the highlighted matching brackets to a fairly clear and obvious colour.
foxmuldr Posted - Jan 07 2014 : 10:28:11 AM
Does VA already tokenize each line? If so that would make it far easier and faster to implement in VA. :-)

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000