back to article Adobe PSD pushes programmer too far

You work long hours, for an ungrateful organization wasting time programming around other peoples' mistakes and botched code. And that's in a commercial operation - never mind the unpaid effort that goes into community open-source projects. Venting in code comments, leaving hidden messages, and inserting the odd codified F**k- …

COMMENTS

This topic is closed for new posts.
  1. Inachu
    Happy

    This is awsome!

    Maybe more programmers like him will shame adobe coders to eat some humble pie and stop trying to meet deadlines when they still have faulty code.

    I would fire those lousy coders at adobe and force them to wite in batch file programming for the next 20 years as punishment.

  2. David Wilkinson

    Very useful comments.

    There is sometimes a period in which you are studying something and you truly can't tell whether you are just missing the big picture or if what you are working for is in fact a poorly designed, incomprehensible and incoherent mess.

    Usually there is an ah-ha moment where you realize what the original designer was thinking, so you keep trying to wrap your brain around it, approaching it from different angles, all with the assumption that the designers choices were part of a rational, well though plan.

    What would even be more helpful is if the creator(s) of the format would have dotted their code with comments such as

    //This is an ugly hack, but I've been working 24 hours straight surviving on energy drinks

  3. Dominic Kua
    Happy

    I love the next line.

    which happens to be a sanity check...

  4. Anonymous Coward
    Anonymous Coward

    @ David Wilkinson

    There's enough bloat in Adobe's wares without packing the code out with comments, surely?

  5. Anonymous Coward
    Anonymous Coward

    @AC

    I really hope you're joking.

  6. Camilla Smythe

    Whimp

    I'd love to have his babies, from the hero aspect, but you just don't cut your salary, present and future, by doing that sort of stuff. Next thing I know he will be unemployed which rather messes with the future of my children.

    Fortunately I am less impressed with God. The back I can cope with but not being able to fart, and the rest of the backup, is something else.

  7. Steve

    Mixed views

    While I can understand his frustration entirely, and his desire to rant about incomprehensible formats, I can't help but wonder whether if he had gone through the bureaucratic nightmare necessary to obtain the format specification and documents rather than presumably attempt to reverse engineer the mess, they might have actually helped understand it and made life easier? Probably not, but I can wonder...

    Steve.

  8. Brian Miller

    Should see ASN.1 x.680 and x.690

    While I was writing encoding/decoding software to this spec, I was reminded of The Holy Hand Grenade of Antioch, what with all of the "shall be" and "shall not" when encoding integer types.

    The Microsoft implementation simply blew past all of that strict complexity and did it wrong.

  9. Hayden Clark Silver badge
    Happy

    however....

    ... the featured rant is the only useful comment in the code. Otherwise, it's "self-documenting"

  10. Colin Barfoot
    Gates Halo

    hindsight always has 50/50 vision

    The PSD format is very old. It has been forced to do things that were never intended for it and has to maintain backward compatibilty. I'm guessing that in the original version the development was implementation driven so that it would actually work on a machine with 256k of memory and the file format had to accomodate that. The programmer has also chosen to use a language that's more remote from the architecture than the original (probably C) would have been which can only make things more difficult.

    Having said that Adobe produces some pretty abysmal formats (or one format rehashed): TIFF / PS / PDF.

  11. Mike
    Go

    Adobe: Serial code abusers

    This site speaks volumes about Adobe's development team: http://adobegripes.tumblr.com/

  12. Michael Baldry
    Thumb Down

    can we really believe his words?

    when he uses a goto statement on line 432 :/

  13. Michael Baldry

    spec?

    Maybe if he had the proper spec from Adobe, he'd have more idea of why things were done the way they were (not saying the format isn't shit, maybe it is...)

  14. Juan Inamillion
    Joke

    @Dominic Kua

    Don't you mean the 'sanity clause'?

    Everyone knows there ain't no Sanity Clause....

    /with cigar and glasses

  15. peter garner

    @Inachu

    > I would fire those lousy coders at adobe and force them to wite in batch file programming for the > next 20 years as punishment.

    Using edlin.. no sense in making it too easy

  16. Mike Bell
    Paris Hilton

    palbuf 768

    I particularly like the line "uint8 palbuf[768];" and the liberal use of the number 768 in general. Lovely stuff.

    Paris, because she likes to buff up her pals.

  17. Ken Hagan Gold badge
    Flame

    Re: Mixed views

    "...if he had gone through the bureaucratic nightmare necessary to obtain the format specification and documents [...], they might have actually helped ..."

    Well, as you go on to say, they might but they might not. It depends partly on whether the implementation matches the spec and partly on whether the spec really is the steaming pile of shit that it appears to be. When a company goes out of its way to make it hard to find out, I tend to assume the latter. This is the same company that makes (or certainly used to make) its products available only through a "download engine" that couldn't cope with a NAT, so they definitely have "form" on the clueless tossers front.

  18. Anonymous Coward
    Joke

    @David Wilkinson

    But *all* my code is an ugly hack, written whilst sustained on Energy drinks! Maybe I should tage the one or two lines that aren't as "#yes. This is good code. Enjoy!"

  19. Big Bear

    @David Wilkinson

    I have been the recipient of such comments of the "Dear Dave, I owe you a proper fix for this hack but it will last through Rel 4.1 unit test. Must fix for 4.2. Cheers, Dave"

    There are times when the man to blame and swear at is yourself...

  20. Lionel Baden

    ERMM

    //This is an ugly hack, but I've been working 24 min straight surviving on energy drinks

    goes at the top of everything i make !

  21. Anonymous Coward
    Stop

    @ Colin Barfoot

    Hey! PostScript is not bad. It's a computationally-complete language. Although, a heavy session of PostScript programming does tend to make it hard for you to program anything else except a HP calculator for awhile.

    You should try writing a Perl script which generates a PostScript document, then spits it through ps2pdf. I have -- and every single person who has ever seen it thinks it's the DBs.

  22. Anonymous Coward
    Anonymous Coward

    @Michael Baldry

    "when he uses a goto statement on line 432"

    So friggin what? If you subscribe to the out of date "never ever use a goto anywhere" paradigm more fool you. If you look carefully you'll notice he was using it to jump out of some nested loops

    before the inner loop was commented out. A lot more sensible than the idiotic "if (flag) break" nonsense to do the same I see from the brainwashed Knuth acolytes.

  23. Andrew Shirley

    See also

    http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered

  24. Ed Blackshaw Silver badge

    @@ Colin Barfoot

    I used to work with someone who had claimed to have acheived that self same task. You are he, AICMFP!

  25. Anonymous Coward
    Thumb Up

    Nice one...

    Power to the programmer :)

  26. Aaron
    Paris Hilton

    Goto statements...

    ...aren't inherently evil. What do you think a JMP statement in Assembler is?

    Paris, because she keeps insisting I'm misspelling "jump".

  27. David Halko
    Joke

    I loved the comment...

    I love the comment, "Having worked on this code for several weeks now, my hate for PSD has grown to a raging fire that burns with the fierce passion of a million suns."

    LOL!

  28. Anonymous Coward
    Thumb Up

    I always

    Ixnay before I entray!

  29. Anonymous Coward
    Thumb Up

    @ Andrew Shirley

    Spent good chunks of the day laughing my ass off at what was posted there. Good stuff.

  30. E

    @Michael Baldry

    Properly used, goto is perfectly acceptable.

This topic is closed for new posts.

Other stories you might like