WWDC2003 Session 300

Transcript

Kind: captions
Language: en
ladies and gentlemen please welcome
senior product line manager for
developer products wiley hodges so i
want to welcome everybody here today
today this monday marks the beginning of
my 12th week back at Apple after a four
and a half year absence and what a 12th
week geez this is a really exciting time
to be back at Apple I was lured back to
the company by the promise of something
really great happening in developer
tools and hopefully this morning you got
a taste of that with what Steve showed
in the keynote an Xcode I personally was
flabbergasted by what was happening I
remember standing behind Steve narath
chair in his office and getting a demo
of Xcode a few weeks ago and just my jaw
hitting the floor I'm thinking this is
so fantastic i'm so excited and that
excitement is just kept with me this
whole time and I want to share some of
that with you today and we're going to
start off by introducing the person who
has overseen this effort and help make
this all possible I am pleased to be
able to introduce to you mr. Ted
Goldstein the vice president for
development technology so thank you very
much and welcome tech I always six heads
hands this is a great day Thank You
Riley so I think this is going to be the
the first Nemo free presentation
I like an email but I've got to talk
about something else so let's talk about
a great legacy I think developer tools
on Macintosh have a great legacy and
that we really do are building on a
number of truly excellent and incredible
systems developers have had extremely
high expectations because of many of
these systems have been just really
fabulous the first maybe not so fabulous
but the Lisa development system coming
mouth in 1983-84 but with soon follows
very quickly by litespeed pascal and
lightsey pascal really changed the way
people thought about programming because
you could type a line of text and
immediately see it executed the
designers of and founders of Lightspeed
really wanted that extremely attractive
environment where you could it
interactively develop the code and
really feel the application come into
existence under your hand so that in
fact almost the the tool itself
disappeared out from underneath you and
that really is just what I think of as
that the most important property of a
great tool one reason why we use the
hammer is you don't really think about
the hammer you don't know who the maker
is you just swing it knock the nail in
and it disappears from your existence
because your brain is focused on what
you're building lycée Pascal was the
first system that actually made that
happen and I think it's an important
part of the legacy of development on the
Macintosh because it was so well matched
so well matched to the interactive
experience that the Macintosh are
offered in 1984 the next system that i
think was incredibly important and
meaningful or two Mac develop which was
the magnetized programmers workshop
diagonal system yes it brought the full
unit kind of command line sequence but
did it in a very interactive environment
and it provided scale people who could
start development in like two pascal or
confound that they they ran out of steam
when the applications became a certain
size and mpw was really great because it
out for small groups and teams to work
together but when it became larger teams
in large groups npw really didn't help
all that much people found it falling
down someone I think one of the greatest
systems that brought the capabilities of
the C language and such that had people
were using an MP w arm but brought it to
the attack and field which delights b2c
environments many many applications were
written using a combination living in
like sleep seed for the development
phase but finally when you get to
deploying they switch back for shipping
the application using M pwc and those
two environments really ran very nicely
synergistically together sink reference
important system provide a great
documentation allowed for that
interactive feel and capability of
knowing of to be able to navigate
through all the immense api's that Apple
was providing to you I think one of the
most important systems and clearly one
that that stands to this day as as the
leaders is meant to work C and C++ and
really sets the standard and we respect
that since for the last ten years mpw
has has really become the the gold
standard and development of the
Macintosh and if you reset the bar very
high and every time we look and compare
ourselves we of course compare ourselves
to what metal works and codewarrior have
done but you know apple also wants to
make sure that it's a player in this
game and we of course when we introduced
mac OS 10 we brought back the we brought
the unix environment we want to the UNIX
focus set of tools with some with
interactivity and we have the apple
project build environment that we came
out with in 1999 these systems in these
tools and people are Apple project
builder really harkens back in many ways
to mpw and to that whole command line
oriented interface with a rapper of a
very interactive feel on top of it but
you could certainly tell that the
interactive tools are one had edit
underpinnings are slower and more unless
dynamic command line tools so we would
challenge
I developers to do better and last year
we set a fairly hard rigorous standard
for us ourselves that to actually do far
better in developing applications and to
improve the programmer productivity than
ever before and I think it's critically
important critically important to say
that today with Xcode are we've made a
tremendous step I believe in the right
direction so when we step back we think
what are the what's the basic mission of
what we're trying to accomplish and that
is to improve programmer productivity we
actually are decomposed the problem into
four basic things first you need to be
able to rapidly develop new ideas second
you need to be able to get to your code
and then get out of that way you want
that transparency you want that tool to
be an extension of your hand you wanted
to you know not so that the tool itself
is all that Gloria so that we're very
happy for it to be a beautiful and
aesthetic thing but we want you to be
able to focus mostly on your
applications because it's your
applications frankly that we depend upon
to our success and we recognize that so
we want to take you to the places in
your code that is most importantly
critical to making things happen the
third is the economy bugs you need to be
able to find your bugs and to fix the
problems that occur to be able to extend
the code and have that very interactive
cycle that really goes all the way back
to Lightspeed Pascal we think that this
is a critical critical ingredient that
you love about are many of the
development environment from the
Macintosh and we wanted to strive for
that same type of experience with that
xcode you saw a taste of that and chris
Espinoza's demo this morning finally you
need to be able to manage large projects
many of the applications that you've
written are in the millions of lines in
the tens of millions of lines of code
and applications that scale Nets have
large teams teams spread over multiple
continents and you need to be able to
manage huge volumes of code and such all
together and we think that that has been
in some sense a big place where Apple
has previously put a lot of its effort
because so many great third-party
developers have put their efforts making
that interactive experience
what we want to do is fuse all four of
these directions into one tool into one
experience for you and so we Ginn with a
new user interface and that new you are
in some sense is inspired by the urs
that have worked are for the Macintosh
users in fact in many ways we recognize
of course kind of an iTunes like feel
about it in iTunes and your music
collection may in fact be the largest
corpus of data on your disk right much
larger perhaps even in the source code
you manage and yet you can sort it by by
group by genre by artist but how
frequently you've listened to it it has
this wonderful feel that you're just
able to manipulate it you're not doing
SQL queries to find the song you're just
clicking away and finding it and it
becomes upside with tool and it was a
great inspiration for us to use this
metaphor and it is so worked extremely
well and many other of the new tools and
applications coming from Apple that we
thought gee here we have a great place
to begin a new user interface experience
but then of course you're also used to
speed in this idea of rapid builds and
zero link this notion of eliminating the
link phase or making it so minutely
small that you don't care about it
anymore is of course a cornerstone of
productivity that feature of rapid cycle
development and and such is of course an
essential ingredient and I think a
hallmark of every Macintosh environment
that needs to exist now how about
finding the data of course that are
things like searching for information
just as it is in your music just as it
is in the finder you have enormous
number of different ways of organizing
and classifying information and
metaphors that works extremely well work
here for the applications work well here
to code sense is this idea of the app
that since it is an interactive tool it
knows something about your program it
has a built-in index of the symbols and
information and it's able to help you
complete that on the floor and then
smart groups this idea of being able to
have meta information organized the both
the lines of the code and the files and
such
to our categories that dynamically
update themselves and this is an area
where we've only just begun you'll see
the first steps here but this is an area
where we would love to get feedback back
we want feedback on all the features
from you next major quadrant of features
is in finding and fixing problems fixin
continue or six feature that you saw
this morning very important part of that
dynamic interactive development feel in
this notion of for matters right that
you're able to tell us something about
the way you want the data to be
presented to you so that if you take any
of the types both that are built into
the system or to extend it with your own
data types and show it in a short amount
of information on the line on on the
debugger information are both for sort
of standard types and for templated
types the final project is how do you
cope with a very large application so
SCM source source code management
systems are distributed build this idea
of be able to form an out to a network
of computers and finally the let you
know what's off in the last phase but in
fact what we would like you to do is to
be part of every part of development
process of running performance tools
building and integrating it into the
application and Scott talked about in
the last session or to use it as part of
the interactive development environment
we think all these things need to be
merged into one environment we call
Xcode now many of these features are
features that you had before what we
intend to do is to essentially say what
you need to meet your needs by providing
you a you are that you don't have to
struggle to learn that's fast that has
that works as you expect and has the
features that you loved in it in other
programming environments that have been
done extremely well before us and so
that you're not sacrificing anything we
think it's critically critically
important that we build upon the past
and then we take that and use that to
your advantage but we also want to
exceed your expectations we want to
provide you with a user experience that
is both compelling in and of itself and
gets out of your way that makes it so
that it's you really are more productive
this idea of descriptive builds where
you can
to leverage all those CPUs not only in
your own office button your other
co-workers or office if you're writing a
10 million line application chances are
you didn't write it all by yourself
chances are there's a couple computers
over there that you can leverage to make
to make things built in fact my goal is
that no build should ever take more than
a minute no matter how large the
application we're not there yet but
we're working on it and this is in fact
I think the very first and most
important step that we set this
important target to to really make this
mistress and we'll show you some of that
later today fixin continue this idea of
being able to dynamically patch the
running application and insert new code
and to be able to try out multiple
different ideas to be able to fix bugs
on the fly and of course zero link this
idea of limiting the link space so that
you think of linking as a kind of an
optimization an optimization that is
applied after are as you get towards the
end of the project to make things even
more types and exactly we'll probably
use the links A's operative time in the
future to do additional optimizations
additional our compilation technologies
so that you can actually do cross module
and Inter module optimizations that are
more that help you improve to put the
execution time of your code so our
challenge then is to provide you with
our the fastest way to create Macintosh
Mac OS 10 applications applications that
are fast to learn fast to use faster
debugging and that the generated code is
fast we want to provide that to you we
think Xcode is a tremendous leap in the
direction of providing that so
you've seen this you've seen some of
this information we we hold networks as
well as the gold standard and this is on
a certain files we picked out in finder
and you can see that in Jaguar we took a
fairly lengthy 30 seconds of coin back
into December 02 tools we made good
progress and reduced its some but I
think in Xcode are we really cut it down
to nine seconds and that's that I think
is really getting into the place we were
finally beating our what what code word
has to offer and then down to even three
seconds where you have this very a
terrific process where almost it's the
debugger ceases to exist and you're just
modifying and changing running
application and you saw that this
morning on full build times again are
the the time has been getting better and
better and now what we're releasing with
Xcode in the distributed build mode
fabulous are incredible time where we
get it into the hundred second range and
even I think today we're going to see
even better than that of our benchmark
application let's talk about carbon some
people say gavel have a mate tools to
make to do carbon programming how many
people thought that just curious right
we do carbon programming we'd love
carbon Xcode was designed from the
ground up focused on carbon and really
to make the carbon development cycle are
tremendously productive and of course
that also means making C++ tremendously
productive as you saw in the Safari we
use a mixture of C++ and objective-c and
they work extremely well together or you
know in a language dialect we call
objective c plus plus we've designed
certain features in xcode specifically
for carbon and c++ for example you can
now set breakpoints on exceptions when
they when a class raises a C++ exception
arm the the debugger built into Xcode
will catch it we provided a new feature
we call the SDK and this is the ability
to live on one version of Mac OS 10 and
target another so you can actually live
on Panther
in car big Jaguar and in this developer
relief we're hanging out to you today
live on jaguar and target panthers and
as well we also support Puma to these
four matters which allow you to write in
C++ directly and two and then this is
vocht automatically by the environment
to display your data and of course in
fact that C++ does inquire an immense
amount of cross information in the
header files we provide the speech of
distributed builds and PCH precompiled
headers to make that easy and terrific
so with that I want to invite up Steve
now off to talk about the Xcode
experience Thanks oh I need a deeper
knew that the reader so I think we can
sum up the Xcode experience and one one
phrase basically we want to provide a
fit and finish that's consistent with
the apple grand and from my perspective
that means for things primarily it means
the UI has to be responsive right it
that doesn't just mean a fast compiler
means fast finds it means being able to
get your job done in general in a very
fast way number two it means
expressiveness we want a UI that can
view your project data for many
different perspectives because there are
many times during development where
you're working on a project that you may
have may or may not have created and the
way you want to view the data is
significantly different based on what
stage of development your eyes number
three we want workflow that makes sense
and that just gets out of your way we
want to make sure that you don't have to
relearn a whole bunch of new concepts
just to use the tool so we were inspired
by many of the applications the Ted's
mentioned we were also inspired by many
of the third party applications that
you've developed we use them and in fact
we look to them often with great pride
we learn from you we're inspired by by
our own apps as well and harmonizing
with cancer when you look at what
Panthers doing and you look at what
we're doing it seems like a unified
whole and I think that's actually a
breakthrough for us to have the tools
and the user environment has a very
uniform look and feel and flow and the
fourth thing and this is this is very
important it needs to look sharp it
needs to be pixel perfect okay in the
past we never collaborated with artists
design and production and Steve Jobs was
gracious enough to let us have the
support of apple's world-class design
and production people and it shows right
people who are experts developing
compilers and development tools are not
artists and some of the guys have
developed icons over the years and we've
gotten by but it's really helped to have
support from our world-class production
people so with that said I'm going to go
through a demo
so I have a project built I have two
projects we're going to look at today
one is appearance demo and for those of
you who have used codewarrior and are
familiar with power plant this will look
very familiar to you what we've done is
we've used our importer technology to
import it into Xcode and right now it's
built and I'm going to take these
through on some of the user interface
now one thing let's start at the top we
have the drop down buttons at the top if
you click and hold basically you get a
list of buttons the idea here is to save
valuable tool bar real estate for
operations that are fairly uncommon okay
so here we group build clean off and
clean together likewise over here we
have build and run building the bug run
and debug ok we have a stop button here
we have a little widget here to open an
editor I'm not going to do that right
now we have fines and we have an
inspector so you click here you get the
inspector you click again it goes away
just like many of the apps on the
platform this morning you saw Chris
Espinoza give a demo of some of the
features here if you want to look at all
the header files or the resource files
you can see them likewise so the search
fields very fast now what we're doing
here is we're actually looking at the
project group if you can read the status
message in the back it it says we have
359 files one of the reasons we have 359
files is power plant is actually
included in this power plants typically
statically linked into your application
and on there's no exception here so
let's um now go through the table view
here if you click here you can sort by
kind right so the application bubbles to
the top and the C++ files are all
grouped together and the header files
are all grouped together and then you
have the resources towards the end here
if we want to sort by file name if you
want to sort by code you can see that
the L window dot CP is the largest
object code we have here and likewise
you get sort by warnings so there we
have warnings file name kind all very
fast right so let's see we're going to
go next that is just a standard group
okay so you create these groups in fact
if you click here you can see that it
has sub structure as you've probably
seen in this project you can click here
and you can go through with the arrow
keys and see all the files that that are
there so even though hierarchy is
something that I personally hate dealing
with all the time you can actually use
this in a hybrid manner where you're
using some of the hierarchy however
you're still using what we call the
detail view or the table view there so
it's your preference so I'm going to go
back here and we're going to sort by
filing and as you might expect if you if
you double click on a file here you get
an editor okay fairly standard behavior
likewise if we if we go over here you
can double click on the application
group and if you double click on the app
application group what we do is we
actually fill a drawer with all the
files okay so Oh couple claps there so
the nice thing about this you have the
benefits of a standalone editor where
you don't have to constantly go back to
the project window to get to your other
files right and your groupings can be
arbitrary so for instance I could I
could close that the group's close the
window closed my hierarchy double-click
on my project and here i actually have
all of the groups right so you can
double click on a file get a separate
window you can double click on a group
get a drawer full of the files or you
can double click on the whole project
this depends on the size of your project
your work style you can imagine having
two editors up with two different groups
so you have a lot of flexibility that
can adapt with your needs okay one of
the things we hear a lot from you is oh
well I don't want to work in an embedded
editor
and I don't want to work just in in
single window mode I want to have a lot
of control and what's cool about this is
you have controlled that in fact you
control you don't have to go to a
preferences panel and set it all up and
say single many all or any of that stuff
it just works as you would expect so
there's a little button here to get back
to the project and why don't we now look
at the first smart group so here's a
smart group called implementation file
and what it does is it goes through and
basically gets all your GP or see or
Objective C files out so it's filtered
so if I was to add a file to my project
if it had a CP extension it would
automatically be viewed when you click
on the implementation file so again the
analogy with smart playlist is it's
based on a rule which you set up and in
this case it's set up to do CP files
there's a project symbols group here
that is very interesting so right now we
we are looking at 8000 symbols here and
if you click on the kind you can see how
fast that is it doesn't doesn't hesitate
and this is a g4 just to be clear not a
g5 and in fact you can you can go here
and you can type and it keeps up with
you very nicely in this case we limited
it from 8,000 to 630 symbols very
quickly you also have the flexibility to
go to the table view and say you know I
don't really need the symbol type and it
gives you more room for your other data
right very nice capability so again it a
dash and then you can pretty much go up
to the symbol and you can say now let's
look at draw drawer and we go down here
and you can see how nice it is to be
able to basically cut through all the
files and get to your data I've always
wanted to have a great way to edit
polymorphic methods because polymorphism
is a huge it's just a great design tool
that is
under use and in fact when you have a
tool that makes writing polymorphic
methods this easy in fact I think it
will encourage a different style of
programming so go back here now I'd like
to quickly demo the fine result if you
go here and right now you're looking at
a sheet obviously that has a fine text
field it has a pop-up that says do you
want to do a textual search regular
expression for the definition search
right now we'll just stick with textual
search and if we could look in the
project in the projects and frameworks
frameworks or all open files and we can
look in all the files and so on so right
now I'm going to look for a string
called the bar and you can see it's
right there with with me and it's still
looking over the entire project and if
you get get the hips here we can double
click on it and it takes you to to the
bar so very very nice very convenient
very fast so what I'd like to do now is
show you a cool feature we call code
sense and if we go right here and we see
is the and hit escape right now we're
looking at everything that matches the
in this context so for instance if I
click these
ah I used to have its sense of the case
insensitive but it's not the case
insensitive anymore so I have to type
correctly now but there is a feature in
code sense to say listen you don't have
to be so rigorous about case so if I can
escape now it will complete it and then
when i get arrow it will it will show me
that
oh well demos yeah you gotta love them
okay I think we'll go someplace else now
and go okay let's let's do something
else right now okay what I want to do
now is actually build a filled the app
but before I do it let's look at an
error and warning smart group now i'm
going to show you the embedded editor
here what we have what we have here is
all the errors and warnings that are
part of the build that we did lad so
here I'm going through all the errors
and warnings and as you can see we
annotate the gutter with with the
warning right there and we can use the
search field very nicely by saying
unused and parameter if we want to see
that so here we limited it from actually
over 200 errors two to six errors or
warnings i should say they're mornings
so it's very very interesting to be able
to manage your warnings this way where
if you're if you bringing over a large
project and in fact as you can see we
compiled all a power plant here and
there were two hundred and sixty-four
mornings why is that it's not
necessarily because it's bad code but
because the ganute compiler has a
different set of constraints that it
places on code to put it politely and
sometimes it finds errors sometimes it
doesn't so I don't really know how many
of these warnings are real but the
bottom line is when you pour code from
codewarrior to Xcode you will encounter
the same phenomenon so what I'm going to
do now is I'm going to go to the
inspector
going to go to build and I'm going to
click something called inhibit all
warnings okay and then what I'm going to
do click on the implementation file
hit save so what I'm going to do now is
hit build and run and it's going to
compile it's going to compile this right
now and what it's going to do is remove
all the warnings for me and so you can
see that all the warnings are going away
and it's really interesting because they
show you where my application oh I have
the search field thank you there we go
so you can see it's shrinking it's
removing all the warnings and errors so
this is a really easy way for you to
tell your manager oh where we cleaned up
all 260 mornings you just click that
button and everything goes away okay
very nice and so as you can see we're
compiling fairly fast now this this on
power plant filled in about 55 seconds a
little bit under a minute and that's
that we consider very respectable we
want to do better but you know for right
now it's 55 seconds for a full build of
power plant and it should run the
application right now so you've seen
this application many times I believe
most of you okay so I'm going to go back
to my drawer here go to one of the
application file in here what I'm going
to do now is show you the pot the navbar
here we have a symbol pop up so if i
want to go to listen to message we can
navigate down very conveniently and if i
create a syntax error and i hit save and
i hit build you can see from the editor
we've basically annotated the the gutter
and then when you click on it you could
see the error in the in the status the
reason this is important is it gets back
to this low distraction factor that
we're trying to promote we want to bring
the information to you so if you're in
the editor and you make a syntax error
and you hit build you don't have to see
some funky town will come up in your
face and
and you get the error right there so
right now if I if I correct my error and
I hit filled you can see it goes away
automatically and it also gives you a
sense for how fast things are right
because as soon as I hit save and as
soon as i hit filled you saw it go away
which meant it had seen the source code
and had corrected it so that's useful
i'm going to show you briefly some some
some neat on support we have for
searching the help system so here we
have a window which has the same search
fields as all the other windows and you
can let's say if you want to search for
retained and it keeps up with you very
nicely and then if you click on it will
take you to the HTML documentation very
quickly ok very very quick so right
there thank you likewise you can focus
on specific book so to speak with carbon
Coco applescript library whatever you
want but it's so fast they often when
you don't want to think too hard again
you just go there and and you get get
the information you need and just like
with the other user interface elements
you can basically remove these columns
as you want so that's that now I'd like
to go back to my inspector so let's
so one of the most interesting
inspectors we have is the target
inspector right now what you're looking
at is a native target inspector we have
a general pain that if you had a more
complex project you would see the
various targets listed here you have
this build and this is where you're
going to spend most of your time when it
comes to changing options there's a
little drawer here and one of the things
that's really cool is if you want to
look at all of the options that we that
we have you can see I selected all the
groups and 136 items turns up there so
now if I go here I saw what about
optimization flags it limits it from 136
26 ok so again very useful way to find
things and just just as you would expect
from the other user interface elements
you have so current settings are the
ones you've chosen in this case I have
29 items here are the common settings
and you can see there are little icons
to tell you whether it's a build setting
or a language setting or in fact a
warning it's very very useful to have
that cue there we have GCC settings here
you can click on all the language
settings code generation settings
warnings pre-processing so there are
many different ways to view the data
from the categories we provide here to
the searching that you've seen and one
of the things that we don't have in the
pre-release that are being planted
you'll have user configurable groups so
let's say you're working at Adobe on
Photoshop and the Photoshop team wants
to have their own custom options they
could actually create their own group
they're dragged over the options share
them with other groups or people on the
team so that you start to have basically
a workflow where you don't have to think
too hard about the options which is
really the best thing right you want
someone who's expert at using all the
compiler options and you want to benefit
from their knowledge and this is a very
easy way to do that so we have and
another thing to mention is these groups
are extensible so if you're a third
party tool you can add
add options here which is very nice so
the rules on pain allows you to
associate or change the compiler and
associate files with the tools that
build them in this case you could switch
between GCC 333 dot 1 and so on and
there are lots of other Reza's in there
as well and then there's properties very
basic icon document types that kind of
stuff so I think you'll find this very
handy very convenient and we hope we
hope you like that one one one point is
we have this facility to pin the
inspector I won't and what that will do
is rather than track your selection as
it was doing before you could select all
over the place and basically that
inspector will stay put which again
since the target is one of the most
common inspectors that might be a
popular feature for you we're going to
work on the the user interface such that
when you actually have it pinned and you
hide that toolbar it's more obvious what
status in this gives you the best of
both worlds where as you know in the
finder there's a difference between
inspectors the track your selection and
info windows so this gives you the same
the same on type of feature however it's
more lazy lazily evaluated you don't
have to you don't have to select the
type of inspector when you open it up
you can do it later on so a another
feature which I'll just mention briefly
is we affectionately call it the Metro
morph where you can double-click on that
widget and navigate your files and get
back some screen real estate if you want
so in that case you know some some
people may prefer that so again it's
it's a case where all the details use
great searching is great but you might
get into a groove where in fact that's
the orientation you want and you saw how
easy it was right you double click on
the widget and and it does the right
thing likewise here it does the opposite
it'll push it out it'll maximize the
view so there are some
when you want the details you to take
over the window other cases where you
want the outline view to take over the
window we support both we have the next
previous buttons here if you click and
hold like Safari you get on the list
very nice here you could just flop
around between the files in the nav bar
this button is called the counterpart
button so if you're in a CP file and you
want to get to the header file you just
click it and this this basically shows
you the include files that that you have
and you can see the form factor is
really nice so when you when you if you
want to maximize it that way here's yet
another way of working right you can go
over here click and you have the full
editor with with your view here so
there's lots of different ways to work
and we think you'll you'll find a lot of
interesting ways to use the tool ok so
I'm going to now go to another dental
another project this project is built
from a framework which is less commonly
known to many of you I believe it's
called on the Qt framework cutie was
developed about 10 years ago by a
norwegian company very talented group of
people then he developed it with a
cross-platform flavor so it runs on on
Windows it runs on linux and so on
they're very strong advocates of the
open source movement so that's also in
line with the Mac os10 strategy so we're
we're strong partners and we want to
support on power plant and QT as
first-class citizens in this Xcode
development environment so here I'm
going to build and run this project
right now it's pre compiling the QT
prefix and then it will compile on
roughly a dozen files and takes about
five seconds to compile this guy and
this this is a 3d little 3d applications
that ships with cutie
and that's just running it outside the
debugger what I'm going to do now is
show you some pics and continue running
it inside of the bugger but before I do
that I want you to see the stop button
when we weren't running anything notice
the stop button was was grayed out now
it's running and you can see that we
composite the application that's running
into the stop sign so basically that's
the way you stop an application and they
stack so if you're running a long fine
most of the fine take are so quick that
they never stack but if you had a long
sign and you had a long build that would
basically stack with the most recent
thing on the top and so it's like a mini
activity stop button lets on now go to
debug
great so what I'm going to do is make
this window a little smaller put it off
to the side I'm going to make the
debugger window a little bit small and
I'm going to hide it for now what I'm
going to do now is click on gear so
right now I'm in the gear and I'm going
to go to the draw method use my son will
pop up and I'm going to comment in a
bunch of code that was previously
commented out so here's if0 i'm going to
move that down to gear 3 okay i'm going
to hit save i'm going to hit six and
notice that it stops the application and
adds the green gear so very similar to
the demo you saw earlier today the big
differences this is happening with a
very large c++ framework 9ct and this is
a GL application written in C++ using
their api's what I'm going to do now is
run another animation called landscape
remove it over here so now I'm going to
comment in some other cousin and look at
look at the code I mean it's not just a
constant not just a variable there's
many functions that are being added to
static data that's being added I'm also
going to go down to another method that
has to do with the landscape and I'm
going to basically set smooth shaded I'm
going to hit save and I'm going to hit
six and it's going to build the
application with my debugger say
error fixing gear okay let's stop it
okay well my second six is uh is not
happening today we could let's do it
let's try it one more time
ok
so here's three of the gears and
going to bring out landscape
and now it's sets initiated
there we go okay so you see how the
point here is we're running two
animations there's lots going on and the
responsiveness even though there was a
minor hiccup there was very good so the
tools are not bothered by what was going
on and it didn't take any longer than
than just doing one of them so that's
fixing continue so that's all I have for
today I think I'm going to bring up
director of interactive tools on Tony
Trujillo beyond and I'd also like to
thank on the the group for working so
hard on this project and giving of
themselves and in supporting it so
deeply so thank you tell me so I'd like
to talk to you about our new native
build system our natives build system is
actually the core of Xcode you no longer
have to use a separate command line tool
like make or aunt because Xcode actually
does all of its own dependency analysis
for you what this allows us to do is
maintain your build stayed at all times
so the benefit event is we can now give
you feedback directly through the UI
when your files become out of sync it
also allows us to deliver faster single
file compilation what we wanted to do is
take it one step further we've
introduced a new technology called
predictive compile normally when you go
to compile an application you do your
debugging you save your files and then
you wait and sometimes you wait a little
longer but with predictive compile
turned on the experience you're going to
have is Xcode is going to go out there
in the background and start to compile
your headers while you're doing the
editing so we're taking care of about
eighty percent of the time that it takes
to compile for you while you're still
working so then when you go to hit the
Save button now you're not going to do
the waiting game anymore what's going to
happen is you're going to have a really
great user
it's and the file be back in time for
you maintaining your build state also
allows us to deliver features like
parallel and distributed bills Xcode
also supports multiple target types
we're introducing a new target called
native targets this gives you a lot of
flexibility what you can do now with
Xcode is mix and match the different
target types within a given project so
you can migrate one target at a time
independently so this allows you to
manage your own process of migration we
want to encourage you to migrate over
the native targets because then you'll
be able to take advantage of all the new
great features that we're showing you
inside of xcode we also are introducing
extensible rules with native targets
what this allows you to do is modify the
built-in rules that we ship with Xcode
so you can actually pick which compiler
you want to use which Reds who you want
to use and do any other mapping that you
may choose so now you can solve both
simple and complex problems by modifying
these rules Xcode also supports project
builder targets and custom-built targets
like to make jam and aunt and other
command line tools now you've heard a
bit about distributive bills already
today this is a really great feature
what we are doing with distributed
builds is we're taking the open source
code called dis CC and also taking
advantage of the rendezvous technology
so you're all familiar with your normal
developer work environment but with
distributed bills what we're encouraging
you to do is to take advantage of the
entire unused computing power across
your work group so if you have a larger
project you can you know so in surfing
the web or reading emails take advantage
of the computing powers if they're not
using so what you've created is a work
fleet across your work group if you have
larger projects you can also distribute
your bills across a build fleet
like the one we have over here this X
serve racks I'd like to invite Stan
German on stage to give you a demo of
distributed build
thank you Tony so it's Tony already
pointed out we have a small build speed
here because we don't have any engineers
who would be surfing the web or reading
email all of our engineers are happily
working on the great code that so that
we can make cds for you my machine here
i have defined ur front and sources from
panther running on Panther and SP
pointed out earlier today in the keynote
as you've seen that's over hundred
thousand C++ lines and 1500 files or
something like that so this machine is
connected to the rack of excerpts and
I'm just going to press build and if
somebody has a stopwatch or a cell phone
with a feature like that it should be
fairly quick now if you direct your
attention to the rack of excerpts at
least the part of people sitting here
you will see a lot of nice blinky lights
we should have a view up there and we're
building finder now the whole stack of
1500 files and it should take just about
a minute steve was talking in the
keynote of 90 second 97 on four or five
machines we're using a few more here but
you will find that actually this is
overkill you probably don't have a rack
of how many extras at home but you can
be using when you're at home your wife's
computer at the office there might be a
few people actually surfing the web
after all well we are now linking and if
we go back to the demo machine you see
the server search of sitting I one
sitting pretty if we could cut to the
computer we see that the finer has
succeeded and we can actually run it now
this is not a optimized build and it's
actually using the zero link technology
as well point out earlier so it will
take a little bit longer to launch but
you gotta find ur here and it's fully
functional and fully built now what we
can do is to show you why we actually
have a big fleet up here I'm going to
clean it and I actually have two
machines here to build the finder let me
built this one as well we don't have it
I thing I triggered a Steve Jobs kind of
shlomo thing looks funny bit so I'm
going to kick off that built of finder
and let me actually restart this one as
well be launching Xcode and so if you
have a stopwatch how long is it going to
take when we're building two finders at
the same time using that build sleep
well you will find out it's actually not
so much more it will be a little bit
over one minute because the machines
before they were sitting more or less
idle and now when you look at the speed
as its flicking through through building
somebody to account of how many sore
spots at the same time the sweet spot
lies with less than those machines that
we have here you will actually find out
it with four or six machines you really
reach almost full speed already and what
was the last time you saw this many
extras on stage it also shows you don't
have to go buy a full full forty two
units rack fearless will be doing now
we're done compiling here the last file
is compiling linking and the other
computer is already done because I click
it earlier and now we bill to finders in
this time so with that back to Tony
Thank You Stan so what we're really
doing here is taking something that used
to take hours to do and doing it in as
little time as it takes to take a coffee
break so the power of distributed bills
so I'd like to shift gears for a minute
in addition to being the director of
Xcode I'm also the director of web
objects and over the past year so a good
number of you come up and ask me what
about eof can you put it back into the
operating system so we're taking a step
in that direction and we've come up with
a new technology a new binding
technology that we've added to cocoa and
it is created with the analogy of the
EOS interface layer inside of web
objects so what's really neat about this
is it's completely integrated with
interface builder so you could take
advantage of this new Koko binding
without writing any code and the benefit
of this is that you can write your
applications a lot faster and a lot
easier and I believe if you attended
discussion in this room prior to this
one it was also demos for you if you're
interested in this technology there's a
couple of sessions dedicated to it the
first one being session for 12 on
Wednesday so I suggest that you attend
that it's a great technology I also
wanted to thank the web objects
engineering team for working so hard to
get this technology into Panther for you
with that I'd like to turn it back over
to 10 thank you very so this is really
great did I mention this was a developer
preview so there are I think one of the
things that though isn't developer
preview is the GCC 3.3 that is on your
your disks both on the the Panther and
the Jaguar versions of Xcode are the
compiler itself is GM and so you can
ship applications with it are the tools
themselves clearly you know where the
first time we're handing out to you but
the compiler itself is GM obviously what
we're trying to do here is to compile
both smarter and faster and we built
upon technologies that were built into
GCC a precompiled head
and we've improved it with two memory
management system with to me out the
algorithms we've added in the predicted
compiler for very fast interactive
response we've edited distributed builds
for our large full build response and
this is really I think a fabulous
platform and foundation for what we're
trying for for making an improving
programmer productivity and this is the
compilers part of it but GCC is also
extremely critically important at
providing you the performance for your
application itself it's not enough for
to simply execute fast it also has to
generate great code and so we've also
put a tremendous amount of time on
increasing and improving the
optimization technology a big part of
that has been spec marketing heard this
morning it helps us compare one system
to another one of the big important
parts about the g5 is that the g5 has
unique and important architectural
features that the GCC compiler is
designed to generate code for so the big
the big word in CPU design is ILP
instruction level parallelism and
essentially what you have to what would
a what what the city does is it
processes to a very long pipeline of
instructions and tries to execute to
multiple functional units are at the
same time so really this idea of a
program counter really is something that
is our this notion is it's not that it's
executing one instruction it's executing
multiple instructions in flight you
heard this morning 215 instructions in
swype well essentially part of what the
compiler is doing is it scheduling and
interleaving multiple operations
multiple statements of your program to
be executed simultaneously and that's a
hard thing to do in GCC is doing this a
tremendous and terrific job for doing
that and as well because we have so much
in flight the CPU is also capable of
prefetching both the instructions and
the data and because because of that
there are these incredible io channels
that is pulling our data both out of
memory and painting in or four discs to
make things to keep that the functional
units said GCC performances is designed
to take advantage of these features and
to create these incredibly good
performance number
that we're talking about so when we look
at where we've come from GCC 3.1 to 3.3
we actually see benchmark performance
improvement of anywhere from ten to
thirty percent on on individual
benchmarks my favorite one in fact is
eon are one of the GCC spec benchmarks
and we improve that by 50% eon is a c++
benchmark with over 200 250 or so
virtual functions so one of the things
is that the g5 r is in fact it's about
its one hundred fifty percent of the
intel pentium benchmark performance one
hundred and fifty percent so in fact our
the g5 is the best machine for
object-oriented code this is a really
terrific device and i think for your
applications are so that use virtual
functions or objective-c polymorphic
message sends this is this is the device
for you we've seen many applications
approved by forty percent for just
migrating from one compiler to another
and even even extremely well tuned apps
apps that we've focused the performance
tools on we've seen our performance
improvements of five percent by just
improving and the alignment flags if you
read the release notes in with the GCC
compiler you'll see that those legs your
mileage of course may vary so it's not
all about flags it's also about
performance tuning and using the tools
which we'll talk about in a few minutes
so very quick run through again to the
spin of the spec benchmarks the ones you
saw this morning the formal names are
spec into base 2000 spec FP base 2000
the multi-process benchmarks spec its
rate base 2000 spec FP rate base two
thousand these are the benchmarks that
really mainframe computers have been
comparing each other over the years in
which today your g5 is is one of them we
use because we ourselves from Apple do
not provide a fortran we used a terrific
fortran implementation from numeric
algorithmics group they're fortunate 95
implementation and it's a terrific
fortran that front ends the GCC compiler
we hire this company called Varitek very
test
used to be the old CD labs using the CD
magazines and to perform the CPU 2000
that's the the names that spec gives the
overall sweet and of course these are
the machines we compared against and
when you look at it you can see you know
this the g5 with these compilers arm
really gives us incredibly good
capabilities repairing and the machines
machine g5 really does uh be Delta Z on
both in the integer and floating-point
tremendously in floating point and this
is just a terrific part of the story we
have today comparing on the even single
CPU inches a little bit less well arm
compared and the reason why one is
better than the other has to do with the
differences between overall system
performance and the fact that are
executing a single thread of an
application for certain kinds of integer
actually had different latency is
involved then when an entire system is
being used together our spec has one
deficiency that rate spec spec is x 1
deficiencies expect rate doesn't and
that is that it's a single threaded the
the idea was that the most applications
were only doing largely merits
processing so there was only one are one
thread of execution spec rate i think is
much more indicative of the kind of
applications people write these days and
i'm going to look once your mini so and
then of course on spec cpu comparing
against the pentium 4 again the eCos out
our edges out on integer but we edges
amount on floating point and i believe
that word processing is about as fast as
it needs to be but i think the
floating-point domain where we have all
of this user interface and graphics
image processing scientific processing
on the g5 is the hands-down winner so
with that if flags aren't enough to make
your application grade then need to
accelerate your applications and so I
want to invite a pain up performance
tools manager to talk a little bit about
the other things you can do Dave
Thank You Ted so you've seen how we can
enable you to quickly build applications
with the Xcode and how the code
generation is better with GCC now but
what if you need more how can Xcode help
you make your applications even faster
well what we've done is we've directly
tied Xcode to several of the major
performance tools that we ship with Mac
os10 you can launch the performance tool
directly from Xcode almost as if it's a
debugger with your executable as the
target application from there and that
is you're navigating through the data
from the performance tool if you find
hot spots in your code we highlight that
code and you can double-click on it get
directly back to the source code in your
application so this lets you look at a
variety of performance aspects and if
your application is too slow for example
you can look at application level
profiling with our statistical profiling
application sampler if you're using too
much memory or leaking memory which is a
bad thing because that might end up
causing paging you can use malloc debug
to look at that to study your object
allocation and de-allocation patterns
perhaps you're creating too many
short-lived objects too much object alex
is great for that and really let you
take advantage of the raw cpu processing
power that you've got here there's a
lower level machine profiling tool
called shark which is part of the chug
tools that all mentioned here briefly
we've also enhanced some of the tools to
give you some new ways of studying
application behavior I in the sample of
profiling tool basically what it does is
takes a call stack at specific time
intervals and we build up at three of
those call stacks previously it just
showed you a browser view we've added an
outline view for that we've added a new
ability to look at
dynamic behavior of your application
would have event tracing so so what we
can do is show you for every let's say
that you stop on Malik and d alec called
for every time the hits will show you a
table of the call stack for each
specific kids then we show a graph with
the height of the stack at that instant
what that lets you do is see patterns of
calling in your code and you can click
on the graph at that point see wow what
is going on here that I'm repeating the
certain activity over and over again we
also how many of you have seen this
spinning rainbow wheel come up a little
too often in your application that's not
a good thing we've added an ability to
automatically catch when that happens
with an application called spin control
just have that application running and
when that little cursor comes up it
automatically samples in the background
and you can go see what was going on
during that period of time now I
mentioned the shark profiling tool
that's part of a package of tools that
spent upgraded for this release it's
called the chudd tools for computer
hardware understanding developer tools
what these do is really give you access
to the performance monitor counters
building to the processor and the memory
controller these tools have a lot of
deep knowledge of the architecture built
in so they really understand the price
they've got models of the processors
from both the g4 and g5 and I can show
you specific optimization tips at
specific lines of source code or
assembly code are certain things causing
cache misses right here for example so
shark is great for seeing these kinds of
things both within a specific
application and across the system as a
whole because it takes advantage of
colonel extension that lets you look at
what's going on in real time in your
application and the entire system
monster is a spreadsheet for performance
events and there's a number of
additional tools
well the answer is the time we're going
to skip over the demo here you can come
to the performance tool sessions on
Wednesday to see that so we hope we've
excited you with a lot of the cool
technology that we've been putting into
Xcode here we want to make it easy for
you to adopt this and remove barriers
that might get in your way in your
environment of getting here so put a lot
of work into the importer so we can
import projects from codewarrior into
Xcode very easily what we do is we Apple
script out to code warrior and ask it to
export the project into XML of the
format we want it we then read it in I
create all the targets and the order you
specified populate them all map all your
code warrior compiler settings / GCC
compiler settings build up your
info.plist one thing that we don't have
on yet in this developer preview will be
there for Panther finals is
cross-project references which has been
very heavily requested if you have
references as the other projects will
automatically import those as well and
the build system will understand that
once your project is in it won't
necessarily fully compile but we've made
some additional changes to enhance that
we've added codewarrior style assembly
syntax to GCC that's a higher level bit
easier to program and we've had a lot of
requests for wide character support so
we've added that in as well it's built
into the system libraries in Panther and
there's a third-party solution from
dinkum where for Jaguar SDKs we've
touched on before we ship header files
and stub libraries for Mac OS 10 dot one
matt goes tend to and now for Panther so
from 10 dot to you could develop for any
of these os's gives you a lot more
flexibility in your environment and in
talking to a lot of our large developers
and listening to you and feedback forms
referred that perforce is a very heavily
used source code control mechanisms so
we've worked with that team company from
alamitos to integrate that into Xcode
as well as the open-source standard CVS
so we quickly seen here some of the ways
that we make it help you develop fast
applications in addition to developing
them quickly and our efforts make it
easy to adopt Xcode so if you want to
give it a try we've got people in labs
throughout the week and come more to the
developing carbon application with this
Apple tools session on Thursday morning
to see the import process in detail
Thank You data so what we have is a
terrific architecture what we plan for
GM is to make it faster yet we'll be
adding in java and webobjects support
and we'll be working on some of those
bugs we want to hear your bug reports we
want to hear your feedback what you like
what you don't like how missing features
and so on I think the workflow is a
tremendous tremendous improvement for
many tool Apple has ever shipped and I
believe that in fact we have the basis
for something that's extremely scalable
technology techniques like smart groups
for example you can clearly see how we
can add in with many features to help
people better understand programs to
help people refactor and understanding
beyond our this release our will be
shipping pretty much concurrently with
women cancer shipped we'll be adding in
into the compiler into module feedback
directed optimization and enterprise
application development in future
releases these are important
technologies that we have already well
under development the enterprise
application development tools that
you've seen in tools like webobjects
will be working in so that they're very
naturally tightly integrated in soap and
such so remember it's a developer
preview they are you know we certainly
will find at least one bug per person
arm but you know it's it's not bad I
think that the we've been living on it
for some some time now and we think that
this is it sits at the quality that you
can
lease so developed that apple com slant
bug reporter send feedback to Xcode
hyping feedback I promise to read every
message and I'll probably respond to 22
most of them and really want to help
help you create better tools and better
applications so the wrap up speed has
been a primary focus removing obstacles
has been a big focus has it has been
very supported we are integrating in
Apple script webobjects Java C Objective
C performance tools into one umbrella
and Xcode I think represents a new
dimension in creating applications for
mac OS 10 you'll hear more i'm joined
please join me at the java state of the
week of the union immediately following
this session downstairs tomorrow we have
the web object State of the Union you
and even detail to introduction to apple
dev tools given by Stan tomorrow GCC and
depth on Wednesday you can only how to
use the cocoa bindings mechanism our
wednesday afternoon and Steve will be
giving a talk about the user interface
and how it was put together and some of
the thought processes behind it God
sweetie Georgie will be up here
afterwards to answer additional
questions they'll be mailing list
created on the side apple com and again
of Xcode Hopsin feedback at group that
apple com thank you very much and have a
good evening
[Applause]
[Music]
you