Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 13 Oct 2003
Offline Last Active Mar 13 2015 01:23 PM

Posts I've Made

In Topic: Some programmers actually hate OOP languages? WHAT?!

29 January 2015 - 01:00 PM

Something I still haven't got is the difference between OOP and simply using objects.


It's blurry, since different people consider OOP different things. Generally though, Object Oriented Programming isn't programming, it is design.


When you go to break your problem into managable chunks, do you think "what parts make this up?" (OO), "what steps do I need to take?" (procedural), or "what operations make this up?" (functional).

In Topic: Some programmers actually hate OOP languages? WHAT?!

29 January 2015 - 11:14 AM

One other thing that should be mentioned is that OOP has changed quite a bit over its existence. Inheritance for example is generally seen as something to avoid these days. Mutable state in objects is generally seen as something to avoid these days.


Why? Because programmers used them and found out that in many cases they suck. Some programmers said "let's make this better". Some programmers said "screw it, I'm going back to my cave" and haven't seen the practical improvements made in OOP technique over the decades. If all people know of OO is old style inheritance heavy, side-effect heavy code - they are completely right that it is bad.


Likewise, many of the other commenters are correct that C++ is a pretty terrible language to make OO code in. Java is a pretty terrible language to make pragmatic OO code in. Universities were horrible at teaching OO throughout the 90's and early 00's (and are still largely terrible). If all you see is horrible OO code, it's not a terribly improper leap to assume that it is terrible, or it makes it too hard to write not-terrible code.


Another thing to consider is personal experience. Like others have mentioned, OO is a tool and like any tool is good at some things and bad at others. If my experiences tell me that most problems are these sort (that OO happens to solve well) or that these sorts of things cause me pain (which OO prevents) then I'm going to think OO is awesome. Some people's experience simply tells them that the verbosity of most OO languages provides no benefit, or the object focused approach yields inferior solutions for the sort of problems they commonly encounter.

In Topic: Modifying my own code while it's running

03 January 2014 - 09:24 PM

Enh, up I imagine the runtime modification would screw up your profiling more than simply including it always (in beta) and turning on logging when needed. When done judiciously, it won't substantially impact performance but still give you plenty of instrumentation to identify issues.

In Topic: Modifying my own code while it's running

03 January 2014 - 09:07 PM

You're better off using an aspect oriented programming framework like PostSharp to inject these things during a build step rather than at runtime. I'm not sure how viable ubiquitous runtime modification of a loaded assembly is.

In Topic: Having trouble accessing an objects properties.

25 December 2013 - 09:06 AM

The solution is to not need BladeWarrior's methods to fight. Generally that means making common methods available on character, making BladeWarrior an instance of Character (rather than a derivative of it), or by letting the thing that controls the fighting get a BladeWarrior rather than a Character array (though that one depends a lot more on how your game works).