AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Software > Programming and Assembly Language

Programming and Assembly Language Please read this Topic's rules!!


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 24th February, 2009, 10:46 AM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Somewhere in Greece
Posts: 788

Introduction to object orient programming

gizmo do you know how can I start?
I mean do you know some links or sites for reading the basics?
Not for professionals but for newbies.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 24th February, 2009, 06:47 PM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, Unicycle Challenge Champion, YetiSports 9: Final Spit Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 16,178
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Oh, geez. There are literally HUNDREDS and HUNDREDS of books written on object oriented programming, and dozens of computer languages written specifically for it, not to mention dozens of others with OOP extensions.

There are a number of different ways to write software. The most common categories are:
  • Sequential programming - a program consists of a sequence of discrete steps and runs from the beginning to the end in order. Most batch files can be considered to be an example of a sequential program. Sequential programs don't generally have branches or variations in program flow and almost exclusively use global variables. They cannot easily cope with a changing environment and are thus difficult to maintain and can rapidly become very complex.
  • Procedural (also sometimes called functional programming) - a program consists of procedures or function calls. There is a 'main loop' that handles primary program control, and makes calls to various subroutines. While a procedural program may, in its simplest form, execute a task and then exit, procedural programs are generally inherently more flexible in dealing with changing environments because of their design, and are thus easier to maintain. Structured programming concepts first originated in the real of procedural programming as a way of organizing code to facilitate code reuse and data hiding (local variables rather than global), thus reducing application complexity and increasing flexibility and maintainability.
  • Object Oriented - A program is constructed from a series of objects, which have properties and methods. The object defines a 'namespace' in which the methods (functions) and properties (data) have scope, meaning they can be accessed and manipulated. Object Oriented Programming is the logical culmination of the Structured Programming train of thought, in that it fully implements 'encapsulation'; everything is part of an object, and objects may contain other objects. There are no (or very few) global variables, and the program flow can be very flexible. Properly designed, OOP programs can be very easy to maintain while providing a high degree of flexibility and functionality.

Note that NO practical and useful program I am aware of implements any one of these paradigms completely, and most programmers develop a programming style that blends the approaches as appropriate.

Some languages tend to inherently favor one programming style over another: assembly has very little inherent structure and so lends itself to sequential programming; with some modest effort it can be used for procedural programming and even structured programming but it requires some discipline on the part of the programmer since assembly has no concept of local scope; EVERYTHING is a global.

C is an example of a language that can be used for either sequential or procedural programming, and C actually makes structured programming relatively easy as it supports the concept of local scope (variables created in one function are not visible in another). Pascal and Modula 2 are other examples of procedural languages.

C++ is an extension of C with OOP primitives called classes (indeed, the first versions were known as "C with classes"). C# is a C++ derivative and so inherits much of that functionality, although being a .NET language it is less functional than C++. Java is another language that is a C++ derivative.

It is worth noting that just because a language is considered procedural doesn't mean that you can't write object oriented code in it; it just means that the language itself doesn't support such concepts. By the same token, using an object oriented language doesn't mean that you can't write procedural programs; it just makes writing object oriented programs easier than a language that isn't designed for it.

It should also be noted that the type of programming language used doesn't make one's coding style good or bad; I have seen very elegantly designed assembly language programs, and I have seen some really horrid object oriented programs. An OOP language can make it easier to build a well designed program, but ultimately bad code is the fault of the programmer, not the language used.

There are lots and LOTS of tutorials on the web:
object oriented programming tutorial - Google Search

However, this one seems like a good place to start:
Object Oriented Programming Tutorial

Last edited by Gizmo; 24th February, 2009 at 06:49 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26th February, 2009, 06:06 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Wow, thanks Gizmo. I'm sure you spent at least an hour writing this.
A lot of keywords there too.
The only code I know are HTML and Actionscripting (Flash), are either of these considered object oriented programming?
I've read that actionscripting is....
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 26th February, 2009, 06:06 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

oh, and where does C# fit? because most windows games are made with it...
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 26th February, 2009, 07:02 PM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, Unicycle Challenge Champion, YetiSports 9: Final Spit Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 16,178
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

HTML is a markup language, and ActionScript would probably be more accurately considered as a scripting language, though as scripting languages go it is quite powerful.

ActionScript falls into a 'grey area' in language definition terms. Generally, a programming language is any language that produces a stand-alone executable which is designed to run for an extended period of time and do multiple things. A scripting language is a language which is designed to quickly automate simple tasks.

Certainly, ActionScript is a language which was designed for quick automation (simple graphical effects and so on), but it has evolved into something much more powerful.

As for the OOP aspect, I don't have enough experience with ActionScript to say this for sure, but I don't think it is quite a full-blown OOP language (although it certainly supports many OOP features). I say this based on my experience with JavaScript, which shares a great many similarities with ActionScript. JavaScript doesn't quite fully support encapsulation, data hiding, and inheritance.

C# is definitely an object oriented language, though my personal opinion is that C# is a waste of time; Java is more portable and in many ways IMO more robust.

It doesn't surprise me that C# is showing up in a lot of games though because most of those games used to be written in VB, and C# is basically C++ for VB programmers.

HTML and XML are markup languages, not programming languages; as such they are concerned with the representation and presentation of data, not the expression of logical algorithms.

Last edited by Gizmo; 26th February, 2009 at 07:03 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 26th February, 2009, 07:26 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Thanks Gizmo, thats kinda what I thought...
I purchased a book on C# because I wanted to learn how to write code for games in Visual Basic Express. I would love to learn how to code so it could benefit my use of computers and entertainment in games.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 4th March, 2009, 01:55 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Somewhere in Greece
Posts: 788

booman do you want to make C# games? Or games in other programming platform? Actually gizmo knows what I want but I must learn from beggining some things cos I am familiar with procedure programming....
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 4th March, 2009, 04:38 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

I would love to learn how to make games in C#, but right now I spend most of my time working to pay the bills and my extra time serving at Church. Some day I'll start going through tutorials and learning each step, one at a time. I have always wanted to mod PC games, create my own games and make flash online games. Since I love playing them I figure it would be good to make-em.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 14th April, 2009, 10:11 AM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Somewhere in Greece
Posts: 788

Interesting! BTW technology change rapidly so we must study like students.
XNA platform is a new generation for writing C# games you may look at it booman.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 14th April, 2009, 02:19 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Actually, I did. I installed XNA and Visual Basic Express and all the other components to get it working. Like Direct X SDK...
All of the installations were quite complex, but I downloaded a few games and looked at their code. I even tried a tutorial and found that knowing the basics of C# would help immensly. Thats a HUGE overtaking I'm not ready for right now. I have not written it off completely either.
I found that its better to wait a few years and then there will be plenty of tutorials for every situation.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 10th May, 2009, 03:13 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Somewhere in Greece
Posts: 788

Same situation here mate.
But I don't know Visual Basic, actually I know the C# basics.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 10th May, 2009, 03:33 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

then you already have an advantage... Check out Visual Basic Express at Microsoft...
There are plenty of tutorials and free games that you can see how they made it.
Obviously, when you have time, of course...
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 25th May, 2009, 05:39 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Somewhere in Greece
Posts: 788

Thanks for suggestion but I don't know to convert my source code to Visual Basic (it is too boring)....
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
programming



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My introduction ccperf721p Random Nonsense! 18 29th June, 2007 04:21 AM
First introduction of GDDR4: Radeon X1950XTX Gizmo Graphics and Sound cards; Speakers and other Peripherals 13 7th August, 2006 02:06 PM
Help with PHP 4 object oriented Wolf2000me Programming and Assembly Language 3 11th May, 2006 03:26 PM
Hello all, an introduction is in order....... lgattone ThunderRd's AOA FOLDING@HOME Team 6 31st August, 2003 06:24 PM
Money's no object - so what RAM for 8RDA+ Blackmyst EPoX MotherBoards 19 9th March, 2003 11:56 PM


All times are GMT +1. The time now is 03:37 AM.


Copyright ©2001 - 2010, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0