Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What programming topic would you want the next challenge to be about?  (It might be a good opportunity to focus on a subject you're not familiar with or to reinforce knowledge on one that you already know)

Control Flow
- 2 (2.2%)
Arrays, Strings, Pointers, and References
- 8 (9%)
Functions
- 4 (4.5%)
Basic object-oriented programming
- 30 (33.7%)
A bit more advanced OOP (Composition, Operator overloading, Inheritance, Virtual Functions)
- 18 (20.2%)
Templates
- 8 (9%)
Other (Explain)
- 4 (4.5%)
Working with files?  (Streams)
- 15 (16.9%)

Total Members Voted: 89


Pages: 1 ... 62 63 [64] 65 66 ... 78

Author Topic: Programming Challenges & Resources (#bay12prog) Initiative  (Read 95765 times)

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #945 on: February 21, 2011, 05:03:06 am »

They are undoubtedly correct in the notion that inner classes are "more object-oriented in line with their concept of object orientation" than delegates.
There is not really one, unifying "object orientation system". Java just implements one of the more popular paradigms, but for example Javascript handles inheritance via prototyping and some some languages (amongst which C# since version 4.0, see a pattern here?) use multimethods instead of or as a supplement to message passing.
Okay, sure, what I said is over-generalized. You add absolutely nothing to the conversation--which is very clearly about the standard encapsulation-polymorphism-and-inheritance model of object-oriented programming--but, yes, you nitpicked a minor generalization in a post that was actually talking about matters of weight. Good for you?

And so's we're clear, that "fixed that for you" strikeout shit is really tiresome. Write a response if you really have to show off how S-M-R-T you are, don't butcher quotes that you attribute to me.

This blog post feels real appropriate right now.
« Last Edit: February 21, 2011, 05:20:30 am by Blank Expression »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #946 on: February 21, 2011, 05:16:03 am »

I think that with "conversation" you mean "monologue", BE :)

IDE Question: I'm doubting whether I should switch from Code::Blocks to Eclipse for C++ editing, but I can't find a lot of stuff in Eclipse, and the help files aren't being helpful. Does anyone know how I can create a new toolchain, and specify specific locations for my toolchain? I've got multiple MinGW installations, and I want to be able to select one, instead of Eclipse picking one automatically.

I'm also still trying to find the locations to enter linking, include directories for source headers, and include directories for libraries. Right now it can't even find STL.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #947 on: February 21, 2011, 05:22:22 am »

Eclipse CDT is a piece of shit. As is C++, for that matter, but still. There are better choices. If you're on Windows it's something of a waste of time to use anything other than Visual Studio; the tools are top-notch and quite literally nobody comes close (Intel's compiler is better, but even they say "use Visual Studio." If you're on Linux you're better off with KDevelop. Netbeans's C++ support has gotten better over time, but it's still user-hostile.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #948 on: February 21, 2011, 05:31:24 am »

Is VS free (as in free beer) and can it use the GCC toolchain? Otherwise it's useless to me.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #949 on: February 21, 2011, 05:35:13 am »

VS Express is free, yes. Whether it can use GCC or not is immaterial (though it can when configured correctly), because if you're writing C++ correctly, the same code will build across any conformant C++ implementation. Both GCC and Microsoft's C++ compiler are conformant enough for anything you're likely to encounter. There is, however, no good reason to use GCC to compile code for Windows; it's poorly suited to the task in nearly any way you can name from binary format to shitty optimization. The overwhelming majority of tools that purport to work with GCC binaries (valgrind, etc.) either have no Windows port or are poorly maintained, whereas comparable tools in the Microsoft ecosystem are...well...competently maintained and actually do their job.

(Both GCC and MSC both fully pass Boost's tests, and if they pass Boost's tests, they'll work with anything else you'll throw at them.)
« Last Edit: February 21, 2011, 05:40:08 am by Blank Expression »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #950 on: February 21, 2011, 06:20:55 am »

There can't be "no good reason" if so many people do it. Your inability to give a balanced or nuanced answer makes your point unbelievable. Thank you for your time, your arguments are noted, but please don't bother.

To anyone else: Problem is, I'm writing something that should work both on linux and windows, and I'm too lazy to make my own makefiles or type in console compile commands. Code::Blocks handles all that perfectly, and I get to install and choose different compilers and linkers with the flick of a switch. Does Eclipse have that same functionality, and if so, where? Or is there another IDE that I actually should be using?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #951 on: February 21, 2011, 06:28:44 am »

May I ask why you're trying to get rid of code::blocks?

They are undoubtedly correct in the notion that inner classes are "more object-oriented in line with their concept of object orientation" than delegates.
There is not really one, unifying "object orientation system". Java just implements one of the more popular paradigms, but for example Javascript handles inheritance via prototyping and some some languages (amongst which C# since version 4.0, see a pattern here?) use multimethods instead of or as a supplement to message passing.
Okay, sure, what I said is over-generalized. You add absolutely nothing to the conversation--which is very clearly about the standard encapsulation-polymorphism-and-inheritance model of object-oriented programming--but, yes, you nitpicked a minor generalization in a post that was actually talking about matters of weight. Good for you?

And so's we're clear, that "fixed that for you" strikeout shit is really tiresome. Write a response if you really have to show off how S-M-R-T you are, don't butcher quotes that you attribute to me.

This blog post feels real appropriate right now.
Well actually (:P) a simple "please stop derailing this thread" would have sufficed, but point taken.
« Last Edit: February 21, 2011, 07:21:51 am by Virex »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #952 on: February 21, 2011, 07:16:50 am »

Code::blocks feels somewhat more oriented towards smaller projects. I'm missing stuff like simple version control without having to setup a CVS/SVN (which I think eclipse has but don't know for sure), and the code completion/hints stuff from eclipse does more stuff, such as "I can't find this file you're trying to include" while typing and a few other stuff, where in CB I need to press "compile" first.

Also, I'm interested in the basic refactoring that Eclipse provides, although I'm aware that it's hard to actually refactor complex C++.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Shades

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #953 on: February 21, 2011, 07:42:54 am »

CDT's refactoring is poor to say the least and limited to function / class renaming. I believe there is code::blocks plugin that allows the same.

What kind of simple version control do you use, I was under the impression most of the vaguely modern version control systems had plugins that worked with code::blocks.

Eclipse/CDT code completion is far better than any of the code::blocks plugins I've used though (although it's been a while since I checked so there could be new ones) and probably worth the change over in itself.

At any rate you can setup eclipse with whatever tool chain you like, it's project options are extensive. You'll probably have to setup it up by having multiple project profiles rather than the default debug/release ones, as far as I recall you can tie in the tools there.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #954 on: February 21, 2011, 07:59:19 am »

Thanks, I'll try that. If I don't succeed, I'll look into plugins for C::B.

I really hate shopping for plugins, though. It's like buying shoes, you have to make an effort to try a few until you find something that fits.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #955 on: February 21, 2011, 01:51:01 pm »

There can't be "no good reason" if so many people do it. Your inability to give a balanced or nuanced answer makes your point unbelievable. Thank you for your time, your arguments are noted, but please don't bother.
I'll bother, thanks, because insisting on doing things for silly reasons is kind of annoying. Also, because people might be deluded into thinking you know what you're doing and mimic you without knowing any better.

- "They don't know any better" is not a good reason.

- "It's Micro$oft, and I can't use their stuff even though I am using their operating system" is disgustingly common (not necessarily you, mind, but very common) and not a good reason.

- "They don't want to learn anything different from their current workflow" either.

- "They wrote shitty code that isn't standard and can't compile without GCC extensions" doesn't fly either. (Relying on non-standard extensions is in general a bad idea, because there's no guarantee they actually keep existing.)

- "They use it for compiler services and want to self-bootstrap" is not the worst answer in the world, but a creeping horror like that, written in C++, is a red flag to begin with.



If you want to say "there must be a good reason if so many people use it"...maybe you should find one of them and actually spur some discussion along. I have extreme doubts that you can, because I'd bet real money that such a reason does not exist, but hey, maybe we'll all learn something.

(And, no, not "so many" people use it. Hobbyists might--some of them--but when you look at people who go "hey, choosing a dumb toolchain will lose us money," they don't flock to GCC. Almost without exception they use MSVC. Maybe they--and, y'know, I--know something here, huh?)
« Last Edit: February 21, 2011, 02:08:39 pm by Blank Expression »
Logged

Farseer

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #956 on: February 21, 2011, 02:01:30 pm »

After reading the last page, I think this thread should probably be remade over and a specific rule on no arguments made. :p

Anyway, I'm writing in Python and I'm having trouble with trying to make a function end the program. I've just started, so don't hurt me. :(

Spoiler: The Function (click to show/hide)

I'm using loops and coding a shitty text-based adventure game because I don't know any better. :p

Spoiler: Where I Want It (click to show/hide)

This, however, does work:-

Spoiler: Working (click to show/hide)

When I try to run the "endgame()" function it just reloops the paragraph of the story. I just want to clean up my code and start doing functions effectively. :(

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #957 on: February 21, 2011, 02:06:18 pm »

After reading the last page, I think this thread should probably be remade over and a specific rule on no arguments made. :p
Then it might as well not exist--what with the whole discussion part of "discussion forum."

Quote
Anyway, I'm writing in Python and I'm having trouble with trying to make a function end the program. I've just started, so don't hurt me. :(
Do you have any code that actually needs to do clean-up work? If not, a sys.exit(0) in your endgame function will achieve your goal. Waiting for the game loop to bounce out gracefully is not necessarily the best design paradigm; it's workable but quitting out of a game is such a hugely out-of-band case that I might just do the cleanup in the endgame() call and then exit the program directly.

I'd need to see a complete code listing to tell you more about your specific code situation.
« Last Edit: February 21, 2011, 02:10:47 pm by Blank Expression »
Logged

Farseer

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #958 on: February 21, 2011, 02:07:41 pm »

Do you have any code that actually needs to do clean-up work? If not, a sys.exit(0) call will achieve your goal. I'd need to see a complete code listing to tell you more about your specific code situation.

Thank god there's a command that does that. Thanks, man. :D

Then it might as well not exist--what with the whole discussion forum thing, no? :)

There's a difference between a discussion and a full fledged angry argument (yes, presenting your argument is part of a discussion, but you know what I mean, don't try to out pun me man!),  and this thread definitely has a foot in angry.

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #959 on: February 21, 2011, 02:16:56 pm »

Currently, I've split my project into multiple files each containing a certain thing, such as one set for item implementations and another for rooms. I'm finding this easier to maintain because of the length of files involved, but at the same time I sometimes run into strange errors to do with it, and I'm worried the web'll just start tangling up into a mess after a while.

Should I keep on with the multi-file style, or should I start merging everything into fewer, longer files? What advantages/disadvantages lie in each?
Logged
Pages: 1 ... 62 63 [64] 65 66 ... 78