Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 25, 2011, 11:21 PM   #1
ohla313
macrumors 6502a
 
Join Date: Apr 2010
Noob giving it a go at coding

I am a complete newb to programming or anything and want to get my feet wet. I am following the w3schools and lifehacker videos to make some sense of this all.

I have a small question though, I am using TextEdit to try out my code (am too cheap to pay for TextMate, $60?! wow..) and I want to be able to see how my code is shown in a browser. I saved my file as an .html file but when I open it in Safari I see all my tags and not links being clickable. How do I change this to make it clickable?

Thank you for your help!
ohla313 is offline   0 Reply With Quote
Old Apr 25, 2011, 11:30 PM   #2
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Check out TextWrangler either in the AppStore or http://www.barebones.com/products/textwrangler/.

When you used TextEdit, this won't work.

1. Enter HTML code
2. File | Save
3. File Format: Web Page (.html)

The procedure above is meant to create an HTML rendering of a Rich Text Document. So you meant to use the WYSIWYG features to make a document and then let TextEdit create the necessary HTML code to replicate your formatting in a web browser.

If you want to code HTML directly in TextEdit.

1. Format | Make Plain Text. (You shouldn't see any formatting bar at the top of your document window).
2. Enter HTML code
3. File | Save and enter a filename ending .html
4. In the "warning" dialog box, click Use .html (or just hit return).
jiminaus is offline   0 Reply With Quote
Old Apr 26, 2011, 12:07 AM   #3
ohla313
Thread Starter
macrumors 6502a
 
Join Date: Apr 2010
Great! Thanks a lot that did the trick!

Do you have any suggestions in how I should go about learning to code and if the resources I listed above are adequate?

EDIT: Why are Text editors so expensive? TextMate at $60 and BBEdit at $100?? Will look at TextWrangler
ohla313 is offline   0 Reply With Quote
Old Apr 26, 2011, 12:13 AM   #4
thejadedmonkey
macrumors 604
 
thejadedmonkey's Avatar
 
Join Date: May 2005
Location: Pa
Send a message via AIM to thejadedmonkey
I use textwrangler. It's amazing, and free

(at least the version from 2 years ago was, IDK about now)
__________________
MacBook 17" MacBook Pro iPod Nano Apple TV
PS4 Custom Windows 8.1 Desktop WP8.1
"Good judgment comes from experience,
experience comes from bad judgment."
- Mulla Nasrudin
thejadedmonkey is offline   0 Reply With Quote
Old Apr 26, 2011, 12:19 AM   #5
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Why are Text editors so expensive? TextMate at $60 and BBEdit at $100?? Will look at TextWrangler
While you could code your own GUI text editor in about 5 minutes, these editor go way beyond basic text editing.

The strange thing though is that I have TextMate and use it as my primary editor (outside of XCode). And yet, I know vim well, and could do everything I do in TextMate (and probably more) in vim, vim is free, and it even comes pre-installed.

As an infamous Australian politician once was renowned for saying, "Plz eksplane". (Sorry to the non-Ozzies, you won't get this).
jiminaus is offline   0 Reply With Quote
Old Apr 26, 2011, 12:43 AM   #6
ohla313
Thread Starter
macrumors 6502a
 
Join Date: Apr 2010
Quote:
Originally Posted by jiminaus View Post
While you could code your own GUI text editor in about 5 minutes, these editor go way beyond basic text editing.

The strange thing though is that I have TextMate and use it as my primary editor (outside of XCode). And yet, I know vim well, and could do everything I do in TextMate (and probably more) in vim, vim is free, and it even comes pre-installed.

As an infamous Australian politician once was renowned for saying, "Plz eksplane". (Sorry to the non-Ozzies, you won't get this).
How is TextMate? What is the learning curve like? i'll probably get Text Wrangler first to see where it goes. VIM pre-installed? I don't see it..

and i get the joke, "Please explain" lol
ohla313 is offline   0 Reply With Quote
Old Apr 26, 2011, 12:50 AM   #7
lloyddean
macrumors 6502a
 
Join Date: May 2009
Location: Des Moines, WA
whereis vim
lloyddean is offline   0 Reply With Quote
Old Apr 26, 2011, 02:08 AM   #8
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Originally Posted by ohla313 View Post
How is TextMate? What is the learning curve like? i'll probably get Text Wrangler first to see where it goes.
There's a zero learning curve for the basic of functions of TextMate. The intermediate functions are intuitive, they'll behave just you'd expect them to, assuming you're used to Mac editors. You don't need to worry about the advanced functions for now.

But I'd say just start with Text Wrangler because it's free. If you find yourself needing more than Text Wrangler provides, then look towards paying for an editor.


Quote:
Originally Posted by ohla313 View Post
VIM pre-installed? I don't see it.
You won't find VIM in the Applications folder because only the text version is installed. You've got to run it from the Terminal. You can get a GUI version from http://code.google.com/p/macvim/.
jiminaus is offline   0 Reply With Quote
Old Apr 26, 2011, 02:10 AM   #9
mufflon
macrumors 6502
 
Join Date: Sep 2006
Quote:
Originally Posted by lloyddean View Post
whereis vim
You need to use the command line (e.g. the terminal)
mufflon is offline   0 Reply With Quote
Old Apr 26, 2011, 06:25 AM   #10
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by mufflon View Post
You need to use the command line (e.g. the terminal)
Learning how to use the CLI is actually very useful when learning programming beyond JavaScript. So don't be afraid of it.

B
__________________
MBA (13" 1.7 GHz 128GB), UMBP (15" SD 2.8 GHz), UMB (13" 2.4 GHz), iMac (17" Yonah), 32GB iPad 3 WiFi+LTE, 64 GB iPad WiFi, 32 GB iPhone 5, Airport Extreme
balamw is offline   0 Reply With Quote
Old Apr 26, 2011, 12:09 PM   #11
ohla313
Thread Starter
macrumors 6502a
 
Join Date: Apr 2010
Thanks everyone for the help thus far. a couple questions though..

Can I screw up my Mac through Terminal or is it pretty much a stomping ground to check things out?

I'm learning basic HTML in w3schools site and JavaScript from LifeHacker, is this a good start?
ohla313 is offline   0 Reply With Quote
Old Apr 26, 2011, 01:15 PM   #12
notjustjay
macrumors 603
 
notjustjay's Avatar
 
Join Date: Sep 2003
Location: Canada, eh?
Quote:
Originally Posted by mufflon View Post
You need to use the command line (e.g. the terminal)
Pssst. "whereis vim" is a terminal command
__________________
.
notjustjay is offline   0 Reply With Quote
Old Apr 26, 2011, 01:18 PM   #13
Cabbit
macrumors 68020
 
Cabbit's Avatar
 
Join Date: Jan 2006
Location: Scotland
Quote:
Originally Posted by ohla313 View Post
Thanks everyone for the help thus far. a couple questions though..

Can I screw up my Mac through Terminal or is it pretty much a stomping ground to check things out?

I'm learning basic HTML in w3schools site and JavaScript from LifeHacker, is this a good start?
Yes you can deleted absolutely everything on your mac just by typing in "rm -f -r *" in the wrong place. You get no dialog or warning, it just goes right for the delete.

Though once you learn the basic commands its very easy, perhaps try a linux or bsd virtual machine to learn the terminal on first.
__________________
Nom nom nom eating cake!
Cabbit is offline   0 Reply With Quote
Old Apr 26, 2011, 02:05 PM   #14
notjustjay
macrumors 603
 
notjustjay's Avatar
 
Join Date: Sep 2003
Location: Canada, eh?
Quote:
Originally Posted by ohla313 View Post
Can I screw up my Mac through Terminal or is it pretty much a stomping ground to check things out?
Yes, you absolutely can screw things up, however, if you're careful, you should be just fine.

You will do absolutely no harm exploring your file system using commands like "cd" and "ls", and probably can't do any harm by copying files using "cp".

You do want to be very careful once you start playing with "mv" (move or rename files) and "rm" (to delete files). "rm" has a few switches that are very useful but can be tragic if not used carefully. "rm -f" will delete a file without asking you to confirm and overriding any "read only" attribute set on the file. "rm -r" will delete recursively everything in the folder tree you specify. "rm -rf" is a particularly potent combination -- it will recursively delete everything in the folder tree AND do it without asking you for confirmation. Apply that combination in the wrong place and you can end up with a LOT of files missing!
__________________
.
notjustjay is offline   0 Reply With Quote
Old Apr 26, 2011, 03:41 PM   #15
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
The Terminal can be a dangerous place because the commands you run in it assume you know what you're doing. Don't let it scare you, just be careful. Before you hit return, always check two things. Check you've typed the command correctly. Check that you're in the right directory.

But the usual mantra applies. Backup! If you use Time Machine, you're automatically getting hourly backups. So if you issue the wrong command or the right command in the wrong directory, you can restore the files very easily from Time Machine. If you manage to hose your whole system, boot from the Mac OS X DVD and do a full restore from your Time Machine backup. But don't let this lull you into a false sense of security.

And a GUI can be just as dangerous. When I used Windows, I was in the habit of hitting shift+delete then enter to delete useless files that I wanted not to go into the Recycle Bin. When I went from Win XP to Vista, they changed the behaviour of Windows Explorer. A couple of times, I hit shift+delete then enter expecting to have deleted a file, but unexpectedly had the whole folder selected instead of just the file. Bam! Whole folder gone. Whole week's worth of the work gone. And no time machine!
jiminaus is offline   0 Reply With Quote
Old Apr 30, 2011, 12:56 AM   #16
ohla313
Thread Starter
macrumors 6502a
 
Join Date: Apr 2010
Over the past days I was going over what I wanted to get out of coding and what I needed for a basic text editor. I realized what I needed.

Which text editor will allow me to see the page I am coding? For instance, I am writing HTML and all that in one pane and I can see the web page changes in the pane next to it.

Hopefully there's an editor out there that does that.

Thanks!
ohla313 is offline   0 Reply With Quote
Old Apr 30, 2011, 03:00 AM   #17
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Originally Posted by ohla313 View Post
Which text editor will allow me to see the page I am coding? For instance, I am writing HTML and all that in one pane and I can see the web page changes in the pane next to it.
The free way I know to do that is to have a text editor and web browser side-by-side. Code in text editor. Cmd+Tab to web browser. Cmd+R to refresh web browser. Cmd+Tab back to text editor. Repeat.

The only editor I know of that does live preview while HTML coding is Dreamweaver. But at USD 30 per month for a subscription or USD 399 outright, I wouldn't recommend you consider it. And you'd need to learn Dreamweaver onto top of HTML, CSS, JavaScript, etc.
jiminaus is offline   0 Reply With Quote
Old Apr 30, 2011, 06:25 AM   #18
bpaluzzi
macrumors 6502a
 
bpaluzzi's Avatar
 
Join Date: Sep 2010
Location: London
Quote:
Originally Posted by ohla313 View Post
Over the past days I was going over what I wanted to get out of coding and what I needed for a basic text editor. I realized what I needed.

Which text editor will allow me to see the page I am coding? For instance, I am writing HTML and all that in one pane and I can see the web page changes in the pane next to it.

Hopefully there's an editor out there that does that.

Thanks!
Coda has this functionality, but it's honestly not much more convenient than using two separate programs and switching between them. Once you really get into testing, you'll want to use multiple browsers, anyway.

As for text editors, I use TextWrangler for 'separate' file editing, when I just need to make a quick change in something.

For actual coding/project file manipulation, I use Eclipse. It's a full-featured IDE, featuring debugging, class inspector, auto-completion, and the like. It's also free! There are specific builds available for most common languages, or you can just download the "Classic" app.

http://www.eclipse.org/downloads/
bpaluzzi is offline   0 Reply With Quote
Old Apr 30, 2011, 05:42 PM   #19
ohla313
Thread Starter
macrumors 6502a
 
Join Date: Apr 2010
Thank you PghLondon and jiminaus for your responses. Sorry but could you dumb it down a bit on what you are saying?

From what I read, Coda would be able to do this but it isn't that useful? And in order to see where my needs are, I should start with the free TextWrangler? Is having too many text editors on my MacBook ok? Should I worry about conflicts or anything? I might just want to try out TextWrangler, Coda, and TextMate at the same time and see.
ohla313 is offline   0 Reply With Quote
Old Apr 30, 2011, 06:29 PM   #20
bpaluzzi
macrumors 6502a
 
bpaluzzi's Avatar
 
Join Date: Sep 2010
Location: London
Quote:
Originally Posted by ohla313 View Post
Thank you PghLondon and jiminaus for your responses. Sorry but could you dumb it down a bit on what you are saying?

From what I read, Coda would be able to do this but it isn't that useful? And in order to see where my needs are, I should start with the free TextWrangler? Is having too many text editors on my MacBook ok? Should I worry about conflicts or anything? I might just want to try out TextWrangler, Coda, and TextMate at the same time and see.
Yeah, it's not really that useful -- whether you're switching in between tabs in the same app, or switching between two apps is about the same, in my opinion. Honestly, it's easier for me to switch between apps, as I can just cmd-tab between them.

No worries with having too many text editors. TextWrangler is a great text editor -- beginning or pro. It doesn't do auto-complete, but it does do color-based syntax highlighting. I use it on all of my development rigs.

Coda combines a text editor (with the syntax coloring, like TextWrangler), an FTP client, an SSH/telnet terminal, and a WebKit (Chrome/Safari) "browser" for doing previews. It's a good idea in concept, but for me at least, I was able to work better using separate programs that are optimized for each of these tasks. Add in the fact that the "separate" versions of these programs can all be found for free, while Coda costs $100 (wow, they've really increased the price on that!), and it was a bit of a no-brainer (for me, at least)
bpaluzzi is offline   1 Reply With Quote
Old Apr 30, 2011, 11:52 PM   #21
virtualandy
macrumors newbie
 
Join Date: May 2010
If you want to edit html/js and see it live, take a look at Firefox + Firebug (I guess these days, Google Chrome and Safari both have developer tools that do the same thing).

Also, w3schools kind of sucks. Take a look at: https://developer.mozilla.org/en/JavaScript/Guide

If you got some extra coin to buy a book, I like this one: http://www.amazon.com/Eloquent-JavaS.../dp/1593272820 (it's about learning to program w/ JS, so maybe appropriate).
virtualandy is offline   0 Reply With Quote
Old May 1, 2011, 03:40 AM   #22
Unggoy Murderer
macrumors 6502
 
Join Date: Jan 2011
Location: Livingston, Scotland
I do professional level website design in my spare time, and I use Panic's App called Coda. It's available from the App Store, and I paid $100 dollars (before it was in the App Store, don't know the price now) but it is the best text editor I have ever used. It supports syntax highlighting for loads of file types (htm, CSS, js...) and has a build in browser for real-time previewing. There's a 14 day trial available, and I recommend you give it a try =]
__________________
27" iMac, i7 3.4GHz, 16GB RAM 13" MBP 2.66 GHz, 8GB RAM 3rd Gen iPad 64 GB Wifi+4G, iOS 7 iPhone 5 32 GB, iOS 7 Mac Mini 2.00 GHz, 2GB RAM
Unggoy Murderer is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: Is anyone here good with coding? AndrewR23 Jailbreaks and iOS Hacks 3 Mar 21, 2014 04:20 PM
Want to try Coding. gomattgo MacBook Pro 6 Feb 23, 2014 07:15 PM
2 vs 4 cores for PS and coding adeblas MacBook Pro 0 Nov 28, 2013 02:56 PM
coding in mac SlrP Mac OS X 10.7 Lion 1 Jan 15, 2013 07:23 PM

Forum Jump

All times are GMT -5. The time now is 09:08 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC