Luminous Landscape Forum

Raw & Post Processing, Printing => Digital Image Processing => Topic started by: Jim Kasson on March 08, 2013, 03:41:18 pm

Title: Photoshop 1.0.1 Source Code Available
Post by: Jim Kasson on March 08, 2013, 03:41:18 pm
Unless you're a computer archeologist, you won't be able to run it, but it's a lot of fun to look at the source code for Photoshop 1.0.1, which is available for download here (http://computerhistory.org/atchm/adobe-photoshop-source-code/).

It's written -- quite cleanly -- mostly in Pascal, so it isn't too hard to figure out, even with virtually no comments. Thanks to the Computer History Museum and Adobe for letting us see it.

Jim
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Eric Myrvaagnes on March 08, 2013, 09:10:21 pm
Great! Pascal is easier to read than most other programming languages, IMHO.
Thanks for the link.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Jim Kasson on March 09, 2013, 12:07:59 pm
Great! Pascal is easier to read than most other programming languages, IMHO.

If I remember right, it was originally conceived as a language for teaching programming. It's missing some constructions that the authors thought encouraged bad programming practices. In that sense, it's kind of the opposite of C. And you're right, you can read the code pretty easily even if you don't know that language, if you have much experience with ALGOL-like programming languages; in that sense, it's kind of the opposite of APL.

Jim
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Jeremy Roussak on March 09, 2013, 01:30:50 pm
If I remember right, it was originally conceived as a language for teaching programming. It's missing some constructions that the authors thought encouraged bad programming practices. In that sense, it's kind of the opposite of C. And you're right, you can read the code pretty easily even if you don't know that language, if you have much experience with ALGOL-like programming languages; in that sense, it's kind of the opposite of APL.

Jim

Ah, APL. The first, and one hopes last, write-only programming language. Pascal used to bring me out in a rash but I was very fond of C and its predecessor BCPL.

Happy days.

Jeremy
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: BrianWJH on March 09, 2013, 09:52:14 pm
Pascal used to bring me out in a rash.
Jeremy

You should have tried the soothing balm of Deplhi, still using this language and fits like a glove.

Cheers,
Brian.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Jeremy Roussak on March 10, 2013, 05:22:16 am
You should have tried the soothing balm of Deplhi, still using this language and fits like a glove.

I never got to grips with the practicalities of OOP, whether Delphi or C++. Now I find that if I want to do any serious programming on the Mac and iPhone, I'll have to learn it to use Objective C. It may prove to be fun, I suppose.

Jeremy
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: francois on March 10, 2013, 06:42:05 am
I never got to grips with the practicalities of OOP, whether Delphi or C++. Now I find that if I want to do any serious programming on the Mac and iPhone, I'll have to learn it to use Objective C. It may prove to be fun, I suppose.

Jeremy

FWIW, I learned Pascal on long time ago and met Niklaus Wirth (https://en.wikipedia.org/wiki/Niklaus_Wirth), the Pascal language father at ETH. I like Pascal and wrote numerous application with it… a long time ago.

Jeremy, if you already know C, Objective-C is really easy and don't be intimidated by all the square brackets.  ;)
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: SunnyUK on March 12, 2013, 01:15:09 pm
Pascal was the first real programming language I learnt, and till this day I admire it for its simplicity and how easy it was to learn and master.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: indusphoto on April 04, 2013, 01:22:04 am
Ghosh! How many programmers are lurking here? This is supposed to be a photographer's website.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: francois on April 04, 2013, 03:05:28 am
Ghosh! How many programmers are lurking here? This is supposed to be a photographer's website.

Scary, isn't it?

 :D
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Alan Goldhammer on April 04, 2013, 09:37:22 am
Ghosh! How many programmers are lurking here? This is supposed to be a photographer's website.
Any of us who have technical degrees probably took computer programing and did some at one point in time.  I fondly remember (NOT) learning Fortran with punch cards on an IBM mainframe and then moved on to the DEC PDP-11 with the wonderful toggle switch and paper tape boot system.  The development of 'C' was wonderful!

Alan
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: francois on April 04, 2013, 10:32:19 am
Any of us who have technical degrees probably took computer programing and did some at one point in time.  I fondly remember (NOT) learning Fortran with punch cards on an IBM mainframe and then moved on to the DEC PDP-11 with the wonderful toggle switch and paper tape boot system.  The development of 'C' was wonderful!

Alan

Alan,
Punch cards… See what I found!
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Alan Goldhammer on April 04, 2013, 03:29:57 pm
@Francois - LOL!!  Our punch cards were similar but an ecru color.  The worst thing about it was that the computer science class jobs would only be run at the beginning of every hour and if you made a mistake in one of the cards, you had to go back and correct it and then wait until the job was run again.  I'm sure glad those days are over!
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: AFairley on April 04, 2013, 04:52:33 pm
Ghosh! How many programmers are lurking here? This is supposed to be a photographer's website.

I learned Basic when I got my first computer (386 XT), went on to Pascal and even did a little assembly language programming.  Strictly for kicks, though.

[EDIT]  Actually, I mis-remebered, my first computer was a Timex Sinclair and I learned the flavor of Basic that came baked into it.  That was some years before the 386.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: bill t. on April 04, 2013, 08:51:16 pm
I wonder how big the zip file would be for CS6?  587K ain't much, truth be told.

Yup, started with hand coded binary on a Kim-1 (http://upload.wikimedia.org/wikipedia/commons/7/7b/KIM-1_Computer_Ad_May_1976.jpg), then x86 assembler, then Basic, then Pascal MT, Borland C, Watcom C with Dos4GW.  All used to reincarnate basically the same program over a 30 years span.  Not bad for a "visual" person.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Eric Myrvaagnes on April 04, 2013, 11:44:29 pm
My first programming was in assembler for the DEC PDP-1 computer. Later some guys at MIT wrote a FORTRAN compiler for the beast.
Since then I have programmed &/or taught programming in a few flavors of BASIC, FORTRAN, Pascal, PL-1, C, C++ and a few others that I forget.
Did tiny bits also in Forth, RPG, Lisp, Logo, Mumps, and Pilot.

I avoided Algol and APL, and once attempted to write (strictly from the manual) a simple program in COBOL, but it never worked, mainly, I suspect, because I didn't have the patience to spell out long-winded stuff like "Environment Division."
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: ErikKaffehr on April 05, 2013, 12:04:42 am
Hi,

My first language was Basic, which we used at university back in 1976. After that I used Pascal and Fortran, going to C and now C++.

Once I was in progress of writing a program doing the same things as Lightroom, but I guessed I would need 300 years to complete, so I jumped on Lightroom since the first beta that worked on Windows I used at that time.

Best regards
Erik
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: francois on April 05, 2013, 08:01:59 am
My first programming was in assembler for the DEC PDP-1 computer. Later some guys at MIT wrote a FORTRAN compiler for the beast.
Since then I have programmed &/or taught programming in a few flavors of BASIC, FORTRAN, Pascal, PL-1, C, C++ and a few others that I forget.
Did tiny bits also in Forth, RPG, Lisp, Logo, Mumps, and Pilot.

I avoided Algol and APL, and once attempted to write (strictly from the manual) a simple program in COBOL, but it never worked, mainly, I suspect, because I didn't have the patience to spell out long-winded stuff like "Environment Division."

Eric,
You should definitely have tried your hand at APL. It's a lot of fun… well, my professors thought so!

Anybody with Ada?
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Jeremy Roussak on April 05, 2013, 09:44:56 am
@Francois - LOL!!  Our punch cards were similar but an ecru color.  The worst thing about it was that the computer science class jobs would only be run at the beginning of every hour and if you made a mistake in one of the cards, you had to go back and correct it and then wait until the job was run again.  I'm sure glad those days are over!

Every hour? Luxury.

I started programming at school, in 1975. We hand-punched cards, first using Portapunch and later graduating to an antiquated cast-iron gadget with 12 buttons, one for each row on the card: I had to learn the correct combinations for the various characters and to be sure that I pressed the buttons simultaneously and fully.

I'd then post the cards from Manchester to Imperial College in London, where they'd run the Fortran and post the output back. Turnround: one week, post office permitting.

It encouraged a careful programming style, that's for sure, and really made me appreciate the 300-baud glass teletypes when I went up to Cambridge.

Jeremy
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Justan on April 05, 2013, 10:43:15 am
I messed around with a number of programming languages and computers, starting with a Honeywell 66. Eventually I worked more with some APIs that mostly hooked into MS C. The last project I did was to co-author a custom UI for a program known as DESQview. At about that time I started working with networks and never got back to programming after that.

But the amazing detail in this story (not about my programming background, that is) - at the time they were writing the code for the photochop prototype, the average Mac had about 128 kb of RAM and the new ones had a whopping 512 kb. That’s not a lot for either programming or running photochop.
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Jim Kasson on April 05, 2013, 11:13:49 am
Wow! What a great stream of memories! I went back and made a list of the machines and languages in my past. Made me feel old...

Burroughs B220 (Tubes!) at Stanford in BALGOL
IBM 7090 at Stanford in FORTRAN
IBM 7094 at University of Illinois in FORTRAN
Bendix G-20 at University of Illinois in FORTRAN
Illiac II at University of Illinois in assembler
Univac 1130 in FORTRAN
Misc. SBC 360’s in PL/1
Misc. time-shared computers in BASIC
HP 2116, 2114 in FORTRAN, BASIC, assembler
DG Nova in BASIC, FORTRAN
IBM PC in LISP, Pascal, C, Actor, Smalltalk, Matlab.

Jim
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Les Sparks on April 05, 2013, 08:52:12 pm
The first computer I used was an IBM 650 and a language called GATE.
Then learned FORTRAN on couple of CDC machines with overnight turn around at best. Really miss punch cards.
Then MS-BASIC on TRS-80 Model I. Tiny C on same.
Moved on to TRS-80 IBM clone and real IBM pre-XT learned Turbo PASCAL. Learned various other flavors of BASIC.
Somewhere learned COBOL.
Then there was Object PASCAL, more flavors of VisualBasic, Prolog, Delphi, C++ on ever faster bigger better Windows machines.
Don't program much anymore. More fun to take photos.

Title: Re: Photoshop 1.0.1 Source Code Available
Post by: Eric Myrvaagnes on April 05, 2013, 11:45:12 pm
Don't program much anymore. More fun to take photos.
+100! (That's one hundred factorial, of course.)
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: aduke on April 06, 2013, 12:41:54 am
+100! (That's one hundred factorial, of course.)


I must disagree somewhat. I started learning programming in 1960 on a 709, hand-punching column-binary into punched cards. Over the next 45 years, was paid to write programs in several machine languages, APL, C, C++, Cobol, Fortran, Pascal, Clarion and some others. I'm currently taking an online class that requires learning Python. That being said, taking pictures is at least as much fun as programming.

Alan
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: aduke on April 06, 2013, 01:03:56 am
  I just remembered a quote from Grace Hopper, the navy Cmdr/Admiral? who lead the team that invented COBOL.

"Programming is more fun than anything you can do with your clothes on."
Title: Re: Photoshop 1.0.1 Source Code Available
Post by: bill t. on April 06, 2013, 03:24:58 am
I started to get tired of programming as Windows & Mac OS's began to crack down on the free and easy access to system hardware and peripherals, and just said SORRY to anything to do with time deterministic responsiveness. Truth be told I was glad to pick up a Nikon again when I retired in 2005.  I still write little utility programs now and then in C++, where I gleefully wallow in the wanton use of "unsafe constructs" like pointers and implicit type conversions that so-called modern compilers like C# are trying so hard to smack down.  It's just not fun anymore, you gotta deal with so much damned OS bureaucracy to do the simplest little thing.