dimumurray
Members-
Content Count
62 -
Joined
-
Last visited
Everything posted by dimumurray
-
Difference Between C, C++ And C#? And some other questions.
dimumurray replied to H R's topic in Programming
As far as the differences between C and C++ go, most of you have got it right. But the origins and nature of C# tends to be somewhat murky in this discussion. I'll try to clear that up a bit. Before microsoft created C# they created J, which was their answer to Java (created by Sun Microsystems). Sufficed to say, that language just did not take off as a platform and fell flat on its face. It is rumored that Microsoft was so ashamed of its creation that at one point they denied its existence. In any case with the advent of the .Net platform they took another stab and created C#. The syntax of C# is very close to Java, more so than it is to C++. Like Java it has interfaces and a single-inheritance hierarchy. What does that mean? Let's start with the whole single-inheritance hierarchy thing. C++ allows for multiple inheritance, that means a class can have more than one super class. There are inherant problems with multiple inheritance, however. Let me give you the classic Diamond Of Death scenario. You're given four classes. Classes B and C are subclasses of Class A, and Class D --using multiple inheritance-- is a subclass of both B and C. Class A sits at the top of the heirarchy, B and C sit on a level below and D is on the 3rd and last level(if you play connect the dots following the classes in the following order A-B-D-C-A you get a diamond). Let say both classes B and C override the method 'foo()' of their super class A, but class D inherits from B and C without overriding any methods. How does D resolve calls to its inherited method 'foo()'. It can't. Hence the fabled 'Diamond of Death' (queue menacing sound). The Java designers decided to implement a single-inheritance scheme to remedy this issue. That meant that a class can inherit-from/extend/subclass one and only one super class. To compensate for the loss of functionality that multiple inheritance provided, Java introduced interfaces. Think of them as classes whose methods have no body, that is, they have no implementation. Interfaces look something like this: interface Movable{ public void up(); public void down(); public void left(); public void right();} Now, in addition to their extends keyword Java and C# also have the implements keyword for interfaces. When the implements keyword is followed by the name of an interface, a class is required to implement all the interface's methods as seen below: class Car extends Vehicle implements Movable{ // ...other code public void up() { // implementation goes here } public void down() { // implementation goes here } public void left() { // implementation goes here } public void right() { // implementation goes here }} A class can implement as many interfaces as it likes and since every class that implements an interface has to provide its own implementation of that interface's methods the DOD (Diamond of Death) scenario never arises.Java also supports garbage collection(i.e. freeing memory occupied by unused objects) and in the true spirit of mimicry so does C#. And that, as far as I know, is the difference between C# and C/C++. As for C# and Java, this is what one of my former professors told me "Java uses 'String', C# uses 'string'". Nuff' said . -
You've touched on some of the basic principles of OOP, but you need to round out your article with a discussion of encapsulation and polymorphism. If you plan on making this a series of articles on Object Oriented Programming, you will want to look at discussing Design Patterns and Frameworks when you start on the more advanced topics. All in all not a bad job. P.S. Consider supplying a list of must-read books on OOP (Anything from the Head-First Series gets my vote )
-
I have read the books and I have found them all to be good reads. Tolkein really did an amazing job of crafting and shaping a believable world. That's why I like one of his later books, the Simarillion (I've not sure if I spelt that right so it might be wrong). That book details how middle earth came into being and also tells of the origins of all the worlds races (though it was somewhat vague on the origins of the hobbits). It not as clear in its narrative as the LOTR books as it reads more like a history as opposed to a novel but it serves as a great backdrop to the original trilogy. Did you know it took Tolkein almost fourteen years to write the books that would make up the trilogy? Plus the guy went as far as to create languages for some of his races in the books but then he was a linguist after all.
-
Hi all, For those of you did not quite catch the meaning of the phrase in the title of this topic, I will have you know this, it is Jamaican parlance for 'what's up'. So I am new here. The new kid on the block. Green as grass but as strong as brass. (OK, so that was a little over the top but I need to keep my character and word count high so you just have to deal with the rhetoric). If you have not yet figured out my goal here, well here it is in not so simple terms (or should I have said a 'nutshell'), my manifesto if you will: To get my post count up high enough so I can get some free, fully-featured, PHP&MySQL enabled, web-hosting. Cannot get any clearer than that now can you. if I come of as somewhat verbose its all for a good cause. I apologize in advance for being so glib. Consider yourself warned. So a little about myself (yeah you knew it was coming): I am an aspiring game programmer with some actionscript experience under my belt. Experience I hope to capitalize on in the not too distant future. But I digress. I am also something of an artist, I've invested several years honing my skills as a pixel artist. I am fairly decent with a pencil too. Anyway, I think I better wrap this up now. I don't want to appear too desperate, mind you. Thanks for having me. I'll be here all week.
-
Flash Games... Program to make them? A FREE one?
dimumurray replied to Dayzed's topic in Programming
The Flex3 SDK is now free from Adobe and there are a number of free third party IDEs (FlashDevelop3 for example). Check out the following site for a number of open-source flash tools: Open Source Flash As for the earlier rant at the beginning of this post I am not sure if you were very fair in you analysis of the situation. At its inception flash was a tool for vector animation and for the most part that meant cool animated visuals. Over time though, web users demanded more from their websites. They wanted functionality that mere pretty pictures, moving or static, could not supply. In an effort to keep up with trends on the web macro-media introduced actionscript. While it would be nice to have click and drag tools I think you've missed the whole point of having a language -- it is essentially the ultimate tool. It empowers creatives with the ability to build their own tools giving ingenuity free reign. The problem is, like so many other things in life, if you want to get the most out of something you have to be willing to put in the time and the effort. Pre-packaged functionality is a nice concept but invariably you'll reach a point where you'll want to do something that the tool at hand does not allow for. But if you can build it yourself, well, the sky's the limit. Imagination unbound... Now get up off your butt and go find a book on actionscript and start reading -
Hi all, I'm working on a project. Basically I hope to build a generic web application framework that will allow Flash/AS3 applications to be easily integrated into the Facebook platform. I am currently surveying a number of technologies and I am trying to figure out what tools will best help me achieve that goal. Many of them are open source with some still in early development. Most lack extensive documentation so its very difficult to gauge the strengths and weaknesses of a tool without investing a good deal of time figuring out how to use them. Is anyone here familiar enough with integrating flash apps into facebook that they can make a few suggestions?
-
I'm not that familiar with 'root' work-arounds in AS3 (still in the process of learning AS3 myself). But in AS2 the usual solution was to use '_level0' instead of root. '_level0' basically gives you a reference to the Stage movieclip. I don't know if this would still work in AS3 but with a little 'google'-ing you might just come up with something. And check out Adobe's official documentation, something's bound to be in there somewhere.
-
Hi all, Does anyone here have an interest in pixel art and its techniques? For those of you that do here's a cool forum to check out: Way of the Pixel There you'll find a multitude of skilled pixel artists plying their trade. In addition there are a number of tutorials and resources to tap to improve your skills. There is even an employment section for those of you looking for work as pixel artists. Enjoy