Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

If I only had a mathematical brain...

Name: Anonymous 2005-01-03 23:53

I'd love to program.  I really would.  But my mind isn't cut out for it.  I've seen people who think mathematically, and I'm not one of them.  I keep  getting stuck on Trig due the to stress from each lesson that adds on top of the previous lesson.  Inane equations within equations, combined with my short memory span and occasional absent-minded backwards thinking means I have to try three times harder than someone who has math "come naturally" to them.  Instead, I have a more creative mind, endlessly thinking and imagining.  I believe this the opposite end of some spectrum, as these math wizards I've met seem to be less creative and more mechanical in thinking.

I was thinking of Game Designer as a possible option, as I can appreciate programming and understand it overall, but can't do the code for shit.  But with creativity I could create a design that programmers can work with.  The only problem is I'll be trying to work in a computer field without a CS degree, and would get little respect for not knowing the details of what a programmer is talking about.

Name: Christy McJesus !DcbLlAZi7U 2005-03-16 12:12

I was thinking about this while I was in the toilet halfway through my programming lab (guess what: Java).

I decided on a couple of rules of thumb for deciding when OO is being used inappropriately.
1) Wrapping a single value in an object.
This should never be necessary. I should never have to wrap an int in an Integer just so I can stick it in a list of Objects. Polymorphism is supposed to be a feature, not a bug.

2) Wrapping a function in an object.
There are so many classes in the Java API that exist only to do something to something. A prime example would be the old StringTokenizer class. Luckily they've fixed that and replaced it with String.split() but the problem is still endemic throughout the API. It's the main reason why Java code ends up a morass of instantiations for doing a simple task.

An object is supposed to be a discrete entity that is responsible for its own state. You call its functions and it changes its state and/or tells you something about itself. It's not a wrapper for a function or a variable; doing that is just a hack to get around stupid barriers put up by the language designers.

There are simple solutions to both of these and they're the same ones implemented by a dozen other languages old and new.

a) Everything is a pointer. Including functions, including variables.

b) Respect the programmer. It's not the job of the language designer to worry about letting the programmer do something stupid. All that will do is give the impression that your language is intended for stupid programmers and the smart ones will go away and program in something that doesn't make them jump through loops in the name of the holy Object.

rant.end();

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List