Board 8 > Anyone familiar with C++?

Topic List
Page List: 1
Enohp
08/17/11 9:26:00 PM
#1:


I've been watching these C++ for dummies type videos on YouTube and it looks really interesting and I've always wanted to learn some kind of programming language.

I just wanted to see what kind of opinions are floating around on here about it?

A waste of time to learn?
A necessity?

--
http://img.imgcake.com/enohpgif2gifje.gif
... Copied to Clipboard!
_Regaro_
08/17/11 9:28:00 PM
#2:


C++ was the first one I've learned, and iirc one of the more commonly used ones. Worth learning, yeah.

--
http://img.imgcake.com/RegaroUlquiorrapngse.png
3DS: 3609-1203-5974
... Copied to Clipboard!
Ayuyu
08/17/11 9:29:00 PM
#3:


I can't code at all but I still know that C++ is really useful, definitely not a waste.

--
Best LPer ever, Gix ! : http://www.youtube.com/watch?v=Vt5YKmP7ecY
... Copied to Clipboard!
SuperAngelo128
08/17/11 9:29:00 PM
#4:


I know it yes

--
Want to listen to more video game music every day?
Check out the VGMusicoftheDay Youtube Channel sometime!
... Copied to Clipboard!
Demon HunterX
08/17/11 9:30:00 PM
#5:


best programming languages to learn (in no order)

JavaScript
C++
SAS
Visual Basic/VB.Net (yep it is, sorry guys)
PHP

--
Currently playing: SC2, Civ 5
Next up: eh ; Awaiting: meh
... Copied to Clipboard!
Heroic_CactObo
08/17/11 9:30:00 PM
#6:


it's pretty much one of the most important languages to date, imo

I have a Comp Sci degree and it's the first high-level language I learned and it's easily my favorite and most useful for most applications
... Copied to Clipboard!
Sceptilesolarbeam
08/17/11 9:30:00 PM
#7:


C++ is really the standard, so if you want to learn a programming language, that's a good one.

--
"As the size of an explosion increases, the number of social situations it is incapable of solving approaches zero." -Vaarsuvius, Order of the Stick
... Copied to Clipboard!
Enohp
08/17/11 9:33:00 PM
#8:


Now, I don't want to sit for hours and research, but what is the basic difference between regular C, C#, and C++. Is there even a regular C+? It's a bit on the confusing side and looking it up doesn't really help me when I know nothing.

--
http://img.imgcake.com/enohpgif2gifje.gif
... Copied to Clipboard!
SuperAngelo128
08/17/11 9:35:00 PM
#9:


C is a bit harder/more complicated to learn but in terms of learning how programming language actually works it can be helpful

--
Want to listen to more video game music every day?
Check out the VGMusicoftheDay Youtube Channel sometime!
... Copied to Clipboard!
neonreaper888
08/17/11 9:37:00 PM
#10:


If you really don't know what you are doing, I would just start with Java.

--
"would a sausage by any other name smell as sweet?"
... Copied to Clipboard!
Colegreen_c12
08/17/11 9:37:00 PM
#11:


C++ is object oriented I believe
... Copied to Clipboard!
Colegreen_c12
08/17/11 9:38:00 PM
#12:


and I never have heard of C# tbh but I dont believe there is C+.

C++ is best though because it will make java easier.
... Copied to Clipboard!
TheOceIot
08/17/11 9:39:00 PM
#13:


external image

--
Currently playing: Lost Odyssey
... Copied to Clipboard!
Enohp
08/17/11 9:42:00 PM
#14:


Why start with Java?

--
http://img.imgcake.com/enohpgif2gifje.gif
... Copied to Clipboard!
Sceptilesolarbeam
08/17/11 9:52:00 PM
#15:


Starting with Java is easy modo.

--
"As the size of an explosion increases, the number of social situations it is incapable of solving approaches zero." -Vaarsuvius, Order of the Stick
... Copied to Clipboard!
dexter28
08/17/11 9:55:00 PM
#16:


Java is easier to learn because it handles a lot of things through magic that C++ makes you take care of yourself. However if you decide you want to continue programming past learning one language, trying to learn C++ after getting used to Java doing some of the complicated bits for you is much more difficult than if you had started with C++ and decided to pick up Java afterwards.

As for whether or not programming is worth picking up, I think so. But as a CS major I'm biased.

--
"There's no bliss in shifting blocks around until they line up? Guess you've never played TETRIS. From Russia with FUN, mother ****er" - AbsoluteZero
... Copied to Clipboard!
Enohp
08/17/11 10:04:00 PM
#17:


I mean, from what I have watched/learned about C++ it seems okay. Obviously nothing is really easy about learning something completely new. I would rather start with this and then work around that until I grasp this completely.

--
http://img.imgcake.com/enohpgif2gifje.gif
... Copied to Clipboard!
Dauntless Hunter
08/17/11 10:13:00 PM
#18:


C# is Microsoft's C++/Java variant. I don't know if it ever really took off that well, but I do know it's what you write games in for XNA.

One language I hear a lot about these days is Python. Seems like that's on the rise. Also Ruby on Rails, but not as much. And of course PHP is huge.

For my money, I'd do everything in Perl if I could.

But a lot of what makes a "good" language to learn depends on what kind of development you want to do.

--
Black Turtle spilled my diet soda!
... Copied to Clipboard!
smitelf
08/17/11 10:14:00 PM
#19:


In terms of abstraction and therefore ease of learning, Java > C++ >>> C. But go ahead with C++ if you find it interesting, because that's what will keep you going.

--
Official Queen ***** of the Universe!
... Copied to Clipboard!
Heroic_CactObo
08/17/11 10:16:00 PM
#20:


C is the predecessor to C++, therefore the syntax is almost exactly the same, but there are some key differences.

C is closer to machine level in that a lot of the stuff that C++ handles in the background, C would have to do manually. Stuff like memory allocation, memory REallocation, string manipulation, and a lot of shorthand stuff like operator overloading. C++ also has object orientation, which makes your life a whole lot easier if you plan on making some more complicated stuff. Other than that, they're pretty similar. C has some advantages like being a good teacher of the basics, and it's also a little bit more efficient so it still has its place in the software development realm.

C# is the bastard child of C++ and .NET and really shouldn't be in the same category. It only behaves correctly in MS Windows (ie you don't need to have a hacky version of a .NET compiler to even run it) because it was developed and built specifically for MS Windows. Don't worry about it first, C++ is a much better language overall.

Java is very similar to C++ in syntax and principles, but it's a little bit more hardcore object orientation, in that even down to primitive data types you're going to be dealing with instantiated objects of classes where in C/C++ it's closer to "this piece of memory." Without getting too technical, I'll try to explain the difference of how Java programs are run vs how C++ programs are run.

C++ you write your code, it runs through a compiler and what you get out is an executable. It can be run directly by the processor because it is a specific set of CPU instructions that must be carried out in a specific order. Very efficient, but also easy to run into problems if you have poor coding skills.

Java you write code that runs through a compiler that spits out .class files, which aren't exactly CPU executables, and they're more of a re-coded version of what you wrote. The only way to run these .class files is to download the Java Runtime Environment. The JRE is basically a virtual machine that starts up when you want to run .class files and takes special care of it while it's running and has to translate it one more time before it gets to the CPU. This has the advantage of being able to take care of things in the background for the programmer like memory management, but has the disadvantage of being less efficient because it has to pass through an extra abstraction layer.

As a side note, the Android OS for smartphones is basically a huge Java library sitting on the Dalvik Java Virtual Machine (not the one Sun Microsystems hands out with copies of Java) on top of a linux kernel. Yes, Android is linux.
... Copied to Clipboard!
neonreaper888
08/17/11 10:19:00 PM
#21:


Why Java, because it's not difficult and it's useful. It's easy to create enjoyable little applets to learn the premise of object oriented programming while still learning some basic programming things like operators and statements and loops and data structures. I haven't compiled Java in a while but I remember it being a little more strict about what it lets you compile, compared to C++ and especially C.

And if you becom a competent Java programmer, it really is NOT hard to learn other languages. hey in C, you have to handle memory allocation and deallocation. you can write to low level graphics memory. if you're talking from one platform to another, you'll have to handle stuff the Java Virtual Machine did for you. it's not hard, it's just more stuff to learn and be good at.

--
"would a sausage by any other name smell as sweet?"
... Copied to Clipboard!
TheGeonaut
08/17/11 10:20:00 PM
#22:


What about Python? I'm going to need to learn it for my GIS work.
... Copied to Clipboard!
Dauntless Hunter
08/17/11 10:23:00 PM
#23:


Oh man regular C. I remember using that a lot in college. In our last semester, my buddy and I were in two classes together, Networking (taught in C) and Computer Vision (taught in Java). We decided to split up the work. I did Networking, he did Computer Vision, and then we shared code. I don't know who got the worse deal. C was pretty brutal, I remember being up all night working on a project that kept failing because the memory allocation function I was using wasn't clearing the bytes like the documentation said it would. But those vision algorithms were something else, man. I never fully understood them. Heck, I never even SORTA understood them.

--
Black Turtle spilled my diet soda!
... Copied to Clipboard!
Heroic_CactObo
08/17/11 10:23:00 PM
#24:


From: Dauntless Hunter | #018
C# is Microsoft's C++/Java variant. I don't know if it ever really took off that well, but I do know it's what you write games in for XNA.

One language I hear a lot about these days is Python. Seems like that's on the rise. Also Ruby on Rails, but not as much. And of course PHP is huge.

For my money, I'd do everything in Perl if I could.

But a lot of what makes a "good" language to learn depends on what kind of development you want to do.



Java/C/C++ are meant for applications and Perl/Python/PHP are in a special class of programming languages called 'scripting languages' which are executed in a completely different way. They also have a wide variety of purposes that spans over something that C/C++ should never really get into and vice versa. Every job requires a different tool, as they say.
... Copied to Clipboard!
LordoftheMorons
08/17/11 10:37:00 PM
#25:


Java is probably a little easier to learn; you don't have to worry about stuff like pointers which may be confusing to a beginner. C++ is a really useful language though. C has some annoying things like memory allocation and (imo) pretty ****ty input/output syntax, which you don't have to worry about in C++. So I'd suggest starting with Java, and once you're comfortable with it moving to C++/C.

--
http://img255.imageshack.us/img255/2636/ivotedphoenixyi0.png
... Copied to Clipboard!
_Regaro_
08/18/11 6:40:00 AM
#26:


From: LordoftheMorons | #025
pretty ****ty input/output syntax


I hated it at first

But after a few weeks I got pretty good at it and I loved it.


cout<< will always be the best though

--
http://img.imgcake.com/RegaroUlquiorrapngse.png
3DS: 3609-1203-5974
... Copied to Clipboard!
Bokonon_Lives
08/18/11 7:40:00 AM
#27:


As a kid I messed around with ZZT (a cult game with a now-dead community that had a VERY rudimentary scripting language called ZZT-OOP) and Qbasic. I learned HTML.

My first foray into "real programming" was Java, and it went very well. It's an excellent introductory language. It led to me pursuing a computer science degree, where they started us off on C++ and later C. In my internship, we used C#, and my first job out of college (which I've been at for 1.5+ years) is C# as well.

C# is the predominant current language of web applications development. Compatibility issues aren't a concern here because it just runs on the server. You can use it to write any other kind of application too, and as was mentioned, XNA is a toolset developed for C# that lets you write games. I find C# very intuitive. It is Microsoft's answer to Java.

In short, objectively I'd recommend starting with either C# or Java, and of the two I'm personally biased towards C# because it's been so very, very good to me.

--
bokonon get your sense-making the **** out of this topic now - Cat1001
Brawl FC: 1461-9803-2942 /// X-Box Live Gamertag: AGGGH
... Copied to Clipboard!
SpeedYoshi
08/18/11 7:43:00 AM
#28:


Start with Java, it's the easiest

C# uses the same syntax so that's ok too.

C is if you want to work closer to the machine

C++ is just bad object oriented, there are better options (Java, C#, Python)

--
Don't worry guys, I have all the clubs
... Copied to Clipboard!
Bokonon_Lives
08/18/11 7:46:00 AM
#29:


Fun Trivia!

No, there is not a C+. "C++" is just a cute name they decided on based on the fact that in all of the "C" languages (including regular C), the string "++" is shorthand for "add one". So for example:

int MyNumber = 5;
(^^ This means, "Here's an integer, we're going to refer to it as "MyNumber", and it's 5.)

MyNumber++;
(^^ This is equivalent to "MyNumber = MyNumber + 1;" i.e., "add one". "MyNumber" is now equal to 6.)

--
bokonon get your sense-making the **** out of this topic now - Cat1001
Brawl FC: 1461-9803-2942 /// X-Box Live Gamertag: AGGGH
... Copied to Clipboard!
SpeedYoshi
08/18/11 7:48:00 AM
#30:


yeah, its a computer science joke haha
c incremented

--
Don't worry guys, I have all the clubs
... Copied to Clipboard!
SpeedYoshi
08/18/11 7:51:00 AM
#31:


also, C got its name because it was the replacement for B

--
Don't worry guys, I have all the clubs
... Copied to Clipboard!
Heroic_CactObo
08/18/11 9:39:00 AM
#32:


From: Bokonon_Lives | #027
C# is the predominant current language of web applications development. Compatibility issues aren't a concern here because it just runs on the server. You can use it to write any other kind of application too, and as was mentioned, XNA is a toolset developed for C# that lets you write games. I find C# very intuitive. It is Microsoft's answer to Java.



After having worked for a company that uses C#/ASP to make websites, I can safely say that that job was the worst coding experience of my life. I found C# to be extremely dumb and pretty much made life hell. In literally every feature implementation these were the steps I went through.

5 mins writing the code that makes most sense to use in any given situation
Literally 2 hours (more if it had to do with a MS DB) getting the stupid thing to stop not working
Spend 5 minutes daydreaming about how long it would take to scrap the entire site and rewrite it in PHP and realize that it would actually take less time than just doing it in C#
Curse for several hours because now it only works in IE and chrome/FF are all ****ed up

I know the arguments for it are "it does everything for you" but there is absolutely nothing that would convince me that the hacky techniques required to get crappy <Asp:XXX> tags to work is better than just writing a script that just does what you want.

But I mean if you understand it then I'm happy for you. I just can't stand it at all.

And whoever said C++ is bad OOP is dead wrong.
... Copied to Clipboard!
Forceful_Dragon
08/18/11 9:50:00 AM
#33:


Learn C++ pretty well, then learn Java.

you might not do a lot with C++ necessarily, but it's one of those things that you will just appreciate having taken the time to learn.

--
Eff_Dee
http://img.imgcake.com/nio/9fdpngys.png
... Copied to Clipboard!
Bokonon_Lives
08/18/11 10:34:00 AM
#34:


Hmm.. I did some googling out of curiosity, and there are a lot of people trying to switch from one to the other who think the one they're switching into looks hard and impossible to parse through... I think the deal is they're just too different from each other. The few people who are actually proficient in both PHP and .NET basically say it comes down to personal preference.

I think what you encountered is more of a .NET problem (or a this-company-has-crappy-legacy-code-and-coding-standards problem) than a problem with the C# language itself. To me, for example, the code works exactly how I intuit it should, and database access from .NET/C# is easy, and I've done it with a handful of different interfaces and been able to become fluent in each of them (stored procedures, NHibernate, LINQ-to-SQL, Raven/NoSQL)

.NET development has changed a lot, too. If you were coding ASP.OLD / Web Sites / Web Forms, rather than MVC (which is now up to MVC 3), you probably either A) had to do inline C# coding in the same file as your ASPX/HTML, or B) dealt with a lot of crappy event handlers which had to be written in the code-behind, of the form "protected void MyButton_OnProcessClick(object sender, EventArgs[] e)" or whatever. That stuff is the devil.

MVC is more intuitive and has more separation between the C# code and the ASPX files. If you're handling a client-side click event, you can do it in JavaScript or whatever. The C# is just there to handle gets and posts to URLs (and you can even manage the routing). You have the option for a lot of fine control in MVC.

I'm not too familiar with PHP or what it's capable of or the maintenance costs of it, but with the right coding practices, well-written C# code can look pretty close to straight-up English, and one of the big perks is that it's easy to write regression tests for the code. (And since MVC completely separates the C# from the webpages themselves, you can even write automated tests for your web projects that don't have to spin up a browser).

You've got me curious about PHP, I'd like to be more knowledgeable about it so I can actually weigh the differences, but I guess I don't have much reason to since I won't be using it at work... ah well...

--
bokonon get your sense-making the **** out of this topic now - Cat1001
Brawl FC: 1461-9803-2942 /// X-Box Live Gamertag: AGGGH
... Copied to Clipboard!
metroid composite
08/18/11 10:51:00 AM
#35:


C++ is the standard almost everywhere; almost every videogame is written in C++ these days (unless it is written in C).

C is actually kind-of annoying; like needing to declare all your variables at the top of a function. If not for that, it's basically C++

I honestly don't recommend Java or php. They are outmoded--they're clunky and cumbersome to write, not especially easy to read, and not especially fast. Seriously, don't bother with Java.

JavaScript is still relevant, though, because of AJAX.

Python is the language that wins at "fast to write, easy to read". It has the GIL, though, so if you're actually planning to do multithreaded then it's not for you. (Hint: you're probably not; use Python if you want a newbie language). Ruby (and especially Ruby on Rails) is pretty hot right now because it can do multithreading and is about as nice as Python. It's a little clunkier to write than Python, looks like, but not a lot.

SQL and variants are worth knowing. If you're just programming for fun, though, avoid them; nobody actually likes writing sequel querries.

C# is good if you want to tie into little Windows utilities because the API is there and just works quickly, and you even get nice visual editors with Visual Studio. If your goal is anything other than making a windows dialog box, though, then there's no particular reason to use it.

--
Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision
... Copied to Clipboard!
Bokonon_Lives
08/18/11 11:16:00 AM
#36:


i like SQL >_>

--
bokonon get your sense-making the **** out of this topic now - Cat1001
Brawl FC: 1461-9803-2942 /// X-Box Live Gamertag: AGGGH
... Copied to Clipboard!
SpeedYoshi
08/18/11 1:23:00 PM
#37:


me too

--
Don't worry guys, I have all the clubs
... Copied to Clipboard!
Heroic_CactObo
08/18/11 7:15:00 PM
#38:


HOLY **** YES @ the event handling sucking massive balls. How can it be so hard to find out what the index of the row the user clicked on is? Really? Really? You think that'd have its own function or something, seeing as that's THE FREAKING POINT OF A GRIDVIEW. Never heard of MVC.

Practically speaking, C#/ASP still seems to be shooting itself in the foot. First of all, when you 'build' a project it's not actually making any executable code at all. No, it's making some weird in-between code in MASSIVE .designer files that are incredibly temperamental and seem to be ridiculously useless on the whole. It seems to be incapable of functioning without ridiculous amounts of back-generated code just to recognize its own variables that only C# finds to be relevant. Why not just make it more robust and have it understand the uses of those variables/class definitions in the compiler? Then when you actually compile/run the code in a browser you realize that it's basically just a crapton of slow-ass javascript functions. So why didn't I just write this in javascript and actually optimize it? I understand it's actually just talking to the server with ajax, but you have to admit it's pretty dumb slow.

As a PHP user, I think in terms of "I need to make a database query" so I make a "mysql_connect()" call and set it to a global var that gets included on every page. In C# you have to have the <asp:DataSource> tag with a ton of garbage in it or have the code-behind make an instantiation on Page_Load which only adds to the complexity and non-readability. What if I want to alter the SQL query? "lololol" All just so you can make tons of inbetween-code. That still doesn't even include all of the right-clicking through context menus to make sure that Visual Studio gets a chance recognize and rename a table that I've added to the DBML from a database it's already connected to. WTF how is that software development? Feels more like monkey work.

MVC may be different but whatever the **** I was doing was just wrong on so many levels. I can't go into details, but this is generally what the situation was at the company I was working for.

Every once in a while we would get a PHP project because me and my buddy were the only 2 people in the entire company that knew PHP and they knew we were good and could work well together. The vast quantities or other projects were C#/ASP.

Very first thing I get assigned when I started working was a PHP project that literally no one else in the company could do, I did it in 1 month completely and utterly alone. The company got its money.

I jump around from C# projects to one another, all of which had been around for literally months with tons of workers on them. Another PHP project rolls through, my buddy and I finish it in 1 month and the company gets paid. Meanwhile, the tons of C# projects were all completely stuck in the mud and were largely unchanged by the time we went back to working on them. No ETAs on completion, just slinking along. It was just impossible to make any progress.

This is probably an isolated case, but that's my experience with the two languages. I'm definitely biased towards PHP because I happen to hate MS, but I really had a hard time understanding any design choices they made in the way C# worked as a web development language. Outside of web apps, I have no idea. It really just made life hell. I wasn't purposely hating on C# either, my manager was always on my ass about deadlines and crap so I really really had to put in the effort to get good with it, it was just so unintuitive to me that I've been led to my current opinion.

Again, if you understand it and are very good with it then by all means continue your badassery. I just personally hate it. Don't let my opinions make you enjoy it any less.
... Copied to Clipboard!
Pianist
08/18/11 7:21:00 PM
#39:


do some playing around in C, then C++, then python

f*** java

--
I'm always serious. Otherwise, no one will take me seriously.
... Copied to Clipboard!
Topic List
Page List: 1