The Computer History Museum has made available the source code for the 1.0.1 version of Photoshop, as noticed by Slashdot. The image editing application is a staple of professional and amateur artists alike, and its ubiquity has led its name to be generalized in the same way as "kleenex," "xerox," and "google"—to edit an image is to "photoshop" it.
Though this early build of Photoshop lacks a lot of features present in the current Creative Suite version, it was still a powerful graphical editing utility when released back in 1990. Photoshop 1.0 was exclusively a Macintosh application, and the code is representative of the typical Mac coding tools of the era—it's a mixture of about 75 percent Pascal and 15 percent Motorola 68000 assembly language, with the rest of the code composed of data files.
Altogether, there are about 185,000 lines of code in 179 files. The code isn't quite complete, though, since it's missing the MacApp framework (which can't be included because it would have to be licensed from Apple).
The linked Computer History Museum page contains some commentary on the code from Grady Booch, chief scientist for Software Engineering at IBM Research Almaden:
Architecturally, this is a very well-structured system. There’s a consistent separation of interface and abstraction, and the design decisions made to componentize those abstractions – with generally one major type for each combination of interface and implementation — were easy to follow....
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.
Booch notes the code even contains easily identifiable references to Macintosh software architect Andy Hertzfeld's Thunderscan device, a clip-in scan head that could transform a dot matrix printer into an inexpensive (but slow) grayscale scanner.
Though Pascal and 68000 assembly aren't the modern coding tools of choice, there's tremendous value to be gained in studying beautiful code (see this Doom 3 source code critique for a more contemporary example). Lessons in structuring a program tend to transcend languages, and being able to define and solve computing problems in discrete, understandable steps with a minimum of cruft or kludging is something every developer should strive for.