dperfors

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

279 Neutral

About dperfors

  • Rank
    Member
  1. Best comment ever

    // This code should be removed // .... where // .... is real code
  2. Unity Code design/architecture

    The most obvious ways of learning about architecture are: code reviews, asking questions and discussing code. But it in order to save time discussing some things it is a good thing to learn about design patterns and the SOLID principles.
  3. Your Prototyping Language?

    I tend to use to prototype using the language of the project. So work related things are prototyped in C# and personal things either in C++, Python or Bash (what can I say, I am a linux guy :P).   When I don't have to write a prototype for some kind of visual problem, I will us unittests to ensure my code is correct. When I am using C# and I only have to show some data, or try out some library to get it for me, I will use LinqPad, a program that makes it possible to use C# like a scripting languages... I haven't found anything like that for C++ though...   Even for learning parts of a language I will write unittests to make sure I understand how the language works...
  4. Learning languages and technology just for learning languages and technology could be fun, but it doesn't get you anywhere... Learning the concepts and patterns used in different languages and learning how to apply them in other languages is what makes you a better developer. Both OO languages and functional/procedural languages are around since a long time. Most of the new languages I see still use the same concepts that where available in the first languages. So when you really learn to understand and use OO, you can apply it in all the languages that support it. You only need to learn the syntax.
  5. 2D vs 3D

    That being said, more and more projects who use 2D art, are starting to use 3D modelling software and some scripts to translate the 3D art to 2D sprite sheets.
  6. How much of Boost do you use?

    At the moment I only use FileSystem, just because it is so easy to use on multiple platforms. Other parts of Boost I did not yet look at. (neither to the new c++11 features...)
  7. c++ IDE preferences

    I did try several IDE's. Eclipse was ok, but I didn't like it for C++ I liked Code::Blocks and CodeLite a lot, they are quite similar in functionality Anjuita / KDevelop are too clunky for me VisualStudio I only use for C# / .NET, also heavy modified on the colours ;) Since a few months I only use VIM and the command line for C++ development. It has a steep learning curve, but I really like it.   I actually hardly miss the code completion (there is some basic support for it in the plugins I currently use, but not as efficient as VisualStudio). I can easily find the needed functions in the documentation of the different libraries or in the header files. Most IDE's won't show the needed documentation anyways (at least not when I looked last, which is some years ago :P)
  8. Code Formatting - Method Organization

    With most IDE's it isn't necessary to organize methods at all, since you have several representations of the complete class structure and you can easily jump to the method you want. That said however, it is possible that not everybody reading your code will use an IDE. So it pays off to organize your code in some way (other than how they popup in your head ;)). I actually have serveral different ways of organizing my code, they depend on the language (C#, C++, PHP), the kind of project (work related, hobby or learning) and the mood I am in... but I try to organize methods with the same functionality together.   Typicly I don't mark regions of functionality with comments or the C# #region keyword. (because I think unnecessary comments are evil...)
  9. Code Review - Dice Game (No graphics)

    Agreed, sometimes I make a method just for the condition of an if statement, especially when it is more complex or used multiple times.
  10. Code Review - Dice Game (No graphics)

    I'm always afraid that I'm going to have too many methods in my program, so would I clear this up by making custom classes, and then just creating an object that can reference them? I don't think you can have too many methods in a program. As is said before, your class should have one responsibility, but your methods shoud also have just one responsibility. Besides that, not all methods have to be public. That being said, sometimes there are reasons to make a method larger than usually. This could be for readability or performance. I can recommend the articles, videos and book of Robert C. Martin about "Clean Code". It is a relative old book, but still very usefull to read.
  11. Code Review - Dice Game (No graphics)

    I agree with most of the things Indifferent says, but I want to add a few small things.   All methods are static. Basically this means there is no Object Oriented programming, which makes it harder to break things apart. I think it would be a good idea to try and find a book that discusses Java and OO. Logic and UI are not separated. This is along the lines with Indifferents "Class length", but with a different angle.. When you separate the logic from the actual UI output it will be easier later on to try and add a Graphical layer, besides that it will be easier to test your logic using unit tests. In the rules() method you have multiple calls to System.out.println(), and although it is probably a matter of taste, I would combine the complete string and print it all in one println().   Btw. for method lengths a good rule of thumb is methods between 3 and 7 lines, especially when the logic is complex, you want less lines.
  12. [quote name='GKANG' timestamp='1337243009' post='4940873'] Are you saying then that I shouldn't even go back to school? [/quote] I didn't say that, but in my experience school isn't always the best place, sometimes it is better to find an in depth course for a programming language and find out all the ins and outs of it. And most of the times these courses you can't find in schools.
  13. Depending on what you want to do as a programmer, you don't actually need Advanced Maths nor Physics, although it could be usefull some times... Knowing a language (or more) is great, learning the concepts like Object Orientation, SOLID, Test Driven Development, etc and learn them really well is much more usefull. When you know those concepts (which you have to learn using a language of course) you can learn any language within months. The problem is that thos concepts are not tought very much in Universities (at least not in the Netherlands), so you have to do some self teaching or find someone who is willing to mentor you. About learning how the languages work, that would be usefull sometimes, especially when you are using higher level languages like C# or Java. Those languages can do a lot for you without you knowing exactly what happens. When there goes something wrong, you really need to know what happens inside the language.
  14. I agree with wolfscaptain, I just didn't found the right words to say it [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img]
  15. I don't really understand why your code in ProjectTile.h should call methods from Game.h... Normaly I would call methods in the source file and not the header. Although it is doable, I think the method you want to choose, is a complex one. A tile that handle an explosion and damage other tiles? Is that really the responsibility of the tile, or is that the responsibility of the "Explosion". It is a though decission and both ways are correct, but in my opinion, putting to much logic in an object is generally not a good thing. Other than this I can't give you much advise...