iSTORYA.NET

Go Back   iSTORYA.NET > Science & Technology > Software & Games > Programming
: :

Register FAQ Members List Calendar Mark Forums Read

Programming :: Programming related discussions ::

Reply
LinkBack Thread Tools
  #1  
Old 10-28-2009, 12:56 AM
Senior Member
dodie is offline
dodie's Avatar
Join Date: Oct 2003
Posts: 781
Default It's not all about OOP, for new learners in programming/software DEV

I wrote this thread to help the new learners for programming and software development.
For those who are professionals and experienced in the field, please excuse this thread for a moment, let's help our future programmers.

..
..
..

If talking about programming and development, it's not all about about OOP. Object Oriented programming language was developed in order to re-organize the programming coding conventions and techniques for the programmer convenience.

OOP concept are necessary when it comes to develop large systems or difficult systems. When another programmer takes over the job, at least he/she can read and understand the previous programmer's works. That's why companies implemented coding conventions. Coding convention is only limited within the company only.
Different companies/teams has their own coding conventions.

When it comes to develop something... it could involve anything. From customized algorithms to programming techniques. Sometimes OOP are unnecessary when it comes to special tasks. There are tasks/scripts that are too short for you to bother to create a class object, some might suggest that creating object is unnecessary.


Most C#(c's),java,php, MFC, ..etc.... already have OOP entities that are ready to use. We call it built-in classes or built-in libraries. In that part, it is necessary to study OOP in order to appreciate the power of that programming language.
Only create OOP or class from scratch if really needed or part of the requirement of your project.

Sometimes algorithms are greater than OOP coding style. So it really depends how the process goes or you want it to be. Sometimes basic programming techniques are more important OOP,

*divide and conquer
*overloading
* recursion
*customized algorithms
*pass by value, pass by reference
*string/int/data/binary manipulation
*nested functions, nested if else flow
*trace logging or debugging

without them you can't perform a better OOP.


knowledge and information is free
Last edited by dodie; 10-28-2009 at 01:11 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-28-2009, 08:46 AM
Senior Member
MarkCuering is offline
Join Date: Aug 2008
Posts: 603
Blog Entries: 1
Default

there are areas that need OO Programming and there are areas suitable for a combination of Procedural & Functional Programming. Functional & Procedural is fairly easy to implement and it is useful in solving specific problem especially that involves Numerial Computation, System Routines and etc...

for example you just join on the company, and your manager open this problem to you, that they have an existing system and one of its task is to gather logs files from the user across the network, before it runs very fast and finish its report within a couple of minutes...you have found out that increasing of the clients & subdomains makes the system slow. From here you can write a simple functional programs that help the system pre-processed the file, instead of letting the system scan the entire network as it requires to do some procedures if it is running or not, what you will do is to write a program that sends the file directly to the system (considering it has multiple threads waiting to do the task)


before:

SYSTEM --> SCAN NETWORK --> Client Running ---> Check Finish ---> Check Logs ---> SYSTEM.

now:

Client ---> Finish ---> Send Log to SYSTEM.


on the other hand, OOP is really useful eg. Polymorphism in object-oriented programming, a ability of one type to appear as ike another type.

Class Square, Class Triangle, Class Circle, Class Rectangle

all of the classes above has a method of .Area() your problem is to get the area of all shapes that user's created.
so instead of calling:

ObjectSqauare.Area(),
ObjectTriangle.Area(),
ObjectRectangle.Area()


you can do this at the same time. consider this example, written in python.

Quote:
class Triangle:
def __init__(self, b, h):
self.base = b
self.height = h

def getArea(self):
return (0.5 * self.base) * self.height

class Square:
def __init__(self, l):
self.length = l

def getArea(self):
return self.length ** 2

class Rectangle:
def __init__(self, w, h):
self.width = w
self.height = h

def getArea(self):
return self.width * self.height

a = Triangle(5,10)
b = Square(10)
c = Rectangle(5,10)

for i in [a,b,c]:
print i.getArea()
output of this is:
Quote:
25.0
100
50
the code below is not magic:

Quote:
for i in [a,b,c]:
print i.Area()
even though a, b, and c is totally different shapes, but they have a common method of getting the area. if you were asked to separate 100,000 shapes that having a less than of an area of 50 then you probably know what you will gonna do. This is just one simple topic in OOP, there's a lot more, like combining it with multiple inheritance over Polymorphism, Abstraction, Encapsulation etc... especially in my favorite Decoupling, a practice of using reusable code to prevent rewritting it, and this is only where I can explained, teach, introduce or understand the real meaning of "OVERHEAD"

just imagine all your classes, objects, are loaded into memory, why would you create another one where you have a chance to decoupled that people keep saying, don't do that, or do this, to avoid overhead... they only saying it because they heard from it, if you asked them what makes it overhead none of them can explained... better go back to functional programming no overhead :-p

have fun learning cheers...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 10-31-2009, 06:02 PM
Senior Member
INFRACTION is online now
Join Date: Dec 2006
Posts: 940
Default

OOP very useful
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 11-01-2009, 03:10 PM
Senior Member
MarkCuering is offline
Join Date: Aug 2008
Posts: 603
Blog Entries: 1
Default

as useful as your comment :-p
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 11-01-2009, 07:35 PM
eax
Elite Member
eax is online now
Join Date: Oct 2006
Posts: 1,584
Default

Quote:
Originally Posted by INFRACTION View Post
OOP very useful
OOP is very useful especially for the Business applications like Object Relational Model(ORM).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-01-2009, 10:36 PM
C.I.A.
digitalsuperman is offline
digitalsuperman's Avatar
Join Date: Dec 2003
Posts: 7,153
Default

Quote:
Originally Posted by eax View Post
OOP is very useful especially for the Business applications like Object Relational Model(ORM).
not only ORM's but also Business Objects..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 11-02-2009, 07:54 AM
Junior Member
rics zalved is offline
rics zalved's Avatar
Join Date: Jul 2008
Posts: 402
Default

OOP is the new generation of the Programming languages, it is very useful..one of the most comprehensive OOP programming language i've encountered is Delphi...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 11-02-2009, 05:12 PM
Elite Member
silent-kill is offline
silent-kill's Avatar
Join Date: Mar 2003
Gender: Male
Posts: 1,739
Default

it doesn't matter how you write your codes, in the end they will be converted to native machine codes.

most important is: problem solving skills, patience and curiosity
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
software to prevent users from installing unauthorize software? etgo Software & Games 7 10-12-2007 07:04 PM
qualifications of a software developer from top software companies in Cebu eblogger Programming 2 07-21-2007 09:46 PM
Programming language better for Database Programming stradnus Programming 29 10-18-2006 07:35 PM


All times are GMT +8. The time now is 08:47 PM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
(c) 2002-2009 iSTORYA.NET | Design by DrE | Modifications by BeoR