How to start programming

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,336
Location
USA
I've been interested in learning the correct ways of programming but I don't know where to start. Everything I've learned so far (which isn't a lot) has been self taught and I don't know where to find the proper resources to continue down the right path.

My reasoning behind this has two motives. First one is to help me with up-coming projects at work. I've begun working with a tool called winrunner by Mercury interactive for automated testing. Winrunner has its own scripting language, which they claim to function much like the language of C. No I'm slowly learning both, but I find myself not having enough background to properly design my scripts from the beginning.

Second motive is personal interest. I would like to be able to create my own application, be it stand-alone, or on the web. I've been getting the impression that no matter what computer language you know, a programmer (or coder) should be able to apply the same basic rules to any other language. I'm find similarities between php, perl, and now my winrunner scripting. Problem is, I have no background knowledge of scripting and programming.

I have a tough time arranging the scripting and logically putting my thoughts into their language. OK, so maybe I just don't have the skill, or the brain power to conceive the science of computer programming. But I'm not giving up, I just need the right info to get me started.

Taking a class is not a helpful alternative right now. The company is on a budget freeze (with an upcoming reduction in force...yippy) so I doubt they will spring for anything. On the same subject, I don't have the money to fund my own private education right now.

So what options do I have? I'm guessing three things right now. One is the obvious...books. OK, so which books? Second would be the Internet...but there is so much info, I still haven't found what I'm looking for. And last would be a knowledgeable person. I have that at work, but we are busy right now that I don't have this resource available long enough to get me going.

Has anyone else begun this pursuit? Does anyone have any pointers to start me in the right direction? I'm open to any thoughts you guys might have to offer.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
Take four years of CS classes. You'll spend about two and a half of them spinning your wheels trying to figure things out and then <poof> suddenly things will sink in.

No?

OK. Everything I can think of is either deeply academic ("The Art of Computer Programming") or very task oriented ("Learn C in 21 Days").

Neither is right, of course.
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,336
Location
USA
Mercutio said:
Take four years of CS classes. You'll spend about two and a half of them spinning your wheels trying to figure things out and then <poof> suddenly things will sink in.

No?

OK. Everything I can think of is either deeply academic ("The Art of Computer Programming") or very task oriented ("Learn C in 21 Days").

Neither is right, of course.
Is this the only beneficial way? If it requires taking classes, then maybe I'll have to consider working something out. I never took and CS classes, so I'm not even in the loop.
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
I would start off learning a single language. Java or C++ are good starting points. I would choose Java, Merc would probably choose C/C++.

Go to a book store and see what introductory books they have. Check out how the book is written and if you like the style then buy it and start reading. Many books will come with a free learning edition of a popular compiler which is nice. Under Windows I like CodeWarrior for Java. That really isn't the real way to write Java though. You are supposed to write it on a Unix machine in vi/emacs and compile it on the command line. But, screw that it takes too long.

I have no preference for a C++ compiler, but the MS compilers are pretty nice. You can probably pick up a copy of MS Visual Studio 6 for pretty cheap. I would avoid .Net it's weird.

Personally for a quick and dirty program I just use VB/VBA because it is so easy to write a quick program and I know the language fairly well.

If you are just interested in creating quick programs VB6 might be the language for you.
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
Just wanted to add that if you learn the basics of programming you can pick up a new language fairly quickly. They all use the same ideas. For instance there are many similarities between Java and C++.

You really don't have to take a class to learn how to program, many people teach themselves. All it takes is a good book and plenty of time.

If you have any questions, there are plenty of people around here that can help you. If you choose to learn Java or VB I can answer more specific questions. (I have written programs in C++ but that was a few years ago and I don't remember too many specifics.)
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
Actually, I'd strongly suggest a learning language like Python or Delphi.

There's a big difference between functional code and well-written code. Just about anyone can crank out an ugly but functional brute-force program, given enough time. Quick, elegant solutions are what take some programmers to the next level.

My freshman year of college I roomed with a CS senior who was like that. He started and finished his senior project the day it was due, working by himself. The rest of his class was working in groups of three, and had put something like two months into their projects.
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
I strongly suggest Delphi too. I had the same questions back half-year ago. You can see it in this thread.

Delphi 7 was released this August. It's a very nice solution IMO. It's also very forward-looking, already supporting .NET and the newest CIL specifications.
The Personal Edition costs a mere $100 so it worths the expense for a language you may stick the rest of your life with.
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
I strongly suggest Delphi too. I had the same questions back half-year ago. You can see it in this thread.

Delphi 7 was released this August. It's a very nice solution IMO. It's also very forward-looking, already supporting .NET and the newest CIL specifications.
The Personal Edition costs a mere $100 so it worths the expense for a language you may stick the rest of your life with.
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
Not much. It's a little PITA to learn Pascal's highly-structured ways, but if you like order in your life it's really nice.

How much? Well, consider I can do a "Hello World!" app... :lol:
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
That's why I think Delphi sucks...who wants to learn a dead language? I have looked at Pascal code before and it seems like there are many better ways to do things.

I would much rather start off with Java or C++ or even VB, but that's just me.
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,336
Location
USA
timwhit said:
That's why I think Delphi sucks...who wants to learn a dead language? I have looked at Pascal code before and it seems like there are many better ways to do things.

I would much rather start off with Java or C++ or even VB, but that's just me.
I don't know the difference between those languages, but I would rather learn a language I can actually use for something right now. I know at work they use Java heavily for thier applications. Something like this could benifit me in more the one way I guess.

Isn't the concept of java a little different since you can use your application on almost any platofrm? (assuming it was written correctly)
 

time

Storage? I am Storage!
Joined
Jan 18, 2002
Messages
4,925
Location
Brisbane, Oz
Pascal was designed as a teaching language. Wirth never expected people to extend it for commercial use. He tried to rectify that with Modula, but the market had already spoken.

Personally, I gag at the idea of C-anything being someone's first language, but I guess universities want to appear relevant, so it's disturbingly common.

Delphi has a good IDE and fairly consistent syntax, but I'd guess that it's learning curve is steeper than VB. But it's also a better springboard to a C++ or Java environment than VB. Plus people build real software with it, and sometimes rather heavy duty stuff at that.

But for scripting languages, I'm not sure any of these are a suitable preparation. Without seeing it, my best advice is what they drummed into us in CS101, and what I find successful programmers know intuitively:

Modularize.

Your number one goal should be readability. Up to a point, modularization helps this goal, but don't go beyond that point either.

There's other stuff, like use meaningful names and use comments. When you have to work around some stupid bug/limitation in a tool, note the reason in a comment. Oh yeah, and use private or local variables wherever possible; or in other words use global variables as little as possible.

Does this summarize 4 years of a Computer Science course or 20 years of experience? Hmmm ...
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
Handruin said:
I don't know the difference between those languages, but I would rather learn a language I can actually use for something right now. I know at work they use Java heavily for thier applications. Something like this could benifit me in more the one way I guess.

Isn't the concept of java a little different since you can use your application on almost any platofrm? (assuming it was written correctly)
That's the idea behind Java, your code will compile on any platform that has a Java SDK written for it. Java and C++ are just similar because they use a lot of the same syntax.

If Java is the language of choice at your work then it seems that it makes perfect sense for you to give it a try.
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
timwhit, I had my doubts too. But after Mercutio's and HellDiver's suggestions I did an extensive search over the web to find out how Delphi fares in respect to VB or VC...

time said:
Delphi has a good IDE and fairly consistent syntax, but I'd guess that it's learning curve is steeper than VB. But it's also a better springboard to a C++ or Java environment than VB. Plus people build real software with it, and sometimes rather heavy duty stuff at that.
Believe me, as time says, you can do really heavy stuff with that. Even games have been programmed with Delphi. And the good thing is that with the Visual Components it has, it's easy like VB but almost powerful as C++.

And who said Pascal is dead? Just because it killed Microsoft's Pascal compiler?! Exactly, TurboPascal and, now, Delphi have been almost the most successful Borland products. Pascal is a learning language as time rightly says, but this doesn't mean you can't build stuff with it. Actually, this neat code requirement is not only negative. Yes it's PITA to accept it, but then the readability of your code is outstanding.
 

Will Rickards WT

Learning Storage Performance
Joined
Jun 19, 2002
Messages
433
Location
Pennsylvania, USA
Website
www.willrickards.net
I'd recommend taking a trip to your local college of choice. Go to their bookstore and see what book(s) they are using for the computer science intro class. I'd recommend using that. The 'learn this language in 21 days' thing will teach you the syntax of the language. It probably won't teach you how to program.

This intro class is the biggest test of fire for most would be computer science majors. If it doesn't frustrate you but rather enthralls you, you were born to be a programmer. If it frustrates you to no end, you will probably have had enough with programming.

The best way to learn to program is coding. Practice is most important. Your code will look like crap when you first start. But it will probably work. And you will be excited because it worked. Then you'll learn how to organize it.
Once you get the language syntax down _by writing_ some small programs, you'll want to switch your focus to learning how to design the program. This will allow you to take on larger projects. You can learn design by studying examples of good design and bad design.

Regarding the language question:
It doesn't matter. The syntax is not important. The important part is to learn how to design an algorithm and then how to express it in code.

Scripting languages are often easier to learn since the code you write is smaller. You don't have to write all the code for the entire program. You just write the code for the thing you want it to do. Input/Output is usually easy in these languages along with many other things.

Feel free to bring up any questions you have here.
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
Will Rickards WT said:
Regarding the language question:
It doesn't matter.
The syntax is not important. The important part is to learn how to design an algorithm and then how to express it in code.
I agree on this.

For me, Programming is like Giurisprudence. When you "learn" Law you learn a way of thinking... there are many differences between the various Law Systems around the globe but lawyers can understand each other because of this common background and culture.

The important question you have to pose to yourself, Handruin, is what are you planning to do with the language?
Java will benefit your Internet endeavors as well. I suggested Delphi because it is like VB in concept but extremely powerful for all RAD projects.
 

yeti

What is this storage?
Joined
Apr 25, 2002
Messages
21
Location
Menlo Park, CA
what programming language to start wit / use

I would agree with Will "design your algorithm and implement it". Knuth's "Art of Computer programming" is considered as the reference for design of algorithms -at least volume 1.

Yet you are in practice extremely restrained by the implementation language, which makes certain designs much easier to express than others. Pascal, C et al. focus on the regular "algorithmic" approach, with nice constructs to help you keep within bounds of "normalcy". Knuth fits right there. Object Orientation help you focus on a very modular approach. Other languages focus more on support of other thought processes. Perl is one of them, where you build on your constructs, Lisp and its descendants help you express yourself in a functional way. There are some languages that support a "logic" approach, not my kind, I can't even remember the name!

All this to say that if you intend to work alone and stay that way (working alone), I would first try to understand how I solve problems, e.g. algorithmically, functionally or otherwise, then play with Pascal or another simple but well constructed language (avoid Basic and ++ at least at first as they will warp your problem solving process), then find a language that decently supports your thought/problem solving process. Of course if you want to share your code, the story is very different, as you have to share the expression of your thoughts (and even English is not necessarily the best here). Contrary to what Prof states, I don't feel that RAD is enough of a reason to go for Virtual anything, as this -for me- confuses the means and the end.

And in the end it feels extremely rewarding to have your thought -or part of it- implemented by a machine!
 

Will Rickards WT

Learning Storage Performance
Joined
Jun 19, 2002
Messages
433
Location
Pennsylvania, USA
Website
www.willrickards.net
Mercutio said:
Wow. I got a four year degree in C++ without ever feeling "enthralled". What a gyp.
Well then there are the people like Mercutio...
Which raises the question: Do you program for a living? If so, do you plan on doing it indefinitely?

Handruin may not have been born to be a programmer. He may just want to learn to program for a more pragmatic reason. There is a middle ground.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
No, Will, I do not program for a living and I haven't since about a year after I got my degree. I just found the work uninteresting. When I was programming, I was doing so under contract - I built an information-management system for a photography business, a web-based Inventory scheduling and Job Cost system and a number of custom touch-screen applications for a large local mall.

None of which was exciting in the least.
 

Cliptin

Wannabe Storage Freak
Joined
Jan 22, 2002
Messages
1,206
Location
St. Elmo, TN
Website
www.whstrain.us
Handruin, my programming\coding background started with programming batch files before I went to college. After that, a couple of courses I took in mechanical engineering school involved programming. During the time I was in the ME school I added a major in CS and after a year or so changed my mind.

The CS courses I took were strictly coding and syntax related. The engineering courses I took were analytical thinking courses with coding added a fair bit along.*

It sounds like you have a specific problem to solve which is good. The problem being that you think you don't have enough background to properly design my scripts from the beginning. I assume you will know when you have achieved this goal.

In college, the first thing I learned how to do was flow-charting. You break what you want to do into individual tasks and identify any inputs and outputs associated with these tasks. You then treat each of these tasks as a black-box function. You only care what is happening inside the box while you are coding the box. When you are working with the parts before or after you treat the middle section as a black-box. This method of thinking is also very helpful when working in teams.

Once you have determined what is going to happen inside a particular section, you can begin to write psuedocode. This is best described as plain english sentences that details the steps that are needed. "Add variable X to Y and put results in Z." In the case of winrunner, "Close the window."

While the flowchart is very nearly completely programming language independent, sometimes the programming language influences the psuedocode. You can consider yourself competent in a programming language when you no longer have to revise either the flowchart or psuedocode during the coding of the program. In other words, expect to make revisions while you are learning. The previous two concepts are referred to as abstraction. You have abstracted the problem from the implementation.

The next step is implementation\coding. All of the steps and concepts referred to before now are transferable to any programming situation or language: Perl, Java, TCL, QT, C\++, Ada, shell scripting.... This is because of the abstraction. It is at this step that you determine whether a variable needs to be an integer or a double-byte integer or a real number, among other things. With the more flexible\powerful languages there can be 15 ways to do something simple. Implementation is what separates the men from the boys among the pros. Implementation is why some code is fast and some is slow. You should not worry about implementation until you can get a fairly large program working.

Some links:
http://www.ee.duke.edu/~jpormann/egr53/flowchart/
http://www.tpub.com/neets/book22/93b.htm
http://homepage.cs.uri.edu/book/programming/chapsix.html
http://courses.eng.ku.edu.tr/comp120/lecture_notes/lecture1.PDF
http://www.hvac.cc/kidscanprogram/main/tofc.htm
http://www.prestonwoodchristian.org/ustech/qbasic/#TOC

I like the suggestion of buying a textbook. Hopefully the links above will get you part of the way there. You should consider calling the CS department at your old school or at the nearest school and ask them to recommend a textbook. Make sure they know you want it light on coding. You might consider gettng a textbook suggestion from a high school. Their textbooks tend to have more explaination and be slower paced. Eventually you might find it beneficial to take a class.

*Coding started with the HP 42C programmable calculator. Nothing really special about it. Then, Fortran 77 on the mainframe. Then C using Borland Turbo C. And then C++ on MS Visual C++. I was very comfortable with Fortran, and C had a similar structure just different syntax. C++ drove me away from programming.

PS. I've used Winrunner before (maybe 5 years ago) and I don't remember it being anything like C.
 

ihsan

What is this storage?
Joined
Oct 6, 2002
Messages
66
Location
Petaling Jaya, Malaysia
Website
ihsan.synthexp.net
Hello all,

Handruin,
If you're going for C, it is time- and effort-effective to go straight for C++. While it is not a learner's language as it is with Pascal but in the long run, it's worth the time you will spend on. If you go to any programmers forums, the first thing most of them will tell you is to go for C++. It is the superset of C and everything you want to learn about it (C) is there plus more. My professor once told me, C++ often enable us to express the art side of us.

I started programming three years ago with C and I wish I had started with C++. Could have saved me a lot of time coping up with the semantics and object oriented methodologies. Gradually I work up the ladders and now learning to write drivers for FreeBSD. It depends on the person itself, I find programming interesting and worth the time I spend on. I may not get a good pay but if you're really in it, monetary gain is never an issue.

Before you start, choosing the platform to start on is fairly important. From my experience, developing with Microsoft is costly to start and can rake even more financial pain to sustain. At least to me. In Malaysia, just to keep up with MSDN licenses and various other 'perks' put huge strain on my pocket. I was a student back then, and MS didn't have any academic package for us so we always ended up with the pirated copies. Last time I check, they have increased MSDN subscription by nearly three-fold. That's a little too much for me. As for the time now, I've settled with JFE/C++ 5.5/Turbo Debugger for Windows and Emacs/gcc/sdb for Unix.

I'll stick to Microsoft from this point onwards. I started with Visual C++ and the yesteryear version of MSDN but as my understanding grows, have started using JFE editor as my IDE, Borland C++ 5.5 compiler which is the compiling engine for C++ Builder, (some say the best standard compliant compiler in Windows world). Both are freely available and aside from understanding the compiler options and macro syntax for JFE, you are straight to your first Hello World program. I quit using Visual C++ because the money factor and the fact that it isn't standard compliant. Microsoft adds many extension of their own and this really makes learning difficult unless you're planning to be committed to MS for life. The integrated IDEs and fast compiling engine are the only plus of having Visual C++.

As for books, there's plenty to recommend. I for one really like The C++ Programming Language by Bjarne Stroustrup, the creator of C++ language himself. The best thing about it is the fact the book contents is cross platform; you can readily apply what you read in Unix, Linux or even Windows. There's no architecture specific issues per se that will cloud your understanding. I find myself still using it to this day from about two years back. Scott Meyers' Effective C++ and More Effective C++ are another.

There are many programmers forum on the net, the ones I used to go are more graphic oriented (developing OpenGL and DirectX apps). Still you can find plenty of excellent heads and some good articles. Some links :
CodeGuru
flipCode
GameDev
MSDN

I'm familiar with C++ so it's my inclination to recommend it. Since I don't do Java, I couldn't comment on that language viability as a development platform. Plus I'm very much a cynical person when it comes to Java.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
I disagree strongly about using Microsoft's C. Basically, you start out writing standard code and end up in "funny Microsoft land" playing with their weirdo libraries and not writing any normal code.

At least, that's what I've heard from the Windows developers I know.
 

Cliptin

Wannabe Storage Freak
Joined
Jan 22, 2002
Messages
1,206
Location
St. Elmo, TN
Website
www.whstrain.us
FWIW, I talked with a guy the other day who has been working on a very large project for the last 1.5 years at the company where I work. He says he can program in C++, Java, Delphi and a couple other languages I don't remember. When I asked him what his weak areas were he said MFC, MS related stuff. When I asked him what his strength was he said Delphi, He said that is how he sells himself.

He said Delphi has almost all the power of C with out the nit-picky annoying stuff like case sensitivity. The parts that are lacking in Delphi is stuff that is used on only rare occasions (recursive alias blocking or something like that).

Can anyone name something that was written in Delphi? Is there a free 'nix Delphi compiler?

PS. For humors sake: http://www.healyourchurchwebsite.com/archives/000271.shtml
 

ihsan

What is this storage?
Joined
Oct 6, 2002
Messages
66
Location
Petaling Jaya, Malaysia
Website
ihsan.synthexp.net
Cliptin said:
Can anyone name something that was written in Delphi? Is there a free 'nix Delphi compiler?
RazorLame, the front end for LAME was written in Delphi. As for compiler, Kylix Open Edition by Borland is available. It's released under GPL so I guess all the programs produced with it will have to be released under such licensing term.
 

time

Storage? I am Storage!
Joined
Jan 18, 2002
Messages
4,925
Location
Brisbane, Oz
Delphi is written in Delphi.

There's lots of shareware, there's email clients and fax software, business software, just about anything except games. It's much more attractive for a software distribution than say, VB, because you don't have to sweat on which libraries the user might have.

But a key use is in database applications, which are often one-off turn-key jobs. I notice that IBM has a white paper with tips on using Kylix with DB2, for instance.

I've heard of a couple of sizeable scientific modelling applications. And there's this: http://www.megasoftware.net/
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
How about Age of Wonders II?
HotDog Professional? <--- HTML editor

Here's some pretty respectable , if biased advocacy.

When I was (briefly) doing professional dev work, I worked in Delphi and in FoxPro (visual and otherwise). I was reasonably productive in both, which is truly amazing considering that, at the starting point, I hadn't EVER written a program to run on a Windows machine.

I've gone back and learned VB from necessity (timwhit's probably much better at it than I am), but I struggled with it compared to anything else. Some things that hadn't been a lot of work (mostly DB access stuff) in either of the aforementioned languages were a royal PITA in VB.
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
For DB access in VB I just use DAO 3.6 because it is incredibly easy. Note, performance usually doesn't become all that important in most of the apps I have written. But, even with over 50,000 records performance was still pretty good considering it was an MSAccess DB.

So Handruin, have you made any decisions? Bought any books?
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,336
Location
USA
I haven't made any decisions yet. It sounds like Delphi has some good fundamentals to learn from. My goal isn't to pursue a career in development; I just want to learn it so that it can help me no matter what I do. I know it will take me a while to get good at all of this, but I’m interested in learning more for myself, then for anything else.

I do have an idea for a personal project, but I can't even begin before I learn the basics. I think my first step will be to read some books, and get some basic knowledge. I'm not sure if I want to start with something like Delphi. I feel like my goal will be something like Will suggested in that I practice. In the beginning my code will look like crap, but it will work. I can then refine it and learn from my mistakes.

The proactive person would suggestion doing it correcting from the beginning, but much of organizing the code I think comes from experience and example.

I'm thinking one of my downfalls will be math. I'm not strong in math and I can now see where some of the schooling I took (and didn't care for) comes into play. From what I can tell so far, it's more of the abstract problem solving that plays into programming.

I started to read a section in my PHP book regarding object oriented programming. I beginning to understand, but I still don't have the big picture yet. I'm getting the hint that I should start will something less complicated before I jump into OO.

I had to chuckle a bit when Cliptin recommend calling my CS department at my precious school. I think it's a great idea in general, but from what I've seen of the CS dept at my old school I'm not impressed and wouldn't value their suggestions. Winnrunner claims to be much like C, but I have no way of knowing. I've also read in other places that its scripting language (TSL) is like C. Right now I'm trying to learn version 7.0. I don't know any other version so I have no clue what they made 5 years ago. Thanks for the links I'm going to start looking through them.

So what is IDE? I've read Mercutio mention it and now ihsan mentioned it. I'm leaning towards the windows platform for developing, only because that is what I'm most comfortable using. I might be able to use the full MSDN subscription we have at work and install it on my work laptop. I'll ask and see what the boss says.

I also don't understand the compilers. I take it you use compilers for different OS's and different systems. But what are the advantages from using an MS compiler vs. a Borland? Can you use one or the other, or does it depend on which programming tool you use, such as MS visual C++, or Borland C++.

Now I see the link for something like razorlame and wonder how one or more languages can produce a GUI that fits in like a Windows app. If you aren't using MS C++, how do you create a windows based application and make it "look" like a windows application. Are there GUI based editors that allow you to design how the application looks? Is this something that is done after the code is written? These are some of the many things I don't fully understand. I can you can now see my knowledge of programming is very limited. :/

I have tons of information to start with and I appreciate the info. I'll need to go out and grab a book or two on C++ or maybe Java. If I do decide on either of these, should I look into a book that comes with a CD containing trial applications? If I skip the trial applications, what tools should I be looking into for C++ or Java? Is that were all these development studios come into play?
 

Prof.Wizard

Wannabe Storage Freak
Joined
Jan 26, 2002
Messages
1,460
As ihsan said earlier, it's better to go for a 3rd-party development studio than MS' if you plan to be completely independent from Windows platforms (one day in the future)...

As he said, Borland C++ Builder is much nearer in the original C++ language than Microsoft's VC++.

I don't quite understand why you find strange how Delphi is able to create Windows GUIs... It IS supposed to do that cause it's developed and marketed exactly for that enviroment.

Bear in mind that Delphi 7 is even nearer the Windows XP GUIs with new Themes included for even better looks.

Last but not least, I still believe the language you should go is something "RADy". Since you DON'T consider passing the rest of your life learning cryptic computer languages with unreasonably steep learning curves, Delphi or VB would do the tricks for you.
And I strongly suggest Delphi because it's a clean product, free of VBasic "MSization", based on a learning language (PASCAL), and capable of supporting complex projexts that otherwise would need C++.
Moreover, with its sister-packet (Kylix) you might even port with minimum effort your projects to Linux boxes... Now that's about freedom my friend! :D
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
I don't know where people get the idea that VB is not a powerful language/development environment. Other than games there is not much that can't be accomplished in VB (in a Windows envirornment of course).

VB is used as the frontend for many powerful DB apps. Well written VB code is quite fast and usually fairly easy to write. For quick development there isn't anything else that I would want to use.

Another thing going for VB is that all the MS Office apps use VB Macros and can pretty much run any VB code. This makes doing repetitive things in Excel obsolete. Access makes a really nice quick DB app, but only if you know VB/VBA.

When I had to integrate Winfax into an application they include a SDK for VB and C++. So all I had to do was include the libraries and write a few lines of code. Then I was off faxing Access reports right away. How would you easily accomplish that with Delphi?

Merc, what language is Foxpro closest to? I have a copy of Visual Foxpro but I really know nothing about it, other than it is supposed to cover the middle ground between Access and SQL Server.
 

Tannin

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
4,432
Location
Huon Valley, Tasmania
Website
www.redhill.net.au
IDE: Integrated Development environment. This, when it first arrived back in, oh, maybe 1980 or so, was a huge advance. With an IDE you can edit, compile, run, debug - all without leaving your friendly front-end. It mightn't sound much these days - indeed, it's something we take foregranted - but back when Turbo Pascal was new and sexy, it was a big, big thing. So far as I recall, TP was the originator of it, though there may well have been other things that came before.

Either way, it was Turbo Pascal that set the programming package world on its ear. This little upstart no-name company called 'Borland' came along and started selling a fast, solid, user-friendly programming package for $99, when everything else was huge and kludgy and cost $400 ot $500. Even better, it was not copy-protected and came with a no-bullshit licence: "use this program like a book: you can have it on as many machines as you like just so long as you only use one at a time." (Or something like that, anyway.) Turbo Pascal was a breath of fresh air that blew life and vitality into the hitherto stodgy world of programming. It was faster, cheaper, easier and better than its competition in almost every respect. Unlike so many other packages of the era, it didn't require you to buy a seperate run-time licence for every copy of your program that you sold - a big plus this, as the run-times were a huge expense if you planned to sell more than four or five copies of your program. Foxpro and dBase were notorious for that. And it compiled into a plain, efficient .exe that was small and fast. TP took the software market by storm. Before too long there were several other Borland languages including Turbo BASIC and Turbo C, and Borland went on to write what is (in my view) still the best spreadsheet on the planet: Quatro Pro.

Eventually, of course, the rest of the industry caught up. Average prices dropped to something reasonable and the quality and user-friendliness of competitor's packages improved out of sight - Quick BASIC and Power BASIC were examples of industry responses to the Turbo Pascal phenomenon. And, equally inevitably, Borland got fat and lazy. Their purchasse of the moribund giant dBase IV from Aston-Tate was the beginning of the end. They went down, down, down, were bought by various industry players, flirted with bankruptcy, wound up reinventing themselves as the company that makes Delphi.

One assumes that history will repeat itself once more.
 

time

Storage? I am Storage!
Joined
Jan 18, 2002
Messages
4,925
Location
Brisbane, Oz
timwhit said:
How would you easily accomplish that with Delphi?
Sorry Timwhit, couldn't resist the challenge. :)
Check the Delphi section on Symantec's WinFax PRO SDK for Windows 9x/NT support page. Stripping out their comments and laborious error checking, it looks a bit like this:
Code:
//This code is assuming that you will print to the winfax driver.
WinFax := CreateOleObject('WinFax.SDKSend');
with WinFax do
begin
  LeaveRunning;
  AddAttachmentFile('');
  SetPrintFromApp(1);

  SetTo(Recipient);
  SetNumber(TelNumber);
  SetAreaCode(AreaCode);
  AddRecipient;

  SetPreviewFax(0);
  SetUseCover(0);
  SetResolution(0);
  Send(1);

  repeat
    sleep(100);
  until IsReadyToPrint = 1;
  while IsEntryIDReady(0) = 0 do
    sleep(100);
  Id := GetEntryID(0);
  Done;
  Unassign;
end;
But you can also pick up components that manage the SDK interface so you need know nothing about it. Or add an entire faxing engine component that doesn't even need Winfax, for that matter.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
20,336
Location
I am omnipresent
Website
s-laker.org
Foxpro is based on Clipper, the same tool that brought dbase into the world. It has a full-featured super-fast underlying database system, and initially, a really odd event-based programming model (your code could happen on one of FOUR events!). Microsoft bought Foxpro with the intention of making it their personal database package, but while they were updating it for the Windows idiom (object orientation, graphical elements, OCX support etc), the guys working on the Jet database got their speed up to within a few powers of ten of what Foxpro's was, and suddenly Foxpro looked like a high-end product, and they started to position it as such.

A short time later (I don't know dates here), Microsoft bought another company whose product became SQL Server. SQL Server is marginally more powerful than Foxpro, but that found Microsoft in a jam. What to do with Foxpro?

What they should have done was dropped Jet, their underperforming "mainstream" database, and switched all the instances of jet in microsoft programs (which now includes things like Active Directory's NTDS, the DHCP and WINS databases in NT/2000 and very possibly the file system in the next full upgrade to NT). But, Jet was developed in Redmond. Foxpro, having never been promoted by Microsoft as anything just wasn't given the internal attention.

In fact, Microsoft's been telling its VB/Access developers that Foxpro will be killed as of the next product upgrade cycle for YEARS. At the same time, it has told Foxpro developers not to worry; it's safe. Would you want to use a product with such an uncertain future?

The down side to Fox is that Microsoft has made it more and more VB-like as time has passed, and one can't expect anyone to have Foxpro .DLLs on their PC, so redistributable Foxpro apps are kind of large. The good news is, Foxpro is cheaper to obtain than a developer version of Access, faster, more full-featured and almost certainly easier to program if you haven't been polluted by VB.

Knowing about Foxpro is kind of like a little secret. There are lots of jobs it's perfect for, since it does about 95% of what SQL Server does, and inexpensively.
 

Sol

Storage is cool
Joined
Feb 10, 2002
Messages
960
Location
Cardiff (Wales)
I have to disagree that using MS Visual C will make you a slave to MS... Here is a neat little trick to turn it into a standard compiler.

Use an apropriate editor to go through all the documentation (Help files MSN library etc.) and replace all instances of "Microsoft Specific" with "Ignore this"

Or just do the same thing when reading the docs...
I used to write all my unix programming assignments with Visual C++ 6, all the documents tell you when somthing is only suported by microsofts compiler and it doesn't take long to ignore it and find another way to do the task...
The only place you'll find microsfot specific code is in the microsoft examples... and they're pretty much usless anyway, microsoft write really shitty helper code, I once tried to learn how to program with directX and found that it was actually much easier to start from scratch with the base line functions than to use the microsoft helper functions.
 

Will Rickards WT

Learning Storage Performance
Joined
Jun 19, 2002
Messages
433
Location
Pennsylvania, USA
Website
www.willrickards.net
Handruin said:
I also don't understand the compilers. I take it you use compilers for different OS's and different systems. But what are the advantages from using an MS compiler vs. a Borland? Can you use one or the other, or does it depend on which programming tool you use, such as MS visual C++, or Borland C++.
Let us start with the basics.
There are 'levels' of languages. These are really just levels of abstraction from the machine code they eventually get translated into.
At the lowest level is of course machine code, you know the 1s and 0s. At this level you are platform (processor) specific. A processor family has a given instruction set. These are simple commands like add, compare, and store. You work with the memory on the processor called registers.

Still at the pretty raw level you have assembly languages. They are a bit less cryptic since they are something like english words instead of 1s and 0s. However you are still working with simple instructions and registers. An assembly language program gets sent through an assembler which turns it into machine code. This is almost a 1 to 1 translation.

Then you have languages like C. The syntax is more abstracted but it does essentially get translated into machine code. However at this stage you need a compiler and a linker. A compiler parses your code and turns it into object code. This is like machine code but not in an executable form. To be executable it has to be linked. What linking does is resolve the references found in the object code to the libraries. These libraries can be standard C libraries or user created libraries. Once all the references are in place an executable can be created.

So since compiling/linking still generates machine code. It is specific to an OS and processor family. This is why languages like Java and the concept of a virtual machine were created. You code for a virtual machine and it handles translation to actual machine code.

There are standards for languages like C++. A compiler may not adhear to the standard completely. Thus even though you are programming in C++, some language constructs or standard libraries may not be available to you because of your choice of compilers. This is the difference between MS and Borland compilers. Mainly a difference in compatibility with the standard and optimization techniques.

When programming in windows you generally use some sort of IDE (Integrated Development Environment) as Tannin said. And yes I still have Turbo Pascal disks lying around. Since it is integrated the compiling and linking stage is mostly transparent to you. So your choice of IDE will determine the compiler you use. You could write code in the IDE editor and then compile it using another compiler.

Handruin said:
Now I see the link for something like razorlame and wonder how one or more languages can produce a GUI that fits in like a Windows app. If you aren't using MS C++, how do you create a windows based application and make it "look" like a windows application. Are there GUI based editors that allow you to design how the application looks? Is this something that is done after the code is written?
Windows has a set of libraries. These expose standard functions and definitions. It is generally called the Windows API (application programming interface). Languages can access these APIs directly (function calls to API functions in your code) or indirectly (the compiler translates other statements into calls to those functions).

I don't want to get into how windows makes a window but to answer your question, yes there are GUI editors to design windows. The presence of these editors has been termed visual. Thus Visual C++ has a GUI based window editor. There are many types of windows and they go by different names. Visual Basic for example uses forms and has a forms editor.

These editors generate code that creates the windows. In some you see that code (VC), in others (VB) it is hidden. After this code is created you write the code that handles the different window interactions, like clicking buttons and entering text.
 
Top