Staredit Network > Forums > Technology & Computers > Topic: Programming Recommendations
Programming Recommendations
Dec 7 2009, 1:56 am
By: omginbd  

Dec 7 2009, 4:04 am omginbd Post #21



Quote from name:zany_001
Quote from omginbd
Quote from name:zany_001
C# is slower than c++, basically. It's nice for making games, especially for 360 compatibility.
Slower? How?
It runs slower. I forget why, google it. Also, scratch the bit about being good for games. It's easier to make games but the games are slower.
Oh okay.



None.

Dec 7 2009, 4:09 am scwizard Post #22



Quote from name:zany_001
C# is slower than c++, basically. It's nice for making games, especially for 360 compatibility.
C# plays with XNA nicely. XNA plays with xbox 360 nicely.

But you don't want to work on video game console applications imo.

Quote from omginbd
Yeah, I don't like WYSIWYG crap. Working on some java/swing now. I can just use eclipse right?
Yeah. Eclipse is a nice IDE and its what I use for my classes.

Quote from omginbd
Also, I have a friend that insists that C# is the optimal programming language. However, I have yet to see a single person recommend it. Whai?
Ignore fanboys.

C# uses a virtual machine like Java, and therefore:
1. Isn't an alternative to C++, as C++ compiles to machine code
2. Can not be optimal for all applications

I'm not going to take a side on whether C# is better or worse than Java, since I dislike the whole VM managed application paradigm so imo they're both bad.

Here's my impression though:
C# tried to pretend it was fast by mimicking C++ syntax. However it's slower than Java, because they're the same shit and Java has had more time and money poured into it.

EDIT: evidence of Java outperforming C# http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=java&lang2=csharp&box=1



None.

Dec 7 2009, 4:33 am ClansAreForGays Post #23



C# is the easiest, but I don't think you should learn C# as your first language like I did. Nothing has as good of an autocomplete (I assume you'll be using visual studio), so when you go from C# to C++ you're like "WTF?! I ACTUALLY HAVE TO TYPE MOST OF THE STUFF OUT! GAAAAAAAAAAAAAAAY!" and I heard from Cole that you don't grasp when garbage collection = good and when it = bad. (That's another crutch you're never going to get over if you switch from C#...)




Dec 7 2009, 4:42 am EzDay281 Post #24



Quote
I mean, once you get down to it, how much of the console base programming is actually used?
Depending on the person, a lot.
I frequently write tiny programs for performing single-time or very obscure, and either way otherwise extremely tedious and time consuming tasks for me, or for getting non-visual information from data.

Quote
Yeah. Eclipse is a nice IDE and its what I use for my classes.
Personally, I use Notepad++.
Not actually an IDE, and it won't compile for you (though if you know how to use its run command, you can setup a hotkey to compile just as easily and quickly as with any dedicated IDE), but that just means it's that much more flexible and general.

As for language...
C++ is always a good choice. From what I've read, I'm a bit weird, but I've always found C++ much more comfortable than Java.
Though, I'm still extremely novice to both...
If you really want graphics, y'can try looking'p SDL.

Quote
C# is the easiest
Though I've little to no personal experience with C#, I find it difficult to imagine anything getting much easier than Processing.
Though, I feel weird calling Processing a "language", given that it's...
I'm honestly not sure. But so far's I can tell, it's basically another level further from the hardware than Java, and working with graphics is... not so much trivial as what it does.



None.

Dec 7 2009, 4:44 am scwizard Post #25



C++ in visual studio has autocomplete O_o

Or so I thought, maybe C# has better autocomplete, I dunno.

Anyways it doesn't matter which language you pick as your first language. Pick anything and run with it. You'll be learning them all once you get serious anyways.

Pick whatever IDE you want an run with it, you'll be learning them all eventually anyways. Pick whatever GUI widget library you want and run with it, you'll be learning them all eventually anyways.

Easiest to learn language is probably python. Hardest to master language is probably C++. Hardest to learn language is probably Haskell. Easiest to master language is probably none of them. Easiest to learn non WYSIWYG GUI library is probably swing. Language that will probably require the most unlearning down the line is probably visual basic (so avoid it). Language that will probably require the least unlearning down the line is probably C. Fastest language is probably C/C++. Slowest language is apparently Ruby.

Now go and program.

Post has been edited 1 time(s), last time on Dec 7 2009, 4:50 am by scwizard.



None.

Dec 7 2009, 4:49 am The Starport Post #26



That appears to be the Mono implementation, though, which was just a way to get .NET shit onto Linux. Not a good comparison.


C++ seems to be the best decision, even if the language itself is somewhat of a mess.



None.

Dec 7 2009, 4:55 am scwizard Post #27



Quote from name:Tuxedo-Templar
That appears to be the Mono implementation, though, which was just a way to get .NET shit onto Linux. Not a good comparison.


C++ seems to be the best decision, even if the language itself is somewhat of a mess.
Java still seems to outperform C# on windows: http://dada.perl.it/shootout/craps.html
That page is a mess though, so it's hard to tell how much truth is behind those scores.



None.

Dec 7 2009, 5:02 am CecilSunkure Post #28



C# is a .net language, a scripting language. C sharp has some limitations -in that it takes care of some low level stuff for you. Sure, that can be a good thing if you just want to whip out some sort of map editor, or other tool, but C# isn't the best language to code extremely optimized code. Programmers need to be able to push the performance of hardware to such extremes, that C# is going to be inhibitive in complex 3D games. You can, however, code entire games from C#, if you want.

If you want to learn a coding language just for fun, learn in python. If you are aspiring to become a professional programmer, the best programmers are the ones that learn in C++. Now, it isn't exactly the language that is so valuable in learning in C++, it's the true understanding of how the hardware works. In C++, nothing is hidden from you, you can't really get closer to the machine. The best coders are usually the ones that learn in C++, and 90% of video games are coded in C++ anyways.

There are some "drawbacks" to C++, however. You have ultimate control over your code when you use C++, and this makes it a harder language to use. Scripting and .net languages are easier to use, because they are high end languages; you don't have to mess around with the low level data manipulation with them. I personally like Python a lot, but I know that learning C++ is going to be far more useful for me, than learning in any other language. So it isn't that C++ is a mess, or is disorganized, it's that C++ gives you control over everything when you code something, which means more work to do for the coder.

If you want to learn C++, you MUST start out in console applications. If you don't know how to do simple tasks, like cycling through an array with a for loop and displaying the elements to the user, then you can't do anything. You have to learn how to use the simple tools of the language in order to construct something; you can't jump straight into fancy gui's.

I recommend reading through this website, and doing all the examples, and recreating the examples without reference. Once you do that, go off and download a book or two on C++, and run through those. http://cplusplus.com

I also started a blog about programming. I started this blog with no programming experience (almost) whatsoever. Might wanna check it out and follow along? I post a lot of interesting links there too: http://cecilsunkure.blogspot.com

If you really want to become a programmer professionally, you are pretty much going to have to go for a CS degree, especially if you want to get into the games industry.

As for a C++ compiler, just use wxDev-C++ for now.

Post has been edited 1 time(s), last time on Dec 7 2009, 5:08 am by CecilSunkure.



None.

Dec 7 2009, 5:14 am scwizard Post #29



Whatever you do don't follow CecilSunkure's blog and code in his style :O

Also probably easier to learn C, then move on to C++. C is a subset of C++ and is easier to learn. Knowing it will help you segway into learning C++ easier.

Quote
I recommend reading through this website, and doing all the examples, and recreating the examples without reference. Once you do that, go off and download a book or two on C++, and run through those. http://cplusplus.com
I am going to represent freenode's ##C++ channel and recommend AGAINST that website. Learn from a book instead.

Quote
As for a C++ compiler, just use wxDev-C++ for now.
Use whatever IDE or text editor you want. wxDev-C++ isn't a compiler it's an IDE Z_Z. Visual studio is great, nothing wrong with it. I personally started out with ConTEXT (a text editor) and gcc.



None.

Dec 7 2009, 5:18 am CecilSunkure Post #30



Quote from scwizard
Whatever you do don't follow CecilSunkure's blog and code in his style :O

Also probably easier to learn C, then move on to C++. C is a subset of C++ and is easier to learn. Knowing it will help you segway into learning C++ easier.
Hey, I don't have a style. All I've learned so far was from cplusplus.com, and I've only spent about a week learning. Plus, you haven't even told me why yet my coding is so terrible :(

I explain myself in that blog as to why I do what I do. I go over a section on functions, so I do the examples and practice using functions. I go over a section on structures, I practice with the structures example and then make something simple on my own. I don't know coding etiquette or anything yet, or how to optimize anything :(

And yeah he's right, I've heard it's easier to start out in C and then move into C++.



None.

Dec 7 2009, 11:34 am ShadowFlare Post #31



C# is not a scripting language. It is a language that first gets compiled into a processor-independent code. When the exe is run, that code is compiled to be optimized for that machine's specific type of processor the first time each section of code is needed.



None.

Dec 7 2009, 3:59 pm scwizard Post #32



Quote from ShadowFlare
C# is not a scripting language. It is a language that first gets compiled into a processor-independent code. When the exe is run, that code is compiled to be optimized for that machine's specific type of processor the first time each section of code is needed.
Yes just like Java.

It sounds like it's faster than the C++ way of doing things, but it's really not. When you compile C++ code, it gets compiled into machine code that's optimized for that machine's specific type fo processor, which means that if you compile C++ code on your machine, it's automatically strictly better than C# code.

And even if the program is being run on a different machine than it was compiled on (which is suboptimal), the optimization you get from doing the compilation at runtime, doesn't offset the performance hit you take from doing compiliation at runtime. This especially applies to a context sesnative language like C#, which made the mistake of basing its syntax off of C++.

The other reason its slow, is because it's actually running on top of a virtual machine, so a lot of its instructuions are external calls to that machine. They play a lot of silly back and forth to, with the virtual machine changing the bytecode at runtime etc. This makes it kinda hard to optimize.

Basically, regardless of wheather I know what I'm talking about or not, salesmanship quotes like the one above, won't change the fact that C# is comparatively slow, always has been and always will be.



None.

Dec 7 2009, 5:23 pm CecilSunkure Post #33



Quote from ShadowFlare
C# is not a scripting language. It is a language that first gets compiled into a processor-independent code. When the exe is run, that code is compiled to be optimized for that machine's specific type of processor the first time each section of code is needed.
Sorry, my mistake. The reference I was reading said it was good to use as a scripting language.



None.

Dec 7 2009, 8:02 pm ClansAreForGays Post #34



Quote
C++ in visual studio has autocomplete O_o
You have no idea what autocomplete is until you use C#. It practically does the programming for you. I threw up in my mouth a little bit the first time I saw MSVS C++ autocomplete, so weak.




Dec 7 2009, 10:21 pm ShadowFlare Post #35



Quote from scwizard
It sounds like it's faster than the C++ way of doing things, but it's really not. When you compile C++ code, it gets compiled into machine code that's optimized for that machine's specific type fo processor, which means that if you compile C++ code on your machine, it's automatically strictly better than C# code.
C++ compilers often can optimize for a specific processor, but they definitely do not do it by default. The defaults assume you want to distribute the program, and thus its default optimization is based on what will work best overall between different processors.

Quote
The other reason its slow, is because it's actually running on top of a virtual machine, so a lot of its instructuions are external calls to that machine. They play a lot of silly back and forth to, with the virtual machine changing the bytecode at runtime etc. This makes it kinda hard to optimize.
Much of the difference in performance is probably from that C# is running on a higher level API. If it directly interfaced with the OS, just like C/C++, then it might be more equivalent. Tests that do not call any part of the API while running are the kind people use when they say C/C++ and C# performance are about the same. Other than the API, there's also the fact that it must take time to compile the code at run-time at least once (though the result of compiling is sometimes cached so it doesn't need to be done again).

Quote
Basically, regardless of wheather I know what I'm talking about or not, salesmanship quotes like the one above, won't change the fact that C# is comparatively slow, always has been and always will be.
I was just responding to the comment about it being a scripting language and explaining what it really is. That was not a reply to any other part of this thread.


Anyway, C# and the .NET languages overall aren't meant to be faster than C/C++. Their purpose is to support multiple platforms without having to compile a new exe or dll for each platform. I am not specifically talking about non-Microsoft operating systems. This is probably more intended for supporting multiple processor architectures without having to compile a new program for each one. For example, a program compiled for the .NET Framework can run in either 32-bit or 64-bit mode on the 64-bit version of Windows.

Anyway, yes, just like Java.



None.

Dec 8 2009, 1:07 am scwizard Post #36



Quote from ClansAreForGays
Quote
C++ in visual studio has autocomplete O_o
You have no idea what autocomplete is until you use C#. It practically does the programming for you.
I must try this at some point :O



None.

Dec 8 2009, 4:01 am Doodle77 Post #37



Quote from scwizard
Quote from ClansAreForGays
Quote
C++ in visual studio has autocomplete O_o
You have no idea what autocomplete is until you use C#. It practically does the programming for you.
I must try this at some point :O
Intellisense is very useful if you're using a library for the first time. After that it's only mildly useful.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:26 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:25 am]
ridicaw408 -- Sports and Fitness Equipment manufacturer https://www.riogrand.in/
[11:24 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[11:24 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[11:23 am]
ridicaw408 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
Please log in to shout.


Members Online: 3taylore523wg2, 2avac8691gr3