Broken by Misdesign

How software designers are sadists at heart

Subscribe to RSS feed

Errors That Aren't

, , , ...

Take a look at this code:
        static int chop_req(int needle, int[] haystack, int low, int high)
        {
            int middle = (low+high) / 2;
            if (high < low) return -1;
            if (haystack[middle] == needle) return middle;
            if (haystack[middle] > needle)
                return chop_req(needle, haystack, low, middle - 1);
            if (haystack[middle] < needle)
                return chop_req(needle, haystack, middle + 1, high);
        }
Notice that there is logically no way this function will fall through to the end. It always returns a value.
Still, I get this silly error:
Error 1 'chop_req(int, int[], int, int)': not all code paths return a value

That all code paths should return a value is an artifical requirement. It is not necessary. It is only there, because people are stupid, which is ok. But it is not ok that safety mechanisms are so stupid themselves, that they break normal code.

I had to rewrite this code without the last if statement, which makes it less readable, because it's not immediately obvious under which condition this last code is ran.
        static int chop_req(int needle, int[] haystack, int low, int high)
        {
            int middle = (low+high) / 2;
            if (high < low) return -1;
            if (haystack[middle] == needle) return middle;
            if (haystack[middle] > needle)
                return chop_req(needle, haystack, low, middle - 1);
            return chop_req(needle, haystack, middle + 1, high); /* This is a special case. But it looks like a general case. */
        }

Haunted by Black Bars

Save me! They put a black bar on top of this very blog. At least it's not pitch black, more grey really.

Google Black Bar

, , ,

Google also put up this black bar. I go to google.com to search, not to have my eyes poked out.

Experts agree: http://eqi.org/blackbar.htm

YouTube De-Evolutions

, , , ...

Just as I was annoyed with GNOME's black bar, YouTube redesigned their site and mixed black-on-white and white-on-black heavily.

I CANNOT STAND THIS MIX.

IT HURTS MY EYES. AND IT MAKES NO SENSE.

Furthermore they focused the site around subscriptions and channels, which are completely useless to me.

Gnome 3 Black Bar is Awful

, , ,

If the UI theme is light-on-dark, then if there is an element with dark-on-light styling, then this element is selected.

If the UI theme is dark-on-light, then if there is an element with light-on-dark styling, then this element is selected.

This is a principle which has been in effect since the first GUIs. Here's a screenshot from Apple Lisa: We can see, that the selected window title is black, and the selected menu title is black.

For some reason, someone thought it would be "cool" to draw the panel in selected style all the time. So that it really stands out.

And at the same time as making the panel look more important, they removed pretty much all functionality from it, so it's not really important any more.

Here's Gnome 3:

Gnome 3 "Activities" Conceptually Broken

, ,

The Activities menu in Gnome 3 merges two distinct concepts: "switching to a window" and "starting an application". These two concepts are not related, thus, grouping them is a mistake.

Further, the concept of "switching to a different desktop" is also merged in under the same menu. There is absolutely no sense at all in grouping "switch to a different desktop" and "start an application".

Microsoft and the freedom of choice

When do you want to restart your computer? Select any choice, as long as it's "now".

GCC deletes volatile asm

GCC is buggy.
int main(int argc) {
    // Use gcc file.c -S
    asm volatile ("#THIS IS IN THE ASM OUPUT!!");
    switch (argc) {
        asm volatile ("#BUT THIS IS NOT!!");
        asm volatile ("#IT'S DECLARED VOLATILE FOR A REASON!!");
    }
}


C:\usrc>gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2/configure --srcdir=
/gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2 --prefix=/usr --exec-prefix=/usr --b
indir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/sbin --localstatedir=/var -
-sysconfdir=/etc --datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/sh
are/man -v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap --enable-version-
specific-runtime-libs --with-slibdir=/usr/bin --libexecdir=/usr/lib --enable-sta
tic --enable-shared --enable-shared-libgcc --enable-__cxa_atexit --with-gnu-ld -
-with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=ada,c,c+
+,fortran,java,objc,obj-c++ --disable-symvers --enable-libjava --program-suffix=
-4
Thread model: single
gcc version 4.3.2 20080827 (alpha-testing) 1 (GCC)

Deficient by Design

, , , ...

I have earlier posted on why Linux users prefer the command line: "It's because their GUI is a piece of shit." (As a commenter put it so much better than I could ever do.)

Because of the sad state of Gnome and KDE I have used XFCE when I have used Linux. I found it the least buggy and most functional desktop environment.

Alas, over time, the amount of certain subfamilies of insects from the order of hemiptera have started to chew on the software last mentioned hereabove. What I'm saying is that XFCE is becoming more and more buggy. At first I started reporting bugs, but since they didn't get fixed, and developers even started re-writing bug-free software into buggy software on purpose ("I want it to work this way, even if it's neither usable, easy to code nor standard! It's my software so I decide when I want to make it annoying!"), I simply stopped using it and stopped reporting bugs.

Yesterday, a developer looked on one of my bugs from 2007 and claimed it was not a bug. Obviously this was a bug (why else would I report it?), which he rather quickly realized.

Now for the problem: XFCE developer realizes his software has a bug, he knows where the fault it, he knows how to fix it (it's easy, even I could do it), but he doesn't want to!

Did you get that? Doesn't want to!

This was only one example that is representative of the Linux software ecosystem. Developers and vendors do not want their software to work correctly.

Let me quote the UNIX-hater's handbook, with some Unix idioms that have polluted Linux:

• “Being small and simple is more important than being complete and
correct.”
• “You only have to solve 90% of the problem.”
• “Everything is a stream of bytes.”


Vista obvious bug counter #5

Open the start menu and type "disk" into the search box. Move the mouse up and down over the right part of the start menu. The first found search result gets a flickering selection box.down