new working set icons... not unique?

Matthew Woehlke matthew.woehlke at kitware.com
Wed Dec 18 21:58:10 GMT 2013


On 2013-12-18 16:22, Sven Brauch wrote:
>> (Hum. This reminds me, I was reading somewhere about algorithms to generate
>> recognizable graphical "fingerprints". I wonder if that would be applicable
>> here. I believe the general technique is to do a random walk over a modest
>> grid size - in KDevelop's case, probably 5x5 or even 3x3 - and increment the
>> cell value per visit, using a mapping of number of visits to, in the case I
>> was reading, an ASCII character. For KDevelop, I would probably have two
>> 'bins', one red and one blue, choose one at random to 'operate on'
>> initially, and alternate that choice every time the random walk tries to
>> cross the edge of the grid.)
> Yes, I have investigated this when I was writing the feature. The
> problem is that those fingerprints are usually large pictures (e.g.
> 64x64). In 16x16 you really can't put that much shapes before the
> image gets blurry and messy.
> Effectively such an algorithm is what I have implemented here.

I was sufficiently curious to play around with it :-). Attached is the 
script (using PySide, can likely trivially adapt to PyQt) I whipped 
together to see what it would look like. The 3x3 grid isn't terrible. If 
you'd be willing to lose the clear separation of cells, 8x8 with 128+ 
steps could also be interesting. (IIRC the algorithm I was reading about 
only uses a grid of about 7x9. You can get away with a much lower grid 
size if the cell color isn't constant.)

> Although I'm perfectly aware that technical reasons are not an excuse
> for poor UI ever, let me explain a bit about the technical situation
> here:
> Currently, a working set has an identifier, a short, random string
> (which is stored with the working set), and the icon is calculated
> *from that identifier*. So, same identifier, same icon -- we don't
> need to store icons at all, we just generate them from the identifier
> whenever they are requested.

Yes, that's the same as the fingerprints I was talking about earlier.

The attached script would easily work in that mode; just need to feed it 
bits from the UUID instead of random bits.

> If you start comparing icons to each other and checking whether an
> icon is too similar to an existing one, that does not work any more.
> The reason is that if you have two sets which would generate very
> similar icons, then one will draws a different icon to avoid the
> similarity. But if you now close the first set, the icon for the
> second one will change too because the similarity is gone. So that
> doesn't work.
> So, if we want to compare icons for similarity, we need to store them
> to disk so they stay stable for a given working set. That's not
> trivial, because when we save them somewhere we need to delete them
> again when they are not needed any more. And for deciding whether they
> are needed or not -- it is infeasible to catch all the corner cases in
> which an icon becomes unused.

I'm confused. Probably because...

> One thing which just came to my mind though is that we could store the
> icon data among with the identifier in the session. It's quite small,
> so that might work.

...I was already assuming this is what you would do :-). (And anyway, 
didn't the sessions used to store the name of the icon being used? So 
the only change is instead of e.g. "alarm", "user-identity", etc. the 
string would be a few hexadecimal digits.)

If the possible color set was small(ish), you wouldn't even need 
similarity checking; just reject an icon that is already in use.

(Also, I realized my numbers were for independent cell colors; with all 
same color there would only be 15 * 7 + 1 = 106 possibilities, but 
that's still well more than most people will have working sets at once.)

I do wonder if a 3x3 grid would be okay; the dots are still fairly 
large, and that would give 512 possibilities before even considering color.

> When it comes to remembering the icons, you'll have to tell what would
> make them easier for you to remember. I find them quite easy to
> remember, but then again I usually only have 2-3 working sets...

Heh, yes, I wish I could manage to keep myself to four or fewer working 
sets ;-). It may also be that I'd get used to it over time (I've only 
had a few days with the new icons, so that may be a bad "sample set"). 
Also I wouldn't be surprised if this is one of those "varies by person" 
things.

That said... my knee-jerk response is that it's easy to remember things 
that have a clear association with a word. Especially if the word 
accidentally happens to be relevant to the working set ;-).


Anyway, thanks for putting up with my ranting :-).

-- 
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdev-icon-concept.py
Type: text/x-python
Size: 1366 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20131218/9663543e/attachment.py>


More information about the KDevelop mailing list