C++

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

GregR

Well-Known Member
Joined
Aug 6, 2008
Messages
1,118
Reaction score
8
Location
San Diego, CA
so I know(hope) I'm not the only one who is taking/has taken a class in C++. I've never been so frustrated in a class my entire life. I'm on my last assignment for the class and it has been nothing but a headache (this program as well as the entire class)

(bloodymary ramble)
originally I wasn't going to touch this program today (a single deck blackjack game that throws an exception based on cards left in the deck compared to how many players are on the table) but had one of those sparks that tells you, "THIS I EXACTLY WHAT YOU HAVE TO DO!" so I fired up xcode and went with what I thought was the right direction. needless to say it WAS NOT correct but I knew I was on the right track. anyway . . . after about 2.5 hours of errors and code that is syntactically correct yet does nothing close to what I wanted I finally got past a huge brick wall!
(/bloodymary ramble)

anyway, with any luck I'll complete and turn in the assignment tomorrow! after I got past the wall I decided to celebrate with some mixed drinks!

does anyone else have coding nightmares they wish to share?

EDIT: (dork) unfortunalty my professor hates the use of global variables and that is exactly what I felt I needed to use to get things going so I'll probably be penalized for it (/dork)
 
C++ is a bear because of all the hidden crap in constructors and weird semantics people (read: you) put into overloaded operators and stuff. It leads to piles of unmaintainable code nobody, not even the original author, can understand. It's almost as bad as Perl.

ok, it's not half as bad as Perl. But I digress.

All professional programming I have ever done has been in C or assembler. I would shoot myself if I had to do C++ for a living.
 
C++ is a bear because of all the hidden crap in constructors and weird semantics people (read: you) put into overloaded operators and stuff.

thats what I really do not like about the language. . . it's TOO fluid! "this operator/function/method doesn't do what you want?" rewrite it so it works for your program. sure the level of freedom is awesome but how the heck am I supposed to translate anything from program to program! and further more, what is syntactically correct for one program has NOTHING to do with another depending on how a program writes/overloads whatever they want!

unexpected identifier this and and now declared in this scope that!!!AHH!
 
Last year I took a programming for engineers... its supposed to teach us basic programming,but we first learned Fortran (useless) and then learned C (better than Fortran)

Thankfully we didnt need to learn C++...I dont think i could have taken that much more programming
 
As a programmer, I love using C# and actionscript/java for development at work. Sometimes I need to use C++, but I avoid it whenever I can.

The worst thing about coding for classes was not so much having to use C++ for more, but more the fact that it seems every class uses such primitive Developments Environments. Everything is 100 times easier to debug when you can just step through the damn code!
 
I will now offer a quote from "The C++ Programming Language" by Bjarne Strousdtrup.

"Not every piece of code can be well-structured, hardware-independent, easy-to-read, etc. C++ possesses features that are intended for manipulating hardware facilities in a direct and efficient way without regard for safety or ease of comprehension. It also possesses facilities for hiding such code behind elegant and safe interfaces."

Need I say more? :D
 
Last year I took a programming for engineers... its supposed to teach us basic programming,but we first learned Fortran (useless) and then learned C (better than Fortran)

I used to think Fortran was "useless". I program with it on nearly a daily basis :D. Judgment should be reserved on languages. The reason why people are often frustrated with a particular language is not necessarily because the language is inherently flawed, but rather because the language is stretched beyond it's original context of intent. This is often a product of bad management decisions where some guy says "Hey let's use that language because that's what everyone else is using now" not "Hmm, well maybe that language doesn't fit our needs".
 
PYTHON FTW!!!

We still use C++/C# to develop a few apps but my group uses primarily Python/IronPython now. It's great!!
 
As far as nightmares....hmmm...well slap Fortran, C++, code generated C from things like Simulink and Rhapsody into a big simulation (along with other languages). Yes, I live in the nightmare realm :D.
 
C++ was a great teaching tool for engineering because it shows the capabilities of programming very well. As far as engineering type applications, it has little applicability but it is great to have as a background. Also, I think MEs should have a class in Basic and Visual Basic.
 
C++ was a great teaching tool for engineering because it shows the capabilities of programming very well. As far as engineering type applications, it has little applicability but it is great to have as a background. Also, I think MEs should have a class in Basic and Visual Basic.

this is how i learned. I need to learn java bevause i think its more aplicable to brewing apps and gui's but c++ is perfect. If i need to i can always write my own constructors because i was neve much into using pre-written protocols. Everything i need to program had to be done from scratch.....as for basic....who didint learn it at some point in their lives?
 
at least it's not as line-noisey as perl is. I mean, any language that can produce this and have it run:

foreach (split q;\;;,qq.'s;q,s;q,q;3g;sg;'g;{i;{);
}{;sg;3g;7i;i';q,g;qq};qq);ii;i};qq{;q,q;q,,;3g;',;q,q;qqs;q,';.. ord q'
'){s;\);5;i;s;';8;i;s,q,1,g;s;s;4;g;s.,.0.g;s'{'6'g;s;g;2;g;s;i;9;g;s'}
'7'gx;print chr}

is crazy. Also, have any of you heard of the obfuscated C++ contest?
 
C++ was a great teaching tool for engineering because it shows the capabilities of programming very well. As far as engineering type applications, it has little applicability but it is great to have as a background. Also, I think MEs should have a class in Basic and Visual Basic.

We were forced to learn Software Engineering using Pascal because C encouraged too many bad habits. That was 15 years ago however!
 
I actually do a LOT of C++ coding for a living which I don't really mind because one of the other alternatives is Assembler (yuck) or PL1 (which I prefer).

Assembler really makes me want to pull my hair out...
 
foreach (split q;\;;,qq.'s;q,s;q,q;3g;sg;'g;{i;{);
}{;sg;3g;7i;i';q,g;qq};qq);ii;i};qq{;q,q;q,,;3g;',;q,q;qqs;q,';.. ord q'
'){s;\);5;i;s;';8;i;s,q,1,g;s;s;4;g;s.,.0.g;s'{'6'g;s;g;2;g;s;i;9;g;s'}
'7'gx;print chr}

I just threw up in my mouth a lil bit!
 
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. (Robert Firth)

C++ has its place in the history of programming languages. Just as Caligula has his place in the history of the Roman Empire. (Robert Firth)

Arguing that Java is better than C++ is like arguing that grasshoppers taste better than tree bark. (Thant Tessman)

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. (Bjarne Stroustrup)

If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? (Tom Cargill)

Within C++, there is a much smaller and cleaner language struggling to get out. (Bjarne Stroustrup)

I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. (Alan Kay)

There are only two things wrong with C++: The initial concept and the implementation. (Bertrand Meyer)

C++ is the only current language making COBOL look good. (Bertrand Meyer)

Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp. (Paul Graham)

Being really good at C++ is like being really good at using rocks to sharpen sticks. (Thant Tessman)

It has been discovered that C++ provides a remarkable facility for concealing the trival details of a program -- such as where its bugs are. (David Keppel)

Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. (Stan Kelly-Bootle)

COBOL was designed so that managers could read code.
BASIC was designed for people who are not programmers.
FORTRAN is for scientists.
ADA comes from a committee - a government committee no less.
PILOT is for teachers.
PASCAL is for students.
LOGO is for children.
APL is for Martians.
FORTH, LISP and PROLOG are specialty languages.
C, however, is for programmers.

Al Stevens
 
ouch..."Being really good at C++ is like being really good at using rocks to sharpen sticks. (Thant Tessman)"
 
at least it's not as line-noisey as perl is. I mean, any language that can produce this and have it run:

foreach (split q;\;;,qq.'s;q,s;q,q;3g;sg;'g;{i;{);
}{;sg;3g;7i;i';q,g;qq};qq);ii;i};qq{;q,q;q,,;3g;',;q,q;qqs;q,';.. ord q'
'){s;\);5;i;s;';8;i;s,q,1,g;s;s;4;g;s.,.0.g;s'{'6'g;s;g;2;g;s;i;9;g;s'}
'7'gx;print chr}

is crazy. Also, have any of you heard of the obfuscated C++ contest?

Ever read cryptonomicon? That looks like Qwghlmian from that book (hysterical nerd novel, love it, read it and enjoy)
 
I never had a problem with C++. My professor was absolutely awesome and made rational sense out of the language. I'd definitely take it again.
 
I actually do a LOT of C++ coding for a living which I don't really mind because one of the other alternatives is Assembler (yuck) or PL1 (which I prefer).

Assembler really makes me want to pull my hair out...

I love me some assembler :D
 
We had to do tic-tac-toe for our c++ final... couldnt get it to work.... 4 hours debugging about 1k lines. Keep in mind, I have no idea what the balls I'm doing. Turns out, there was 1 missing ")" that broke everything.

I'm now trying to stick to hardware.
 

Latest posts

Back
Top