The basis of programming...

Just wanted to know if anyone could fill me in on how programming work

Page 1 of 1

5 Replies - 2330 Views - Last Post: 20 November 2006 - 07:22 PM Rate Topic: -----

#1 milkdrops  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-November 06

The basis of programming...

Posted 18 November 2006 - 09:10 AM

[b] Hi people. i'm a complete noob when it comes to programming.

My questions are these....What is the basis of programming? How does it work?

I know nothing about programming but am curious about it. What is the basis of how you get it to function? As far as I know you use certain codes and specific numerical/non-numerical instructions to create something. Say if i wanted to create a program how would I go about doing it? is there something i'd need? Is programming all about knowing exacly what you type into the compiler so it processes the infomation and turns it into your program or whatever it is your writing? I guess i'm very unsure about the whole essense of how programming works. I dont really understand how it gets put into what you want it to be put into and how you make certain decisions based on numbers and such. Could anyone please fill me in? thx.

Is This A Good Question/Topic? 0
  • +

Replies To: The basis of programming...

#2 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 207
  • View blog
  • Posts: 4,812
  • Joined: 23-December 05

Re: The basis of programming...

Posted 18 November 2006 - 10:31 AM

there are many languages out there to learn, it is about learning a language and eventually many, not just making a program.
Java seems to be a popular starting block, i'd also suggest visual basic, but java is all available free. (compiler JSDK, JVM, and the documentation)

Not all languages are compiled, C, C++, and java are examples of compiled languages, and there are differences in these such as functional and procedural, but i won't get into that here.
Some languages are interpreted like scheme or based on truths such as prolog.
There is also assembly which is assembled directly into data that the computer can understand.
When a 'program' is compiled it is converted into the most simpilest form of it's current language and then is translated into assembly. Which in turn is then assembled all without you knowing it. That's what a good language does.

Pick a language standalone application, web design (php, javascript/ajax) and just start reading about it or buy a book.
Learn to create variables, if statement, (if it exists: while, do/while and for loops) and also learn recurssion. Once you have these down, it will be much easier to expand your thinking into any other possibilities of the language.
Was This Post Helpful? 0
  • +
  • -

#3 KeyWiz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 439
  • Joined: 26-October 06

Re: The basis of programming...

Posted 20 November 2006 - 06:05 PM

I believe I understand your question, when I first started programming, I didn't understand the underlying principals therefore I was unable to accept the face of programming. (see my post in the caffeen lounge, play a game with me)

So here is the answer to what I think you are asking.

A computer chip is a two function device, it stores temporary code, or permanent code.
The temporary code has a special section called the register. The register is basically the place where code is currently operating.

Of the permanent code area of the chip there are hard wired transisters, which allow conditional routing of electrons, and are permanently set to do certain things to the register, such as add 1, or subtract 1, or load byte, etc.

These certain things are called Operational Code, or OP CODE, they have been set in the currently used set of commands ever since the X86 chip was made in the late 80's.
Each Command is accessed through an Address in the memory.
When it all comes down to the basics the Register is the Controller of everything.

Machine code is simply op code followed by op code etc. The original programs were stored on punch cards and punch strips
which simply represented a series of Op Codes.

As Programming progressed, short cut commands were invented to perform thousands of OP Codes in a related desired effect. For example, Set Address AF42:0001 (1)
or later more advanced procedures like For a = 1 to 10: Next a which causes the computer to literally count from 1 to 10.

Different Programmers saw different ways of doing things and mostly because the earliest processors had an inherant limitation which sometimes failed to add numbers correctly, The earliest chips were limited to a decimal to 8 points. ie. 1.2345678, Different Programming Languages were created.

One of the easiest to learn back in the 70's was BASIC which is an anagram for Beginner's All-purpose Symbolic Instruction Code which was developed by college students in the mid sixties. see http://en.wikipedia.org/wiki/BASIC

Basic has evolved over the years into a truely professional programming language, and in fact Visual Basic 6.0 is the largest single platform used for writing computer software.

VB2005 will likely replace it though, especially since Microsoft is offering a stripped down version for free. See http://msdn.com

The general problem with Basic was that each processor created had to have a version of basic created just for that machine. Many differing versions did things slightly different and sometimes radically different which meant that there were several versions of BASIC in use at any one time.

Also the original versions of Basic each had to be typed by hand into each system type. I bought many BASIC programming books where the code didn't even come close to the version used on the machine I happened to have at the time. So I had to translate from one version of Basic to another.

These earliest versions were translated to machine code one line at a time during execution. This caused BASIC to be very slow at doing things, any thing, every thing.

Oter languages like COBAL anf FORTRAN were developed specificly to override mathmatical short comings of the phyical machines. Then came C. C was developed with the intent that code written in C for an IBM MainFrame would also work on a WANG MainFrame computer or any other computer without having to alter the code. C is a processor independant language.

C+ improved on C and C++ improved on that. Microsoft came out with C# which is basicaly C type language with internet functions and classes.

Java was built on C++ and has a very similar method to it. The big difference of JAVA is that they created transportable programming code which created a Virtual Machine in memory of the client computer, protecting the main system from certain functions. Originally JAVA claimed the ability to guarantee no virus's could be implemented through JAVA, that later proved to be not true, but JAVA remains a powerful and popular language.

So hopefully all this long winded explanation gives you what you wanted to know.

Choose a language to learn and start there, after you catch on to the varrious functions and abilities is is fairly easy to move on to other langages, although there is a push by Microsoft to basically merge the best of all different languages into one language, and it appears to be Visual Basic in it's 2005 incarnation which is radically different than anything that has come before.

Functions which in the past were available only to C type langages have now been incorporated into Visual Basic 2005 yet there are things VB can do easily that the C types can't, yet according to MS, which implies that these features will be add to the VC and C# languages soon.

Right now you can easily start in Visual Basic, C++, JAVA or C# and not go wrong with learning programming. http:/msdn.com offers many free on-line videos and classes as well as Paid for classes on advanced topics.

DO NOT UNDERESTIMATE THE VALUE OF THESE FREE TOOLS
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 250
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: The basis of programming...

Posted 20 November 2006 - 06:33 PM

That'sa good explanation KeyWiz...I would only point out that there are MANY free tools and language compilers that are NOT offered by Microsoft - in fact, MS represents only a small portion of the tools an languages available. I would also take exception that VB 2005 may become the desired language of the future. While it has a certain following, the language itself is almost universally despised by VB6 users, and more so by those who program in C/C++. Although VB's usage has gained a couple of percentage points over the last year, this takes into account both VB6 and VB.NET - two completely different languages. Even together VB has approximately half the usage of java. I would encourage people to experiment with a variety of languages, as you've done...not just platform specific ones.
Was This Post Helpful? 0
  • +
  • -

#5 KeyWiz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 439
  • Joined: 26-October 06

Re: The basis of programming...

Posted 20 November 2006 - 06:54 PM

I mean that VB2005 will become the next Most Used Language, not because it is free but because Microsoft has retained the BASIC label, which is a bit misleading, VB2005 is not VB6 or VB2002 up to VB2003, VB2005 is an entirely new Programming Language and I believe should honestly not be named basic in any sence. I would have named it Windows Programming Language 1.0 since as I stated it incorporates many langages features and methods. Of course, I would have been fired for missing the most powerful selling word, BASIC.

Also, I try to only make statements that I have learned through my limited personal experience. Different people learn in different ways, this is what makes each of us unique, and Computer Programming an Art Form, not a science.

One more thing, the new dual core processors work differently which will cause a lot of VB6 developed programs to not work, if not with Windows Vista, then by the time they develope Infinity (my guess at the next op sys name by MS). So programmers will have to move on if they wish to make a living, Operating Systems change on about an 18 month cylce, and have done so since the 1960s.

This post has been edited by KeyWiz: 20 November 2006 - 07:02 PM

Was This Post Helpful? 0
  • +
  • -

#6 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 250
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: The basis of programming...

Posted 20 November 2006 - 07:22 PM

VB 2005 is not a new programming language...VB 2005 is the tool used for programming in VB.NET. VB.NET is also the langauge referred to as vb 2002 or 2003 - it's all VB.NET. While new functionality has been added to the language, that same new functionaltiy has been added to all the .NET languages. VB.NET was originally conceived to bring the VB6 programmers into the .NET fold - an initiative that did not have the desired effect.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1