Coding Classes & Required Development Environments?
Sadistic Yoda asks: "I walk into my entry level C++ class and the TA informs us that the code must compile under CodeWarrior for Windows, which is included with the text (Problem Solving with C++: The Object of Programming, Second Edition, by Walter Savitch), to receive passing grades. Personally I would rather use vi and g++ on the department's Debian machines from the shell. Will I run into any problems or do I bite my tongue and make it through class using their program?" I find it disappointing that schools think that "teaching programming" involves locking their students into a specific environment. I know it makes it easy for the teachers and TAs when it comes to technical support, but what about those students who already have a handle on their own system, are willing to learn the language (and its pitfalls in all environments) who can't (or won't) run the required software for whatever reason? Is this limited form of teaching really teaching?
Secondly: It's a kickstart to learning the language. I wouldn't reccommend attempting to map codewarrior quirks to gnu quirks in your first few programs, especially when you're trying to learn.
Lastly, to actually LEARN you can always develop on the unix boxes and port it to codewarrior. That's valuable practical experience in writing portable code.
And tell the TA you're doing it, too.
--Dan
I can think of many reasons why I would require students to use a single environment, particularly when teaching an OO language. Some of these include:
(1) so the professor can distribute lines of code and libraries for all to use in projects;
(2) to assure that code may be tested directly and automatically against testbed code; (the single worst part of graduate school for me, was the process of grading computer programs);
(3) to facilitate group programming projects.
In the first- and second-year CS courses I TAed
(waaaaay back in the Dark Ages when Pascal was standard), the reasons we specified the environment included:
1) Availability of lab resources. Often times the computer lab is only going to have one type of machine with a limited selection of development environments for the various classes. Today this is less of an issue, because most students will have their own computers (further increasing their desire to use a custom platform).
2) Compatibility. Besides basic issues with the compiler and standard libraries, we often provided completely or partially implemented code in the course of assignments, and could only afford to make sure that it worked on the specified platform. Imagine if you were a student trying to get an assignment working and discovered there was a bug in the code provided with the assignment when compiled in your environment. Clearly we had to define this
behavior as "at your own risk".
3) Proprietary native interfaces. In the very introductory class, we were using Pascal on Macs, and provided native widget libraries so the students could create more visually interesting programs than println('hello world'). Today of course there are cross-platform alternatives.
4) Mechanical concerns. As others have pointed out, testing submitted programs generally involves both compiling (to make sure there are no warnings) and executing them to evaluate that the output is correct. In classes of up to 200 students, no way can you be prepared to do that on 4 systems.
5) Support. TAs could not necessarily be expected to help with compiler or dev environment issues for more than one platform.
Today students have the luxury of a well standardized C++, that allows you to write compliant code that will compile under g++,
msvc++, or one of the edison design group
based compilers, not to mention Java. Nonetheless, in the context of a particular course I would still expect to see a pretty standardized configuration designated as the target platform for assignments.
That being said, advanced students could and
can still always follow whatever development process they wanted "at their own risk". Just don't expect your TA to bail you out if you run in to trouble!
I'd further like to say that I think everyone should spend less time concentrating on learning specific API's in great detail, and instead focus on improving your core skills and fundamental understanding of programming.
I used to spend a lot of time learning API's (bought every volume of Inside Macintosh as they came out, and when I was just starting out and broke and hungry, used to read them in the bookstore before I could afford to buy them).
I prided myself on knowing all the little bugs and intricacies of the MacOS so I could just know to code around an OS bug without having to research why my code didn't work. I got so good that I was hired as an OS engineer at Apple where I concentrated on debugging the MacOS system software with MacsBug (a machine level debugger) - I had the MacOS source code at my disposal but that usually didn't help when I was visiting a tester's cubicle to diagnose a machine with a hard-to-reproduce crash.
Then I moved to the BeOS, shipped a product and wrote a lot of code but got fed up with their lack of commitment to their developers. And without getting paid to write BeOS code, I never could keep up with the BeOS API's I wanted to work with, like the new Media Kit (which I do know enough about to say it is pretty cool).
A couple years back I stopped spending much time learning and mostly just cranked out routine code. I felt I didn't want to learn anymore because, as I would sometimes say:
Ever since I read C++ Answers from Bjarne Stroustrup I got the gumption to start learning again. What I decided to do was go back to learning the basics.I read Scott Meyers' Effective C++ and More Effective C++ and as I read through each item I inspected my program top to bottom and applied the advice to it (thus fixing a lot of bugs).
I also bought Bjarne Stroustrup's The C++ Programming Language: Special Edition (I recommend the special edition to professional programmers).
I started reading the newsgroups comp.lang.c++, comp.lang.c++.moderated and comp.std.c++ and posting questions there - in one case I found a construction on the very edge of the C++ standard and as a result of a compiler bug managed to instantiate an object of an abstract base class - its pure virtual function had a nil pointer in the vtbl and my program would crash when this function was called. An engineer from the compiler vendor read my post on the newsgroup, agreed that it was a bug that his product would compile my code, and logged a bug.
I didn't used to use the Standard Template Library very much at all. I had read too many mailing list and newsgroup postings from people whose code wouldn't compile when they changed platforms.
But I figured that by now compilers must have matured enough I could reasonably start trying out the STL. I bought STL Tutorial and Reference Guide by Musser and Stepanov and actually only read a little bit of it before I realized that the STL is actually really easy to use (the API is very simple and uniform), so if you know only a very little bit you can go a very long way.
In part because of challenging myself I became overwhelmed with programming stuckness as discussed in Overcomming Programmer's Block? (sic) and I suppose grew a little bit by taking a week off without pay to rest, contemplate, study and take a broader view of architectural issues.
One thing that helped quite a bit was learning about Extreme Programming.
These things have all had direct payoff in my code, both in making my code quicker to write, easier to debug, easier to make my classes more reusable within the one program I've been writing the last few months, and I'm pretty sure more likely to make some of the code I've written reusable in most any program in the future.
It's also made it a lot more pleasant.
But don't listen to the headhunters - what they're looking for is "skill sets" and industry buzzwords (COM, COM+, DCOM, TCP/IP, Visual C++, ASP, SQL, device drivers, CORBA, Unix internals, Java, Perl, PHP, JSP) - I get recruiter calls looking for all kinds of acronyms, most of which I don't mention anywhere on my resume.
Even I advise listing every skill keyword you can legimately claim on your online resume in Market Yourself - Tips for High-Tech Consultants - but while listing skillsets may be a valuable jobhunting tool in your resume, acquiring them should not be your focus.
BTW, when someone asks me whether they should learn Java or C++, I usually advise beginners to learn Java as it's easier to get something working reliably without crashing, but emphasize they should learn both languages as well as at least one kind of assembly code. I stress that it's important to learn both C++ and Java well enough to understand the strengths and weaknesses of each (pop quiz - why does Optimizeit claim to remove memory leaks from Java programs, when Java is a garbage collected language?).
Most new programmers these days are most concerned with which language will make them the most money the fastest. I tell them that they won't go anywhere until they can pick up any new programming language as a matter of course and have at least a couple under their belt.
I've got bad news for you neophytes - friends, just knowing a programming language doesn't win you very much in the work world, you have to understand the concepts and how to apply them, and you have to know how to apply them in a production environment, working in a business under pressure, shipping working products and dealing with people who don't understand anything of substance about computers.
Your focus should be on acquiring skills that will be applicable to any program you write. You should just learn enough of a skill or tool to get the job done and then leave it. Take with you what can be applied anywhere.
BTW - learning the fundamentals and not getting too specialized enables you to develop for any platform, as I do - you can see this from my homepage. (Perhaps one reason why I prefer understanding the fundamentals is that my degree is in Physics, and I've always wanted to understand things at a fundamental level - Quantum Mechanics, Particle Physics, Cosmology and so on.)
One final word of advice - read The Forum on Risks to the Public in Computers and Related Systems. It's often entertaining and funny, occassionally tragic, usually insightful and will make you a more responsible programmer and a wiser computer user. You'll certainly learn to avoid using computers for anything of real importance and take extra caution to protect yourself when you choose to do so.
-- Could you use my software consulting serv
>>Things at this level are all about getting the basics in place
Which is why I would think that the standard should be ANSI C/C++. That way you are guaranteed to have the solid foundation, and if you later move on to fancy IDE's with extensions, it doesn't matter which one you (or your Prof. or boss) choose, because your knowledge will translate into that environment. If that environment has nice extensions and handy non-ANSI classes and such, you'll be ablt to appreciate those better. For instance, I use C++ Builder at work, and it's nice to use AnsiString, which has features like an overloaded "=" operator, but when I recently worked on a demo project that needed cross-platform compatible code, it was good to still know how to use strcpy with char *'s.
By the way, I had a class like this too. We were told that our code had to compile in Borland C++ 4, and to submit our source code and program to the grader. It turned out the grader was running a Solaris box, so he just pulled the source files out, discarded all of the IDE bloatware, and compiled with gcc. My point is, since it was all standard console-type code, it didn't matter how we developed it. Make ANSI your class's standard (that's why it's a standard), have the students submit the ASCII source code, and then let the TA/Prof compile it in whatever combination of environment and OS they please.
Do not teach Confucius to write Characters
Today's Sesame Street was brought to you by the number e.
Does the school have Windows machines with Code Warrior on them that you can use to compile your assignments? If so, I don't understand what the big deal is. I don't think it's unreasonable to expect the TA's not to want to bother fudging around with code to get it to compile on the platform they're using. If they don't provide the environment on machines at school, and expect you to go out and purchase your own box which runs Windows, then maybe I'd complain. (Although apparently many schools in the US expect students to purchase their own computers and do everything at home; here, the labs on campus provide all the facilities you need for your courses. In this case you may have no choice, but see the texbook analogy below.) But otherwise, who cares?
Most CS courses here are the same way. If your code doesn't compile on the platform being used (often g++ on Unix), tough. Sometimes the software needed isn't available on Windows, so students who use Windows at home have no choice but to use the school's Unix facilities. And even if you're using Linux, your code is not guaranteed to compile on their system - differences between gcc versions, etc. may cause problems. If your code doesn't compile, tough - it fails the automated testing, and you lose a bunch of marks. Presumably if there's a problem the TA's are nice enough to try and fix code that doesn't work, and/or assign some marks, but I don't see what's wrong with expecting students to test their code on the school's systems before submitting it.
This is no different than being forced to do assignment questions out of a $100 textbook, even if you really don't need the textbook to learn the course material. This happens ALL THE TIME. You most likely buy the textbook anyway, and use it, but you can also just find a copy in a library or borrow from a friend. Likewise, in this case, if you don't want to buy Windows, you can either find a public workstation (presumably your University has some), or find a friend who runs Windows and compile on their system. How hard is that?
Ok, I'm on a bit of a roll here now. I'll probably get moderated down for this, but I don't even understand why Slashdot would post this question. Actually, the question is a good one; he merely is asking a technical question. It's Cliff's attempt to turn it the discussion into something political with his commentary that's stupid. Oh, poor Linux user! The horror of having to use Windows for 2 minutes to verify that the code compiles and runs on it (assuming they're not using features or libraries specific to CodeWarrior, which for an entry-level C++ course I would assume they're not)! I know we're Linux zealots, but why can't some people in this community just accept the fact that NOT EVERYONE USES LINUX, and there are going to be occasions when you're FORCED TO USE WINDOWS (or Macs, or...) For god's sake, stop WHINING and being offended and deal with it!
"When all you have is a hammer, everything
else look like nails."
The axiom above is true for many real life situation, including programming.
If you are limited to only VB or G++ or vi or whatever, make the BEST of it.
After all, you are in the class to LEARN something, might as well do you best LEARNING THE PROPER WAY TO DO THINGS RIGHT THE FIRST TIME.
VB or vi or G++ or whatever are just tools. You do not have to be attached to ONE SPECIFIC TOOL. What is MOST important is the SKILL TO CREATE, and that skill should NEVER be limited to any specific tool. You can "graduate" from using M$ stuffs, but as long as you have that skill to create newer and better things, you can always migrate to OTHER KINDS of tools available.
Hope all of you can glean the skill to create despite the obstacles the power-that-be want to throw at you.
Muchas Gracias, Señor Edward Snowden !
Of course, many students wrote their code in (insert favourite moronic Windows IDE here), and just copied the code directly across to the Solaris box, and submitted without even checking to make sure that the program compiled. Many times, the program failed to work, and the students were marked down regardless of their protests of "but it worked at home". How are we supposed to know whether it worked at home or not? In any case, a little bit of investigation usually showed that the program had a combination of bugs that gcc/glibc/Solaris trigged but DroolIDE's compiler environment didn't.
If you have an alternative policy that is even slightly practical for a class with 800-odd students, I'd sure like to hear it!
In any case, it's not going to hurt you to be exposed to a different programming environment. At worst, you'll know *why* Windows programming is as horrible as Slashdotters often regard it :)
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
Everything worked flawlessly until the final. I had a 98 average in the class, but the final exam was to take a program and modify it. Well wouldn't ya know it, the stoopid program wouldn't compile under gcc, cuz of a few function calls depended on a library that was different in gcc than it was on borland.
So being the procrastinator that i am, i found this out the night before the final was due, and by 8 the next morning i had the program compiling/running with gcc. It was due at 10. So I had to hand my port to gcc, but of course i got squat on the final, and my final grade ended up being a b. sucks huh??
the moral of the story is, yes there are valid reasons for a class to require a consistent work environment. This is a prime example, If i'd used the borland thing, i wouldn't have had that problem, but i'd be out 90 bucks and i'd have to have used windows. I'll take the B.
i was in almost the same exact class. the teacher explained that everyone should use Visual Studio 6, because that is what is provided by the school.
All i had to do was raise my hand and ask if i could use vi and g++ on my personal linux box and he was almost overcome with joy, i actually had previous knowledge.
After i asked, the teacher had to explain what vi, g++ and linux was to the class. Seems a lot more people are coming into computers for money and not the love of the game.
just ask if you can, usually they are flexible for students who actually have some original thinking in their skulls. Also, on the plus side, they will probably remember you and possibly favor you for taking a unique approach to the first problem of the class.
xavii aka bob
Its not about tech support. If that's all the problem was schools wouldn't care too much. The problem is really cross-platform/compiler compatibility. As sad as it may be...something written for g++ *might not* work on Code Warrior for Windows, or Visual C++. This is less of a problem with C compilers, but still an issue. Your TA needs to be able to compile whatever it is you wrote, and so they pick one platform they will use.
For example, at my school they recommend a particular compiler, and ask everyone to use it (under the Macintosh, since that's what dorm clusters have)...for lower level C/C++ classes. At higher levels they reccomend gcc/g++. But the issue is that you really should be running the same compiler that your TA/TF is, or the results will be somewhat unpredictable. You could probably get by, but its always a major risk. And if it doesn't work on their machine, you can't just say "well it worked on mine" because you were using an officially non-kosher compiler to test.
In contrast, Java classes (where most compilers are relatively conformant) encourage the use of whatever compiler you want. They say it might be wise to test on the "target" compiler (JDK 1.2/3 on Solaris), but that its not necessarily "required".
My advice is develop at home - just make DARN SURE you test it thorougly on the foreign compiler and fix all compiler errors before submitting. (and you probably will have some)
1) You need to learn how to LEARN TO USE new tools. If you think what you have is bad, I took a course that required all programs to be written using MFC and Visual C++. Now that was a nightmare (spend 80% of the time trying to find what you need in the docs, 10% actually writing code, and 10% debugging). What made the class even more fun it was my Operating Systems class where we did some basic networking, threading, and deadlock avoidance.
2) You will always have employers asking you to develop using 'Y' platform (X is an overused buzzword). Even though we all know that practically any development environment can be coerced into making any program, you have to do it the way they want it, or you will quickly be looking for another job.
I don't mean to be a pessimist, but for your own sake, avoid starting any type of confrontation. By the way did you ask the professor on the first day of class? In my classes we usually get about 3-4 question on this very topic the first day.