Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Simple Question: Where to start?

Simple Question: Where to start? (Page 2)
Thread Tools
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 4, 2003, 11:05 AM
 
Avoiding using a framework is just plain unwise -to put it very midly.
I would not disagree with that, if the framework is appropriate to ones project. However, I would equally suggest that using a framework like Cocoa is no excuse for not learning how to program well, as seemed to be suggested a number of posts ago.
     
Uncle Skeleton
Addicted to MacNN
Join Date: Nov 2002
Location: Rockville, MD
Status: Offline
Reply With Quote
Jul 4, 2003, 11:56 AM
 
the question was "Simple Question: Where to Start?". Are you people suggesting that a person asking this question would be writing anything the least bit as complex as OmniWeb 4.5?

Now, I admit, one or two people have suggested that they hate C and would be better off removing any direct contact from it, and that's a little overboard. Obvioulsy you need to learn most of C eventually. But "eventually" is not "Where to Start". Why not learn Hello World in the context of Interface Builder instead of stumbling on printf's and char buffers? Why not learn the important parts of C as part of Obj-C? What's that thing they say, make it run, then make it run fast?
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 4, 2003, 12:13 PM
 
It seems that we are converging to the original question.

I believe a beginner needs instant gratification. It's just good for the soul. Spending some time with IB and displaying "Hello World" on a window is where I would start. The other stuff will fall in place as the associated needs become to materialize.

The above approach is not what is used at universities. There you are screwed if you don't work on your assignments. With that incentive, it makes it feasible to start learning about programming with C and thinking about data structures.

If you are learning on your own, then a quick fix will probably inspire you to go on to the next project. This is not the best way of learning but it is one that makes programming fun. At the end of the day, that's what it's all about.

( Last edited by DaGuy; Jul 4, 2003 at 01:46 PM. )
     
wadesworld
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Jul 4, 2003, 02:08 PM
 
I think a beginner would be well served to start with Cocoa/RealBasic/Java. Why? Because user interface is so easy (not that sure on Java, but I think it's pretty easy).

As a beginner, I had a huge collection of unfinished programs. I'd write all the backend logic, and get bored to tears with the massive amounts of code it took to process a simple dialog box or a scroll bar. After hours of toiling over the interface and realizing I was only 20% finished, I'd quit. (Granted, these were the old Toolbox days)

Thus, as someone else said, I think a language/framework that gives a beginner a path to quick accomplishment is a good choice.

Wade
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 4, 2003, 02:31 PM
 
Obvioulsy you need to learn most of C eventually.
Not necessarily. C is not the only language.
This is not the best way of learning but it is one that makes programming fun. At the end of the day, that's what it's all about.
Well, writing robust and reliable programs might also be considered useful.
     
itai195
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status: Offline
Reply With Quote
Jul 4, 2003, 03:14 PM
 
I'll just have to disagree a bit. I don't see the point in a beginner even bothering with user interfaces. Learn how to program first; just start with little programs that run in an interpreter or on the command line. After that, tackling user interfaces is generally just learning new frameworks and getting used to an event-based programming model. Quick results when you're learning are good, but relying heavily on a particular language or framework can teach you bad habits early.

If someone chooses to start with the Cocoa/Obj-C/Project Builder triumvirate, all I recommend is to keep an open mind. That's not the only way of doing things... Try to spread your wings and learn some other tools frequently.
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 4, 2003, 05:51 PM
 
Interesting discussion...

If one is required to build robust applications and judge the importance of the C school, and so on, then that person has the aptitude of a career programmer and would likely not asking where to start.

On the other hand, the casual programmer needs inspiration and some instant results. If you don't get this then you were probably never a casual hobbiest type programmer.

Cocoa teaches some good design principles by default. Forcing MVC is just one of them. I think it's a superb learning experience because C doesn't teach how to think about desing principles from the start, Cocoa does.
And it has nothing to do about being object oriented, there is encapsulation in C also.

Most crappy software occurs not by missusing control statements. It occurs by not leveraging past best practices. Out of Java, C++ and Objective-C (Cocoa), the latter is the only one that teaches good habits. Better yet it's an extension of C.
( Last edited by DaGuy; Jul 4, 2003 at 06:13 PM. )
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 4, 2003, 06:04 PM
 
Out of Java, C++ and Objective-C the latter is the only one that teaches good habits. Better yet it's an extension of C.
An interesting "recommendation" given that C++ is also a derivative of C, and that C itself isn't exactly renowned for encouraging good habits.
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 4, 2003, 06:17 PM
 
I meant Objective-C (Cocoa). See edit above.
Objective-C by itself, obviosly, doesn't enforce MVC.
     
natan
Forum Regular
Join Date: Jul 2002
Location: Berkeley, CA
Status: Offline
Reply With Quote
Jul 4, 2003, 06:22 PM
 
I'm taking a Cocoa elective course at my school next semester, and I wanted to get a head start of the summer. I asked the same question that swiz did on a mailing list for the course, and here are some of the responses:

If you don't know c, your best bet is to choose a small project, pick up K&R (Kernigan and Ritchie) and try to work through it. Start with something simple like a base calculator (a pretty standard project)

so that when I type basecal 10 16 32
it would spit out 20 because 32 is 20 in hex.

C is a reasonably simple language in that, the syntax is straightforward, and it's a very procedural language which is kind of nice.
If you don't know any C, I'd recommend "Absolute Beginner's Guide to C", by Greg Perry. That's what I read to get me started. If you've already had some programming, you'll fly right through it, picking up most of the syntax and basic stuff right away.

The only catch is that its 10 years old and one or two of the included samples don't work quite correctly.

Once you know C, its a full step to wrap your brain around object-oriented programming (speaking as a non-programmer, of course), and I'm not aware of a book that teaches this concept well. I headed straight to the O'Reilly books (learning cocoa, building cocoa apps) and I'm learning OOP that way. Obj-C is a matter of picking up the new syntax and learning OOP.
I think that you realistically ought to learn C (or C++, Java) before attempting to learn Cocoa. Of the two C is probably easier to learn and would really help when you get to 61C. I didn't take 61B at Cal but I would think that knowing a little OOP going in probably wouldn't hurt. Either way, most texts Cocoa presumes knowledge of C at the least but many attempt to teach to OOP as you go. The standard C text is the one used in 61C is The C Programming Language, Second Edition by Kernighan and Ritche (aka K&R). It's a great reference but perhaps not the best text ever written for beginners but you'll have to buy it anyway_ (it's the reference you'll use for all things C for the rest of your life) so you might as well try it out.

Most likely you'll find K&R insufficient, in that case I have a few other recommendations. An excellent text for both C and C++ is Herbert Schildt's C++ The Complete Reference which despite it's name covers both C and C++ quite well. It is a an strong learning and excellent reference book but not a replacement for K&R. Absolute Beginneer's Guide to C by Greg Perry is also very well liked though I personally have never used it. Stanford's Eric S Roberts has a couple of good intro CS/C texts which are probably also sufficient but they are quite expensive and don't really jive with the Cal lower division curriculum.
     
swiz  (op)
GUI Punk
Join Date: Jan 2002
Location: S.E. Mitten
Status: Offline
Reply With Quote
Jul 4, 2003, 08:32 PM
 
The thread title I provided for this is certainly ironic when considering the content now.

Well, I am 26, not 14 and I have wanted to program for Macs since OS9 but when I realized the amount of time and concentration involved I opted to put it off until I was sure I could commit myself to it for the long haul. I am there now. I bought the Hillegass book (Cocoa Programming for Mac OSX) and the Ritchie and Kerninghan book (The C Programming Language 2nd Edition ANSI).

Mind you, I had only cut and pasted my way around javascript and stuff before. I know html quite well but as some others have said, that is hardly considered programming.

I started the Hillegass book first and his writing style is quite well suited for even for a mega beginner like myself. Its not hard to follow at all and with the help of a programmer I know through iChat I am starting to understand alot (with sooo much more that Im still wrestling with). The C Programming Language book is helpful for better descriptions of why the actual code is setup as it is. But without either one of these books I'd be lost. I need the C book for clarification of code stuff, and the Hillegass book to show me how to really build apps in the environment I plan to build in, Cocoa with the Dev Tools.

I'd greatly appreciate any one emailing me with their iChat/AIM screennames for the occasional answer to a particular. I promise not to bombard you. ( swizcore at swizcore dot com )

On with the discussion...

24" AlumiMac 2.4ghz C2D, 4g Ram, 300g HD, 750g USBHD • 80g iPod • 160g ATV • iPhone 3g
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Jul 5, 2003, 04:39 AM
 
Originally posted by swiz:
The thread title I provided for this is certainly ironic when considering the content now.

Well, I am 26, not 14 and I have wanted to program for Macs since OS9 but when I realized the amount of time and concentration involved I opted to put it off until I was sure I could commit myself to it for the long haul. I am there now. I bought the Hillegass book (Cocoa Programming for Mac OSX) and the Ritchie and Kerninghan book (The C Programming Language 2nd Edition ANSI).

Mind you, I had only cut and pasted my way around javascript and stuff before. I know html quite well but as some others have said, that is hardly considered programming.

I started the Hillegass book first and his writing style is quite well suited for even for a mega beginner like myself. Its not hard to follow at all and with the help of a programmer I know through iChat I am starting to understand alot (with sooo much more that Im still wrestling with). The C Programming Language book is helpful for better descriptions of why the actual code is setup as it is. But without either one of these books I'd be lost. I need the C book for clarification of code stuff, and the Hillegass book to show me how to really build apps in the environment I plan to build in, Cocoa with the Dev Tools.

I'd greatly appreciate any one emailing me with their iChat/AIM screennames for the occasional answer to a particular. I promise not to bombard you. ( swizcore at swizcore dot com )

On with the discussion...
That sounds like a good compromise to me, learn both! Anyway, my AIM is CatfishMan42. I'm not anywhere close to an expert but I've done some Cocoa.
     
invisibleX
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
Jul 8, 2003, 04:03 PM
 
I am also learning how to program. I have done lots of realbasic and a wee bit of java so I know about object orented programming and such. I decided to screw advice and just jump into a free C tutorial, got the hillegass book and I'm on my way. I want to use C anyway (carbon) and for the type of apps I want to create I need everything I can get. C was a bit frustrating at the start because its not object oriented and that was screwing with my head but I'm doing better now. After looking at some sample cocoa I feel better knowing that C will actually help me get into some of the ideas. RealBasic helped as well because I can already relate to most of this without a language like C being my first.

My advice: learn C, its worth your time even if it ends up being of little use. The hillegass book is good. I am doing the C first but that just so I can brush up (its only a 17 chapter tutorial). Hopefully it'll go well
-"I don't believe in God. "
"That doesn't matter. He believes in you."

-"I'm not agnostic. Just nonpartisan. Theological Switzerland, that's me."
     
swiz  (op)
GUI Punk
Join Date: Jan 2002
Location: S.E. Mitten
Status: Offline
Reply With Quote
Jul 8, 2003, 11:58 PM
 
Originally posted by invisibleX:
I am also learning how to program. I have done lots of realbasic and a wee bit of java so I know about object orented programming and such. I decided to screw advice and just jump into a free C tutorial, got the hillegass book and I'm on my way. I want to use C anyway (carbon) and for the type of apps I want to create I need everything I can get. C was a bit frustrating at the start because its not object oriented and that was screwing with my head but I'm doing better now. After looking at some sample cocoa I feel better knowing that C will actually help me get into some of the ideas. RealBasic helped as well because I can already relate to most of this without a language like C being my first.

My advice: learn C, its worth your time even if it ends up being of little use. The hillegass book is good. I am doing the C first but that just so I can brush up (its only a 17 chapter tutorial). Hopefully it'll go well
Yeah this is pretty much the path Ive chosen. Im reading the Hillegass book with The C Programming Language, and your right, the fact that the C book isnt contexting it in an object oriented form creates some hickups but Im pretty much accepting the fact that I will need to read both books twice anyhow .

Good luck to both of us.

24" AlumiMac 2.4ghz C2D, 4g Ram, 300g HD, 750g USBHD • 80g iPod • 160g ATV • iPhone 3g
     
natan
Forum Regular
Join Date: Jul 2002
Location: Berkeley, CA
Status: Offline
Reply With Quote
Jul 9, 2003, 02:18 PM
 
Im reading the Hillegass book with The C Programming Language
That's also the path I took as well, those two books and "The Absolute Beginner's Guide to C" because K&R was a little daunting at first.
     
swiz  (op)
GUI Punk
Join Date: Jan 2002
Location: S.E. Mitten
Status: Offline
Reply With Quote
Jul 9, 2003, 10:27 PM
 
Originally posted by natan:
That's also the path I took as well, those two books and "The Absolute Beginner's Guide to C" because K&R was a little daunting at first.
Wow, this is such a conicidence, I just bought the Absolute Beginners Guide to C. Did you find it helpful? Im reading all three simultaneously. And Im planning to read them all a second time too.

24" AlumiMac 2.4ghz C2D, 4g Ram, 300g HD, 750g USBHD • 80g iPod • 160g ATV • iPhone 3g
     
macgyvr64
Grizzled Veteran
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 11, 2003, 04:46 PM
 
I'm interested in Cocoa, too.. I think I've got C/C++ down.... heck, I'm working on a packet capturing app in C right now.. I have bought several books on Cocoa, and it seems vastly different than C. I have Apple's book on it, Aaron Hillegass's book, and a Cocoa for Dummies book...sadly, none of them really helped too much. Any suggestions?
     
jimothy
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Atlanta, GA
Status: Offline
Reply With Quote
Jul 11, 2003, 05:38 PM
 
If you don't know anything about the command line before you need to use it, you're liable to jump in and rm -rf your whole hard drive.
If you don't know anything about the command line, you're only slightly more likely to rm -rf your whole hard drive as a thousands monkeys are to type the works of Shakespeare. A little knowledge, on the other hand, is a dangerous thing.
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 11, 2003, 06:08 PM
 
Originally posted by macgyvr64:
I'm interested in Cocoa, too.. I think I've got C/C++ down.... heck, I'm working on a packet capturing app in C right now.. I have bought several books on Cocoa, and it seems vastly different than C. I have Apple's book on it, Aaron Hillegass's book, and a Cocoa for Dummies book...sadly, none of them really helped too much. Any suggestions?
Well, Cocoa is not a language. So in some sense you will have to read lot in order to learn how to use it. It's a freaking huge framework. Lots of fun, though.

If you want to blank out the Cocoa stuff for a while as you transition from C/C++ then go to the book store and browse or buy the O'Reilly "Objective-C" pocket reference. This will teach you some Objective-C after that then go ahead and revisit Hillegass's book -which is one of the better ones.
     
Trytti
Fresh-Faced Recruit
Join Date: Apr 2003
Location: Lake Mills, Iowa
Status: Offline
Reply With Quote
Jul 12, 2003, 03:00 AM
 
Is sticking with BASIC any big deal? It's been ten years or so since I've programmed. Would RealBASIC be the best option or would jumping to 'C' be easy enough. I'm not looking to make a big splash or anything. Just to do this or that.
     
macgyvr64
Grizzled Veteran
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 12, 2003, 03:09 AM
 
Sounds like REALBasic would fit "this or that"...it's relatively easy to use...
window1.textfield1.caption="Hello world!"
it's got a great built in manual..and you get the Aqua UI, too. It's great
     
clf8
Junior Member
Join Date: Apr 2001
Status: Offline
Reply With Quote
Jul 12, 2003, 05:04 AM
 
Originally posted by Gametes:
Actually, that's exactly my point. youwill be able to write your ow hash table by the time you graduate; I can almost guarantee it.
*never* write a hash table again because Cocoa comes with all sorts of collection classes.
Hahahaha, that's funny. Sure, Cocoa implements all that, but that doesn't mean their implementation is the best. Is the more efficient. Works most ideal for the specific application. That's why you do all the link list and tree bs in college, to understand how it all works and why.

But, I say if you wanna learn to write Cocoa, jump straight into it. If you wanna go an easier route, learn Java because it will run nearly as well. Learning C is well and good, but Objective C's syntax is completely different. I'm not sure if it's worth starting with that if you have to learn Objective C and all the Cocoa fun do really do anything.

Originally posted by Gametes:
That would surely give us a better understanding of the internal workings of our computers, and allow us to prevent the dreaded char*-exploit hack.
It's because Apple did all this for us, so we can start working from higher levels of prodctivity, and not have to deal with that junk.
Actually, wasn't there a bug in the screen saver where you could overflow a buffer? Didn't Apple write that? Sometimes, Apple doesn't do it right (or most securely). Sure, for the average user you should just stand on Apple's shoulders. But if you want to do something serious then these things are important. Don't knock the knowledge.
-Flowers...
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jul 12, 2003, 05:15 AM
 
Originally posted by Trytti:
Is sticking with BASIC any big deal? It's been ten years or so since I've programmed. Would RealBASIC be the best option or would jumping to 'C' be easy enough. I'm not looking to make a big splash or anything. Just to do this or that.
It works, but you should probably keep in mind that a lot of people have a great deal of animosity towards RealBASIC. One popular Mac site in particular is pretty much guaranteed to whack any RealBASIC app they find over the head with a large club.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 12, 2003, 09:35 AM
 
Originally posted by Trytti:
Is sticking with BASIC any big deal? It's been ten years or so since I've programmed. Would RealBASIC be the best option or would jumping to 'C' be easy enough. I'm not looking to make a big splash or anything. Just to do this or that.

The thing to keep in mind is that the Basic is not known for encouraging overall good programming and design skills -and almost always snobbed out by the more academic minded. Why? Well, there's poor memory use, some Basics have the GOTO statement still hanging around and so on. With this said you will find lots of small apps, macros and utilities built on Basic but few (if any) big apps for example an iPhoto type of app or and internet browser.

Programming should be fun. If you are serious about programming then learn some C at some point but RealBasic should work well for you while you decide what path to take and help you produce some decent "small" apps with minimal effort.

     
kennethmac2000
Senior User
Join Date: Apr 2000
Location: Edinburgh, UK
Status: Offline
Reply With Quote
Jul 12, 2003, 09:35 AM
 
Just to throw in my two cents (�0.02) worth...

I would in principle recommend starting with Cocoa and using the Java APIs, which I use myself on a regular basis.

However, in practice I would feel reluctant about doing so without first explaining to someone that Apple treats the Java APIs with utter contempt. There are STILL no Java APIs for NSNetServices (Rendezvous), for example, despite the fact that Apple claims Objective-C and Java are peers for Cocoa development.

Apple needs to get its act together.
     
Gametes
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Jul 12, 2003, 01:30 PM
 
I have NEVER laughed so hard in all my life.
I will pay anyone who can get down to past "Migraine" without so much as giggling 5$

http://perversiontracker.com/archive...003_03_23.html
you are not your signature
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 13, 2003, 05:22 PM
 
some Basics have the GOTO statement still hanging around
setjump? longjump?
     
ApeInTheShell
Senior User
Join Date: Dec 2002
Location: aurora
Status: Offline
Reply With Quote
Jul 14, 2003, 12:37 AM
 
wow
that was a lot of reading i didn't do

seriously, i am reading the C Primer Plus book by the Waite Group. Excellent book. I am compiling my simple apps in unix. It is like a mac, comfortable.
It even got me more interested in the command line and now i can do many commands..muwahahaha!!

o'reilly is a good site for tutorials. If you're creating a game do not look on google though. Useless C knowledge out there sometimes.

good luck include standard input output
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 14, 2003, 01:15 AM
 
Originally posted by Richard Edgar:
setjump? longjump?
Let's try to help these guys. Let's not get into this kind of debate.



The GOTO type stamements typically do not provide good coding discipline.

Those statements that you mentioned are of value to kernel level programmers, they are different breed.
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 14, 2003, 01:41 AM
 
Those statements that you mentioned are of value to kernel level programmers, they are different breed
I had the impression that they provided equivalent functionality to GOTO. Hence, if the mere existence of GOTO is a reason for criticising BASIC....
     
macgyvr64
Grizzled Veteran
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jul 14, 2003, 01:57 AM
 
I never really got that... I use C all the time...but what's wrong with GOTO in BASIC? People seem to hate it..
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jul 14, 2003, 05:00 AM
 
Unconditional branches (whether done by GOTO, or some equivalent syntax) disrupt the flow of a program. This means that it can be hard to find out where control was transferred from. They can be useful (e.g. for breaking out of a deeply nested if statement), but I think that this use is being eroded, as more controlled statements which achieve the same effect are added to languages. This then leaves GOTO statements simply as a means of spaghettifying code.
     
ambush
Banned
Join Date: Apr 2002
Location: -
Status: Offline
Reply With Quote
Jul 15, 2003, 12:21 AM
 
Originally posted by Angus_D:
An MP3 player is perfectly feasible, when you remember that you can just play MP3s through QuickTime (NSMovie does the job).
I'd choose mpg123
     
EnterUserName
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Jul 16, 2003, 03:44 PM
 
Wow, this reminds me of my delimma a few years ago when I wanted to learn how to write for OSX. After all, the keynote address made it all look so snappy and fast.

The only time I had programmed before was in the 7th grade (1983) on some PS/Jr's (BASIC). That was fun. Then a few years later (1988), I played around with (no laughing) HyperCard.

So with little to no experience, I decide I am going to jump in and learn what Cocoa is. For those of you who have done the math, that makes me 29 (30 next month, so I'm not offically old just yet).

I can write AppleScript if I want to and I use FCP FXScript to make cooler effects but other than that.....

This is my take on the whole thing: Start 'Somewhere'. I spent so much time trying to figure out where to start that I didn't do anything for a long time (days!). I finally realized that it I was going to do "this" I was going start to act like I wanted to do "this".

I think you have noticed that there is no magical answer to your question. As in all things, one question leads to more questions.

But I sure of one thing: Programming is a hobby that sure can eat up a lot of time. I can't believe I'm already 30.. Ummm... 29.
"Go Ahead and enter a user name"
"I've tried, all the good ones are taken"
"This isn't rocket science, just enter a user name!"
"Hey, that's good. I'll use that"
"Use what?"
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 17, 2003, 12:12 AM
 
Originally posted by Gametes:
In fact, That's it. I've had enough. I've snapped. I hate C. I can't take it anymore.
I'm going to make a SDCWrapper Framework. It will include things like:
  • varNameFromString:asType:
  • assign:to:
  • for:var:from:to:
  • if:then:else:
  • switch:case:...
  • and on and on

someone put me out of my misery.
You know, you just described Smalltalk, right down to the syntax. Give it a try, I think you'd like it. Ironically, I learnt Smalltalk from a formal university education of programming, and the same professor taught me hash tables.

However, I dove straight into programming, without buying any books, before I ever went to uni.

However, I started with C.

However, I'm fairly confident that I could have learnt Cocoa without doing so.

However, I like the complex little bits with pointers and anonymous inner classes and esoteric syntax and reinventing the wheel better so that the car goes faster and, yes, hash tables. I find clever optimizations at least as much fun as adding new features, if not as useful.

However, I am aware that not everybody shares this same opinion
[vash:~] banana% killall killall
Terminated
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 17, 2003, 12:21 AM
 
Originally posted by DaGuy:
Let's try to help these guys. Let's not get into this kind of debate.



The GOTO type stamements typically do not provide good coding discipline.

Those statements that you mentioned are of value to kernel level programmers, they are different breed.
Although I agree that there's no point in arguing about this here, I just have to point out that Objective-C has goto...
Code:
display: NSLog([NSString stringWithCString:"Hello, world."]); goto display;
The above is perfectly valid code, if useless. And of course @"Hello, world." is a much better way of doing it, but that's not the point.
[vash:~] banana% killall killall
Terminated
     
DaGuy
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 17, 2003, 02:12 AM
 
I guess I'll have to buy a book on writing for the legal profession -or something of the sort.



Alas, all I meant (or intended to say or should have explicitly said) was that GOTOs can be abused especially by beginners. I also wanted to "suggest" that a language that has them to much in your face does not teach very well. I deeply apologize if the interpretation (or implication) was that the existence of GOTOs separated the good and bad languages. Whether this true or false, I don't know enough to make such a statement. A formal proof of such an assertion would make one heck of a journal quality paper.

And yes, I believe languages teach you about design and many other topics by mere usage. In this regard Objective-C is my favorite. For example, grasping what an Objective-C category is requires some OO polishing that I don't think a typical Basic programmer has. Of course we could now debate the merits of this comment



but I rather put the matter to rest and let the original intent of this thread carry it's due course.
( Last edited by DaGuy; Jul 17, 2003 at 02:21 AM. )
     
Trytti
Fresh-Faced Recruit
Join Date: Apr 2003
Location: Lake Mills, Iowa
Status: Offline
Reply With Quote
Jul 18, 2003, 09:25 PM
 
I've heard that before, but what part of the GOTO command is so bad? Is it using it w/o some sort of a 'condition' the problem? From the programming that I've done, I can see that just using it to get from one point to the other can make the program a bit messy.

I've have not been taught structured programming, but to me, I've come to the conclusion that you have to keep the program as orderly as possible. If it's conditional GOTO's, keeping orderly blocks, etc.

I've done a lot of PLC programming, relay ladder logic style, and that can get very messy too if your not too careful. In some respects, I wish BASIC had some of the feel of RLL and vice versa. Perhaps BASIC's now have a new feel to them.

What exactly constitutes or defines 'structured programming?' That can apply to RLL too I'm sure.
     
 
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:18 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,