Jump to content

  • Log In with Google      Sign In   
  • Create Account


Narf the Mouse

Member Since 20 Apr 2006
Offline Last Active Jul 30 2013 12:55 AM
-----

#4994955 What does it mean to "be creative"? And how does one "be creative...

Posted by Narf the Mouse on 29 October 2012 - 12:20 AM

Welcome to your first dose of politics. The rest of your life will be spent dealing with people; best you learn how.


#4994851 A class that contains an instance of itself

Posted by Narf the Mouse on 28 October 2012 - 04:40 PM

We don't know what you need to do in your constructor either. But I can tell you one thing: you cannot allocate a new menu unconditionally in each menu, because each menu will contain a menu, which will contain a menu, which will contain a menu, which will contain a menu, which will... ad infinitum. Whatever you do, you must have some logic that controls when the chain breaks; that is, which menus don't contain a submenu.

This is a form of endless loop. Any loop that does not have a 100% valid, viable and usable exit condition is very bad.


#4994847 Just starting out...python a good choice?

Posted by Narf the Mouse on 28 October 2012 - 04:23 PM

I'm going to go against the flow and say Python is a terrible language. It's one of the few languages I've run across which is incomprehensible on the fifth read-through. Java is also a terrible language, old and full of legacy bad language ideas, as well as just plain strange quirks..

C++ has plenty of old legacy bad language ideas and can be very incomprehensible. However, it's an open standard with decades of history and hundreds of libraries. You may not have a clue what you're doing, but you'll have a lot of options to trip over your own feet with a loaded chainsaw.

C# has only some legacy bad language ideas, is easy to read and understand, but has solid and strongly defined limitations. Also, you're stuck with either Micro$oft of Borg or GPL of Borg.

C is like C++, only there's no classes and your loaded chainsaw has no safety features.

Basic is easy to program in and understand, has a lot of safety features, but has no classes and you're quite limited to the language, unless (for a few) you write your own dlls - Usually in C++.

Meanwhile, if we ever get a compiler that can just understand English/your native language and can, in fact, "Just make me *an FPS", you'll spend most of your time giving the compiler directions like "Make the enemies harder, but not too hard" and the compiler will spend most of its time hating you and plotting to take over the world (seriously, all you need to say to kill off Humanity is "Optimize economic production".

>>> All programming languages are terrible <<<

Pick the one that clicks with you, then learn it.

* "a" and "an" are properly used based on which flow best, not on "consonant or vowel". Also, double negatives in English add. Double negatives negating is Latin grammar, taught by pretentious English teachers. Also, "a FPS" just sounds terrible.


#4994797 Are you planning/making a Windows 8 (metro) app?

Posted by Narf the Mouse on 28 October 2012 - 12:45 PM

Windows 8 is a sign that Micro$oft is up to their old empire-building tricks again. I've actually considered moving to Linux, and I *Hate* the GPL. (It's not free software. It's masquerading as free software, but it's not - You pay with your entire code base)

There's other OS's, but they're not that complete, I've found, and I'm not an OS programmer. OTOH, if someone kickstartered a Modern non-Licenseware OS, it may be the first kickstarter project I put money in.


#4994737 Enum help

Posted by Narf the Mouse on 28 October 2012 - 10:02 AM

To explain further, anything outside of your class doesn't know the Type enum exists. Your Item class knows it exists, but that knowledge is contained inside the class, since you declared the enum inside the class. So, if you want anything else to use the Type enum, you have to tell them where to look.
The :: operator refers to the contents of the Item class itself, not any specific Item instance, so you use it to refer to the Item::Type enum. You'd also use it to refer to static members, the contents of namespaces (since namespaces can't have instances) and probably more, but I'm a C++ newb myself. :) (Just not a coding newb)


#4973119 Self-storing class-instances on creation

Posted by Narf the Mouse on 24 August 2012 - 03:09 PM

Globals smell, but sometimes all the alternatives stink worse.

Unless someone's solved the "log errors in app consistently" problem in a simple, concise, and non-abusable way. If it has been solved, it's never been mentioned in any thread on the issue I've seen, which, admittedly, isn't all of them.

Edit: Seriously, if it has, I'd like to know.


#4970955 How To Modify An Element in the Dictionary Class?

Posted by Narf the Mouse on 18 August 2012 - 05:46 PM

You can also use the [] syntax to set new values. This should come with a warning sign, though; there's no protection against over-writing existing values.


#4962712 "Attempted to read or write protected memory" on DrawIndexed()

Posted by Narf the Mouse on 24 July 2012 - 01:50 PM

How did the D3D runtime even let you get that far? I would've expected it to fail a lot sooner. Anyway, glad it's fixed Posted Image

Well, presumably nothing else used DirectX11 functionality, and the fact that I was loading a DX11 effect file just never occurred to it, I guess. Thanks.


#4962137 omnigraffle

Posted by Narf the Mouse on 22 July 2012 - 10:58 PM

...What.


#4961072 Java vs C# - Experts points of view

Posted by Narf the Mouse on 19 July 2012 - 03:30 PM

A better analogy for programming languages might be toolboxes, not tools.

Pretty much any carpenters' toolbox contains most of the tools a carpenter needs; however, some assortments are better for some jobs and most carpenters have a favorite assortment of tools.


#4959756 Qt C++ MMORPG

Posted by Narf the Mouse on 16 July 2012 - 03:29 PM

http://www.gamedev.net/page/resources/_/technical/game-programming/how-do-i-make-games-a-path-to-game-development-r892 - Start with Tetris. Realize the ridiculously immense scale of the project you've set yourself. Lower your expectations.


#4957810 Can someone point me to the newb corner? =+)

Posted by Narf the Mouse on 10 July 2012 - 04:48 PM

Or you could just not steal.


#4957760 Struggling with ==

Posted by Narf the Mouse on 10 July 2012 - 02:07 PM

In short, what people are saying is that you're comparing (after the first comparison) booleans and chars. Not gonna work, in most languages.


#4956820 [OOP] problem

Posted by Narf the Mouse on 07 July 2012 - 10:16 PM

Also, your variable and function names are not clear. The only purpose of a variable or function name is to denote, clearly and simply, what the variable or function is.

Name your variables like they'll be read by a homicidal psychotic who knows where you live.

(That'll make more sense and be funny once you have more experience with debugging your own code three months later).


#4956775 Hybrid Ray Tracing Feasability

Posted by Narf the Mouse on 07 July 2012 - 07:03 PM

If all of the instructions in the ARB assembly language are all I need to suit my needs, then would there really be that much of a difference in execution speed and/or compatibility? Here is an ARB instruction reference: http://www.rendergui...om/gpuguide.pdf . Would I be able to write the tracer without using a high level shading language like GLSL? I would like to use ARB assembly and avoid using GLSL, but if it is absolutely necessary, I definitely won't sacrifice performance. I just was wondering why ARB isn't preferable.

Premature optimization. You're deciding something will be faster; enough faster to make a difference, before you even know where the major slowdowns are.

Make it work first, then maybe worry about speed.




PARTNERS