If I find another programming language easier should I stay with it instead?
-
No, that is the whole point. A proper OOP language begins with the class, and everything proceeds from there. Without the class nothing will work. In C++ the class is just an extra that you can use or not as you like. So you can write C++ code that conforms (more or less) to the rules of OOP, but you can also just ignore them. As an example:
// in C# or Java you must have the following as a minimum:
class Mainclass
{
static void Main(string[] args)
{
// do something starting here
}
}// in C++ you have
int main(int argc, char* argv[])
{
// do things here.
// BUT: this is the earliest point that you can instantiate a class
// AND: if you do not create any classes your code will be fine.return 0;
}
No and no and no, all this _is_ _not_ the defintion of a proper OOP language. Even in ada (which is for me the OOP reference) you can do dirty things ;)
It does not solve my Problem, but it answers my question Chemists have exactly one rule: there are only exceptions
-
Richard MacCutchan wrote:
One thing you really need to develop in the IT world is an open mind.
and a lot of patience.
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
No and no and no, all this _is_ _not_ the defintion of a proper OOP language. Even in ada (which is for me the OOP reference) you can do dirty things ;)
It does not solve my Problem, but it answers my question Chemists have exactly one rule: there are only exceptions
-
No, that is the whole point. A proper OOP language begins with the class, and everything proceeds from there. Without the class nothing will work. In C++ the class is just an extra that you can use or not as you like. So you can write C++ code that conforms (more or less) to the rules of OOP, but you can also just ignore them. As an example:
// in C# or Java you must have the following as a minimum:
class Mainclass
{
static void Main(string[] args)
{
// do something starting here
}
}// in C++ you have
int main(int argc, char* argv[])
{
// do things here.
// BUT: this is the earliest point that you can instantiate a class
// AND: if you do not create any classes your code will be fine.return 0;
}
This is now a valid C# program:
using System;
Console.WriteLine("Hello World!");Espen Harlinn Senior Architect - Ulriken Consulting AS The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
1. Finish your assignments on Java. 2. Don't be afraid of pointers, but do read some topics on / play with pointer arithmetic. 3. You can get a job with C++, no issues with that, there are plenty of jobs requiring C++. 4. I wouldn't waste my time on C#, unless you have a project to do with that language. If you are already learning Java and C++, you won't benefit a lot from adding C# to the list. 5. You will benefit from adding a functional language to the mix, but I wouldn't recommend Haskell to a beginner. I found Standard ML to be easy to learn, so I would recommend that. 6. Try a C++ GUI framework. I would recommend Qt.
-
This is now a valid C# program:
using System;
Console.WriteLine("Hello World!");Espen Harlinn Senior Architect - Ulriken Consulting AS The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
-
If you've already coded in Java, C# will feel somewhat "familiar", but I think of it as more streamlined and more cohesive than Java. It's just more ... flowy to code in. The hardest thing about it is getting used to MicrosoftPascalCasingSchemesInTheDnf Like it's IPAddress, but DnsEntry. (if an acronym is 3 letters or more, it gets title case treatment)
Real programmers use butterflies
honey the codewitch wrote:
The hardest thing about it is getting used to MicrosoftPascalCasingSchemesInTheDnf
That's because of Anders, I think.
"He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C# and core developer on TypeScript."
We won't sit down. We won't shut up. We won't go quietly away. YouTube, and My Mu[sic], Films and Windows Programs, etc. and FB
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
Hey! Thanks for reaching out! Learning to code is hard for most people, and, importantly: _no programming language is perfect_ When I read the title of your post, I was about to respond with "write code in whatever makes you most productive!", but then I read until the end, and now I have to recommend that you try to get everything you can out of Java, because finding your first job is _freaking difficult_, but trying to find your first job _without a qualification_... well, let's say you'd better have friends in the right places. A lot of the issues you're talking about in Java aren't intrinsic to Java. Yes, C++ doesn't have interfaces, but interfaces fulfill some of the role of abstract classes, which C++ has, but clearer: you can't _inherit_ from them, only _implement_ them. precursor / disclaimer: I've worked in > 20 languages. C++ was my primary for about 6 years, I've only fiddled in Java (written small things), but my daily driver for about the last decade has been C# (and I do a reasonable amount of JS/TS), so I know that a lot of concepts from C# hold in Java land, and I have a reasonable history with C++... Interfaces (or, in C++, you might use an abstract class for this) simply provide a "contract" for talking to something else. Let's say you have an interface for `IDog`: this tells you what "shape" a dog has (it might mention that there are an integer number of legs, an integer number of tails -- you'd expect values 4 and 1 from those, but some unfortunate doggos have had accidents )': ) and a method like `Speak()` which returns "woof!". You could see how this "shape" doesn't just apply to dogs: cats also have an integer number of tails and legs and when they "speak", they say "meow!", so you could think of a simple contract for an animal where you have, in C#: ``` public interface IAnimal { int Legs { get; } int Tails { get; } string Speak(); } ``` Now, when we want to implement our own animal, it may do _more_ than that (perhaps it can do tricks!) and it will speak with its own voice. The point is that, if we have a zoo of different animals, in a collection, eg `List()`, we could count the total legs at the zoo, or imagine the cacophony if all animals were to "speak"!. This means that a function which was, for example, counting all legs at the zoo, doesn't have to care what animals are actually _in the zoo_! Even the `Snake` class could implement `IAnimal`, where `Legs` would return zero! Eg: ``` int CountLegs(IAnimal[] animals) { var total = 0; for (var
-
1. Finish your assignments on Java. 2. Don't be afraid of pointers, but do read some topics on / play with pointer arithmetic. 3. You can get a job with C++, no issues with that, there are plenty of jobs requiring C++. 4. I wouldn't waste my time on C#, unless you have a project to do with that language. If you are already learning Java and C++, you won't benefit a lot from adding C# to the list. 5. You will benefit from adding a functional language to the mix, but I wouldn't recommend Haskell to a beginner. I found Standard ML to be easy to learn, so I would recommend that. 6. Try a C++ GUI framework. I would recommend Qt.
Learning C# may not add a lot more on top of Java and C++, but learning how to deal with .net can lead to some good jobs, just sayin'. Coder's gotta eat (:
------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY
-
C++. It's not OOP
please explain in more details why not.
It does not solve my Problem, but it answers my question Chemists have exactly one rule: there are only exceptions
Apples and Oranges for the most part. C++ is a language. OOP is a style of programming. C++ is capable of performing OOP, but there are detractors as well.
-
Programming languages are part of the toolbox of a good programmer, each with its own strengths and weaknesses. A good programmer will try to use the programming language most appropriate to the job. For example, most programmers would not write a program to calculate orbits in COBOL, nor would they write an interactive game in Fortran (though it is possible to do both). A good programmer will know more than one language, and will be able to write code in the differing styles that these languages impose, e.g. procedural for C and C++, Object-Oriented for C++ and Java, etc. The idea is that you should be able to match the project to the appropriate language. Many programmers have had a long and successful career knowing only one language (for example the COBOL programmers who started in the '60s). Today, you are likely to migrate between projects with differing requirements, and cannot afford to limit yourself in such a manner. In addition to your Computer Science studies (data structures, algorithms, etc.), I would recommend trying to learn at least one popular language a year - C, C++, Java, Python, etc. You do not have to become a master of the languages, just know how to program in them and where to find the more advanced stuff. This will help you when you have to look for a job. Programming is a challenging career, but it can be very rewarding to the right person. Good luck!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
Daniel Pfeffer wrote:
A good programmer will know more than one language, and will be able to write code in the differing styles that these languages impose, e.g. procedural for C and C++, Object-Oriented for C++ and Java, etc. The idea is that you should be able to match the project to the appropriate language.
This! In my first professional project, I worked with folks that were taught COBOL OTJ (most started late 50's/early 60's). They had no degrees or certificates -- they were high school grads hired by the US federal government and taught how to program in COBOL. Fast forward 30+ years. My team was rehosting ancient applications onto Oracle, and part of that was training the programmers how to handle the new applications + languages. I worked with one woman for months -- she could not learn SQL. Honestly, she was brilliant, she could make COBOL do anything she wanted. But after 35 years of doing things exactly 1 way, IMO she had a mental block and just could not make the mental shift to a totally different paradigm. That taught me a valuable lesson -- never stop learning. When you stop learning, you limit your ability to adapt to an ever changing environment. Java doesn't make sense but other languages do? Then study the languages that DO make sense. Learning to program is NOT learning a specific language. Learning to program is learning to think, and to express your ideas in a way a computer can execute it. IMO, learn at least 3 styles of programming: procedural, OOP, and SQL. All three require thinking differently, and learning any language in a style gives you the background to learn new ones. Always keep in mind that the right language to learn is one that someone is willing to pay you to work with.
-
I only said it is needed, not that we develope it :rolleyes: :laugh:
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
Be careful not to judge a language by the writings of an author. I must have a dozen Java books that are good for a bonfire and another dozen books on C that are wonderful. Java jumped to a leading development language in application programming because of its usefulness, but I would never want to develop gaming programs with it. Think of languages as tools in a toolkit and you will go far. Just as a hammer is terrible at turning screws, a scripting language will never be good at real-time applications. Other languages are much better at that. Usually, experienced programmers can point you to good books, or better yet, good authors to help get you where you need to go. CodeProject has a great breadth of experienced developers who are happy to help, and no, I am not getting paid to say that. With Bjarne Stroustrup having developed C++, he is an excellent source, but I found his book to be dry and slow going. Ask for good books for Java and maybe you can get a leg up.
-
honey the codewitch wrote:
The hardest thing about it is getting used to MicrosoftPascalCasingSchemesInTheDnf
That's because of Anders, I think.
"He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C# and core developer on TypeScript."
We won't sit down. We won't shut up. We won't go quietly away. YouTube, and My Mu[sic], Films and Windows Programs, etc. and FB
For new work, I've been simply ignoring Microsoft PascalCase for member names, and use camelCase, instead. I got a few warnings about the style at first, then the warnings just stopped.
-
C# isn't modified Java. C# is what java would be if someone took Java and designed all of the mistakes out of it. :-D
Real programmers use butterflies
-
Quote:
but there is not much else that it could do
It's a real time saver - I bet I'll save at least 0.00000001% on my next .Net project ;-) As for what else is new in C# 9.0 record types seems like a useful extension, with the same pitfalls as structs. Meaning it easy to loose many of the performance benefits through mindless boxing/unboxing. Init only setters: seems to be useful for functional programming purists - Upside: objects are immutable so you can avoid explicit locking in a multithreaded program, downside: there is going to be a lot of lock contention related to the allocation of objects. So far I believe the downside is, on the average, far greater than the upside. Pattern matching enhancements: Minor syntactic sugar … which has the potential to make some code more readable, but to me this:
if (e is not null)
{
// ...
}is not more readable than:
if (e != null)
{
// ...
}Native sized integers and delegate pointers: sounds interesting, but I have no idea about how much this will improve the performance of a program. Sounds mostly like stuff the JIT compiler would do for me anyway … New Expressions: This is something I'm actually going to use. Support for code generators: I have yet to use partial methods for anything, but have used class factories and virtual functions to achieve similar functionality in the past. This would certainly reduce the amount of generated code.
Espen Harlinn Senior Architect - Ulriken Consulting AS The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
The first language is the hardest. Once you MASTER any single language, others will be easier to understand. For Java, you might try the free ebook: Thinking in Java. It is an okay learning book. For Java, just remember that Object variables are only "leashes" or "reins" on an Object. They let you control something that wants to roam free (and be garbage collected when that happens). Primitives are values. All variables (including "leashes") are passed to and from functions by value/copying. So if you pass an object to a function, you have a second leash to the same object inside the function. Java object references act like C/C++ pointers, except that the Java language will not let you access the contents. In C/C++, you can dereference a pointer type via * and see the actual memory location. The one syntactic "sugar" that basic Java gives you is a double quoted String constant: "Assign me to a leash or lose me forever".
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
A few thoughts from me: Why Java? -- New kid of the 90s when a new boom of development kicked off with this people. Companies digitizing their processes and looking for how to do that. A: Free, B: had some features for new programmers that eased development. New programmers thrown Java New programmers cheap Move 20 years on. Java has its foot in lots of business applications, because of that expansion phase. So lots of work maintaining that work because the risk to rewrite seems unproductive from a business perspective. Tons of courses use Java to teach, because they already have the course setup for that and will cost time and energy to change it. Again its free to use the language and teach from, so many courses used it. After learning how to write code. It will be helpful to understand some business stuff to be able to manage clients. This is a whole different thing to understand. Unless you happy to be code monkey (in the positive sense, not negative) and find a manager to deal with all business. This still leave you at the manager whims that when you think project should be done as X, but manager says must be done as Y. Why learn concepts? -- For 10 years after uni, never once used an Abstract. had no need. Had no need because I was in a company whos product had no need. Until I found a code base which everything had Interfaces. Now some of this might be C# specific but lots of cross over. Interfaces were created for everthing, so dependcy injection could be done on Testing (unit tests). This granular level of testing also took some learning and once clicked the interfaces made sense. For some understand B before A is more helpful then A then B. I am the former. "Oh no, you never did tests before!?" Yes and no. I had tried to do unit testing to little avail. So the previous porjects I had worked on relied more on integration test, automated out, and dedicated testers following manual test sheets. So need to learn that programming had little need. So back to Abstract. I noticed that there could be a use for an Abstract class. This was not really me thinking in OOP terms, but understanding some C# features, and wanting to trim some code fat. consider this. There are lots of clients that need food. We offer Breakfast, Lunch, Dinner, but needs to be implemented different for each client. So we make an Interface for Breakfast, Lunch, Dinner. (interface is just method names, properties and return type. Only the public methods) So each client has to implement each met
-
In the begining I would like to thank you for all your responses to my late topic on job :) I read them all. Now I have another question. I know I'm whining too much... :~ You probably think I'm acting like a prima donna. So, I heard some advices from the other programmers that If find a programming language hard, i shouldn't give up on programming and maybe try another. So I did it. About one month or two ago I started to learn c++. And immediately everything started to click. I even began to understand some java concepts that I couldn't get before. A week ago I read like about 600 pages of Deitel book on C++ like it was an interesting novel. Now I'm almost on the same productivity level as my java just in one week. I don't use pointers yet and don't allocate memory either, sometimes I have to check out the syntax but I can make simple console games(I struggle, i didn't finish any yet, but I can ;P ). I bought Bjarne Stroustup's book and I love it... I just want to learn more and program, but today I thought... damn.. I have to stop. I have assignments on java for school and I'm late. They will kick my out of college so I thought, I focus only on java. I thought: "It's a good language, it has great support for GUI, I can get job". So I woke up in the morning and thought: "I will read those java books with the same passion!" and I opened my java book... and that's it.... I can't go any further. I don't know if the problem is books themselves, are books on java really that horribly written or is it a language itself? I simply can get why and when I should use interfaces, why should I bother studying those (100 * infinity) libraries when I can write programs using just few. What is the purpose of abstract class, inner class, biolerplate code here, boilerplate code there... Plenty of lines just to print "Hello World!". I can't stand it anymore :(( Smart people, what should I do?
I went to University to study Computer Science. What I can tell you is that once you have learned four or five languages you will find that learning new ones gets easier. So, you have two options that are fairly obvious to me. One would be to find more books on Java, you could probably do this for free in a public library since the language is so popular. The second option would be to look ahead at the other courses you will be taking and what languages they are using then start learning those languages now, that will help you gain greater insight in programming which will help with Java, and you will have a head start on what is coming up in the future. This second option will work but it will also take longer, so you do have a big choice here.
-
Hey! Thanks for reaching out! Learning to code is hard for most people, and, importantly: _no programming language is perfect_ When I read the title of your post, I was about to respond with "write code in whatever makes you most productive!", but then I read until the end, and now I have to recommend that you try to get everything you can out of Java, because finding your first job is _freaking difficult_, but trying to find your first job _without a qualification_... well, let's say you'd better have friends in the right places. A lot of the issues you're talking about in Java aren't intrinsic to Java. Yes, C++ doesn't have interfaces, but interfaces fulfill some of the role of abstract classes, which C++ has, but clearer: you can't _inherit_ from them, only _implement_ them. precursor / disclaimer: I've worked in > 20 languages. C++ was my primary for about 6 years, I've only fiddled in Java (written small things), but my daily driver for about the last decade has been C# (and I do a reasonable amount of JS/TS), so I know that a lot of concepts from C# hold in Java land, and I have a reasonable history with C++... Interfaces (or, in C++, you might use an abstract class for this) simply provide a "contract" for talking to something else. Let's say you have an interface for `IDog`: this tells you what "shape" a dog has (it might mention that there are an integer number of legs, an integer number of tails -- you'd expect values 4 and 1 from those, but some unfortunate doggos have had accidents )': ) and a method like `Speak()` which returns "woof!". You could see how this "shape" doesn't just apply to dogs: cats also have an integer number of tails and legs and when they "speak", they say "meow!", so you could think of a simple contract for an animal where you have, in C#: ``` public interface IAnimal { int Legs { get; } int Tails { get; } string Speak(); } ``` Now, when we want to implement our own animal, it may do _more_ than that (perhaps it can do tricks!) and it will speak with its own voice. The point is that, if we have a zoo of different animals, in a collection, eg `List()`, we could count the total legs at the zoo, or imagine the cacophony if all animals were to "speak"!. This means that a function which was, for example, counting all legs at the zoo, doesn't have to care what animals are actually _in the zoo_! Even the `Snake` class could implement `IAnimal`, where `Legs` would return zero! Eg: ``` int CountLegs(IAnimal[] animals) { var total = 0; for (var