Learning programming is so so so hard ! !!
MarijnR
Yellow-bellied Woodpecker
Joined: 10 May 2010
Age: 55
Gender: Male
Posts: 65
Location: the Netherlands
Putting the language question aside, the best way of learning programming is by examples as was stated before. Even if the material itself is as dry as a desert, a decent instructor will be able to map the how and why of different classes and functions to real life examples. If you can switch instructors you could benefit greatly. Not many people are able to instinctively understand programming, it is hard for most people and I have seen a lot of students dropping out because of it.
Having programmed for years in a number of languages, I have to say C# is a bitter one. Not difficult when you are familiar with programming but it's bloated (too many predefined functions you do not need or can create yourself) and in my opinion not always following the logic you might expect.
LordoftheMonkeys
Veteran
![User avatar](./download/file.php?avatar=29086.jpg)
Joined: 15 Aug 2009
Age: 35
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground
Agreed. I never liked "gadgets and gizmos" languages, with the exception of Javascript. I prefer ground-up languages like C/C++. C# doesn't teach you how to program; it only teaches you how to put together premade classes and widgets. The same goes for Java as well. Another thing I don't like about Java and C# is that they force you to use classes even when a procedural method would be much more convenient. Compare this to C++, which gives the programmer the choice of using either object-oriented or procedural programming to accomplish a task.
_________________
I don't want a good life. I want an interesting one.
I was decent with programming. I was pretty good at math, but applied math AKA physics, I wasn't so good at. I don't really understand, I knew the formulas and knew the ideas behind them, but couldn't put them together.
I took C++ years ago, what's different in C#?
_________________
b8d0f0/bbe4a6
LordoftheMonkeys
Veteran
![User avatar](./download/file.php?avatar=29086.jpg)
Joined: 15 Aug 2009
Age: 35
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground
There is about as much similarity between C++ and C# as there is between Javascript and Python. They both have their roots in C, but they are completely different languages. Don't be fooled by the fact that they have similar names.
_________________
I don't want a good life. I want an interesting one.
Kinda off the rails of your C# discussion, I'm annoyed at Visual C++. I opened it up and I'm bombarded with menus, options, I had to find where to turn whitespace on and edit my tab settings on the Internet. I can't wait to get it working so I can go sit back in GNU/Linux with my terminal and simple text editor, I've gotten to the point where Windows makes me feel uncomfortable.
I took C++ years ago, what's different in C#?
C# doesn't have explicit pointers, having reference types instead. Also, there is no multiple inheritance, but it has these things called interfaces that are kind of like abstract classes, and you can make a class implement multiple interfaces. It is pretty similar to Java in both these respects. Other than that, C++ and C# have almost the exact same feature set (well actually C#'s has a lot of additional features, but you don't have to use them). If you know C++, C# can be learned in minutes.
Yes they do. Java at least (I don't know anything directly about c#). You can't even do "hello world" without a pointless wrapper class.
I'm sure they do a lot of that, but I don't think 'notorious' is quite the right word. If you're writing "hello world" or something else really small because you're trying to learn programming in general, OOP is just a pointless complication.
Actually, I'm having a hard time seeing the point of OOP for larger programs. Encapsulation is a good idea, but it isn't unique to OO. Nounifying everything doesn't really buy you anything. Inheritance just breaks encapsulation and makes pieces of your code interdependent. The 'is-a vs. has-a' distinction is complete hogwash as far as I can tell.
I rather like the duck-typing idea though, and the polymorphism thing might be useful.
_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton
I rather like the duck-typing idea though, and the polymorphism thing might be useful.
Abstraction and modular design. Anyway, I'm designing a game engine in C++. Sure, I could've done it in C, but it's better to write something like that in C++ due to classes.
Titangeek
Veteran
![User avatar](./download/file.php?avatar=38936.jpg)
Joined: 22 Aug 2010
Age: 31
Gender: Male
Posts: 7,696
Location: somewhere in the vicinity of betelgeuse
Yes they do. Java at least (I don't know anything directly about c#). You can't even do "hello world" without a pointless wrapper class.
You still have a static main, though. Sure, it has to belong to class, but in this context the class is nothing more then a name that gets pre-pended to the name of your function in compiled code. You don't have to declare a single non-static function.
I'm sure they do a lot of that, but I don't think 'notorious' is quite the right word. If you're writing "hello world" or something else really small because you're trying to learn programming in general, OOP is just a pointless complication.
Actually, I'm having a hard time seeing the point of OOP for larger programs. Encapsulation is a good idea, but it isn't unique to OO. Nounifying everything doesn't really buy you anything. Inheritance just breaks encapsulation and makes pieces of your code interdependent. The 'is-a vs. has-a' distinction is complete hogwash as far as I can tell.
I rather like the duck-typing idea though, and the polymorphism thing might be useful.
Have you ever wrote a large app? You don't really realize how useful OO design patterns are until you start using them.
Perhaps try Python. I've starting learning programming and it seems like a well put together language. I actually finished my first program today using it, it takes Imperial measurements (feet, inches, pounds, as well as Fahrenheit) and spits them out as metric and Celcius. I got tired of not understanding what people were saying so this should help with that.
I agree that it's a difficult thing to study, though I'm doing it alone using online tutorials, so far I haven't had too much trouble though. I don't know anything about C#, though I know some of the basics in C.
Pascal is prettier, but C (just plain old C) is more generally used. So I agree. If one has to start with a high level procedural language, C is the one.
ruveyn
Argh... but it's so difficult. I admit, I know almost nothing about programming, and my most complex project is the one which converts Imperial measurements to metric ones but C just seemed too hard to bother with as a first language. I had the compliler running and some basic programs which added numbers together and showed the results before I couldn't be bothered continuing. It didn't help I tried learning it late at night either...
Programming is difficult because you're telling a computer what to do. Nobody's forcing you to learn.