• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: offtopic: best way of plainng overall structure of programs/functions etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: offtopic: best way of plainng overall structure of programs/functions etc.


  • Subject: Re: offtopic: best way of plainng overall structure of programs/functions etc.
  • From: Andrew Merenbach <email@hidden>
  • Date: Sun, 5 Aug 2007 07:44:56 -0700

Hi, Stephan,

I agree with Uli in that I like to write small prototype applications, in my case often for specific features that I have yet to implement.

For instance, I have a program called "Quotient" that displays an extended quotient (hence its name) out to any number of decimal places. Recently I implemented a "detector" that searches the resultant quotient for a pattern.

In order to do this--figuring out my algorithm as I went--I might have had to add a bunch of spaghetti code and then mixed it in with the rest of my program, making it an unmanageable mess.

Rather than do this, I created a "Foundation Tool" (not to be confused with a "CoreFoundation Tool"), which allowed me to use all of the classes of Foundation--a subset of the Cocoa frameworks--which would run as a command-line application. In this tool I implemented as many classes as I needed to, calling them, as I say, on the command-line.

Once I got my code worked out and cleaned up, it was easy enough just to drop my new code into my application and--voilĂ !--I had no need to mess up my code while experimenting with a new feature.

This is only a modest example, of course.

With regard to planning an application, I like to lay out a basic interface and set up a couple of methods--not even properly named (just something like "doStuff:" (with the full knowledge from the Cocoa docs that I should not be writing methods that start with "do"-- but this is only temporary) and then I create some basic program logic in this -doStuff: method. Once I have things working and I have a few methods, I begin to separate out their functionality and I name them more properly, as well as refine the interface to be more than a couple of text fields and a checkbox, or whatever it is that I've laid out before.

Cheers,
	Andrew

On Aug 4, 2007, at 4:40 PM, Stephan Huebner wrote:

Hi all,

sorry, but this is not specifically about cocoa-programming, but I don't know where else I could ask. If anyone wants to answer, it might be better to send answers to me and not to the list.

Despite the fact that I've tried out several programming languages over the years I have never done really big projects and most of the time I used a mixture of trying out things in front of the computer and planing the more complicated funtions on a piece of paper. And most of the time it worked (to my own surprise :-). But not always.

So, the problem ist: I've never found the perfect (or at least elegant) way to lay out the structure of a program before sitting on the computer. So more than once I found that the solution I scribbled on a paper didn't work as I expected and then I sat there in front of the computer and began to hack around until the functions did what they should do.

The simple question is: How do the Experts do it? How do they plan an application? Are the apps to lay out an application or objects- structure of any use? I think there's one from the Omnigroup, but I think I've tried it out once but did not like it enough to use it. Or maybe I was just too impatient, who knows.

Would love to hear suggestions how to solve this problem and once again, sorry for the offtopic.

Greetings,

Stephan Huebner
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: offtopic: best way of plainng overall structure of programs/functions etc.
      • From: "Eloy Duran" <email@hidden>
References: 
 >offtopic: best way of plainng overall structure of programs/functions etc. (From: Stephan Huebner <email@hidden>)

  • Prev by Date: Re: When you send a message to an object, how does it find the corresponding method?
  • Next by Date: Re: offtopic: best way of plainng overall structure of programs/functions etc.
  • Previous by thread: Re: offtopic: best way of plainng overall structure of programs/functions etc.
  • Next by thread: Re: offtopic: best way of plainng overall structure of programs/functions etc.
  • Index(es):
    • Date
    • Thread