Author Topic: Usability issues  (Read 30528 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Usability issues
« on: February 21, 2009, 11:18:06 pm »
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.
« Last Edit: August 27, 2009, 07:56:39 pm by Ceniza »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Usability issues
« Reply #1 on: February 22, 2009, 02:29:40 am »
Quote
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.

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

Quote
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.

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

Quote
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 report this encoding problem several times. But it still exist :(.

Quote
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.
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Usability issues
« Reply #2 on: February 22, 2009, 02:37:01 am »
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.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Usability issues
« Reply #3 on: February 22, 2009, 08:10:14 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?

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Usability issues
« Reply #4 on: February 22, 2009, 10:58:10 pm »
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

Offline smartmobili

  • Single posting newcomer
  • *
  • Posts: 6
Re: Usability issues
« Reply #5 on: February 23, 2009, 10:51:33 am »
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.

« Last Edit: February 23, 2009, 10:59:56 am by smartmobili »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Usability issues
« Reply #6 on: February 23, 2009, 03:10:54 pm »
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.

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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Usability issues
« Reply #7 on: February 23, 2009, 03:14:15 pm »
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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Usability issues
« Reply #8 on: February 23, 2009, 06:57:14 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]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Usability issues
« Reply #9 on: February 23, 2009, 07:15:47 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?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Usability issues
« Reply #10 on: February 23, 2009, 07:51:10 pm »
Quote
opens fine on my winxp box ("US english"). what are your encoding settings in settings -> editor?

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

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Usability issues
« Reply #11 on: February 23, 2009, 07:57:07 pm »
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.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Usability issues
« Reply #12 on: February 23, 2009, 07:59:11 pm »
btw, do you know what the encoding of that file actually is?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Usability issues
« Reply #13 on: February 23, 2009, 08:22:25 pm »
using a more recent revision of C::B

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)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Usability issues
« Reply #14 on: February 23, 2009, 09:07:20 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.