Join 136,100 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,667 people online right now. Registration is fast and FREE... Join Now!
Alright. Before you open fire on me, hear me out... If I wanted to make a website that washes your dishes and cooks for you, I could git er done in less than a week. I got this whole web development thing on lock. (lol@my verbage)
Now, I want to write a program. But here's my problem:
If I woke up one night in a cold sweat and nothing could pacify me but to create a website, I would open up a text editor, write a file, save it (.html, .php, .css, whatever), mozey over to an ftp program, connect, upload, fire up the browser and take a look-see. Back to the text editor if I don't like it, lather, rinse, repeat.
But last night, I woke up in a cold sweat for a different reason... Then I took the oversized Hanes sweater off and that pretty much fixed that problem. But then I had another problem! I wanted to write a *real* program. Not just some nifty functionality on a website.
I guess the real question is... where do I even begin? I know I need a language, and I've pretty much got C++ in the crosshairs. But I don't even know where to write the code! Then how do I get it from 'code in a text editor' to 'program running on my laptop'? I've seen a few things on a few forums that hint to a 'compiler'? Is that the programming equivalent to a Dreamweaver type thing?
See I just have no clue where to begin. A 1, 2, 3 type of list would be extremely helpful!
I've seen a few things on a few forums that hint to a 'compiler'? Is that the programming equivalent to a Dreamweaver type thing?
A compiler will take human readable text & convert it into machine code that the computer can load into memory & execute.
Since php runs on the fly, & html is taken at face value, it will feel weird at 1st. After you get into Linking Libraries, & undefined functions you'll understand =-)
Sweet, you actually did that in a 1, 2, 3 fashion! No matter how bad I ever need instructions, I hate when they're long and saturated with filler! Perfecto! *snatches up that shopping list* Ok, I'm off! *whisks out the door*
Surprise: if you've programmed PHP, you've already written a program, because PHP was your compiler that made the script into an application (it just didn't show you the executable, but it "was" there). -- hm, I might get a flame for mixing compiled and interpreted here, but hey, it's just the idea!
See, the concept of PHP being a 'programming language' is what I lean heavily upon when I brush my shoulder off and arrogantly say "Uh yeah, I'm a web programer." Ha ha. And I'm fine with that, but I want to make a program that runs... OUTSIDE of a web browser ^__^ and thank god I have what knowledge I do of languages like PHP because otherwise I would be 100% lost on this new endeavour rather than only 70-80% lost. lol
Oh by the way, to make matters worse, I've never even GLANCED at C or C++. I'll be learning a whole new language in this process ^__^
You'll find a good deal of similarity in C++ with PHP. C++ is a lot more rigid in how it does things, but a lot of the basic operations and constructs are the same.
Essentially the flow of development in C++, is write your code into a text file, run the compiler on that source code file. If it is correct, then it will generate an executable which you can then run like any other program.
If you want an "OMG, look, I wrote a real program" kind of deal and the environment you're thinking of is Windows, then I'd recommend one of Microsoft's free development tools. You can literally start a new project and have a windows application running in under five minutes.
If you go this route, I'd use C# rather than C++. C++ is a venerable beasty with lots of nasty little quirks for the unwary. While some newer platforms will shield you from this somewhat, you're bound to find one where you least expect it.
C#, basically Java for Windows, uses the C inspired syntax that's also found in PHP. If you do well with this, you'll have the desktop programming thing worked out and C++ will make that much more sense.
You know pure_gray_star, if you simple go to a bookstore like chapters or barnes & noble and pick up a beginners book on the language of your choice the first chapter is usually how to setup your computer environment to run programs and shows you the steps to build your first program (usually called hello world by tradition). They usually tell you the software you need, where to find it on the Internet and how to go about entering code and compiling it.
C++ will be a great starter language for you and has a lot of the backbone principles that will help you even expand into other languages. If you even have the time and money to do it, you can usually find an Introduction to C++ programming class at any university computer science department. I find classes are great for the beginner because they talk about the problem solving behind the code, not just the code. Plus you can ask questions to get the fundamentals down if you need to. Once you got the basics you can climb through the language pretty quickly.
But at least get the beginners book. I recommend the Sams Teach yourself series or anything that has the word "Beginner" on the cover. Stay away from the microsoft press books for now... in classic microsoft style they can get wordy.
Oh and one last word of advice.... Visual C++ is not the exact same as C++. Find a book on C++ and once you grasp that you can go into the Visual kind. This may get boring since you are left with a dos window style of programming, but once you are done with the basics, again the Visual portion will be much much easier.
I picked up Sams "Teach Yourself C++ in 21 Days", and it will walk you through all you need to know to pick up the basics of C++ - everything from setting up your environment to pointers.
Wow, when I bought my 350z and joined a Z forum, those guys were assholes! I'm a little surprised by how helpful everyone here is (hence the "Don't shoot!" attitude displayed in the beginning of my first post).
It's funny to say this but going to a bookstore honestly never even crossed my mind. I learned everything I know about 'coding' through the steps a.) I want to do something. b.) Let me look at examples of similar things. c.) Ok, now let me teach myself how to do it. I research, study other people's bits of code, and basically learn things in a very pack-rat collage type of way. So yeah, I might actually try reading a damn book!
I think the original reason I stear clear of books is because as I said above, I don't like the filler. I like the 1, 2, 3 instructions and whatever filler information I need I find myself.
But ayway, thank you guys so much I'm really glad I joined this forum!
If you want an "OMG, look, I wrote a real program" kind of deal and the environment you're thinking of is Windows, then I'd recommend one of Microsoft's free development tools. You can literally start a new project and have a windows application running in under five minutes.
Weeeelllll, not exactly! Ha ha, it's not quite as "Look what I can do!" as that. For being one of the many who literally does 'dream in code', I woke abruptly one night recently with this colossal idea for a program. And colossal not only describes the gravity of the idea, but also the size of the program. It's probably going to take about a year before I even have a beta version put out. It's kindof my M.O. to not know crap about a particular thing then try to jump in head first anyway and try to make some huge magnificent beastly exhibition of what I was able to accomplish.
And as far as environment, I have a laptop that runs Vista and a desktop that runs both XP and Suse 10.1 so I will probably be using mostly Linux to work on programming.