  usa2k Please PRAY for Rebekah Premium,MVM join:2003-01-26 Canton, MI clubs:
·VOIPo
·WOW Internet and C..
·Broadvox Direct
| [Chat] C++, Thinking out loud ...
I got side-tracked lately with some old books of mine on C++.
I started reading the early edition of "Thinking in C++" and was feeling overloaded by the end of chapter 2. (Chapter 0 is the 1st chapter)
I switched to another book I had - "Learn C++ in 24 Hours". It was crafted with 24 chapters, and I loved it this time around. I managed to progress to chapter 20 before feeling a heavy weight of the subject.
I also had "Introduction to C++" but quickly decided I did not like the format of the book, and its cutie subject headings. I cannot fathom what possessed me to purchase that book?
Today I paid a visit to the local book store and noticed a few things. Many of the C++ books for sale were written between 1999, and 2005 (More older than newer). Based on that, the books I have are not likely to be too out-of-date!
I think I will take another run at "Thinking in C++" from the 1st chapter (Chapter 0) again. An immersion approach sometimes help me hammer the information into my brain.
One thing I wonder is if C++ is on the decline? I did not get a sense that there are new killer libraries to wow the programming industry. I had thought that the LINUX camp would still be evolving C++. It looks like the Standard Template Library(STL) is the defacto library to learn.
If I am getting the right sense of the programming world, C# has maybe overtaken C++ in the Microsoft camp? The .Net world framework tries to keep MS unique, or maybe even makes it cutting edge?
I've been conditioned by those I've known, that MS is the evil empire - so why buy into their system and feed it further? Stay open source, cross platform in my personal education. Seek good programming tools that will promote a level playing field.
Anyway, those are a few scattered thoughts. If anybody wants to correct my perspective, agree/disagree, please do so! If C++ is becoming a dead horse, why? Is C# the end-all-be-all? If so, does that mean Microsoft wins?
In any case, thank you for listening to my ramblings here. --
Jim, VoIP 12/2002, VOIPo 2/2007 FAH-Tool ... Pets ... USA2K site ... Artist-247 |
|
  PetePuma How many lumps do you want Premium,MVM join:2002-06-13 Arlington, VA
| I'd say C# is now the de-facto for most MS development. It's frankly nicer, easier, and has a lot of additional library support (via .NET) that would just be trickier in C++. And it has the added advantage of also being a viable web development language.
You're ignoring Java as the other viable alternative. It has many of the same advantages (and disadvantages) of C#.
C and C++ will be around a long while, but they are becoming a bit more specialized for applications where performance or footprint is tantamount. We do a lot of Windows development (and some Linux development) at my job, and over the last 3-4 years we've gone from mostly a C++ shop to almost entirely C# -- I think maybe 3/4 of the team has never written a line of C or C++ in their lives. -- Fight fire with water. |
|
  Steve I'm a PC, so shut up Consultant join:2001-03-10 Yorba Linda, CA
| reply to usa2k said by usa2k : I've been conditioned by those I've known, that MS is the evil empire - so why buy into their system and feed it further? Whatever you think of Microsoft, C# is a kick-ass language surrounded by a tremendous library environment - it's exceptionally rich (hey, extension methods alone are worth the cost of admission).
And once you use LINQ you won't ever again say that Microsoft has never innovated.
Steve — C programmer since 1981, C++ since 1990, C# since 2005 -- Stephen J. Friedl | Unix Wizard | Microsoft Security MVP | Orange County, California USA | my web site |
|
  usa2k Please PRAY for Rebekah Premium,MVM join:2003-01-26 Canton, MI clubs:
·VOIPo
·WOW Internet and C..
·Broadvox Direct
| reply to PetePuma Thank you!
I am not really ignoring Java, just focusing on the state of C++, and likely C#. Java has been a slow start for me, but I plan to master it eventually as well.
I am soon hoping to reboot my career by going back to school pursuing an Associate Degree as a Computer Information Web Specialist. There is a mixture of graphics, and programming subjects in the course structure. »www.schoolcraft.edu/pdfs/guides/···list.pdf
I appreciate your insight relating to C++ and C#. Notice there are no Java subjects listed, or C++. The Programming Associate degree might be a better fit for me, but I am looking for government financing and it does not list this other degree  »www.schoolcraft.edu/pdfs/guides/···tems.pdf (A good list of Microsoft disciplines!)
Electronics/Automotive was my past career. Now that I do not currently have a career, I am looking to do something I enjoy more. Of my 26.5 years at one place, the majority of my time has been more of a Team Leader/Supervisor type role.
I want to get hands on in Web Design/Programing role. I hope the next 26 will be more satisfying!  --
Jim, VoIP 12/2002, VOIPo 2/2007 FAH-Tool ... Pets ... USA2K site ... Artist-247 |
|
  usa2k Please PRAY for Rebekah Premium,MVM join:2003-01-26 Canton, MI clubs:
·VOIPo
·WOW Internet and C..
·Broadvox Direct
| reply to Steve Thanks Steve. Your opinion and many other like Pete's are highly valued by me.
Excluding Windows is likely the same as avoiding major highways. I need to adjust my thinking to what can do the most in our current age. Plenty of pioneers to play the rebel out there already.  --
Jim, VoIP 12/2002, VOIPo 2/2007 FAH-Tool ... Pets ... USA2K site ... Artist-247 |
|
  Bobcat Premium join:2001-02-04 Bedminster, NJ
·Verizon Online DSL
1 edit | reply to PetePuma said by PetePuma :C and C++ will be around a long while, but they are becoming a bit more specialized for applications where performance or footprint is tantamount. They're certainly more popular for embedded systems. Note that the embedded target market far exceeds the desktop market. Probably the server market, too. -- It's nice to be important, but it's more important to be nice. |
|
  Gomez Been drinking brew for breakfast? Premium,Mod join:2001-02-21 Atlanta, GA clubs:
·Speakeasy
Host: Pub Games It is the economy,.. Clearwire
| reply to Steve said by Steve :said by usa2k : I've been conditioned by those I've known, that MS is the evil empire - so why buy into their system and feed it further? Whatever you think of Microsoft, C# is a kick-ass language surrounded by a tremendous library environment - it's exceptionally rich (hey, extension methods alone are worth the cost of admission). And once you use LINQ you won't ever again say that Microsoft has never innovated. Steve — C programmer since 1981, C++ since 1990, C# since 2005 Steve doing C#?.. you know that's almost java .. "C# for java programmers" is a pretty thin book. (»www.onjava.com/pub/a/onjava/2001···ava.html)
That said, a lot of java programmers have jumped ship and are now coding groovy (»groovy.codehaus.org)
Bottom line. No matter what you've learned, ya' gotta keep on top of the current technologies. -- It's a fact : Chicks dig Mafia players. 'Wanna help buy a goat?' - »www.kiva.org
|
|
  Steve I'm a PC, so shut up Consultant join:2001-03-10 Yorba Linda, CA
| said by Gomez : Steve doing C#?.. The difference between C# and Java is that Java sucks  |
|
  Gomez Been drinking brew for breakfast? Premium,Mod join:2001-02-21 Atlanta, GA clubs:
·Speakeasy
Host: Pub Games It is the economy,.. Clearwire
| said by Steve :said by Gomez : Steve doing C#?.. The difference between C# and Java is that Java sucks Yep, other than the syntax being the same, the exception handling being the same.. One sucks the other doesn't..
NIH (Not invented here) syndrome me thinks.
I know you won't bite this bullet, given the friendly cross fire over C vs java for years.. Makes it all that much more fun 
-- It's a fact : Chicks dig Mafia players. 'Wanna help buy a goat?' - »www.kiva.org
|
|
  urbanriot
join:2004-10-18 St Catharines, ON
·Cogeco Cable
| reply to usa2k said by usa2k :I switched to another book I had - "Learn C++ in 24 Hours". It was crafted with 24 chapters, and I loved it this time around. I managed to progress to chapter 20 before feeling a heavy weight of the subject. If that book's first printing was quite some time ago, I think I read it when I was about 14 or so and was quite a great introduction to C++ (from years of Basic, Pascal, C and Assembly). If you're going the book route, make sure you type up the labs.
Personally I feel one should learn programming and object oriented fundamentals more than they should learn how to program in a particular language. As I kid I was a whiz with assembly and C, but my mind really opened up when we learned object oriented Pascal in high school. From there, progressing from that to C++ and C# was intuitive. |
|
  usa2k Please PRAY for Rebekah Premium,MVM join:2003-01-26 Canton, MI clubs:
·VOIPo
·WOW Internet and C..
·Broadvox Direct
| Thinking in C++ 1995 (I was 35) Learn C++ in 24 Hours 1997 (2000 printing)
Some of my electronics schooling included PDP8 and PDP11 programming. The mainframes were a pair of HP3000 and BASIC was my subject. Single board computer assembler also back then.
I was not really pursuing programming until around 2000. usa2k.com was my first URL I purchased in 2000. PHP is my best language, but not the OO part (yet!)
If I have the luxury, I like to saturate myself with the reading of a book, then go back and work through the exercises on a second read. But that is me. 
Two more years in school and I will be 51, but the economy should be on the mend by then! --
Jim, VoIP 12/2002, VOIPo 2/2007 FAH-Tool ... Pets ... USA2K site ... Artist-247 |
|
  djrobx
join:2000-05-31 Valencia, CA
·PHONE POWER
·AT&T U-Verse
·AT&T CallVantage
·Time Warner VOIP
·RoadRunner Cable
2 edits | reply to usa2k Your old books are perfectly fine for learning purposes.
C# is fantastic. It's a more "professional" version of what was good about the "classic" Visual Basic with C-like syntax. With the extremely rich .NET framework and simple methods for accessing COM components, you can cobble the damndest things up in no time. You can use C# code in anything from Windows apps to console executables to server side web page generation.
It's fast and fun to develop in.
It won't replace C++. There are times when you need a deeper level of control and performance that C++ is better for. You can use C# and C++ together quite easily, though. A recent example, C# has a serial port class, but it's too latent to talk to my DirecTV receiver. No biggie, I wrote some "low level" C modules to talk to it, and then linked to them from my C# app.
C++ is more universal and can be readily compiled on almost any platform.
The good news is that once you've learned the basics of one of these languages, it's relatively easy to pick up the next. Don't fear that what you learn in C++ would be wasted. Most of what you learn is directly applicable to any other object oriented language with minor syntax differences. -- AT&T U-Hearse Your funeral. Delivered.
|
|
  Bobcat Premium join:2001-02-04 Bedminster, NJ
·Verizon Online DSL
| said by djrobx :C# has a serial port class, but it's too latent to talk to my DirecTV receiver. So C# on a 2 GHz Pentium is too slow to do what a 2 MHz 8080 could do with assembly or Basic? |
|
  DC DSL Stays crunchy even in milk Premium join:2000-07-30 Washington, DC
·Covad Communications
·Verizon Online DSL
1 edit | said by Bobcat :So C# on a 2 GHz Pentium is too slow to do what a 2 MHz 8080 could do with assembly or Basic? In many respects that, unfortunately, is the case. The overwhelming majorty of programmers that didn't earn their stripes in the days of miniscule memory and processor speeds don't give a hoot about how compact or efficient their code is. If they would rediscover that art, they would also have half the battle for secure code won as well.
MS is a huge mis-leader in this area. Office and Visual Studio are horrible memory pigs and performance-challenged, but they're more concerned with adding every conceivable function to the core, regardless of actual utility, than they are with make it run fast and in the smallest memory footprint possible.
A few years ago I showed some MS product guys exactly what's wrong with their thinking. I dusted off an app I wrote in 1984 using dBASE II and fired it up in a DOS VM. The app was a monthly process that worked on on some 50K parent rows and a typical 4 or 5 child rows. On a 6MHz AT with the fastest PC disk drive of the day, this program would take about 12-14 hours to run. In the VM, this sucker was done in about 20 minutes. However, ports of the same app to both VB and VC console apps took 45 minutes to run (didn't matter if it was an Access MDB or SQL Server as the database).
No argument that 45 minutes is a hell of an improvement over 12 hours. But why should the modern Windows code take twice as long to execute as 25 year old 8088 code that was doing all the interpreting, calculating, and I/O itself?
Going by the code I see from younger programmers, there clearly is a monumental lack of discipline and basic understanding of what goes on in the hardware when a program runs. Modern CS education emphasizes OOP, abstraction, and reusability as basic tenets, but pays little attention to using those correctly. One poorly thought out object model or inefficient loop will ruin an app worse than writing one like COBOL still ruled. Only the nerdiest are ever exposed to considerinig the implications of things like "passing parameters by value or reference." (Offshore programmers are the absolute worst when it comes to scalability or proper implementation of abstraction.)
How I wish I could whup sense into most younger programmers. The true ability to design efficient code has gone the way of diagrammable writing. At least I get to confound them with "how the hell does he make his code run so much faster than mine?" -- There is no giant fur-bearing trout. |
|
  cowboyro
join:2000-10-11 Shelton, CT
·AT&T U-Verse
·Comcast
·Optimum Voice
| reply to usa2k Don't forget that the newer compilers include a sh1tload of buffer and exception checks, slowing down the code. Also making the code too much object-oriented can cause slowdowns (objects that get created and destroyed way too frequently). There must be a balance between code readability and execution speed, but too many programmers just go by "get a faster machine". My programming started with BASIC and Z80/I8080 assembly though... |
|
  DC DSL Stays crunchy even in milk Premium join:2000-07-30 Washington, DC
·Covad Communications
·Verizon Online DSL
| said by cowboyro :Don't forget that the newer compilers include a sh1tload of buffer and exception checks, slowing down the code. Also making the code too much object-oriented can cause slowdowns (objects that get created and destroyed way too frequently). There must be a balance between code readability and execution speed, but too many programmers just go by "get a faster machine". My programming started with BASIC and Z80/I8080 assembly though... It's always fun to wallop some "super genius" over a sucky object model. One way to get on my bad side is defending a hierarchy that fully constructs all of the subordinate objects when the parent is constructed just to get a few properties of the parent. "Learn how to support lazy-loading!"
I have like 4x more computing power in any of my laptops than existed in total on the planet when I started playing with computers in 1968. -- There is no giant fur-bearing trout. |
|
  DC DSL Stays crunchy even in milk Premium join:2000-07-30 Washington, DC
·Covad Communications
·Verizon Online DSL
| reply to usa2k said by usa2k :I've been conditioned by those I've known, that MS is the evil empire - so why buy into their system and feed it further? Stay open source, cross platform in my personal education. Seek good programming tools that will promote a level playing field. The problem with 'cross-platform' development is the age old one of whether any given endpoint precisely supports what you're doing. Java is quite popular, but Sun quickly backed away from it's main mantra of WORA because of implementation issues once you were beyond the mainstream OS platforms. It took them a few years to realize they couldn't actually control everything quite as precisely as they had envisioned to create that panacea. It's the same issues that dog HTML, CSS, XHTML, et al.
From the mid-90s to early 00s, C++ and VB were the dominant development camps for Windows. The rule was pretty straight-forward: for high performance or low-level/native code, you went C++. For most business desktop applications you went VB.
C# mixed things up because it blended C (the pre-1994 Windows language of choice), C++, Java-ish stuff, and the ease of use of VB. This won over a lot of programmers who avoided Windows because they thought they were too good to write stuff using VB. There is very little difference in terms of performance or capability between C# and VB (they generate virtually identical intermediate code): it's mostly personal style choices that separate the camps today.
C++ is less attractive for the majority of development these days because C# and VB are far easier to work with and better suited for desktop and web solutions. It's biggest attraction is if you want native (unmanaged) code executables. -- There is no giant fur-bearing trout. |
|
  usa2k Please PRAY for Rebekah Premium,MVM join:2003-01-26 Canton, MI clubs:
·VOIPo
·WOW Internet and C..
·Broadvox Direct
| Thank you! This is a great education.
Having read with great attention, 19 chapters of Sams Teach Yourself C++ in 24 Hours (the 1st edition, but the accurate title!), Thinking in C++ is feeling more comfortable already.
Lets see if I can stay of the Internet and get some reading done today!
--
Jim, VoIP 12/2002, VOIPo 2/2007 FAH-Tool ... Pets ... USA2K site ... Artist-247 |
|
  drew Reformation Premium join:2002-07-10 Port Orchard, WA clubs:
·wavebroadband
| reply to DC DSL Interesting you old hats who don't even mention the head-guy behind Borland's Delphi product is the guy who really "did" C#.
If you've ever worked in Delphi ( oo pascal), then you would readily see the similarities.
C#, for one thing, has syntax going for it over VB IMO. After using both, I can't believe I ever liked VB.
I'm stuck writing shitty ISAPI DLLs in Delphi 5 for the next conceivable period. -- Come play Mafia! | My Picture Blog |
|
  Bobcat Premium join:2001-02-04 Bedminster, NJ
·Verizon Online DSL
| reply to DC DSL For the past 7 years, I've been leading a project that involves C on a 40 MHz DSP. We only have 128k bytes of memory for the program and variables, plus 1 MB for the heap (which is used entirely for large data structures). I wrote an executive which, IIRC, is around 20 lines of code. No RTOS. No semaphores or other crap. The poor little DSP is overworked, but it gets the job done and degrades gracefully.
For a few months, they put me on a job which was going to be done in Ada95. They told me to start doing class diagrams and all that other OO crap. It was horrible. I was like, "If I started writing the code, I'd be halfway done by now." The good news was the DSP job needed a bunch of new features added, so I got back on that. Thank goodness.
I'm now on a job that uses the same DSP for something else. They had an expert develop an interferometry algorithm for us. He assumed we'd have a multi-GHz Pentium and developed something which would never be fast enough on our 40 MHz DSP. Luckily, I was able to modify his algorithm and make it run in 100 usec on the DSP.
The OO weenies had a pile of crap they called "The Framework" added to another Ada95 job. The stupid thing used tons of memory for no good reason, and they ran the system out of memory. I looked at it for 15 minutes and found 7 MB of memory being wasted by some stupid OO thing. Now they have other people trying to rip it apart to save memory.
What are these kids learning in school now a days? -- It's nice to be important, but it's more important to be nice. |
|