Advice on Using Bbedit/Terminal vs Xcode

Howdy,

I am working my way through learning C (K&R, and K N King) books and at this time my goal is to simply learn the C language. I have been using BBEdit to create the .c files and then the Terminal via clang, and ./ to compile and run the programs. I am aware that I can also use Xcode to create command line projects to do the same thing; but I hate the debugging "console(?)" window and then going through a huge amount of directory layers to locate the 'executable' file, which I can get to run in Terminal.


I am nearly 70 years old, and am doing this to keep my mind active. I don't see any application development in my future, but if some muse infected me and I did finally decide to learn all the other things required to develop any Mac applications, I sure as heck would not sell them, give them away perhaps, but never sell them.


So given my current goal of simply learning C and learn more about Unix, should I stick with Terminal/BBEdit or bite the bullet and go with Xcode? Seeing as how I am still in the very early chapters of both books, changing should present no problem. I have discovered that I can add .c files to a new project.


Oh, and does one call it X code or in following in line with the OS X thinking is called TenCode?


I appreciate your insights.


~DN

iMac, OS X El Capitan (10.11)

Posted on Apr 13, 2016 5:37 AM

Reply
6 replies

Apr 13, 2016 7:44 AM in response to danuke

Hello danuke,

I advise people to stick to the command line when they are first learning. You get a better idea of how the process works that way. I would also suggest using vi instead of TextWrangler. TextWrangler is a great editor, but a little too great. If you want to learn UNIX, you should learn vi too.


As you start making more and more complex projects, it will become more and more difficult to stay on the command line. You could start building makefiles, but once you have more than a couple of source files, having a development environment like Xcode makes life much easier. Xcode is optimized for graphical apps and iOS apps. But perhaps you'll get tired of the command line too.


And it is pronounced ExCode. The rumour is that Apple will be abandoning the "X" in the near future and changing "OS X" back to "macOS". I think they might also rename "Xcode" to just "code". Check back in mid June to see if I was right.

Apr 15, 2016 7:11 AM in response to etresoft

Howdy,

Thank both of you for your replies. I have been messing with Xcode for the last two project problems in King's book, and I do like the way it shows all the mistakes, or possible mistakes, but sometimes just too many show up. I really don't need to know that all the variables ain't used yet.


However I do lean towards the Terminal / Command Line. I have been using BBEdit for years and years. I first got it to write the website for my church. And it is really nice to enter bbedit name.c in the terminal to create source code. Then I have a little alias name run that does the ./a.out step.


~DN

Apr 15, 2016 7:11 AM in response to Keith Barkley

Hi Keith,

When you write, "You can run the command line tool directly from XCode - no hunting for executables." I am guessing that you mean using the run arrow or command. That's ok, but it all shows up in that little debugging/console section on the bottom of the Xcode window.

I did discover that I can find the executable really quick in the products folder. Then I can either go to it in the finder or simply use the "Open with external editor"

menu option which runs the program in Terminal where I have plenty of room to see what is going on.


~DN

Apr 14, 2016 4:44 PM in response to danuke

I suppose it depends on how serious you are and how much time you have to invest.


I prefer to stay as far away from Xcode as I can - just about every time I get the hang of it and collect a few handy shortcuts, Apple yanks everything out from under me with a new, bigger version. That, and in my experience, it is still a bit clunky and it doesn't take much to crash it. Things just get worse if you don't have a lot of memory and a large display. The command line tools however, are excellent.


I am also not a professional programmer, more of a serious hobbyist, so I prefer to spend my time learning about language features and the various frameworks rather than constantly trying to (re)learn Xcode, so I just skip that part and use BBEdit and Terminal. BBEdit also has the advantage of having an excellent scripting dictionary, so it is fairly easy to automate parts of your workflow.




MacBook Pro / OS X 10.10 Yosemite / Xcode 7.2 / RubyMotion FTW

Apr 15, 2016 7:10 AM in response to red_menace

Howdy Red,

Thank you for your reply. Wow, are you ever right about Xcode changing over the years and throwing us hobbyists off. I agree with you regarding BBEdit and Terminal, so I am going to stay with that for now, and revisit Xcode after I get C down. Also, BBEdit is great for learning LUA.


Aside, I find your user name interesting. We did a lot of "fighting" with the Red Menace under the Arctic Ocean waaay back in the ought and 70s. 😁


Take care,

~DN

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Advice on Using Bbedit/Terminal vs Xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.