Join 136,155 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,121 people online right now. Registration is fast and FREE... Join Now!
I know this question is out of the norm but when you program do you have notes or do you just memorize the mandatory lines of code needed .For Example how would you type out this code?
if( !hWnd ) // If the window was not created, { MessageBox(NULL, "The window is not created because errors in the program", "Error!", MB_OK); return 0; }
Your question is a little confusing. Are you asking how someone would plan out and create a program?
When creating a application that is large I will normally take out a piece of paper and draw it out. This is also called a flow chart but everyone has their own way of creating it and how it looks. I then write everything out that I need to declare and what its purpose is. Then I move into my code and build it function by function testing each one as I go. Everyone has their own way of planing and creating a program so this is just mine. I am no expert in C++ so other people that program for a living might have some other ways of doing it.
For the lines of code once you get programming down you know most of them. But from what I have heard people still keeps books around as refrenece because their is a lot to programing.
This post has been edited by lockdown: 16 Dec, 2007 - 05:19 PM
"Are you asking how someone would plan out and create a program?"
In short yes i would like to know how every one dose theres. i was hopeing you would say something like that and not you just make it up as you go along.I will try using a flow chart next time and some pseudo code .
Thanks for the help. Any one else know of other ways?
This post has been edited by Clearman: 16 Dec, 2007 - 05:32 PM
Yeah I have a couple friends that say they just make it up as they go. That said some people can work things out like that in their head with no problems.
Working with flow charts and pseudo code is one of the proven methods to planing. How everyone dose theirs is different but that is one of the first things I learned this semester with C++.
Working with flow charts and pseudo code is one of the proven methods to planing. How everyone dose theirs is different but that is one of the first things I learned this semester with C++.
I just finish my first semester i just got why they were teaching us data flow diagrams .And there is no way in hell that people can "make it up as they go" they must have been working with c++ for a long time to do that. Are you in third year or first.
This is my first semester of college and I just finished my Intro to C++ course with a A . I am taking the next course witch is object ori. next semester. But I have my own way of drawing things out similar to a flow chart but I skip the squedo code. I just write out the code as in C++.
lol we have to do java and i got an A.I am the only one who got over a e .already 15 out of 23 people dropped out of the class you should see it . Right i am off its 2am over here. btw squedo code is the worst thing made by man i had to do 12 programs with 50-80 lines of code in it . Thanks again and gl in your coarse .
This post has been edited by Clearman: 16 Dec, 2007 - 06:11 PM
Certainly anything bigger than a trivial problem needs some thought, although the purpose of design and prototyping is for the developer to gain a firm understanding of the problem he/she is trying to solve.
Its sometimes said that you only truly understand a problem once you have the solution in your hands - and that's not always too far off from the truth. You can document all the design and theory that you like, though, until you attempt a prototype or test program, you can never be sure whether there are elements which neither you nor your colleagues had thought of. Equally, you may sit down with barely a penstroke to paper, and attempt to solve the problem as you see it - This inevitably results in the developer producing the solution to the wrong problem when he/she hasn't really understood it.
Truth is that development is an iterative process - For anything but the most trivial of programs, you will go through several different designs and prototypes before you see the light at the end of the tunnel. Its not entirely unheard of to have an almost-working solution before the formal design document emerges which accurately describes what the application is intended to do.
Its something of a catch-22 situation - You need to have a solution in your hands in order to create the solution; but its one that every software developer faces on a regular basis - and there's no easy answer, in general, the "best" way to develop software is whatever works for the individual or team who are looking for the solution.
By the way, its a little disheartening to hear that so many of your university classmates have been put off by the whole process (And understandably so). Software design is a difficult thing to do, letalone teach; and there's no way that any tutor or course can really teach problem solving to you - its a key skill that only a student can learn him/herself. I expect the university are just trying to teach various techniques, and maybe have taken one or two of them a little too far.
Short answer, no one seriously does it this way. Most windows programs start out with some Microsoft tool that generates this or hides it behind some C++ classes. I haven't seen this kind of code in a very long time.
That said, a guy named Charles Petzold wrote the definitive tome for making windows programs with simple C, the Win 32 API, little more tools than a free command line compiler and notepad. You can check out his books here: http://www.charlespetzold.com/books.html
Of special note is the code offered for now out of print "Programming Windows, 4th edition" ( Windows 95 ). That code should have the hello world prog and a few other basic examples to help you walk this path.
By the way, its a little disheartening to hear that so many of your university classmates have been put off by the whole process (And understandably so). Software design is a difficult thing to do, letalone teach; and there's no way that any tutor or course can really teach problem solving to you - its a key skill that only a student can learn him/herself. I expect the university are just trying to teach various techniques, and maybe have taken one or two of them a little too far.
I have to disagree with you assumption that the people in my class had any problems with problem solving the drop outs were mainly because of 3 things: 1)They had little to no interest in the computing area. 2)7 of them had a hard time with basic english. 3)There is a pub next to our collage.
There are 4-8 people who are good at programming and all of us tried to help them with java but when a person says to you after 3 months of lectures and you helping them with websites given to them and you hear "what is a for loop" you just give up.I wouldn't be disheartened they just didn't care at all.
QUOTE(Be @ 16 Dec, 2007 - 07:24 PM)
Short answer, no one seriously does it this way. Most windows programs start out with some Microsoft tool that generates this or hides it behind some C++ classes. I haven't seen this kind of code in a very long time.
My great and powerful teacher once said when he was making us sort an array "manually" he said "some programmers just use the .sort function but you are working to be the ninja coders you will be the best"(i.m not kidding). I will look into 3ed party programs though but still its good to know if you need to make a 3ed party program. Thanks for the help and the links i will enjoy them.
This post has been edited by Clearman: 16 Dec, 2007 - 07:49 PM