Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 18 Online
OpenStudy (anonymous):

im trying to get started in this problem set, but have never done ANY programming before... and im using "vim" and "Ruby" rather than python and IDLE. how do i create a directory to save everything i do in, and how then do i create a file to start writing in?

OpenStudy (anonymous):

Creating a directory is a task for your operating system. As is 'creating a file' though vim will create files for you if you tell it to write the buffer you're working on to a file.

OpenStudy (anonymous):

Using Vim? what operating system are you using? the command line to create a new file is "vim yournewfilename"

OpenStudy (anonymous):

Also if you haven't done any programming before, why not just use python instead of ruby, and learn ruby after you have some of the basic programming concepts down. Python and ruby are similar, and many concepts are common to all programming languages.

OpenStudy (anonymous):

Agree with polpak, but i would go even further.. as to say you may want to do some basic computer courses on operating systems first.. I find it key to knowing how operating systems work when you start to get into larger more sophisticated programs. (Plus you wont get stuck on issues that you are currently stuck on)

OpenStudy (anonymous):

suggestions naterator? im a mac user . . . as to Ruby vs Python, i live in Chicago [ruby land] and a friend here codes in Ruby and is occasionally able to help me out... so, ruby.

OpenStudy (anonymous):

yes, but if you use python you'll be able to a) follow the lecture b) follow the handouts c) get help here d) read the course book

OpenStudy (anonymous):

Hmm mac is one of the few OS that i do not use.. I am unix and windows, i would not be able to help out with Mac's

OpenStudy (anonymous):

Mac is essentially a pretty gui interface on top of a unix OS.

OpenStudy (anonymous):

yes it is a unix kernal, if you could ever show me how to get to a command prompt on one of those things then i would take the essentially out of your statement.. But to me calling something Unix meant that it could be administered like one.. But thats all personal pref for me.. You are absolutely right tho polpak it is built on top of unix.

OpenStudy (anonymous):

mac has a command prompt. Applications -> Utilities-> Terminal

OpenStudy (anonymous):

hmm maybe my ignorance for apple products got the best of me ;)

OpenStudy (anonymous):

It's ok. I don't use them because the hardware is so expensive compared to what you can get for a non-apple PC

OpenStudy (anonymous):

But the OS is a far sight better than windows IMO.

OpenStudy (anonymous):

Yea, i have just never had a desire myslef.. Just for that reason. I never could get past the price hike they put on those products.. That and i always heard negative points about them locking you down from things you should be able to do... Whether thats true or not, it just gave me more of a reason to stay away from them.. Have a good one.. AgentFin this may help... su - "if you cant root you should have the rights under your home directory" cd /home ls -ltr 'check what directory is your home directory cd yourhomedirectory 'change to your home directory mkdir myproject vim myfile -in vim (think its the same as vi ) hit "esc" the "qw" and enter. this will quite and write the file. To edit the file just do vim and the file name. Best of Luck.

OpenStudy (anonymous):

or just use the gui ;)

OpenStudy (anonymous):

Or just use another editor. A simple text pad or whatever will work too.

OpenStudy (anonymous):

Point being you're trying to learn programming. Adding learning vim just makes the learning curve that much steeper.

OpenStudy (anonymous):

wow. thank you! . . . since i really like the lecture style, i'll definitely be sticking with this program. will see what i can do by way of the ruby/python issue! as to "simple text pad" does "TextEdit" work then? [going back in my head to the html and perl class i had back in 2002...] i should be able to then save the TextEdit files to just somewhere in a folder [directory?] on my desktop or whatever and then point at that via Terminal?

OpenStudy (anonymous):

Yep, textedit or notepad++ or anything like that will work just fine.

OpenStudy (anonymous):

Once you save a python (or ruby file) you can run them by typing in the terminal python path/to/thefile.py

OpenStudy (anonymous):

Just 2 cents. At the top of the assignments page for the course on the MIT site is a PDF detailing how to install the IDLE development environment. I Highly recommend this, as it is awesome in itself, in addition to being the program that is used in the lectures. There is a shell as well as the ability to save code as .py files to be run in the shell. Quick, easy elegant solution. (And it can run on Mac, Win, or Linux).

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!