Computer Science, a Mac, and You. Kevin Cathey Junior, Computer Science

Similar documents
Xcode Tricks. ios App Development Fall 2010 Lecture 13

Xcode Setup. Setup. 1. Copy your files. 2. Install X Code

NSIGHT ECLIPSE EDITION

Laboratory Assignment #4 Debugging in Eclipse CDT 1

Xcode Release Notes. Apple offers a number of resources where you can get Xcode development support:

Xcode Release Notes. Apple offers a number of resources where you can get Xcode development support:

CS193P: HelloPoly Walkthrough

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

Reviewing gcc, make, gdb, and Linux Editors 1

NSIGHT ECLIPSE EDITION

About Xcode and iphone SDK

Manual Eclipse CDT Mac OS Snow Leopard

NSIGHT ECLIPSE EDITION

Registering for the Apple Developer Program

Module 3: Working with C/C++

CS354 gdb Tutorial Written by Chris Feilbach

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

CS193E: Temperature Converter Walkthrough

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, January 2018

Saleae Device SDK Starting a Device SDK Project on Windows Starting a Device SDK Project on Linux... 7

Code::Blocks Student Manual

COBOL-IT Developer Studio 2.0

Arduino IDE Friday, 26 October 2018

The Road to CCSv4. Status Update

Installing and getting started with Xcode for Mac OS.

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

CS 261 Recitation 1 Compiling C on UNIX

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

Scientific Software Development with Eclipse

Using Eclipse for Java. Using Eclipse for Java 1 / 1

Computers and Computation. The Modern Computer. The Operating System. The Operating System

Eclipse CDT Tutorial. Eclipse CDT Homepage: Tutorial written by: James D Aniello

Hands-On with STM32 MCU Francesco Conti

CS480. Compilers Eclipse, SVN, Makefile examples

CSE 333 Midterm Exam 7/29/13

Using Eclipse for C Programming

Software Development With Emacs: The Edit-Compile-Debug Cycle

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005

Principles of Programming Languages. Objective-C. Joris Kluivers

Introduction to Cocoa Programming

The requirements according to Autodesk are to be using Xcode with the 10.8 SDK(comes with it). Xcode 6 does not have this SDK.

DS-5 ARM. Using Eclipse. Version Copyright ARM. All rights reserved. ARM DUI 0480L (ID100912)

At the shell prompt, enter idlde

Code::Blocks Student Manual

ITP 342 Advanced Mobile App Dev. Memory

ios: Objective-C Primer

You re most likely eager to get started programming in C. I shan t waste

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview

CUDA Development Using NVIDIA Nsight, Eclipse Edition. David Goodwin

ECE QNX Real-time Lab

Xcode. Chapter 1. Creating a Project

iphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department

CSE 351. Introduction & Course Tools

User Guide Zend Studio for Eclipse V6.1

Resource 2 Embedded computer and development environment

ARM DS-5. Eclipse for DS-5 User Guide. Version 5. Copyright ARM. All rights reserved. ARM DUI0480Q

AN5171 Application note

Goals for this lecture. Lecture 4 Getting Started with ITK! Getting help. Assignments. Assignments, cont. Grading of assignments

COSC345 Software Engineering. Make

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Introduction to Linux (Part II) BUPT/QMUL 2018/03/21

The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.

Lab Objective. Lab Assignment. Downloads and Installation

Exercise Session 6 Computer Architecture and Systems Programming

ARM DS-5. Eclipse for DS-5 User Guide. Version 5. Copyright ARM Limited or its affiliates. All rights reserved.

Intro to C and Binary Numbers 8/27/2007

Installing Eclipse CDT and MinGW

Panel discussion on Legacy codes in astrophysics

Project 1. Fast correction

My First Cocoa Program

Introductory ios Development

USING CODEBLOCKS. Implementing Computational Models

Developing Applications for ios

Assignment III: Graphing Calculator

AN 834: Developing for the Intel HLS Compiler with an IDE

How to version control like a pro: a roadmap to your reproducible & collaborative research

COPYRIGHTED MATERIAL. 1Hello ios! A Suitable Mac. ios Developer Essentials

The purpose of this tutorial is to introduce you to the Construct 2 program. First, you will be told where the software is located on the computer

Learning Objectives. A Meta Comment. Exercise 1. Contents. From CS61Wiki

Lab 4: Interrupts and Realtime

Application Development in ios 7

My First iphone App. 1. Tutorial Overview

CSE 333 Midterm Exam Sample Solution 7/29/13

CCS Lab FAQ: Using Google App Engine to host websites

Topics in Mobile Computing

Dreamweaver Basics Outline

Laboratory Assignment #3 Eclipse CDT

Hello! ios Development

Code Signing Your Buzztouch Application By Ed Goodall Goodall)

Module 4: Working with MPI

ios Core Data Example Application

How to program with Matlab (PART 1/3)

Using the Command Line

What s NetBeans? Like Eclipse:

COP 3014: Spring 2018 A Guide to Using CLion

Bindings Example Exercise James Dempsey - WWDC Pre-Show Cocoa Workshop

Continue: How do I learn C? C Primer Continued (Makefiles, debugging, and more ) Last Time: A Simple(st) C Program 1-hello-world.c!

Adafruit WebIDE. Created by Tyler Cooper. Last updated on :29:47 PM UTC

Chris' Makefile Tutorial

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Transcription:

Computer Science, a Mac, and You Kevin Cathey Junior, Computer Science

Roadmap Introduction to Apple s Developer Tools Xcode & Instruments Implement three MP s acm.uiuc.edu

Introduction to Developer Tools

Interface Instruments Xcode Builder

Shark

Software Development Cycle And how the tools integrate with it Start with a project Make core classes Design an interface Code Build Debug Profile Write tests Implement

Software Development Cycle And how the tools integrate with it Start with a project Make core classes Design an interface Code Build Debug Profile Write tests Implement

Start with a project Xcode is project based (most of the time) Start an application with a project template What is a project? Collection of source code files (or resources) Definition of what that source code turns into (a product) Set of rules of how to get these (targets and configurations)

Main parts of a project @implementation MyCla - (void)dosomething: (id)sender { NSLog(@ Do something really cool or I ll punch you. );.m NSString *str = [NSString stringwithformat:@ %d, 0x4094]; NSError *error = nil; [[NSWorkspace sharedworkspace] createfileatpath:str error:&error]; } @end? Source Code (resources) Target Product (Executable)

Creating core classes Class creation is easy Create a new file from the templates and give it a name Done.

Building an interface You use the most obvious tool: Interface Builder. Interface Builder is a drag and drop WYSIWYG editor for interfaces. IB is not a code generator and aims to minimize the amount of code you need to write. IB provides mechanisms to connect your code to your interface (and vice versa) called connections.

Software Development Cycle And how the tools integrate with it Start with a project Make core classes Design an interface Code Build Debug Profile Write tests Implement

Implementation Write code Xcode is a powerful editor. Does expected things like line numbers and color syntax. Also does cool things: Code focus Code folding Code sense Code completion Code refactoring

Implementation Write code Navigation cheat sheet Open Quickly Switch between interface and implementation Jump to definition of symbol Jump to documentation of symbol Command-Shift-D Command-Option-Up-Arrow Command-Double-Click Option-Double-Click

Terminology Term Definition Project Collection of resources (source files, images, text files, whatever) and all the rules and pieces needed to turn those resources into a running piece of software. Target Collection of rules and phases that turn some set of resources into an executable. Product The output of a target. Executable Any executable Xcode launches for debugging. This is usually the Product of your Target, but could be any executable (think of writing a dylib). Configuration Settings Target uses to build (compiler flags, warning settings, etc).

Implementation Build This is what the target does. Xcode s build system figures out dependencies for you, and what needs to be built. Drops down to gcc and ld for compiling and linking. Configurations A group of settings for a target. Default configurations are Debug and Release Debug: Has standard settings with debug symbols. Only setting you always need to change is to turn on warnings as errors. Release: Same as Debug, but without debug symbols.

Implementation Debug Xcode sits on top of GDB for debugging, and brings it into the developer s workspace. In-line debugging: Roll over variables to see their values. Step through your code without leaving it. Breakpoints: To set them, just click on the source line you want to stop at. Use Breakpoints window to set conditional breakpoints. Fully interactive gdb console.

Just because Xcode sits on top of gcc, ld, and gdb, this does not give you an excuse not to know them. Useful links: http://developer.apple.com http://users.ece.utexas.edu/~adnan/gdb-refcard.pdf

Implementation Testing Xcode includes SenTest, an Objective-C and C/C++ unit testing framework. Create a SenTest target, and then set that target as a dependency of your others. If your unit tests fail, then your build fails, and you can quickly find the problem. Read Apple s documentation for more. Another alternative is to write a Python script for unit tests, then add a build phase to a target that runs the Python script and fails the build if the script returns anything but zero. Then use same script when you upload to the Linux box.

Software Development Cycle And how the tools integrate with it Start with a project Make core classes Design an interface Code Build Debug Profile Write tests Implement

Profiling Instruments sits on top of dtrace. You can profile all different aspects of your program: CPU sampler (where are you spending the most time) Memory allocations Leaks File system usage Network usage Graphics performance From Xcode, instead of debugging, you run with a template from Instruments, or build your own.

Let s code

MP1 Create a C program that counts the words in the first input argument. You will just turn in your main.c file.

MP2 Take MP1, and put your counting code into a function called num_words_in_string in a file called wordcounter.c. Also create a header file. Call with argv[1] from main. For building, use our makefile.

How do we go remote?

How to get changes remote? We need to test our stuff on the Linux boxes (dcllnx, csil-core, etc), how do we get our stuff back? A few options: scp SVN *

SCM For School Create repository in your home folder (or have one provided by school). Check out locally, then add your MP to the folder. In Xcode, setup your repository. Do all the rest of your integration with Xcode. Then, on Linux box, check-out, build.