Tutorials

Links to Tutorial Series

Here is a list of past and present tutorial series featured on MacResearch:

Cocoa for Scientists (XXXIV): Scrapbook of an Advanced Core Animation View

Author: Drew McCormack

At NSConference 2010 I delivered a presentation on developing the iPhone game Sumo Master using the Core Animation framework. It covered the usual bag of tips and tricks, but also the process of development, from twinkle-in-the-eye to App-Store reality.

I personally find articles and talks about the evolution of a concept particularly interesting, so I thought I would write up a similar experience I had building an advanced custom control for the study app Mental Case. The control was used in the iPad version of the app, but could just as easily be found on the Mac. (The iPhone screen would be too small.)

Knime Tutorial

KNIME, the Konstanz Information Miner, is a visual platform for graphically building and editing workflows and data analysis pipelines from defined components called nodes. KNIME is developed in Prof. Michael Berthold's group at the University of Konstanz, Germany. It can be downloaded for free from www.knime.org.

科学者向けのCocoa (part1):ハローブレーブニューワールド

英語チュートリアルの作成日:2006年10月17日
著者:Drew McCormack
翻訳:Ignacio Enriquez
Japanese Version of Drew's Tutorial.

The Dynamics of Scrolling

By Drew McCormack

There has been quite a bit of discussion the last few days about the momentum-based scrolling that Apple uses on the iPhone. The discussion has largely been fanned by John Gruber’s Daring Fireball blog. He has been arguing for some time that one of the reasons web apps feel inferior on the iPhone to native Cocoa apps is that the WebKit-based scrolling doesn’t behave the same. A recent post pointed to a JavaScript framework that Apple is apparently using internally, and which does produce a comparable scrolling experience.

This got me wondering how difficult it would be to reproduce Apple’s momentum scrolling on your own in JavaScript. Is the reason no web developers mimic native scrolling that it is too difficult, or is it just laziness or the expectation that it is very difficult that stops them? Or is JavaScript just not up to the task? To find out, I decided to try. About 3 hours and 100 lines of JavaScript later, I have my answer. Now it’s your turn.

Using VVI for Graphing on iPhone

The following tutorial was produced for MacResearch by VVI.


This tutorial shows how to make an iPhone application that graphs your data. It also provides the fundamentals for incorporating many 2D and 3D graph types in your iPhone applications.

Cocoa for Scientists (XXXIII): 10 Uses for Blocks in C/Objective-C

By Drew McCormack

Snow Leopard brought with it blocks (closures) for the C and Objective-C languages. Blocks at first seem to be nothing more than anonymous, inline functions, but that is only partially true, because they are also a lot like objects, carrying about their context data with them. Once you start playing with blocks, a whole new style of programming opens up to you, and you find uses for blocks in places where you may not have expected them.

This is my list of ten different applications of blocks in C/Objective-C.

OpenCL Tutorial - Shared Memory Kernel Optimization

In this episode we'll go over an example of real-world code that has been parallelized by porting to the GPU. The use of shared memory to improve performance is covered as well as a discussion of synchronization points for coordinated work within a work-group. Source code is provided.

In iTunes, you can subscribe to the podcasts by going to:

Advanced -> Subscribe to podcast
URL: http://feeds.feedburner.com/opencl

Episode 6 - Shared Memory Kernel Optimization (Desktop/iPhone/iPod touch)
Episode 6 - Shared Memory Kernel Optimization (PDF)
Source code for Episode 6

OpenCL Tutorial - Questions and Answers to Episode Four

This episode covers questions hthat were generated from the previous podcast. We'll discuss GPU layout/terminology and bank conflicts resulting from shared memory access.

In iTunes, you can subscribe to the podcasts by going to:

Advanced -> Subscribe to podcast
URL: http://feeds.feedburner.com/opencl

Episode 5 - Questions and Answers to Episode Four (Desktop/iPhone/iPod touch)
Episode 5 - Questions and Answers to Episode Four (PDF)

ChemDoodle Web Components

About the Author

Kevin Theisen is the President of iChemLabs, which funds, develops and hosts the open source ChemDoodle Web Components.

Protein Data Bank Demo and Canvas Technology Analysis

In this article, I provide some background and analysis of the javascript/Canvas technology along with future prospects followed by a step-by-step walkthrough on how to quickly put together a rich web application with the ChemDoodle Web Components. In the walkthrough, I produce a small application that queries the Protein Data Bank (PDB), displays 3D animations of the results, and saves a viewing history. The example is of moderate difficulty, and the reader should have prior knowledge of HTML. Javascript is also important, but those experienced in other programming languages should be able to follow the code with ease.