Book 2: Our first Program

Previous | Next

You already installed Xcode in the previous step, so let’s jump right in and start it up: Click the LaunchPad-icon in the dock, and there, click the Xcode icon. You will now get a Welcome to Xcode window.

Welcome to Xcode

You can either click the Create a new Xcode Project entry there, or if you’ve already had Xcode open and this window isn’t there, choose New Project from the New submenu of the File menu.

A project is an Xcode document, and essentially a list of files that make up one program. There are different kinds of projects depending on what the final result should be. For example, you can use Xcode to create application programs, but also to create screen savers or plugins. Each kind of program needs to be assembled from different kinds of files, in a slightly different way, and an Xcode project contains the information what to compile how. Due to the sheer number of settings involved, Xcode provides pre-made project templates that are already correctly set up for common programs.

Motv project template window

To get you started easily, we will start with a simple program that can be run using Terminal.app’s command line. So, select the Application section in the Mac OS X area of the left list and choose the Command Line Tool template, which will give you a very simple C program. Click Next. Make sure that the Type-popup is set to “C”. Type in MyFirstProgram as the name for the project.

It will also ask for a company identifier, which is what a Mac uses to tell apart various programs. If you have your own web server, use its domain name in reverse. Otherwise, we’ll just use com.example for now. Turn off Use Automatic Reference Counting for now, if that option is there. It is not needed for C. Then click Next again.

Screen Shot 2012 08 05 at 6 41 03 PM

You will now be asked where you want to save your project. Choose the desktop for now. Your project will be put into its own folder on the desktop. (Leave the Create local git repository for this project checkbox off for now — git is cool, and you’ll want to use it if you want to program for a living, but we’ll not go into it in this tutorial)

Every couple Xcode releases, a helpful Apple programmer re-arranges the categorization in the “New Project” window. If your “New Project” window doesn’t look like the screen shot above, try looking through all sections for a template named something like “Standard Command Line Tool” or “C Tool” or something like that.

You will now get a window with a list called Project Navigator on the left, and to its right more detailed information about whatever is selected on the left. If you now click on the entry “main.c” in the list, you will see a text editor. This is where you will edit text using Xcode.

Motv groups and files

The Project Navigator list contains a lot of stuff, including an icon representing your project, and a few brown folders (which Xcode calls “groups”). But right now we only care about main.c. This is a text file that Xcode has helpfully created for you to hold your program. Note the file name suffix (or “extension”) “.c”: Compilers generally use the name suffix to indicate what programming language a program is in. Xcode can work with several programming languages, not just with C.

Now click on main.c. Its contents should show up in the editor as text, where different pieces of text are coloured by Xcode to make it easier to tell apart the different parts. Delete the text in this file, and type the following code into the file (don’t worry, I’ll soon explain what this does):

#include <stdio.h>	// Defines printf etc.
int main() { // Write a string of text to the console: printf( "Masters of the void." );
return 0; // Tell OS everything is OK. }

Save the file, then click the [Hide or Show Debug Area button] button in the upper right of the window. This will show the “Debug area” at the bottom of the window:

[The Debug Area in Xcode, with variables and console showing]

The three buttons in the upper right let you switch between showing only the left area, only the right area, or both, like in the screenshot above. The right part is what we need right now. That is the console area — essentially a simplified Terminal.app that is built into Xcode. Here you will see any text your command-line program writes out, and you will also be able to type in text that your program can receive (more on that later). Now, choose Run from the Product menu. This will run the compiler over the text file and create a program from that. Afterwards, it will immediately start the program so you can see that it works.

Since this is the first time you are running application in Xcode, you will probably be asked to activate Developer Mode. This is what you need to use the debugger, which we will play with in one of the later chapters, so be sure to click Enable in that window.

Screen Shot 2012 08 05 at 6 57 21 PM

If you’re very quick and look at the light blue box at the top of any Xcode window after choosingRun, you’ll see that it is telling you which file it is compiling. Of course, we only have one file, so this isn’t as interesting as when you have a bigger program that you have split up into several files, but for now one file is fine.

Once the program is built and starts, it will write “Masters of the void.” in bold print into the Console area. Not much of a program, but you now know how to make the computer do something.

Help, it didn’t work!

[Xcode's status area showing a build error]

If you are like me, chances are it didn’t work right away. If something goes wrong, the status area at the top of the Xcode window will say “Build Failed” and show the number of errors next to the red stop sign and you can click the little warning icon above the Project Navigator list to switch from your files to the Issues Navigator (click the small folder icon on the very left to get back to the list of files) to see details about each mistake. Click the first error message to open an editor in the right half of the window that shows you where the error occurred. Edit the text so it matches the example code above and try to Run again. Repeat this until it works.

Motv build results window

There are a few things worth noting that may help you find errors:

  1. C is case sensitive, that is “Main” and “main” are different words to it. So, make sure you type every character exactly the same as it is written above.
  2. When C doesn’t understand something, it will valiantly try to just struggle on until it really can’t make sense of your code. So, it is important to try to fix errors in order, because many of the later errors will be “misunderstandings” caused by earlier errors. Also, if you can’t find the error on one line, look at the lines above it. Sometimes a mistake is farther up, but C was still able to make sense of the code until at a later point.
  3. If one of the error messages doesn’t really make sense, or seems truncated, you can sometimes uncollapse them to show additional information
  4. If there still seems to be something missing, you can use the little speech balloon icon to show the Log Navigator instead. This is where Xcode keeps track of your program’s output from all previous runs, as well as of the error messages. The error messages there have much more details than the ones in the Issue navigator, but you can’t see them and look at your code at the same time. There are two kinds of entries in the Log Navigator: “Build MyFirstProgram” lists the error messages that occurred while trying to translate your program text into an actual computer program that a machine can perform, and the “Debug MyFirstProgram” entry shows the output from your program (because you’ll usually want to look at that when you are looking for mistakes (“bugs”) that happen while your program is running.

 

So, what did I just do?

Let’s switch back to the Project Navigator using the little folder icon in the upper left and look at the main.c file from top to bottom so we understand what we just did:

#include	<stdio.h>	// Defines printf etc.

This first line means that you want to tell your compiler it should put the contents of some other file here, just as if you had typed its contents there. You signal this using the #include command. In this case, you include the file named stdio.h, which is part of the ANSI C standard library. You can enclose the name either in “<” and “>” or in quotes. The former means it’s a system file (i.e. part of the ANSI C standard library or code provided by Apple), while using quotes tells the compiler it’s one of your own files (we’ll get to making more files of your own later).

 

ANSI stands for the American National Standards Institute. ANSI C is a standard written down by this group, that tries to provide a common set of rules to which the companies who create C compilers can adhere, ensuring that a program you write on one computer can also be compiled on another. At least in theory.

 

So what’s a #include good for? Glad you asked. You see, a computer is very complex, and even to get a single character displayed on the screen already involves lots of programming work. However, much of this work has already been done by the programmer(s) that wrote the operating system you’re working with. They wrote dozens and dozens of files, all like our main.c file. These files contain things like printf in the fourth line of our file, which is basically a command that writes text to the screen.

Usually, every programmer who wanted to draw text on the screen would have to do the work to create their own printf. But programmers are a lazy lot, and so they invented #include. Somewhere on your computer, there is a file named stdio.h, which contains all the code needed for printf, and which is essentially the same as the one used by your operating system (if I may say this in such a simplified way). By including this file, you tell the compiler to do the same as if you had copied the contents of that file into your main.c file. You’ll quickly develop a deeper understanding of these include files (or header files, as they’re sometimes called, hence the “.h” suffix) when we get to creating an include file of our own. For now it suffices to know that this #include tells the compiler about printf, which is described below.

 

By the way, “stdio” is short for “standard input/output”. C was originally designed at a time when file names could only be 8 characters in length, so you’ll find a lot of abbreviations like this.

 

The two slashes behind the file’s name indicate that the compiler should ignore anything on this line following the two slashes. This is called a comment. Use comments often and always to indicate why a line does what it does, even if it is obvious to you now, since it will make it easier for you if you have to get back to your program a year later. Trust me on this one, it may be annoying at first, but I’ve had to throw away a couple of good programs I’d spent lots of work on because they were simply unreadable. And most people do not have the discipline to go back to a program and add in all the comments after they’ve finished the code.

 

I usually end comments with a full stop (“.”) when they describe the line they’re on, while I use a colon (“:”) at the end of comments that describe the line(s) below them. I hope that helps you read the comments in these samples better.

 

int	main()
{
	...
}

The following lines after our #include define a routine (a named collection of commands), or in C terms a function. The first word, int, tells the compiler about the return value of this function. If you still remember maths class, if you have an equation

y = f(x)

y is the return value. But in C you don’t give the return value a name like “y”, you only tell the compiler what kind of data type it is (what type it has). In this case, main() returns an int, which is short for “integer” and means a positive or negative whole number (that is, no fractions). The next word is the name of the function, main. Main is a special function, it is the first one called by your computer when it runs (executes) your program. It’s the starting point of your program, and when main() has finished, your program is finished.

The “(” and “)” following main indicate that this function receives no parameters (if it received parameters, like our example “f” above takes “x” as a parameter, it would be between the brackets, more on that later). Then follows the “body” of this function, which contains the commands that make up this function and is enclosed in “{” and “}”. Think of the function body as something like a “to-do” list. The computer will simply read this list, and do each item on the list, in order.

	printf( "Masters of the void." );

The first of the two items on our list, the printf-line, is what does the actual output. As you may notice, printf() is a function. It does not provide any interesting return value1, but it takes one parameter, the text to write to the screen, which is always enclosed in quotes. Like all commands inside a function, this command is finished with a semicolon. This is necessary since C allows a command to stretch across several lines. That is:

	printf(
	"Masters of the void."
	);

and

	printf
	(
	"Masters of the void." )
	;

are the same to C. It also doesn’t care how many spaces you put in there, or how many tabs (though it does care if it’s between quotes). So, go crazy and insert spaces wherever you feel you need them to improve readability, as long as the spaces or tabs or line breaks aren’t in the middle of a word.

So, to summarize, this line simply moves “Masters of the void.” onto your screen. The last line of the function’s body,

	return 0;	// Tell OS everything is OK.

specifies the return value of the function and exits from the function. It should always return the number zero from main(). On some operating systems, if you return something else than zero from main() they think an error has occurred and output an error message.

You now know about main(), about include statements, about comments, and have a vague idea of return values. Not very dramatic, eh? Stay tuned, the second lesson will introduce you to more, and give you a second opportunity to understand all this using a little movie.

Previous | Next

1) Yes printf does provide a return value, but we don’t need it, so we just ignore it. back

This entry was posted in C Tutorial. Bookmark the permalink.

58 Responses to Book 2: Our first Program

  1. Qasim says:

    Hello,
    I am new to make mac book, when i try to get input from scanf like integer, when i write number say 154 and press enter the program just goes to next line and stop it accept only
    enter to jump on next line and doesn’t compile further program, i have already read many forum like someone says type slash after the digit, or press enter with command button and bla bla bla, but no technique is working . so please help me 🙁

  2. Reza Ebadi says:

    Thank you… A million thanks for such great works to teach lots of things about programming to amateurs like me. Actually i’m a senior medical student loving and dealing with Mac and iOS devices along with my daily duties in the hospital. Although i’ve read tons of great technical things in both software and hardware parts,and then worked with them,i’ve always been an amateur in programming which learning it is one of my wishes.Actually i got into panic whenever i thought about programming,until i found your website. I want to know you opinion as an expert. Could you plesae tell me my fear is true or not? Can i be a programmer with all conditions i mentionesd above.

    • Uli Kusterer says:

      Programming is mainly a skill to be practiced. There’s nothing inherent in programming (in general) that you couldn’t learn by just *doing* programming for a while. So just get started, try it. Where it becomes difficult depends on what programs you want to write, and what you know beyond programming. So just jump in, have fun 🙂

      • Reza Ebadi says:

        Thank you… It’s full of great ideas, innovation… I love it, even in this (first) session the regular rules attract me a lot. Of course you are right, but i couldn’t imagine it doesn’t need a genius mind 🙂 thanks for your fast reply. Best.

  3. Andy says:

    Very good tutorial reading materials for beginners with C programing, concise and easily understandable. I love the idea of proving hands-on demo for operations with X-Code for Mac-lovers although you don’t have to use it. I am also appreciated for those tips shared her. Thank you ! I will introduce this website to some of friends and even older teachers who have no experience of C at all but want to start learning.

  4. Chase says:

    My build was successful, but I can’t get the program to run at all. Is this because I just have the free version? There are no errors in the code, but after I hit run it says “Build Successful” and then nothing. Sorry if this is a dumb question… Today is Day 1

  5. Iva says:

    Just want to say thank you for this wonderful website. It’s really helpful for students.

  6. Prama says:

    Great Walkthrough! I’m currently in first year of Software Engineering and was about to bootcamp a copy of Windows to learn programming in C Language. Now I don’t have to

  7. Uli Kusterer says:

    I just updated the tutorial to match Xcode 4.4. Should make it easier again to follow along.

  8. Juanjo says:

    Yes, I have also just purchased XCode 4 and it looks quite different from the screenshots hown here, but still, if one looks carefully for the items named in teh tutorial, you can find them. I have tried this lesson and … it worked!!! Certainly it is not great stuff for a first program, but it feels great when you run it, it works and you understand how it works. Thank you very much; I’ll follow your course as I’m interested in writing educational programs for my kids using iphone, ipad or imac. Thank you very much indeed.

  9. Uli Kusterer says:

    Erjan,

    yes, Xcode 4 has substantially changed. I hope to be updating this tutorial for Xcode 4, but it takes some time to re-take all the screen shots.

  10. Erjan Aisabay says:

    I just purchased XCode v.4.0.1 and it seems very different than what is described above. I am lost!!! Please advise, if you there is a similar explanations information specifically for 4.0.1. Thank you.

  11. TWhip says:

    Great walk-through! First time i have ever programmed with C or done anything with XCode and i understood the whole thing. Look forward to the rest of the tutorials

  12. Duelix says:

    This is the most amazing way for me to learn programming with a computer as my only tool. Thank you SO much.

  13. Chuck Huff says:

    Right out of the box I found it a little perplexing with the code that said:
    return O; because it was suppose to be a 0. Once I got that figured out the rest of lesson one went smoothly. Haven’t attempted the next part yet, but now I know what to look for, I Think.

    Thanx

    CAHuff

  14. Jonathan says:

    I have a hard time knowing what, out of all of this awesome stuff, i REALLY need to memorize. I have a hard enough time retaining information unless i do something a few times. I can get all these programs to run, and generally understand why or what they are doing, but is it to my benefit to fiddle with them and try and change things to see if i really understand? or should i be patient… ! I only have a music degree dammit! 😉

    Also, i am interested (eventually) in game programming (as a hobby), like online flash games and such. Is this a good place to start, just learn a language? Will learning this on MAC, hold me back when i want to program on a pc?

    Any tips are awesome! Thanks

  15. Kostis says:

    It says
    [Session started at 2010-08-31 12:00:03 +0300.]
    GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type “show copying” to see the conditions.
    There is absolutely no warranty for GDB. Type “show warranty” for details.
    This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys011
    Loading program into debugger…
    Program loaded.
    run
    [Switching to process 848]

  16. Kostis says:

    I have this one problem, ‘Masters of the void’ does not appear in the console window even though it says that the program succeeded. What might be my fault?

  17. dharmeshtx says:

    I have already finished my software engineering degree. I love C language. I believe it is mother of all programming languages. I feel much more comfortable then ever to learn with this tutorials. So far it is the best technique to learn “C language”.

  18. Elaina says:

    [Session started at 2010-08-16 12:58:28 -0600.]
    GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type “show copying” to see the conditions.
    There is absolutely no warranty for GDB. Type “show warranty” for details.
    This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys000
    Loading program into debugger…
    sharedlibrary apply-load-rules all
    Program loaded.
    run
    [Switching to process 797]
    Running…
    We die, like fire and powder…
    Debugger stopped.
    Program exited with status value:0.

    I see what you did there, putting a error in the example code. Thanks for helping me learn.

  19. stanley li says:

    i have the following error

    The Debugger has exited with status 0.
    [Session started at 2010-07-11 11:38:47 +1000.]
    GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type “show copying” to see the conditions.
    There is absolutely no warranty for GDB. Type “show warranty” for details.
    This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys000
    Loading program into debugger…
    sharedlibrary apply-load-rules all
    Program loaded.
    run
    [Switching to process 2572]
    Running…
    please enter your age :(gdb) run
    [Switching to process 2574]
    Running…
    please enter your age :kill
    quit

  20. Dan Kelleher says:

    If using Xcode 3.1.3 (the full installation) for PPC and OSX 10.5.8 then the template for a command line tool written in C is not found as Application –> Command Line Tool but rather as Command Line Utility
    –> Standard Tool

  21. FKK says:

    very good tutorial!!!!! I’ve tried other tutorials, but your’s is the best. You not only explains what to write, you explains the why too. And the visual graphics is very helpfull as well. And, it’s very hard to find programming’s tutorials using XCode for MAC users. Great for someone who is just beginning on programing, like myself. Very very thank you!!!!!

  22. chet says:

    very good!!!thank you so much for this tutorial!!!!

  23. Dave Stern says:

    Nice. Thanks so much, Uli. I’m not sure how much programming I’m going to do, if any, but this is a very clear-cut explanation of the concepts, so I can at least understand what’s going on under the hood, as it were….

  24. Lauren says:

    Oh, I did type “Masters of the Void” initially. That was just me experimenting with the text…. I didn’t know that’s all it would do; I was expecting it to be much more complicated! Which just shows how great your tutorial is that I was confounded by how easy I sailed through this C stuff! Much thanks! 🙂

  25. Uli Kusterer says:

    Assuming that you wrote “programming is fun” instead of “Masters of the Void”, then yes. 🙂

  26. Lauren says:

    Thanks for responding, Uli! I chose the Console from the Run menu and did the Build and Run there. This is the text that popped up:

    “[Session started at 2010-02-21 13:58:21 -0500.]
    GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type “show copying” to see the conditions.
    There is absolutely no warranty for GDB. Type “show warranty” for details.
    This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys000
    Loading program into debugger…
    Program loaded.
    run
    [Switching to process 267]
    Running…
    Programming is fun.

    Debugger stopped.
    Program exited with status value:0.”

    Is this all that should’ve happened?

  27. Uli Kusterer says:

    Very likely you overlooked the part where it says “choose ‘Console’ from the ‘Run’ menu”. That window is where any text will be shown. Was that it?

  28. Lauren says:

    So confused! I’ve followed this tutorial to the letter but when I Build and Run nothing happens…no error message, no text on the screen, no nothing. The build results say “Build Succeeded” with “no issues”. Please help!

  29. Chris Patton says:

    Thanks for this tutorial it is very helpful and informative. I ran across this site because I started a blog detailing my journey towards becoming an iphone/mac developer at http://beginneriphonedeveloper.blogspot.com/. I figured that this site would be a helpful link to anybody who is like me and is new to learning about the programming for the mac and iphone.
    Thanks a million!!!

  30. Garotas* says:

    In Xcode 3.1.4 (and maybe earlier) you have to go to the section “Command Line Utility” where you can find the “Standard Tool” which is in fact exactly the same thing like the “Command Line Tool” used for this tutorial. It has a different icon though. I’m just posting it because I couldn’t find it right away. And because I think this tutorial is so great that I will be commenting every single page of it! 😉

  31. Uli Kusterer says:

    Charles,

    “main” is a special name, whatever function you call “main” gets called by the operating system when your progrm runs.

  32. Charles Marshall says:

    Thanks Uli! That clears up a lot for me. Is “main” just a name for this particular function, shown in this example? Or would all programming, in other C examples for instance, also need a “main” function as well?

  33. Uli Kusterer says:

    Charles,

    close. “printf” itself is located in “stdio.h”, but you are *calling* it from inside another function, “main”. Calling a function means telling the compiler to do whatever is inside a function. The “main” here is not a call, you are actually telling the compiler what commands to do when someone calls main. Usually, the operating system calls main, which is why you don’t see any call to main here.

    Also, the brackets { and } tell the compiler when “main” is finished. What “return 0” does is provide a return value, that is it tells the operating system *how* the program finished. If there is an error somewhere, you would return some error-number to give the system a clue what happened.

    But yes, you’re close.

  34. Charles Marshall says:

    So, let me see if I’m understanding this correctly: “stdio.h” is a program. “printf” is a command found within the “stdio.h” program. And the “printf” function is, in this example, located within another function, “main”. And “return 0” is just a way to let the system know when “main” is finished.

    Am I close?

  35. Alex Demitri says:

    I love your tutorial!
    Keep it going, please!
    Alex =)

  36. Uli Kusterer says:

    Rodolfo, if you’re looking for reference documentation, I generally just use the”Open man page…” command in Xcode if I want to remind myself what a particular command does, otherwise I use Google to find out what call to use. For Mac specifics, there is also Apple’s http://developer.apple.com web site, though that doesn’t really cover much C, as it assumes you already know that part.

  37. Rodolfo Pena says:

    Hi, I really liked this tutorial since I’m trying to learn some C and I’m a mac user, so this is pretty much what I’ve been looking for. JUst one question, do you recomend any C or C++ manuals for a beginner, I mean, I use to program 18 years ago and the las time I wrote code was 15 years ago, and I use to write on all dead languages like cobol, clipper, dbase, and yeah GWBasic, so, I don’t think that will be very useful for me now on the mac, but anyways, I can’t remember very well either.
    Some advice?

    Thank You!!

  38. Bruno Gatjens says:

    Thank you so much for that tutorials.

  39. thinkdunson says:

    there’s a free version of visual studio 2008 called express. you can download them (three versions, visual basic, visual C#, and visual C++) from http://www.microsoft.com/express

    i would assume that the C++ version also works with C, but it’s microsoft, so there’s no telling.

  40. Uli Kusterer says:

    Harlan, I’m sure there are many equivalents for Windows to Xcode, but all the documentation and the descriptions on this site will be for Mac OS X, so you’ll have a hard time following along. That said, there is of course Visual Studio on Windows, but AFAIK it has a rather hefty price tag. You could probably install the GCC compiler in a Windows version as well, but then you’ll have to do all your compiling on the command line. However this will only let you create Windows programs, of course. You can’t do iPhone or Mac applications that way, for that you’ll still need a Mac at this point in time.

  41. Demian Velasco says:

    This is amazing, thanks a lot

  42. Uli Kusterer says:

    Emily, thanks, fixed.

  43. Emily says:

    The natural numbers do not include zero. A better definition would be both positive and negative whole numbers. Otherwise, this is very well written!

  44. AWESOME!!! it worked!!! now i know how to type on the screen!!! THANK YOU!!

  45. Harlan says:

    Carl Merritt writes:
    How can I work through your tutorial using a Windows-based system? Is there an equivalent for Windows of the X-Code used in the Mac? Appreciate your help.

    Sorry Carl M.
    XCode is only for Mac. In order to create iPhone Apps you need ANY Intel based Mac.
    A Mac Mini will do just fine to create Apps for iPhone or a Mac. Xcode will only work in Mac OS X Sorry man. If you watch Apples website in there Referb. section or Clearance you can pick up a Mac Mini for about $380. sometimes. Or you can get an iMac 20″ 2.4Ghz around $800. maybe less just depends on the time. Just as long as its Intel you can create apps for iPhone

  46. Harlan says:

    I am reading the Tutorial in Safari with no problems. I wonder if its your screen your reading it on? I am on iMac 20″ 2008 model. I have the Resolution @ 1680×1050.
    Theres an option in Safari/Preferences/Advanced Very top UNIVERSAL ACCESS Check the box. And change the number to what ever size you like. You can tell the FONT to be no Smaller then 24 if you like.

    You can also go in System Preferences/Speech and set up one of the voices and “Speak selected Text when the key is pressed.”Set Key”
    I use that when I dont feel like reading. The Mac just reads it to me!

    But I can read it just fine. No Pink here.

  47. Carl Merritt says:

    How can I work through your tutorial using a Windows-based system? Is there an equivalent for Windows of the X-Code used in the Mac? Appreciate your help.

  48. Fantastic tutorial. I will definitely be coming back here very often!

  49. Uli Kusterer says:

    Daniel, the images are so small for several reasons: 1) because large images use bandwidth, and bandwidth costs me money 2) Because they’re supposed to show you the windows and areas, and the text is there as an example, and not really intended to be read.

  50. It might be so that the “pink” text is the red texts in the xcode screens. I don’t really understand why you have made them so small. Great work with the tutorial Uli.

  51. marius says:

    HI Uli,

    hab gerade dein Tut überflogen und was mir besonders auffällt, das sich der weisse Text auf dem schwarzen Background shcwer anschauen lässt. Bei mir verschwimmen die Absätze bei nicht 100%igem Hinsehen zu weissen Blöcken. Die Comments z.B. auf grauem Hintergrund sind schon angenehmer aber irgendwie auch noch nicht das Optimum.

    Vielleicht gehts nur mir so, ka. wollts nur mal anmerken.

    Ansonsten ist es aber eine klasse Arbeit und ich finds cool, daß Du Sie den Leuten zur Verfügung stellst!

    Gruß,
    marius

  52. If you have trouble with white text on a black background, I suggest turning on the screen inversion shortcut in the Accessibility prefpane. Then you can just hit cmd+opt+shift+8 whenever you want to read this page.

  53. William Scott says:

    The white text on black background does give the illusion of being pale pink. There is something about the anti-aliasing of this in Safari that does make it hard to read. I just turned 45, and don’t wear glasses, FWIW.

    I use terminals and an editor (TextMate) with a black background and white font, but find it renders better when the anti-aliasing is turned off.

  54. Uli Kusterer says:

    Edward, there must be something wrong with your screen or browser. There is NO PINK AT ALL on any of my web sites, nor will there ever be. Nor is the background white. Do you perhaps have a custom style sheet set up? Or did you print this and one of your color printer cartridges are empty?

    The colors here should be white-on-black text, with a pale prussian blue for the links. While I’m aware that white-on-black is not everyone’s cup of tea, it just felt right for this site, and I took great care to maintain high contrast.

    That said, there is a plan, eventually, to provide a downloadable/printable version, but that may take a while.

  55. Edward F. Storm says:

    I’d love to work through your tutorial, but I have a lot of trouble reading it. I’m a little up in years, and
    the pale pink type on a white background is almost impossible. And it’s a struggle to read the insets
    which contain program text and Xcode stuff. Does your tutorial text exist in a pdf format or something
    similar? Thanks for any help you can offer.

Leave a Reply

Your email address will not be published. Required fields are marked *


*