Why OOP is great

Last week I worked a bit on Coppercube again, my 3D engine sideproject which also renders 3d realtime graphics in the flash player. Because the Flash9 deployment target already works, I wanted to implement the windows target, basically the editor should create a windows .exe from the 3D scene. Before starting to program, I roughly estimated 6-8 hours of work to finish it. But in the end, it only took me 20 minutes.


I was surprised by my own speed of work :) The advantage was that the whole already exsiting project was written in nicely but strictly designed OOP (in a similar way I used when creating irrlicht), and I only had to subclass two classes and write about 200 lines of code. The beauty of OOP kicked in, and 20 minutes later, I had a bug free, working win32 player and an editor which could create interactive realtime 3d applications for both flash and windows.
Sometimes, I really like being a programmer. If everything would be that easy :)

four comments, already:

Congratulations. I do agree with a big BUT: in my daily work as programmer I have seen a lot of OO-Code that was hard to maintain, just as I have seen a lot of non-OO-Code that was easy to handle. If you do it right you get nice code, easy to maintain and easy to extend, but (as always) you can also create code that should be rewritten.

btw: I really like Irrlicht. Easy to extend, easy to understand and (really important for me) easy to get a first running application up. When I discovered Irrlicht it took me about 20 Minutes and I had a running 3D program.
Brainsaw (link) - 24 03 09 - 07:27

Sure, OOP is not a magic bullet. You still have to use it right :)
niko - 24 03 09 - 16:27

lOl coppercube looks alot like irrEdit except for the tabs. Which i like. I am hoping coppercube will replace irredit. Coppercube looks way better IMO :p. plus it will be hard for you to maintain both.

to OOP or not to OOP that is thee question :-p
leo () (link) - 31 03 09 - 09:17

@leo: the question:

if (2*b || !(2*b)) {
}

;)
Brainsaw (link) - 01 04 09 - 07:20


Name:  
Remember personal info?
yes
no
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.