Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 1.4

FEATURE

Coffee Break Pro

Rewriting an application in REALbasic

Issue: 1.4 (February/March 2003)
Author: Thomas Reed
Author Bio: Thomas Reed has been programming as a hobbyist for more than 20 years, and fell in love with the Mac in 1984. Coffee Break Pro can be found at http://home.earthlink.net/~thomasareed/shareware/.
Article Description: No description available.
Article Length (in bytes): 12,388
Starting Page Number: 11
Article Number: 1408
Related Web Link(s):

http://home.earthlink.net/~thomasareed/shareware/

Excerpt of article text...

I grew up programming any machine I could get my hands on -- from the obscure Epson HX-20 notebook computer to the Commodore-64. In 1984, my dad brought home our first Macintosh, and I started programming it in BASIC shortly thereafter. Since then, I've been using a computer daily, sometimes for work and sometimes for play, but nearly always for extended periods of time.

In early 1993, I started to experience mild pain in my hands, wrists, and arms as a result of long sessions at the keyboard. I had heard the buzzwords "Carpal Tunnel Syndrome" and "Repetitive Stress Injury," but they hadn't really made an impact on me before. After all, I was only 21; things like that weren't supposed to happen to people my age! Although I never had symptoms severe enough to seek medical attention, and my discomfort was probably simple muscle pain, I was worried. I began to hear horror stories about people who developed lifelong health problems because of extensive computer use.

I had previously seen a few break reminder programs before then, and had laughed at them. Now I realized that they were not such a silly idea. Unfortunately, after looking at the available programs I found that none of them suited my needs. All were very simple, easily bypassed, and not very flexible. Thus was born the idea for Coffee Break!

First Version

In 1994, I released the first version of Coffee Break, which could (optionally) take quite a heavy-handed approach to making the user take scheduled breaks. Depending on how the user set up Coffee Break, it could prevent the user from easily quitting or changing the preferences. It was also capable of being more lenient, giving the user options to delay breaks or to stop breaks early. It could pause the timer if a screen saver came on, using a method that was standardized by Berkeley Systems in their famous screen saver, After Dark.

Over the years, Coffee Break gained a small, but loyal, following as $5 (and later $6) shareware. Unfortunately, as I added new features and changed old ones, the code became more and more unstable. Coffee Break was not only my first attempt at a shareware-quality program, it was also the largest program by far that I had written in C. It relied on code that others had written, such as John Norstad's Newswatcher code, Matt Slot's appe Windows, and Apple's popular MoreFiles libraries. Although there was nothing wrong with any of this code, it was difficult to integrate in ways for which it hadn't been designed. I didn't even understand how all the routines in this third-party code worked, and even had trouble figuring out a couple sections of code I had written. If I changed certain parts of the code, I was guaranteed to have weeks of work figuring out why several other things broke. The code just wasn't very good.

...End of Excerpt. Please purchase the magazine to read the full article.