hi. i want to learn programming on different languages like c++, python, etc. im currently learning c++. im thinking about buying another laptop for it. a cheap one because right now i use a mac and dont want my mac to slow down.what would i have to download to learn the languages. i use xcode on my mac, would i be able to run the other languages on it? does anyone have any advice on how i can learn the languages. any websites that can help? thanks
i would suggest getting linux ubuntu 11 for ur new laptop cause it comes with the essentials for these languages. it comes with a c and c++ compiler, a python compiler, easy-to-install ruby interpreter, and its a great platform for learning languages. and linux has a bunch of benefits that mac and windows don't
its not something I'm starting. all have benefits that the others don't. i think linux is just a better choice in this case because it comes with several interpreters/compilers already installed, doesnt take up that much space, is easy to setup a dual boot with. etc
buckys c++ tutorials on you tube here dream in code etc are handy for problems that you are stuck on, lazy foo is great if you want to pick up an api but i tell you this as a beginner to a beginner, you do pick it up you just dont notice, just keep practicing code and you will never know enough but you will be able to do more, it seems slow but theres lots to learn, its also very good for your brain too
I don't know, I know a few programmer that refuse to use anything besides vim and they can't organize code to save their life. Good organization is something I think you kind of need to be picky about to begin with before you start coding anyways. I use Code::Blocks, Vim, Geany in Ubuntu and really don't use Windows outside of playing Guild Wars once in a blue moon.
@bhx: u misunderstand me. i mean u should learn to program organized on a text editor. i dont mean a text editor means it will teach u to code organized. and i have never seen the point of just programming w/o an ide. its there to help u by cutting corners once u understand why its cutting and where. which is achieved by writing on a text editor
Using an IDE can be beneficial to a newbie, because they can take advantage of the tools to see what things are supposed to look like. As long as they are conscientious and go back and learn what it all means.
For example, newbies often see code in books that is written all in one file, with all the functions coded inline (I don't mean declared as inline). So they have no idea about having header & .cpp files for each class. If they use the class wizard and create functions, they will see how it is supposed to look with separate declarations & definitions.
Another example is make files. The IDE will create one, go and research what all the stuff in the make file means, which is a lot easier than trying to build your own from scratch.
Also, compiler options - the same thing, find out what all the options the IDE has put in, go and see what they all mean. Deciding which options to use could be quite tough to do from scratch because compilers like gcc have a zillion options.
It is good for ones education to understand what the compiler is doing in detail, but I am saying it is quite tough to do this by yourself - why not get the IDE to give you some clues?
As far as editors go, I prefer something that I can cut, paste & copy with - which is a lot easier than remembering dozens of vi commands. This is exactly what I had to do at work for about 3 months.
Now that i have a fair idea of what the compiler does, I prefer to use the IDE full time.
I suppose it is much easier these days with all the resources on the internet. I first taught myself C in 1987 with the help of the K&R book. I also fooled around with UNIX shell scripting and AWK. Fooled being the operative word. I had no internet back then.
It was really tough because all I had was that one book, and the man pages - I couldn't find any books on Unix or AWK back then. I preferred the C shell (csh) because I was already learning C. Some of the man pages were nightmare - ever read the grep man page? I heard somewhere that, that page was deliberately made as obscure & complicated as possible, just for a joke.
After all that, it was a bit of a downer to have to learn FORTRAN and Pascal at University.
The other thing I notice about some of the younger (I am guessing) newbies is they want to tear into writing code, without seemingly to have any idea of what they are doing. Such things as program structure, data types, control flow, functions etc. They don't seem to want to look at the documentation / reference section on this site - I would have been over the moon to have a resource like that in 1987!! They don't seem to want to look on the internet. They don't even research the functions they are using in their code - they just blindly use them, hope for the best, and if it fails they fire question to this forum.
It's like they have never driven a car and tomorrow they want to do Formula One..........
Any way enough of my ranting (although someone might learn something - I hope)
Again, knowing about headers/cpp files or declarations/definitions doesn't lead to good organization. I've ran into a few programmers that will have their declarations and definition in the header file. While I've seen programmers actually try to include cpp files for the headers. I've also seen a real small few have projects with only 3 files (the main file where int main is, a header file with all declarations, and another source file with the definitions).
Just recently I saw a thread on Gamedev I think it was where a guy was making his first 3D game engine and the only files he had was main.cpp, engine.h, engine.cpp which he quickly got experienced programmers telling him to separate it into graphics, sound, ai, networking, input, etc and not force everything into a few files as it will lead to huge problems later.
It is sad that almost all books for learning C++ don't seem to bother with expressing the importance of header files and organization. Though, that is also where the Cplusplus.com tutorials fail too as they don't really stress the importance of it either. I think they Cprogramming.com tutorials do touch on it though. It is an important topic that is too often skipped and left to be learned later.
There are some issues with using IDEs, specially the ones that are caused by using an IDE. By instance
I'm not sure what my compiler options are set to: I'm using Qt Creator, and those are buried somewhere I can't find.
Or the common `undefined reference' (never linked) or `multiple definitions' (include cpp). Some IDEs have a quick mode so you don't have to create a project or even save the file to test some snip (¿what's a project?)
That's right, I had some of those issues as well, but it didn't take me long to figure them out myself. About 6 months ago I upgraded to a new version of fedora, and had a new KDevelop & QtCreator. I was wondering why there was no toolbar button to compile the code!! Then I realised it did background compilation & highlighted the errors.
With my previous post, I guess I was relating some of the struggles I had and some of the concepts that helped me - that may not suit everyone, people learn in different ways.
Could it be a balance between starting with nothing versus trying to figure out problems with hidden things in an IDE?
I wonder how many newbies actually use the shell to compile their code? Very few I would guess, yet they still have basic problems with braces & semicolons etc. The IDE is probably telling them there is a problem via syntax highlighting or other means. If they don't understand that - then how are they going to get on compiling from the shell?
Part of the problem is that compiler messages are a bit cryptic for a newbie, as are the zillion compiler options. At least with the IDE, one might ask oneself, why all these squiggly red lines, red text, pink shading etc?
Of course the other part might be sheer ignorance on the part of some newbies - I mentioned that a bit already.
I like to compare things to cars, because a lot of people have a reasonable understanding of them. It is good to learn what a clutch, gearbox and gear ratios all mean, and learn the skill of driving a manual gearbox car. Having done that, I might prefer an automatic transmission in heavy city traffic. Then again, what If I had to drive a heavy truck? Most probably won't have auto transmission.
As another example consider Computer Aided Drafting (CAD). This software has all kinds of automated things, so a novice can do lots of things without having any idea of how to achieve the same thing drawing manually.
There are lots of examples, but I am sure the idea of encouraging a newbie to have a go at compiling from the shell, is aimed at increasing their understanding of the underlying system. This is good, especially if someone wants to work in industry - where they may not be able to avoid it.