cs106a – Lecture #2: Programming & Control Structures

Prerequisites to the second lecture is reading the chapters 1 to 3 of “Karel the Robot learns Java”.

Karel knows four basic commands (or methods):

move()
turnLeft()
pickBeeper()
putBeeper()

To run feed Karel commands, first import Karels basic commands, create a class derived from Karel and put the commands into a run() method:
Continue reading “cs106a – Lecture #2: Programming & Control Structures”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #1: Introduction

The first lecture mainly provides administrative details about the course. Two text books are named to be required for the course:

  • Karel the Robot Learns Java, which is included in the iTunes stream and
  • Roberts, Eric: The Art and Science of Java with slides and code available for free at Stanford.

It also refers to the Stanford Honor Code states:

Rule 3: You must not look at solution sets or program code from other years.
Continue reading “cs106a – Lecture #1: Introduction”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Programming Methodology

The course cs106a Programming Methodology teaches the widely-used Java programming language along with software engineering principles. Its lectures from Fall 2007 are provided as streams via iTunes. While the iTunes feed includes the handouts and assignments from 2007, its homepage at Stanford provides the material of the recent course.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lessons learned from eaGeier #6

Creating a Date Picker

The eaGeier needs the possibility to enter a date e.g. to specify the purchase date for a voucher. Just providing a simple text field seems a little bit tedious. Thus – instead of opening a normal keyboard – the eaGeier provides a date picker, when a date field is selected, but at the same time keeps the possibility of entering a date via a hardware keyboard.

First the class handling the text fields needs to be the <UITextFieldDelegate>, and to implement the <UIPickerViewDelegate, UIPickerViewDataSource> protocols.
Continue reading “Lessons learned from eaGeier #6”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Final Project: eaGeier available at App Store

The eaGeier, developed as final project for the Coding Together course, is now available at the eaGeier - m2m server software gmbh.

It’s an tool for accounting on cash basis mainly used for small companies in Austria (Einnahmen-Ausgaben-Rechnung) and Germany (Einnahmenüberschussrechnung).

The app is a local port from the server application at www.ea-geier.at.

A demo of the app is available at YouTube.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lessons learned from eaGeier #4

Sending a PDF File

Yet again the excellent documentation at Apple provides all you need to send an email. Start by initializing a mail-composer view controller, add a subject, a text and the file you want to attach as NSData. To allow the user to set the mail recipient just provide an empty array for the recipients. Set the delegate if you want to use the delegate functionality and finally present the mail view controller.

MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
[mail setSubject:@&quot;A Subject&quot;];
[mail setMessageBody:@&quot;A text you want to send with the PDF file.&quot; isHTML:NO];
[mail addAttachmentData:[NSData dataWithContentsOfFile:thePathToYourPDFFile] 
               mimeType:@&quot;text/pdf&quot; 
               fileName:fileNameOfThePDFFile];
[mail setToRecipients:[NSArray array]];
[mail setMailComposeDelegate:self];
[self presentModalViewController:mail animated:YES];
FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail