Jump to content

  • Log In with Google      Sign In   
  • Create Account


medevilenemy

Member Since 29 May 2005
Offline Last Active Yesterday, 06:47 PM
-----

#5038200 HTML5 browser game

Posted by medevilenemy on 01 March 2013 - 06:02 PM

I wouldn't suggest trying to do anything particularly ambitious in HTML5 yet.  Its come a long way in the last year or so but it is still no really ready.  Most browsers still don't have great support for it, and nobody has really figured out quite how to use it yet.




#5031266 Learning By Doing vs Learning By Reading

Posted by medevilenemy on 11 February 2013 - 06:14 PM

I can't really tell you what the right way to learn is.  Different people learn in different ways.  I, for one, learned the hard way.  I started teaching myself C in 7th grade (some 12 or so years ago now) with an incredibly outdated compiler and a reference book nearly as old (http://www.amazon.com/First-Book-Fundamentals-Programming/dp/0314813489).  I didn't really read the book through, but rather used the examples and such in the back as a start and referred to the appropriate chapters for explanation/help as needed. 

 

My general thinking is that books and classes are good (assuming you have a good book / good teacher) for learning the syntax rules and such, but I think experience (and discussion) tends to be a better teacher of design skills and what I call an adaptive understanding of the language... that is, the ability to understand not only how things work (not just how you're told to use them) and how to combine them without external direction to achieve a certain goal.




#4953207 New To programming, Where to start?

Posted by medevilenemy on 26 June 2012 - 10:13 PM

C++ is as good a language to start with as any other, in my opinion. The key is to take your time and do it right. Learn the fundamentals of the language, and of design, then move on from there. Start with the core functional programming features inherited from C, and when you are comfortable with that move into OOP and such. A lot of people tend to focus too much on the modern concepts like OOP (College educated CS folk, even) at the expense of fundamentals like efficiency, functional design, simplicity, and most of all commenting (At my company seeing more than one or two lines of comments for every 500 is not uncommon).

Java isn't really all that different to learn than C++... they share most of the same concepts, they just accomplish them in different ways. Whatever you choose to start with, there are plenty of us here who can try to help... just take it easy and focus on learning the skills.


#4927273 Newbie here, I wish to start.

Posted by medevilenemy on 01 April 2012 - 02:54 PM

I concur with Waterlimon. Straight-up C just isn't well suited to games... that is to say that OOP features come in very handy. You're also more likely to find useful libraries for more modern languages. It isn't really very hard to pick up the basics of C++ (or Java or C# which are both relatively similar to C++ in syntax). I can appreciate the desire to make a game right from the get-go (its pretty much what I tried to do some 10 or 11 years ago), but I'd first focus on language and design skills before taking on a big giant project. From there, start with small projects (much higher chance of finishing Posted Image ) and work your way up as you develop the kind of skills you'll need for elaborate projects.


#4820334 So you want to be a real programmer?

Posted by medevilenemy on 06 June 2011 - 07:45 PM


C++ takes a lot of heat because it doesn't conform to today's fad ideas of mainline programming (this is IMHO, of course :P) namely: Strict adherence to OOP principles, and type safety. C++ wasn't designed to be an OO language, but rather to give you the ability to write OO code if you chose to.


Um, yes it it was. C was designed EXACTLY to be an OO language. C++ actually started out being called C with Classes ( aka, objects ). The very first extensions to C++ were to support Object oriented programming on top of C. ( Originally C++ compiled down to C code ). Bjarne Stroustrup was heavily inspired by and accredits Simula as one of the major inspirations for C++. Now, one of the design tenants of C++, at least as it evolved, was to but a multi paradigm language, but then, the same can be said of C# ( which supports functional, procedural, object oriented and various other programming methodologies ) and a lesser degree to Java and various other languages. Few languages actually force you into a specific coding style, beyond the likes of smalltalk, LISP and other specialty languages.


It was not really written to be type safe because strictly enforcing type safety can limit programmers, to a certain degree.


None of our languages of preference are perfect, nor are we (certainly not me), but there is plenty to be learned from both the strengths and weaknesses of various languages. I mean simply to have us consider various languages and paradigms as equals as, honestly, language doesn't matter nearly so much as design skills and thinking both inside and outside the box.

Like what? What *good* programming practice does C++ lack of type safety enable it to perform, that a language such as C# cannot? [ There are a few answers, I'm curious to hear yours ]

It is a language of choice, designed to support multiple paradigms.


As explained earlier, this is by no means exclusively the domain of C++. Actually, in some areas, C++ is actually a very poor fit for some programming paradigms.

Honestly, I think pure OO and type safety are both overrated... just like you should use the right tool for the job, you should use the right paradigm for the job -- and sometimes that is somewhat subjective.


Really? Lets completely ignore the merits of object oriented programming for a second, which is a thread unto itself, but frankly you think type safety is overrated? Really?

As for C++ being dangerous: Sure it is... it makes no effort to hold your hand. If you or I, as programmers, mess up then it won't work properly... because we messed up. The idea is to learn the tools available, apply good design skills (and I tend to think at least some degree of creative intuition), and be careful. If something is broken, take responsibility and fix it. Java/C# have somewhat different approach... They are "safer" to work in as often times you won't go quite as humorously or terrifyingly wrong, and yet they somewhat restrict you from trying the crazy idea which later turns out to be brilliant, etc etc etc. Of course, many will disagree, that is fine. When it comes to it, C++ is just as valid a language as Java/C#/whatever depending on use, and on programmer comfort and preference.


If I can be completely honest for a moment, I highly recommend you take some time to familiarize yourself with some other languages. Some of your perceptions of different languages are just patently wrong, as are your understanding of the history and to a lesser degree, the merits of C++.

Had you mentioned portability as a strength, that I could understand. Had you mentioned 3rd party library support as a strength, that I could understand. Or the large repositories of code and the backward compatibility with C, that I could have understood. Had you mentioned performance as a strength, that I would have slightly disputed, but still it would be understandable. Yet almost every thing you did mention, to be completely honest, are the kind of things that one hears from another and puppets as truth.

Please don't take this as an insult or as an attack on C++, my intentions are good. It just seem so many people are working on bad supposition, and in the end that doesn't help anyone, especially when those suppositions are passed on generation after generation.



No need to be quite so rude, Serapth, we are all simply discussing opinions in good faith. I will not respond point for point except perhaps for a couple and to try to clarify my general meaning: I was not trying to say that OO and type safety are bad, or that C++ is the greatest thing ever, but rather that I don't think they are the greatest things ever. Focusing too much on any given paradigm or practice is limiting in that you box yourself up and won't necessarily think of alternate methods of doing things. For example, a messaging system. There are lots of ways to go about it, the general idea simply being to pass data/arguments in a type agnostic format as well as the context to decode the message on the far end (because different messages can, conceivably, need different types of arguments). You can do this lots of ways, from generics, to polymorphic wrappers, to string packing or even void pointers. There are pros and cons to each, with the void pointer method probably being the most sketchy from the perspective of type safety... but really, so long as you are careful and provide yourself appropriate context, even the void pointer method can be worked with relative ease.

On C++ design intentions, allow me to quote something (from the C++ man himself by way of wikipedia):

In The Design and Evolution of C++ (1994), Bjarne Stroustrup describes some rules that he used for the design of C++:[page needed]

  • C++ is designed to be a statically typed, general-purpose language that is as efficient and portable as C
  • C++ is designed to directly and comprehensively support multiple programming styles (procedural programming, data abstraction, object-oriented programming, and generic programming)
  • C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly
  • C++ is designed to be as compatible with C as possible, therefore providing a smooth transition from C
  • C++ avoids features that are platform specific or not general purpose
  • C++ does not incur overhead for features that are not used (the "zero-overhead principle")
  • C++ is designed to function without a sophisticated programming environment

The second point there is what I was attempting to express.... not that C++ wasn't intended to be useful for OOP, but rather that C++ wasn't intended to be solely OO... OO is simply a tool, albeit an important tool, in the C++ feature set. It is not the end-all be-all for programming nor is it the only valid way to approach all problems.

Point three above is really the perfect overall statement -- As stated above... there are indeed plenty of ways to shoot yourself in the foot... the responsibility is the programmers to try not to do so, and to take responsibility if they accidently do.


#4819962 So you want to be a real programmer?

Posted by medevilenemy on 05 June 2011 - 09:18 PM

C++ takes a lot of heat because it doesn't conform to today's fad ideas of mainline programming (this is IMHO, of course :P) namely: Strict adherence to OOP principles, and type safety. C++ wasn't designed to be an OO language, but rather to give you the ability to write OO code if you chose to. It was not really written to be type safe because strictly enforcing type safety can limit programmers, to a certain degree. It is a language of choice, designed to support multiple paradigms. Honestly, I think pure OO and type safety are both overrated... just like you should use the right tool for the job, you should use the right paradigm for the job -- and sometimes that is somewhat subjective. As for C++ being dangerous: Sure it is... it makes no effort to hold your hand. If you or I, as programmers, mess up then it won't work properly... because we messed up. The idea is to learn the tools available, apply good design skills (and I tend to think at least some degree of creative intuition), and be careful. If something is broken, take responsibility and fix it. Java/C# have somewhat different approach... They are "safer" to work in as often times you won't go quite as humorously or terrifyingly wrong, and yet they somewhat restrict you from trying the crazy idea which later turns out to be brilliant, etc etc etc. Of course, many will disagree, that is fine. When it comes to it, C++ is just as valid a language as Java/C#/whatever depending on use, and on programmer comfort and preference.


#4818421 Managing a custom archive

Posted by medevilenemy on 01 June 2011 - 02:41 PM

A quick google search will turn up a number of different zip (or other archive format of preference) interface APIs which should do the trick for you, in any number of languages (C++/Java/C#/Perl/etc)


#4789413 Thinking like a programmer

Posted by medevilenemy on 22 March 2011 - 11:31 PM

I tend to think one thing a lot of formal methods of teaching technical skills (the programming aspects of CS or engineering in large part) lacks is any instruction in creativity/design thinking. I am myself educated as a computer engineer, and there's something we tend to say from time to time and that is that one "thinks like an engineer" or doesn't. Perhaps its something that isn't really teachable, I don't know. I think the same basic way of thinking applies to programming. This is not to say you can't be a good programmer without this, but it works through a different mechanism.

A lot of people, including myself, describe thinking "like an engineer" or "like a programmer" as being able to sort of "feel" a problem and visualize its parts as well as possible solutions instead of the mathematical approach they tend to teach which is very paper-oriented and manual -- focused largely on canonical forms for things and "rules" rather than organic and creative design and problem solving. Its a peculiar ability, to be able to sense the scope and details of a project as if it were a physical object with parts which can be removed and moved around. Honestly, I don't think it is related to the knowledge of any language or method in any direct way. This is also why I tend to think that design based technical fields are not so mathematical and structured as many believe or would teach you -- rather there is plenty of room for creativity and organic development though it manifests differently than painting a picture or writing a book. Sorry for rambling, just my quick $0.02


PARTNERS