News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Usability issues

Started by Ceniza, February 21, 2009, 11:18:06 PM

Previous topic - Next topic

Ceniza

I said about two weeks ago that I was planning to post a week ago something that I'm just going to post now.

The following "issues" come from my experience working with Visual Studio. The intention is not to become a clone of Visual Studio, but it is still good to see what is happening there.

Issue 1: "Unindent" (has anyone found the right word for it?)

It would be nice if pressing shift+tab removed all white space up to the previous level of indentation, or up to the last non-white space character or the beginning of the line. In other words, given the following piece of text (| signals the cursor position)

this    is    a        |test

pressing shift+tab should transform it into

this    is    a    |test

and again into

this    is    a|test

and again would do no more.

Issue 2: Automatic type deduction when debugging

This one depends on the capabilities of GDB, which I have not checked yet. The idea is as follows: suppose you have a class hierarchy, reduced in this example to Derived inherits from Base. Having a pointer to Base actually pointing to Derived should show this information. In other words, trying to watch the pointer to base should show that it's currently pointing to an instance of Derived, and allow the user to watch the internals of it know that its real type is known. In Visual Studio, for example, this information is shown in brackets, so you would see something like: [Derived].

[SVN rev. 5614]Issue 3: Code completion tooltip messing with debugger tooltip

If both tooltips are enabled, trying to see the value of a variable by hovering the pointer on it will display two tooltips, one on top of the other. In all my tests, the code completion tooltip was always on top of the debugger tooltip. Visual Studio solves this issue by completely disabling code completion's tooltip during a debugging session.


Issue 4: Auto expandable debugger tooltip

When you hover over a variable during a debugging session, a 2 columns tooltip will be shown providing the name of the variable (IIRC) and some brief information about it. On the left of this tooltip there's a + (like those of trees) that automatically expands when the mouse is on it for a few milliseconds. After expansion, another tooltip appears below the previously shown one displaying another level of information. When the variable is an object, this tooltip will show all its attributes and their values. When those attributes are objects, their value will be just some brief information about it, and a + will appear to expand them. This allows you to easily browse complex objects when debugging. Also, if you right click on a tooltip, you get a menu where you can, for example, add that level of expansion to the watched variables window.

Issue 5: Opening files with different encodings

This problem has been discussed, again, recently. Sometimes you try to open a file in CB, but all you get is an empty document. I faced this problem when trying to check the file xmltest.cpp of TinyXML. I was trying different encodings, but I could not find one that would really open the file and display its contents.

Issue 6: Set next instruction

This one has a thread of its own here. I never felt the need to use this feature because I never saw it before. When I started using Visual Studio, I found this little one quite handy in some cases. It's one of those features that have to be used with extreme care, but so are also many other features already present.

Issue 7: Send command to debugger field

I think this one was requested once a long time ago. It would be a seldom used feature, but it would also be handy to have. The debugger output window would be a good place to put it in.


Issue 8: More memory windows

Rarely used also, but having the ability to display more memory address contents during debugging would be handy. I saw up to four in Visual Studio and Delphi shows two by default.

Random thought: Filtering of opened files

A few weeks ago I came up with the idea to have some sort of new tabbed view for opened files that would allow you to do some filtering on the names of these tabs. Filtering could be, for example, all files that start with letter 'I', or all files with the sequence 'logger', all files with extension '.cpp' or even a combination of them. Logical operators could even be considered, also sorting. My first imaginary prototype looked more like an index with a text field and options

* | # | A | B | C | D | E | ... | Z | a-z | z-a | Filter: _________x

I still wonder about its usability benefits, but I wanted to comment about it anyway.

Time for you to share your thoughts.

ollydbg

QuoteIssue 1: "Unindent" (has anyone found the right word for it?)

It would be nice if pressing shift+tab removed all white space up to the previous level of indentation, or up to the last non-white space character or the beginning of the line. In other words, given the following piece of text (| signals the cursor position)

this    is    a        |test

pressing shift+tab should transform it into

this    is    a    |test

and again into

this    is    a|test

and again would do no more.

I have been using Visual studio for many years, but I haven't use this "shift + tab" to do the deleting. :oops: , I always use 'delete' key. :D

QuoteIssue 3: Code completion tooltip messing with debugger tooltip

If both tooltips are enabled, trying to see the value of a variable by hovering the pointer on it will display two tooltips, one on top of the other. In all my tests, the code completion tooltip was always on top of the debugger tooltip. Visual Studio solves this issue by completely disabling code completion's tooltip during a debugging session.

This is really messing, These two tooltips will overlap each other. So, I do suggest disable code completion tooltips when debugging.

QuoteIssue 5: Opening files with different encodings

This problem has been discussed, again, recently. Sometimes you try to open a file in CB, but all you get is an empty document. I faced this problem when trying to check the file xmltest.cpp of TinyXML. I was trying different encodings, but I could not find one that would really open the file and display its contents.

I report this encoding problem several times. But it still exist :(.

QuoteIssue 7: Send command to debugger field

I think this one was requested once a long time ago. It would be a seldom used feature, but it would also be handy to have. The debugger output window would be a good place to put it in.
This is very important for a deep debugging.

Thanks for sharing your ideas.




If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ollydbg

I have a Jump issue.

When I press "ALT + left arrow", the caret will jump to the last editing position. then, "ALT + right arrow", it will go forward.

But it doesn't jump back after I jumping with "mouse right click"->"find declaration of XXX".

So, my suggestion is:

Before each "find XXX" jump, the previous editing position will be recorded to the editor.

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

dmoore

Quote from: Ceniza on February 21, 2009, 11:18:06 PM
Issue 5: Opening files with different encodings

This problem has been discussed, again, recently. Sometimes you try to open a file in CB, but all you get is an empty document. I faced this problem when trying to check the file xmltest.cpp of TinyXML. I was trying different encodings, but I could not find one that would really open the file and display its contents.

I can't reproduce this with xmltest.cpp downloaded from sourceforge. Can you post the file and/or encoding settings you are having trouble with. Also, what's your locale set to?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

JGM

Many of the features here could be borrowed from gedit and notepad++. It came to my memory all the plugins that implement this things like filename filtering for gedit. Since im programming now on gedit for my CMS project  :D

smartmobili

#5
Let me hijack this post and add what I would like to see in CB :

A) In a file dialog when you add a library path for instance, please keep the last path because everytime you want to add a new path
you need to restart from home directory.

B) Add notion of target, for instance I am developping for Windows CE and we have different SDK so I would like to have a Combobox allowing
me to choose between those SDK (Windows Mobile, Windows Mobile 6).
From a CB point of view it means to be able to choose two different compilers and to be able to switch
from them easily.
Then those compilers settings should be save in the output project.

C) Possibility to associate compiler(s) with a project, for instance I have declared a new compiler and when I am adding a new option,
GNU GCC compiler is selected by default.
This is not what I want since I am working with another compiler so I have to select again and again my new compiler everytime.
I can see the 'Set as default option' but it seems it will set the default compiler for all projects whil I want it to be the default compiler
only for the project I am working on.



It would so great to have these features.


MortenMacFly

Quote from: smartmobili on February 23, 2009, 10:51:33 AM
B) Add notion of target, for instance I am developping for Windows CE and we have different SDK
That's why Code::Blocks features the concept of global variables in combination with usual compiler variables.

Quote from: smartmobili on February 23, 2009, 10:51:33 AM
C) Possibility to associate compiler(s) with a project, for instance I have declared a new compiler and when I am adding a new option,
...it never worked different than that.. .unless I don't understand what you mean...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on February 23, 2009, 03:10:54 PM
Quote from: smartmobili on February 23, 2009, 10:51:33 AM
B) Add notion of target, for instance I am developping for Windows CE and we have different SDK
That's why Code::Blocks features the concept of global variables in combination with usual compiler variables.

If I understand right, it would be enough to have different build targets, with different compilers and different settings for includes, libs, defines etc.

Ceniza

Quote from: dmoore on February 22, 2009, 08:10:14 PM
Quote from: Ceniza on February 21, 2009, 11:18:06 PM
Issue 5: Opening files with different encodings

This problem has been discussed, again, recently. Sometimes you try to open a file in CB, but all you get is an empty document. I faced this problem when trying to check the file xmltest.cpp of TinyXML. I was trying different encodings, but I could not find one that would really open the file and display its contents.

I can't reproduce this with xmltest.cpp downloaded from sourceforge. Can you post the file and/or encoding settings you are having trouble with. Also, what's your locale set to?

I tried that with Code::Blocks 5432 in a Dutch version of Windows XP Professional. Just in case, I attach the xmltest.cpp file that always opened as an empty file.

[attachment deleted by admin]

dmoore

Quote from: Ceniza on February 23, 2009, 06:57:14 PM
Quote from: dmoore on February 22, 2009, 08:10:14 PM
Quote from: Ceniza on February 21, 2009, 11:18:06 PM
Issue 5: Opening files with different encodings

This problem has been discussed, again, recently. Sometimes you try to open a file in CB, but all you get is an empty document. I faced this problem when trying to check the file xmltest.cpp of TinyXML. I was trying different encodings, but I could not find one that would really open the file and display its contents.

I can't reproduce this with xmltest.cpp downloaded from sourceforge. Can you post the file and/or encoding settings you are having trouble with. Also, what's your locale set to?

I tried that with Code::Blocks 5432 in a Dutch version of Windows XP Professional. Just in case, I attach the xmltest.cpp file that always opened as an empty file.

opens fine on my winxp box ("US english"). what are your encoding settings in settings -> editor?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Ceniza

Quoteopens fine on my winxp box ("US english"). what are your encoding settings in settings -> editor?

ISO 8859-something first, then UTF-8. None worked.

dmoore

ok, I did some more testing.

the file fails to open if:
1/ I set my fallback encoding to utf8.
2/ I set utf8, windows 1252, ISO 8859-1 or default as my default encoding.

on the other hand: with windows 1252, ISO8859-1 or default as a fallback encoding the file opens just fine.

I'm updating my working copy to see if I can get more info out of the debug log.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

btw, do you know what the encoding of that file actually is?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

using a more recent revision of C::B

Quote from: dmoore on February 23, 2009, 07:57:07 PM
1/ I set my fallback encoding to utf8.

still breaks if the "use system locale settings" is not checked (works if it is checked because it uses the fallback)

Morten's error message:
Warning: Using user specified encoding as fallback!
Encoding fallback is: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Encoding conversion using settings has failed!
Encoding choosen was: Unicode 8 bit (UTF-8) (ID: 41)


Quote
2/ I set utf8, windows 1252, ISO 8859-1 or default as my default encoding.

except for utf8, this now works even without the system settings fallback. (would have to check the svn logs to see what changed)
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Ceniza

Quote from: dmoore on February 23, 2009, 07:59:11 PM
btw, do you know what the encoding of that file actually is?

I have no idea. It opens just fine in UltraEdit, but I have not checked if it reports the detected encoding somewhere.