Adobe Photoshop 1.0 Source Code (1990)

(computerhistory.org)

273 points | by tosh 4 days ago

10 comments

  • ofrzeta 2 hours ago
    Quite the praise by Grady Booch:

    "There are only a few comments in the version 1.0 source code, most of which are associated with assembly language snippets. That said, the lack of comments is simply not an issue. This code is so literate, so easy to read, that comments might even have gotten in the way."

    "This is the kind of code I aspire to write.”

    • crazygringo 11 minutes ago
      > the lack of comments is simply not an issue

      I'm looking at the code and just cannot agree. If I look at a command like "TRotateFloatCommand.DoIt" in URotate.p, it's 200 lines long without a single comment. I look at a section like this and there's nothing literate about it. I have no idea what it's doing or why at a glance:

        pt.h := BSR (r.left + ORD4 (r.right), 1);
        pt.v := BSR (r.top + ORD4 (r.bottom), 1);
        
        pt.h := pt.h - BSR (width, 1);
        pt.v := pt.v - BSR (height, 1);
        
        pt.h := Max (0, Min (pt.h, fDoc.fCols - width));
        pt.v := Max (0, Min (pt.v, fDoc.fRows - height));
        
        IF width > fDoc.fCols THEN
          pt.h := pt.h - BSR (width - fDoc.fCols - 1, 1);
        
        IF height > fDoc.fRows THEN
          pt.v := pt.v - BSR (height - fDoc.fRows - 1, 1);
        
      Just breaking up the function with comments delineating its four main sections and what they do would be a start. As would simple things like commenting e.g. what purpose 'pt' serves -- the code block above is where it is first defined, but you can't guess what its purpose is until later when it's finally used.

      Good code does not make comments unnecessary or redundant or harmful. This is a myth that needs to die. Comments help you understand code much faster, understand the purpose of variables before they get used, and understand the purpose of functions and parameters when their short names cannot possibly communicate those things in sufficient detail.

  • ofalkaed 4 hours ago
    When this got released I really expected someone in the opensource community to run with it, but as far as I know no one has. Back around 1990 a Graphic designer that had his office n the same building as my mom worked in let me copy his Photoshop 1.x disks and nothing has ever compared to it for me. When will we get the linux port of Photoshop 1.0? I would love to see how it develops.
    • delaminator 4 hours ago
      If they did, they can only send you screenshots

      > 2. Restrictions. Except as expressly specified in this Agreement, you may not: (a) transfer, sublicense, lease, lend, rent or otherwise distribute the Software or Derivative Works to any third party; or (b) make the functionality of the Software or Derivative Works available to multiple users through any means, including, but not limited to, by uploading the Software to a network or file-sharing service or through any hosting, application services provider, service bureau, software-as-a-service (SaaS) or any other type of services. You acknowledge and agree that portions of the Software, including, but not limited to, the source code and the specific design and structure of individual modules or programs, constitute or contain trade secrets of Museum and its licensors.

      • ofalkaed 4 hours ago
        I was talking about more than just a literal port, running with it is broader than just a literal port. I guess my general point is that I am disappointed that all these releases of historical code have so little to show for being released.

        Edit: Disappointed is really not the right word but I am failing at finding the right word.

        • pm215 3 hours ago
          I think there's two parts to this:

          1) these historical source code releases really are largely historical interest only. The original programs had constraints of memory and cpu speed that no modern use case does; the set of use cases for any particular task today is very different; what users expect and will tolerate in UI has shifted; available programming languages and tooling today are much better than the pragmatic options of decades past. If you were trying to build a Unix clone today there is no way you would want to start with the historical release of sixth edition. Even xv6 is only "inspired by" it, and gets away with that because of its teaching focus. Similarly if you wanted to build some kind of "streamlined lightweight photoshop-alike" then starting from scratch would be more sensible than starting with somebody else's legacy codebase.

          2) In this specific case the licence agreement explicitly forbids basically any kind of "running with it" -- you cannot distribute any derivative work. So it's not surprising that nobody has done that.

          I think Doom and similar old games are one of the few counterexamples, where people find value in being able to run the specific artefact on new platforms.

        • delaminator 25 minutes ago
          you literally said:

          > When will we get the linux port of Photoshop 1.0?

    • msk-lywenn 4 hours ago
      The source is now readable but it’s not open source at all.
      • bromuro 3 hours ago
        It is open source but not free software.
        • chongli 2 hours ago
          No, it’s source available but not open source. Open source requires at minimum the license to distribute modified copies. Popular open source licenses such as MIT [1] take this further:

          The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

          This makes the license transitive so that derived works are also MIT licensed.

          [1] https://en.wikipedia.org/wiki/MIT_License?wprov=sfti1#Licens...

          • sigseg1v 30 minutes ago
            Not quite. You need to include the MIT license text when distributing the software*, but the software you build doesn't need to also be MIT.

            *: which unfortunately most users of MIT libraries do not follow as I often have an extremely difficult time finding the OSS licenses in their software distributions

          • aeon_ai 46 minutes ago
            MIT is not copyleft. The copyright notice must be included for those incorporated elements, but other downstream code it remains part of can be licensed however it wants.

            AGPL and GPL are, on the other hand, as you describe.

        • Xerox9213 2 hours ago
          It’s is “source available” but not open source.
        • cgfjtynzdrfht 2 hours ago
          It's "source available" [1], not open source [2].

          Words have meaning and all that.

          1: https://en.wikipedia.org/wiki/Source-available_software

          2: https://en.wikipedia.org/wiki/Open_source

          • geokon 1 hour ago
            cant blame him. We're in a bit of a bananas situation where open source isnt the antonym of closed source
            • jefftk 10 minutes ago
              This isn't that uncommon:

              * If a country doesn't have "closed borders" then many foreigners can visit if they follow certain rules around visas, purpose, and length of stay. If instead anyone can enter and live there with minimal restrictions we say it has "open borders".

              * If a journal isn't "closed access" it is free to read. If you additionally have permissions to redistribute, reuse, etc then it's "open access".

              * If an organization doesn't practice "closed meetings" then outsiders can attend meetings to observe. If it additionally provides advance notice, allows public attendance without permission, and records or publishes minutes, then it has “open meetings.”

              * A club that doesn't have "closed membership" is open to admitting members. Anyone can join provided they meet relevant criteria (if any) then it's "open membership".

              • denotational 4 minutes ago
                * A set that isn't open isn't (necessarily) closed.

                * A set that is open can also be closed.

    • LollipopYakuza 1 hour ago
      I understand it was a very unique and powerful piece of software in 1990 but why would it be such a game changer to have the 1.0 running on Linux today?
    • gwbas1c 58 minutes ago
      What about GIMP or any of the other open source image editors?

      Just supporting a modern OS's graphical API (The pre-OSX APIs are long dead and unsupported) is a major effort.

    • ofrzeta 2 hours ago
      You could try having an LLM port it to Linux :) As an aside I was always (well, no longer) hoping that Photoshop gets ported to Linux because at least an IRIX port existed, so there has to be some source code with X11 or whatever library code.

      https://fsck.technology/software/Silicon%20Graphics/Software...

  • spacebacon 3 hours ago
    That software box on the shelf at Babbage’s is a cherished memory—a tangible oddity of software distribution prior to broadband, now just a relic in memory. Most of us assumed it would last forever. We get our software at the click of a button now, but we traded something for that.
    • xnorswap 3 hours ago
      Software felt more valuable when you forked over £60+ ( Which was worth a lot more back then ) and got a physical box, with a chunky set of instruction manuals and 5+ floppy disks.

      It wasn't even broadband that destroyed that experience, when CDs came around developers realised they had space to just stick a PDF version of the manual on the CD itself and put in a slip that tells you to stick in the CD, run autorun.exe if it didn't already, and refer to the manual on the CD for the rest!

      • moregrist 2 hours ago
        There are many things I feel nostalgic for in that era, but chunky manuals for specific software are at the bottom of that list.

        They weren’t like textbooks, which have knowledge that tends to be relevant for decades. You’d get a new set with every software release, making the last 5-20 lbs of manuals obsolete.

        You did lose some of the readability of an actual book. Hard-copy manuals were better for that. But for most software manuals, I did more “look up how to do this thing” than reading straight through. And with a pdf on a CD you had much better search capabilities. Before that you’d have to rely on the ToC, the book index and your own notes. For many manuals, the index wasn’t great. Full text search was a definite step up.

        Even the good ones, like the 1980s IBM 2-ring binder manuals, which had good indexes, were a pain to deal with and couldn’t functionally match a PDF or text file on a CD for searchability.

      • flyinghamster 2 hours ago
        Also, you were far more likely to get actual documentation back in the day. You're never going to get a detailed first-party technical reference for today's Apple computers (at least not without being Big Enough and signing a mountain of NDAs); compare that to the Apple II having a full listing of the Monitor ROM, or the original IBM PC Technical Reference Manual.
        • bombcar 1 hour ago
          The very existence of those manuals improved the software, as the technical writers were trained in a different discipline than programming, and it really showed.

          Even some well-documented modern software is obviously documented by the programmers and programmer-adjacent.

      • ofrzeta 2 hours ago
        Manuals like AutoCADs have certainly felt valuable https://i.ebayimg.com/images/g/Gm8AAeSwwIZowjzn/s-l1600.jpg It's not even complete, for instance the ADS manual is missing. It's also a bit more expensive with roughly 3700 USD in 1992.
        • xnorswap 2 hours ago
          Oh yeah, when I said £60, I was thinking of even the cheapest consumer-grade software!
  • reconnecting 4 hours ago
    There was something magical about white floppies, as shown in the screenshot.
  • russellbeattie 3 hours ago
    > "Software architect Grady Booch is the Chief Scientist for Software Engineering at IBM Research Almaden and a trustee of the Computer History Museum. He offers the following observations about the Photoshop source code."

    OMG. Booch?? The father of UML is still around? Given that UML is a true crime against humanity, it just goes to show there is no justice in the world. (I want a lifespan refund for the amount of time I spent learning UML and Design Patterns back in the bad old Enterprise Java days. Oof)

    • heap_perms 2 hours ago
      I completed a CS degree just a year ago, and they absolutely wrecked us with UML. I’m still recovering mentally.
      • goalieca 1 hour ago
        UML used to be a staple of job interviews.
        • forgetfulness 1 hour ago
          It was going to be the future of Software Engineering in the 2000s, Software Architects laying out boxes for Software Bricklayers to implement as dictated, code generation tools were going to make programming trivial.

          For trivial CRUD apps, and maintaining modified versions of the generated code was a nightmare.

  • Daneel_ 5 hours ago
    Interesting little read. I always find it fascinating when old code holds up really well - especially structurally. Great trip down memory lane!
  • cramcgrab 1 hour ago
    Wow! Writing photoshop while a phd student at Michigan! Wish current students would do some code
  • snvzz 2 hours ago
    >To download the code you must agree to the terms of the license, which permits only non-commercial use and does not give you the right to license it to third parties by posting copies elsewhere on the web.

    Note this is a toxic license. Accepting it and/or reading of the code has potential for legal liability.

    Still, applaud releasing the source code, even if encumbered. Preservation is most important, and any legal teeth will eventually expire with the copyright.

  • roschdal 5 hours ago
    • rplnt 4 hours ago
      I used to use GIMP as an example of OSS desktop applications having bad UX, I mean back around 2010 maybe. The UX felt plain horrible. Anything I every tried there was pain to achieve. And there was plethora of desktop applications having the same issue back then. "Geeks can't do UI".

      I feel like that has changed? Even Blender felt good the last time I used it, Firefox became kinda fine, though these are probably bad examples as they are both mainstream software. But what about OSS that is used primarily by OSS enthusiasts? What about GIMP now?

      • VoidWhisperer 3 hours ago
        This is just my personal experience, but even with the current UI, there can tend to be a learning curve with GIMP. Alot of it probably comes from figuring out where tools and functionality that are readily available upfront in other paint programs are hidden 2-3 menus deep in GIMP
      • maxloh 2 hours ago
        That’s what happens when you let people do other people's jobs. UI/UX design is a profession, and there is a reason for that.

        Unfortunately, designers are rare among the FOSS community. You can't attract real casual or professional users if you don't recognize the value of professional UI/UX.

      • tonyedgecombe 2 hours ago
        Blender feels like an outlier amongst open source software. Outside of programmers tools the great majority of open source feels mediocre. I wonder what the Blender people did differently.
        • Palomides 29 minutes ago
          unlike most FOSS, blender gets millions of dollars a year to support development
      • cynicalsecurity 2 hours ago
        A simple trick to make GIMP perfectly usable (exists since ages):

        > To change GIMP to single-window mode (merging panels into one window), go to "Windows" in the top menu and select or check "Single-Window Mode"; this merges all elements like the Toolbox, Layers, and History into one unified view.

    • KellyCriterion 5 hours ago
      the funny thing with GIMP is: even while its a very powerful tool, it still lacks a good texting tool until today :-)

      and having the source available didnt help so far either :-))

      • RadiozRadioz 3 hours ago
        For texting I recommend using a mobile phone or desktop instant messaging program. While it's not the case with all of them, graphics editing tools tend to have texting utilities as a second-class citizen at best
      • postexitus 4 hours ago
        Can you detail what you mean by good texting tool? What features are missing?
      • KellyCriterion 4 hours ago
        for the downvoters:

        could you please show me a good textting tool plugin for GIMP, then?

        you can check their forums & other sites: the textingtools is on top of their discussion lists?

        • hiccuphippo 14 minutes ago
          I don't understand what you mean by texting tool. Do you mean text rendering? kerning?
        • shakna 4 hours ago
          I don't see it at the top of the discussion on the forums I checked.

          So can you expand why you think the text tool, is bad?

        • ehnto 4 hours ago
          Honestly, I think it was just the smiley faces. I didn't downvote.
        • iwuefx 4 hours ago
          [dead]
      • dist-epoch 2 hours ago
        FTFY: the funny thing with GIMP is: even while its a very powerful tool, it still lacks a good image editing tool until today
      • panki27 4 hours ago
        Nothing stops you from creating a PR :-)))
        • KellyCriterion 4 hours ago
          I would, if I would GIMP use often enough to have the motivation - I use GIMP maybe 2 - 3 times a year.

          And thats the irony covered in my post: Even that the source is available didnt motivate someone enough so far to create better version of the built

        • worldsavior 4 hours ago
          Nothing stops you from commenting these useless comments.