Programming D: (c#)

Everything todo with programming goes HERE.
XzL.Smart
Round Winner
Posts: 216
Joined: Sun Apr 30, 2006 4:21 am
Location: Arizona

Post by XzL.Smart »

I don't know where your looking, but there are a lot of good c++ programing in the barnes and noble where I live.
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Post by Ratchet »

First off, I live in the country... No libraries. I will (TRY) and take your advice monkey. I am also getting linux as we speak :X

C# is out the boat i suppose :x
pavelo
Average Program
Posts: 70
Joined: Sun Apr 23, 2006 4:05 pm

Post by pavelo »

<nitpick_mode>
Monkey wrote:C++ is really an expansion on C. C++ compilers will also compile C.
_some_ c++ compilers will compile _some_ c code
Monkey wrote:C is simple but totally as powerful as C++.
brainfuck is simple and totally as powerful as c++, but noone programs in it seriously
</nitpick_mode>

imho, C (or C++ for that matter) is not the bestest of languages to learn programming in... it has a lot of quirks and a complicated syntax..
if you never programmed before, you could try something pascal-based, or java if you think pascal is too old (C# should be a relatively clean language too, but i have never used it so i can't really say)
yes, and learning linux definitely helps, but that's an adventure on its own
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

As a language, C# is great. It's like C++ with all the quirky bits removed. Java is halfway between the two :) The downside is that C# tied to .net, so it's difficult to get any graphical stuff done with it on non-MS systems. Interfaces to things like SDL and OpenGL exist, but they are very thin and confront you with all the quirky bits C# is supposed to hide from you, like pointers and memory management.

Also, the Armagetronad Visual Studio projects are outdated. Don't use them. Use the Code::Blocks stuff, and if you encounter errors, post them. Since we're all Unix guys, we're not in a hurry to adapt them to the latest source code changes either, so they're bound to break between releases.
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Post by Ratchet »

I am trying to get Ubuntu to work, Which it has worked, but the internet is proving to be a pain. My dad is good with electronics and he has tried for quite a while trying to figure out exactly how to set it up.. but it's not working. Hopefully he gets it soon... or i get help.. -.-
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Post by Monkey »

pavelo wrote:
Monkey wrote:C is simple but totally as powerful as C++
brainfuck is simple and totally as powerful as c++, but noone programs in it seriously
I hope that you aren't saying that no one programs in C seriously. I also hope that you don't think that C++ is "definitely better" than C.
Z-Man wrote:C# is great. It's like C++ with all the quirky bits removed.
Z-Man wrote:quirky bits C# is supposed to hide from you, like pointers and memory management.
Is it a good thing, to be hidden from what is actually going on? Personally, I think that it is essential to understand what is going on and to be in full control. I don't like automatic typecasting and I think that understanding pointers/memory management/etc is important.
IMO if you want to use a language that hides things from you, just to learn some basics of programming, then fine but don't use it for projects.
Playing since December 2006
User avatar
ivantis
Round Winner
Posts: 269
Joined: Mon Mar 03, 2008 2:33 pm
Contact:

Post by ivantis »

you really should learn a smaller language first, like python, php, perl, something like that.
i started with perl, then php, javascript, and then my terrible attempt at C++ (yeah you IRC guys know that well :lol: )
Image
Image
Image
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Monkey wrote:
Z-Man wrote:quirky bits C# is supposed to hide from you, like pointers and memory management.
Is it a good thing, to be hidden from what is actually going on? Personally, I think that it is essential to understand what is going on and to be in full control.
Well, all you need to understand really, from an abstract level, is the difference between objects, references and values. They translate to objects, pointers and values in low level languages, hardly a difference. But what I was more getting at with C++ quirks is this:
- object slicing
- virtual vs. nonvirtual functions
- accidentally not overriding a virtual function
- non-checked containers being the default
- semantics of iterator invalidation for STL containers
- name lookup rules
- the troubles of multiple inheritance
- lifetime of automatic objects
and more. All of that is specific to C++; pure C doesn't have these quirks.

Of course, to really know programming, you need to learn at least one language from each of the three main flavors:
1. Bare bone, low level. There, for learning purposes Pascal > C because it has a generally more readable syntax, but C still wins because nowadays, you have better tools for it.
2. Duck typed scripting languages. Python wins for learnability there over all alternatives.
3. High level object oriented languages. From a design viewpoint, C# > java > C++, and the same goes for ease of learning.
Of course, C++ also is in camp 1 (and one can argue about whether it even belongs in bucket 3), so it's a double win to know it; but really, the performance gain of C++ over C# or java is not all that big.

And no, I don't forget about functional languages (lisp, haskell). Serious geeks should know one of those, too, if only to customize emacs. But they're not for the average guy just wanting to get things done.
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Post by Monkey »

Here is a copy of a post I made on CT forums about Java:

My current opinion of Java is (and I'm with Kyle on this one) that Java does seem to suck.
Why?

1) Compulsory Virtual machine - If you want to write hardware specific code then you should be able to! C++ allows you to do either cross-platform, or hardware specific ...it lets you choose.
2) Virtual machine for small programs - Hello world program takes 20meg or something stupid. C++ can do small programs in much less memory.
3) Multithreaded Java is renowned to have bad performance. I have first hand evidence of this from a programmer I spoke to that had C and Java versions of the same program that his company used. There was a *huge* performance difference.
4) Java does not have multiple inheritance. C++ lets you use multiple inheritance. Surely good object-oriented code should have the most 'correct' representation of objects.

...etc

I'm no expert on Java or C++ but that is my current opinion.
Z-Man wrote:Serious geeks should know one of those, too, if only to customize emacs.
emacs...yeah...because serious geeks would be using emacs...they wouldn't be using vim...no...they would be using emacs...that's right...emacs...
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Screwdrivers suck! Reasons:
1. They don't have enough power. If a screw is stuck, you can't apply enough torque to get it loose.
2. They're really bad at drilling holes. I mean, it's possible, but it takes AGES.
3. They're completely useless for nuts and bolts. Come on, that's seriously weak.
4. The path to the screw needs to be free. If there's an obstruction in front of the screw, tough luck.

Duh. Obviously, you need to choose different tools for different jobs. If you need absolutely top performance, a tiny memory footprint or access to inline assember/hardware stuff, then you won't have much luck with pure Java, C# or Python. If you want easy distribution without compilation for different platforms, you won't have much luck with C/C++. If you want small executables, you won't have much luck with C++.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

"Choosing the right tool for the right job."

That's why there's so much damn choice. :/
Image
Monkey
Match Winner
Posts: 759
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Post by Monkey »

Z-Man wrote:Duh. Obviously, you need to choose different tools for different jobs.
Tank Program wrote:That's why there's so much damn choice.
Sounds like Tank agrees with me that there is too much choice?
I can program in prolog but I'll be damned if I can find a use for it. I struggle to believe we need so many languages to choose from. More standards and less languages please. I have a real issue with Java. IMO, with enough standards for the use of C++, Java could be made obsolete...call me mad if you like.

People are also using languages that are 'easier' in situations where their chosen language is not the ideal choice. That is not a good thing.
Playing since December 2006
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

I have nothing against Java. I had quite a lot of fun learning it at the time, even if I don't remember much of it now.

Also, using the wrong language for the job can be exceedingly fun. There are all sorts of extra challenges you face, generally the sorts of problems I enjoy.
Image
Post Reply