TweetFollow Us on Twitter

Dec 97 Factory Floor

Volume Number: 13 (1997)
Issue Number: 12
Column Tag: From The Factory Floor

Sean Parent: The Photoshop Development Process

by Dave Mark, Copyright 1997 by Metrowerks, Inc., all rights reserved.

One of the most complex applications on either side of the great divide has got to be Adobe's Photoshop. This month's Factory Floor interview is with Sean Parent, Photoshop engineer extraordinaire!

Sean Parent sparent@adobe.com is an engineering manager and senior computer scientist working on Adobe Photoshop. Being the author of Actions (a Photoshop 4.0 feature) has earned him the nickname "Official Photoshop Action Figure."

Sean joined Adobe in '93 coming from Apple where he was a senior software engineer working on the PowerMac project. When he's not working, you can find him at your local coffee shop or rushing home to spend a few minutes with his family.

Dave: In general terms, can you describe the Photoshop development process?

Sean: If I had the time, I could write a book on this topic. Photoshop is a very large application, on the order of a million lines of C++ code, and we have a relatively small team, currently about 12 engineers, working on it. Our goal is to ship each release simultaneously on Mac and Windows and our tier one languages (English, French, German, and Japanese). We have a full version and a light version of the product (Photoshop LE) and over 100 plug-ins.

We try and keep process minimal, with just enough in place to keep the complexity from becoming chaotic. You can easily spend more time working on process than you do working on product.

Feature ideas come in through market research, tech support, and from the team as a whole. We also have a small set of target customers with whom we work very closely. Engineering works with marketing to prioritize the features based on both customer demand and feasibility. Each engineer is assigned a feature, and that engineer will research the issues and write a short design document with input for HI, marketing, and QA. Then he or she will implement the feature.

As each feature is completed and tested the engineers move to another feature. Each engineer is responsible for keeping his bug count below 25 and testing occurs throughout the product cycle. If your bug count goes above 25, it becomes your highest priority.

Dave: What is your general approach to localization?

Sean: We have been spending a lot of time working on localization for the next release, trying to streamline the process. Our approach is to imbed string tokens for user visible strings directly where they are used. At runtime the actual text is looked up in a unicode file from the token. The unicode text is run through a translation table for the current platform script and used for display. We have tools that scan the sources and generate reports about new strings, modified strings, changed strings, duplicate tokens and the like. Translators are given a unicode text file with the tokens in them and they just replace what they are equivalent to.

We also have an auto layout mechanism. It currently is a little heavy weight, you have to enter expressions to completely describe the layout of the view. These expressions are evaluated at runtime. I plan to, when I have the time, replace this with a lighter weight and easier to develop for model that I've been working on.

This whole mechanism makes it very easy to develop since you just add strings right where you use them, and it makes it very easy to translate. We have Pig Latin and a bunch of other wacky versions of the application.

Dave: Any interesting opportunities for developers in the next release of Photoshop? Sean: For those familiar with Photoshop 4.0, there is a feature called Actions. An Action is like a small macro, you can record a set of steps (Action Commands) and then play them back. For the next release we are exporting an API to the Action system. You can now construct an Action Command and then send it to Photoshop. The model is similar to AppleEvents but a bit easier to code to and it works cross platform. Through this API you can bridge Photoshop to other scripting systems, or write plug-ins that drive the application to do all sorts of things.

Dave: When we were discussing plug-ins you mentioned a unique menu enabling technology developed for Photoshop. Can you tell us about that? Sean: Most Photoshop customers have well over a hundred plug-ins. It would be prohibitive, even for Photoshop, to keep these plug-ins loaded at all times. And it is too time consuming to load each plug-in separately to query it to see if it is available given the current document state. For Photoshop 3.0 we just had a set of flags that the plug-in would provide, but with all the variables of a Photoshop 4.0 document this was breaking down (the state of a document includes color mode, transparency channels, color depth, selection, layers, etc.). The solution was to use the expression evaluator, originally written for the view system and have each plug-in provide a boolean expression which is evaluated to determine if the plug-in should be enabled. The expression evaluator is about 3K of code, just a simple recursive decent parser, and can calculate thousands of expressions per second.

Dave At this year's MacHack, you gave a presentation on managing the Photoshop development process with a relatively small team. For those folks who didn't get a chance to see the presentation, can you discuss some of the core issues here? Sean: I think the biggest issue in developing software, Photoshop or any other major project, is keeping things in control.

The traditional approach of getting all the features in-driving for an Alpha date -- and then bringing on QA is usually a disaster. Quality is an afterthought, with features taking priority and you end up with a soaring bug count. Trying to rip half completed (and wasted) features from the product to get to a point where you have something shipable. This kind of development goes on all over the valley and is why software dates slip. If you have a bug count over 10,000 how do you even begin to schedule a ship date?

Photoshop follows a more evolutionary cycle. Each feature moves to completion before we move on. QA is active for the entire life cycle. We have more QA engineers than we have development engineers. By developing like this we can cut off development when we are feature rich enough to call it a relase, wrap it up, and ship. At any point we can cut off development on Photoshop and have the application ready to ship, from engineering, within 3 months. Of course we have to schedule documentation and outside dependencies, so making a cut is non trivial but we can be very responsive.

The other big issue that sends development out of control is what I refer to as the "fan effect." This is all the stuff that happens after you hit that big ship date. You have a bunch of people leave on vacation, you might loose a member or two of the team from burn-out, you might have to do a bug fix release, you have tier 2 and 3 languages to get out, marketing strikes a deal with someone to bundle your product but they need a new version, you need an updater to go on the internet. People tend to focus on that first US release and forget about the fan effect. All of these tasks chew your resources that should be working on the next version. We are constantly looking at how to manage these issues, how to plan for them, how to avoid them, and how to do them in parallel. The goal is to hit that ship date and move everyone to the next version. We are still a long way from that goal but we made a lot of progress between Photoshop 3.0 and Photoshop 4.0 and the next release makes many more improvements.

Dave: Photoshop is clearly a performance sensitive application. What process do you use to tune Photoshop for different processors? Sean: Photoshop is architected so most of the performance critical code is isolated into a set of "bottlenecks" that can be overridden. There are about 500 bottlenecks and these get tuned heavily for each target processor. For the remainder of Photoshop, we focus on picking efficient algorithms and writing maintainable, robust code. Then we measure it and tune what is needed.

Dave: Photoshop is about 1,000,000 lines of C++ code. What kind of framework do you use? With such a massive code base, how do you keep it current? Sean: Photoshop was originally written with MacApp 1.1.1 in Object Pascal. For Photoshop 2.5 it was ported to MacApp 3.0 and C++ and also ported to Windows. During Photoshop 3.0 development Apple canceled the MacApp project (it was later resurrected) and the Photoshop team took over development of the framework. It still bears some resemblance to MacApp but we did our own port to PPC, we have modified the view system, added scripting, our own exception handling system, and lightened up a lot of the framework. Over 95% of the code is shared between Mac and Windows.

For the next release of Photoshop, I would estimate that close to 50% of the engineering time has gone into improvements in the code base, not features. This is always a tough thing to balance. It is easy to spend too much time working on architecture and not end up with a product and equally as easy to hack features in and end up with an unmaintainable code base.

We try and keep the code base up to par with the latest language spec, OS features, coding practices, et. all. The team is encouraged to spend time reading and Mark Hamburg (my manager) and I are frequently handing out books to the team and making runs to Computer Literacy. With as much code as we have, correct and robust tools are very important. We are constantly trying out the new features in the compilers and trying to raise the bar on our code. When a new language feature becomes available it is rarely supported well enough through all the tools that we can adopt it right away, but we can gain some experience and push tool developers in the areas we feel are important.

STL (the C++ Standard Template Libarary) is a good example. It provides a tremendous amount of power and can greatly simplify coding. But support for templates is still weak among the compilers and linkers (the VC++ linker has a limit of 255 characters for a symbol, and STL can quickly exceed that). You can also get a fair amount of code bloat using STL, and none of the current tool vendors have linkers that will fold identical routines (it is very common with STL to have multiple methods that generate identical code but are operating on different types). We have started using STL, but slowly until we gain experience and the tools get better.

Dave: Photoshop is one of the first major applications to take advantage of the Latitude porting libraries. What can you tell us about that experience?

Sean: Photoshop 3.0 was shipped for Sun and SGI built with Latitude. At that time the Unix Photoshop team was a separate porting team (they were even in a different division). The port went relatively smoothly, it took a team of 5 less than a year to release. The code modifications they made have since been rolled into the main code base. A lot of the changes were to get Photoshop compiling with the various compilers and tuned for the specific platforms. The one great side benefit was being able to use some of the Unix debugging tools like Purify -- we found and fixed a number of difficult problems in the main code base from this effort.

Latitude supports a large portion of the Mac API with a large degree of fidelity. Even direct access to many data structures is supported. It was certainly a much easier way to get to Unix than a direct port.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Dropbox 193.4.5594 - Cloud backup and sy...
Dropbox is a file hosting service that provides cloud storage, file synchronization, personal cloud, and client software. It is a modern workspace that allows you to get to all of your files, manage... Read more
Google Chrome 122.0.6261.57 - Modern and...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
Skype 8.113.0.210 - Voice-over-internet...
Skype is a telecommunications app that provides HD video calls, instant messaging, calling to any phone number or landline, and Skype for Business for productive cooperation on the projects. This... Read more
Tor Browser 13.0.10 - Anonymize Web brow...
Using Tor Browser you can protect yourself against tracking, surveillance, and censorship. Tor was originally designed, implemented, and deployed as a third-generation onion-routing project of the U.... Read more
Deeper 3.0.4 - Enable hidden features in...
Deeper is a personalization utility for macOS which allows you to enable and disable the hidden functions of the Finder, Dock, QuickTime, Safari, iTunes, login window, Spotlight, and many of Apple's... Read more
OnyX 4.5.5 - Maintenance and optimizatio...
OnyX is a multifunction utility that you can use to verify the startup disk and the structure of its system files, to run miscellaneous maintenance and cleaning tasks, to configure parameters in the... Read more
Hopper Disassembler 5.14.1 - Binary disa...
Hopper Disassembler is a binary disassembler, decompiler, and debugger for 32- and 64-bit executables. It will let you disassemble any binary you want, and provide you all the information about its... Read more

Latest Forum Discussions

See All

Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »
Live, Playdate, Live! – The TouchArcade...
In this week’s episode of The TouchArcade Show we kick things off by talking about all the games I splurged on during the recent Playdate Catalog one-year anniversary sale, including the new Lucas Pope jam Mars After Midnight. We haven’t played any... | Read more »
TouchArcade Game of the Week: ‘Vroomies’
So here’s a thing: Vroomies from developer Alex Taber aka Unordered Games is the Game of the Week! Except… Vroomies came out an entire month ago. It wasn’t on my radar until this week, which is why I included it in our weekly new games round-up, but... | Read more »
SwitchArcade Round-Up: ‘MLB The Show 24’...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for March 15th, 2024. We’re closing out the week with a bunch of new games, with Sony’s baseball franchise MLB The Show up to bat yet again. There are several other interesting games to... | Read more »
Steam Deck Weekly: WWE 2K24 and Summerho...
Welcome to this week’s edition of the Steam Deck Weekly. The busy season has begun with games we’ve been looking forward to playing including Dragon’s Dogma 2, Horizon Forbidden West Complete Edition, and also console exclusives like Rise of the... | Read more »
Steam Spring Sale 2024 – The 10 Best Ste...
The Steam Spring Sale 2024 began last night, and while it isn’t as big of a deal as say the Steam Winter Sale, you may as well take advantage of it to save money on some games you were planning to buy. I obviously recommend checking out your own... | Read more »
New ‘SaGa Emerald Beyond’ Gameplay Showc...
Last month, Square Enix posted a Let’s Play video featuring SaGa Localization Director Neil Broadley who showcased the worlds, companions, and more from the upcoming and highly-anticipated RPG SaGa Emerald Beyond. | Read more »
Choose Your Side in the Latest ‘Marvel S...
Last month, Marvel Snap (Free) held its very first “imbalance" event in honor of Valentine’s Day. For a limited time, certain well-known couples were given special boosts when conditions were right. It must have gone over well, because we’ve got a... | Read more »
Warframe welcomes the arrival of a new s...
As a Warframe player one of the best things about it launching on iOS, despite it being arguably the best way to play the game if you have a controller, is that I can now be paid to talk about it. To whit, we are gearing up to receive the first... | Read more »
Apple Arcade Weekly Round-Up: Updates an...
Following the new releases earlier in the month and April 2024’s games being revealed by Apple, this week has seen some notable game updates and events go live for Apple Arcade. What The Golf? has an April Fool’s Day celebration event going live “... | Read more »

Price Scanner via MacPrices.net

Apple Education is offering $100 discounts on...
If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take $100 off the price of a new M3 MacBook Air.... Read more
Apple Watch Ultra 2 with Blood Oxygen feature...
Best Buy is offering Apple Watch Ultra 2 models for $50 off MSRP on their online store this week. Sale prices available for online orders only, in-store prices may vary. Order online, and choose... Read more
New promo at Sams Club: Apple HomePods for $2...
Sams Club has Apple HomePods on sale for $259 through March 31, 2024. Their price is $40 off Apple’s MSRP, and both Space Gray and White colors are available. Sale price is for online orders only, in... Read more
Get Apple’s 2nd generation Apple Pencil for $...
Apple’s Pencil (2nd generation) works with the 12″ iPad Pro (3rd, 4th, 5th, and 6th generation), 11″ iPad Pro (1st, 2nd, 3rd, and 4th generation), iPad Air (4th and 5th generation), and iPad mini (... Read more
10th generation Apple iPads on sale for $100...
Best Buy has Apple’s 10th-generation WiFi iPads back on sale for $100 off MSRP on their online store, starting at only $349. With the discount, Best Buy’s prices are the lowest currently available... Read more
iPad Airs on sale again starting at $449 on B...
Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices again for $150 off Apple’s MSRP, starting at $449. Sale prices for online orders only, in-store price may vary. Order online, and choose... Read more
Best Buy is blowing out clearance 13-inch M1...
Best Buy is blowing out clearance Apple 13″ M1 MacBook Airs this weekend for only $649.99, or $350 off Apple’s original MSRP. Sale prices for online orders only, in-store prices may vary. Order... Read more
Low price alert! You can now get a 13-inch M1...
Walmart has, for the first time, begun offering new Apple MacBooks for sale on their online store, albeit clearance previous-generation models. They now have the 13″ M1 MacBook Air (8GB RAM, 256GB... Read more
Best Apple MacBook deal this weekend: Get the...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New 15-inch M3 MacBook Air (Midnight) on sale...
Amazon has the new 15″ M3 MacBook Air (8GB RAM/256GB SSD/Midnight) in stock and on sale today for $1249.99 including free shipping. Their price is $50 off MSRP, and it’s the lowest price currently... Read more

Jobs Board

Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
Senior Software Engineer - *Apple* Fundamen...
…center of Microsoft's efforts to empower our users to do more. The Apple Fundamentals team focused on defining and improving the end-to-end developer experience in Read more
Relationship Banker *Apple* Valley Main - W...
…Alcohol Policy to learn more. **Company:** WELLS FARGO BANK **Req Number:** R-350696 **Updated:** Mon Mar 11 00:00:00 UTC 2024 **Location:** APPLE VALLEY,California Read more
Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill WellSpan Medical Group, York, PA | Nursing | Nursing Support | FTE: 1 | Regular | Tracking Code: 200555 Apply Now Read more
Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.