• 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: Using the debugger with local variables was Re: is this badly written code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the debugger with local variables was Re: is this badly written code?


  • Subject: Re: Using the debugger with local variables was Re: is this badly written code?
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 15 Apr 2008 14:40:53 -0400

> These simplistic examples (creating a URL from a string)
> will work the same no matter how many times you execute them, but a lot of
> real code isn't that simple.

  Well *THANK* you, John! ;-)  Indeed as I was finishing up that
sermon and packing up my soapbox, I thought of the many shortcomings
of using string assignment and appendage (is that the right word?) but
I trust my meaning was clear.

  Your example is better - something I hadn't thought of. Something as
simple as -[myWidget explodeHamster] is clearly destructive to your
Hamster* which may hinder future debugging attempts. Perhaps even
better is -[myHamster multiplyEyesByTheTimeOfDay:] ... how many eyes
did your hamster have before? That's easy enough to see in the
debugger. How many will it have now? Well probably more (or less at
and just after noon or midnight) than it had before, that's for sure
...

  The point is, for debugging, nothing is easier than seeing (at a
glance) your variable and its value in a convenient list in your
debugger and being able to modify that (to see what happens if your
hamster has twenty-eight eyes and the time is given in 24-hour mode
versus 12-hour for that particular trip through your for loop.

--
I.S.
_______________________________________________

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

References: 
 >Using the debugger with local variables was Re: is this badly written code? (From: Erik Buck <email@hidden>)
 >Re: Using the debugger with local variables was Re: is this badly written code? (From: "I. Savant" <email@hidden>)
 >Re: Using the debugger with local variables was Re: is this badly written code? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Cannot Remove Observer Error
  • Next by Date: binary search trees & binning
  • Previous by thread: Re: Using the debugger with local variables was Re: is this badly written code?
  • Next by thread: binary search trees & binning
  • Index(es):
    • Date
    • Thread