Interesting image names



  • <input class="pointer" type="image" style="width: 81px; height: 26px;" src="images/buttons/butt_ok.png"/>

    C'mon guys, just two more characters to avoid the WTF, I hear "o" and "n" are cheap these days. (At least they have a sense of humor - must have been fun programming this site).

    And yes, all their buttons have names like this: butt_send.png, butt_add_module.png, etc.



  • @broekage said:

    <input class="pointer" type="image" style="width: 81px; height: 26px;" src="images/buttons/butt_ok.png"/>

    C'mon guys, just two more characters to avoid the WTF, I hear "o" and "n" are cheap these days. (At least they have a sense of humor - must have been fun programming this site).

    And yes, all their buttons have names like this: butt_send.png, butt_add_module.png, etc.

     

    Maybe they were using Windows 3.1.



  • @broekage said:

    C'mon guys, just two more characters to avoid the WTF

    It's not really a WTF.... I think the guys writing the site probably had a mental age higher than about six and just read 'butt_' as button, it's extremely common to shorten resource names (even if it does only save a few chars)
    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters...
     



  • Just because it's common practice, it isn't less of a WTF to shorten names to save 1-3 letters. There's simply no point in reducing readability to save a few keystrokes.



  • @ahnfelt said:

    Just because it's common practice, it isn't less of a WTF to shorten names to save 1-3 letters. There's simply no point in reducing readability to save a few keystrokes.

    If the site has a really high traffic (e.g. like Amazon, Ebay, ...) saving 1-3 letters per image, saving 20-60 letters par page, saving 20-60 * hits_per_day (100.000 ? 1.000.000 ? more ?) letters can help reduce the stress on your connection and be able to deliver a few more pages...



  • Nothing against shortening names, but why not good old "btn"?



  • I use but meself.



  • @bitpirate said:

    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters...

    Huh? Try again. It's "HWnd", which is short for "Handle to a Window", which means it saves 14 keystrokes. :-) 



  • @bitpirate said:

    @broekage said:

    C'mon guys, just two more characters to avoid the WTF

    It's not really a WTF.... I think the guys writing the site probably had a mental age higher than about six and just read 'butt_' as button, it's extremely common to shorten resource names (even if it does only save a few chars)
    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters...

    Changing the folder to btns instead of buttons, removing the underscore, and spelling out "button" instead of "butt" saves more characters and is more readable.  I think they were just being lazy.

    buttons/butt_ok = 15 characters

    vs.

    btns/buttonOk = 14 characters



  • @bitpirate said:


    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters... 

    HWND and everything else on that level of the windows APIs was inherited from OS/2, which in turn inherited from 1970s mainframe systems that had strict and very short limits on the lengths of function names, types, files, and pretty much anything else (largely because they measured their total memory capacity in kilobytes). Please do not emulate it out of some misguided notion that it was designed with modern software (or even C-like languages) in mind.



  • <FONT face="Times New Roman" size=3>I once watched a demo of a control for <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />st1:placeDelphi</st1:place> called AutoButt. It was a button that you didn’t have to click but just hover the mouse over. Reminds me of another post</FONT>



  • @ShadowWolf said:

    @bitpirate said:

    @broekage said:

    C'mon guys, just two more characters to avoid the WTF

    It's not really a WTF.... I think the guys writing the site probably had a mental age higher than about six and just read 'butt_' as button, it's extremely common to shorten resource names (even if it does only save a few chars)
    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters...

    Changing the folder to btns instead of buttons, removing the underscore, and spelling out "button" instead of "butt" saves more characters and is more readable.  I think they were just being lazy.

    buttons/butt_ok = 15 characters

    vs.

    btns/buttonOk = 14 characters

    If you're going to change the name of the folder to btns or buttons, why repeat it in the filename? buttons/ok.png is the way to go.



  • When I used to mark university assignments, there were several people who would shorten "assignment 1" to "ass_1". And it wasn't because they were lazy. :)



  • @ahnfelt said:

    Just because it's common practice, it isn't less of a WTF to shorten names to save 1-3 letters. There's simply no point in reducing readability to save a few keystrokes.

     

    which is more readable?

     

     

    void payEmployees(Employee[] employees) {
    for (int i = 0; i < employees.length; i++) {
    employees[i].pay();
    }
    }
     

    or

    void payEmployees(Employee[] employees_to_be_paid) {
    for (int index_for_loop_of_employee_array = 0; index_for_loop_of_employee_array < employees_to_be_paid; index_for_loop_of_employee_array++) {
    employees_to_be_paid[index_for_loop_of_employee_array[.pay();
    }
    }

     


    Granted I exaggerated some, but I think you get the point.  Brevity increases readability.  Once you are used to reading "butt" and thinking "button" it is easier to see "butt" than "button"  Not to mention saves typing.



  • @HitScan said:

    @ShadowWolf said:
    @bitpirate said:

    @broekage said:

    C'mon guys, just two more characters to avoid the WTF

    It's not really a WTF.... I think the guys writing the site probably had a mental age higher than about six and just read 'butt_' as button, it's extremely common to shorten resource names (even if it does only save a few chars)
    Hell the win32 api is full of such stuff... hwind anybody? Also only saving two characters...

    Changing the folder to btns instead of buttons, removing the underscore, and spelling out "button" instead of "butt" saves more characters and is more readable.  I think they were just being lazy.

    buttons/butt_ok = 15 characters

    vs.

    btns/buttonOk = 14 characters

    If you're going to change the name of the folder to btns or buttons, why repeat it in the filename? buttons/ok.png is the way to go.


    That is correct.  Although naming everything butt might get you more search engine traffic.



  • @Cap'n Steve said:


    That is correct.  Although naming everything butt might get you more search engine traffic.

    Thats ridiculous and it wont happen...

     You need at LEAST a butt_open or a butt_insert for this to happen...



  • @tster said:

    Brevity increases readability.

    "Readability" is naturally ambiguous. It's a positive thing, but doesn't convey anything about what it really does.

    Brevity increases scannability. But does it increase understandability? After all, when writing code, one must always take maintainability into accountability. periodibility.

    There's a tradeoff, and there's a personal sweet spot. I personally try to stay away from crunched up variable names where meaning is compated into five characters; and I equally stay away from identifiers that use four or more words. But sometimes either is necessary. It depends. There is only one hard law that always applies everywhere: ensure you can maintain the code, because that's the only thing that ever happens to code, once it is written.



  • In my old job they used tit_ for titles and butt_ for buttons.



  • @cangulo said:

    In my old job they used tit_ for titles and butt_ for buttons.

    Every site needs some T&A. :D 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.