Post #113,274
8/9/03 9:01:54 AM
|
What I hate about C++
I just spent about 4 hours coding and testing two linked list object classes, yesterday.
I've done this twice in the past month for C and C++ projects at my office.
At least with Java, Python, Perl, PHP, and Smalltalk, you start with an infrastructure, with List, Tree, Hash and Map classes that do some of the "basic" coding for you. You focus on what the application needs to do, not building low-level data structures.
Our code has to run on Windows, Suse, RedHat, Solaris, HP/UX, and AIX (with management talking about AS/400 and OS/390 ports), so we can't very well use things like MFC. I've used RogueWave in a previous life, but I don't even know if they're still in business.
Even with that, I'm sure that Rogue Wave gets a licensing fee if you redistribute code with "their" linked lists. I guess I could try to sell management on Rogue Wave, if it's not too expensive, thread safe, and redistribution is free.
Any good suggestions for open source code or C++ templates? My boss has to understand them, so the STL is probably out (because it's difficult to understand). I did STL in a previous life, too, but back then we had to modify it to work with MFC and most of my colleagues couldn't use (understand) it.
I'm looking for something open source that will compile and link on all the above mentioned platforms, and at least has linked list and tree classes.
Glen Austin
|
Post #113,306
8/9/03 1:39:07 PM
|
Re: What I hate about C++
I would suggest using the [link|http://www.boost.org|Boost] libraries, except that they use templates.
|
Post #113,330
8/9/03 4:32:07 PM
|
?? STL
At least with Java, Python, Perl, PHP, and Smalltalk, you start with an infrastructure, with List, Tree, Hash and Map classes that do some of the "basic" coding for you. You focus on what the application needs to do, not building low-level data structures.
STL's map is a Red-Black tree, same as Java. Linked Lists are simply lists. Map is there (as well as Multimap). Hash isn't officially supported - but I know it's there for Solaris (and I think Linux). Check out STLPort. Any good suggestions for open source code or C++ templates? My boss has to understand them, so the STL is probably out (because it's difficult to understand). I did STL in a previous life, too, but back then we had to modify it to work with MFC and most of my colleagues couldn't use (understand) it.
Hmm..if your boss can't understand STL - then you'll probably end up with RogueWave. They're still in business.
|
Post #113,344
8/9/03 8:52:38 PM
8/21/07 12:43:30 PM
|
So you have to use simple stuff
because your boss has to understand it and he's not too bright?
I'd start looking for a new job.
While I agree that for a long time C++ lacked decent base class libraries, STL isn't half bad (assuming you can find a compiler that can compile it - which was its other problem).
Otherwise, yes RogueWave stuff is pretty decent. I probably have the source code around here somewhere. You can probably get it for decent terms and I don't think there were runtime fees.
Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations. --AndyBower
|
Post #113,364
8/9/03 10:48:31 PM
|
Interpreted Environments
I'm beginning to be a BIG fan of interpreted environments, because machines are so fast now, that most people can't tell the difference between a compiled application, and and interpreted one. Most interpreted environments are providing an excellent base of computer science, and basic GUI design components, and database access, so why not? Finally, many interpreted environments are portable, at least between Windows and Linux. (And I'm not sure that much else will matter in 5 years.)
It's interesting because the evolution seems to be that a new language gets introduced. Then basic C/S stuff (Lists, Maps, Trees) gets built. Then GUI and database components get built. Next the builders start working on "non-programmer" screen design, then workflow. Finally, performance monitoring tools. About the time a technology is mature, and most developers (and some non-developers) get productive with it, then the whole landscape is blown away, and we start all over on a new technology base.
I'm already a Java fan. I love the base classes. Strings/StringBuffers are useful. Vector gets used a lot, as well as the tree and mapping classes. I'm a big fan of Property, too.
Our code has to compile against Windows, 3 Unixes (Uni?), and 2 Linuxes (Lini?). So it REALLY has to be portable. It seems that everyone can agree on C++ for portability.
I've been looking at PHP, and want to start looking at Python, but I don't they'll get a warm reception at work.
BTW, Todd, I just changed jobs. I was doing Java, but got tired of 1 - 1 1/4 hour commutes (each way) every day, demanding boss, threats when there were problems (whether they were my fault or not), etc. I was burned out. I'm basically 2 1/2 months into this job. Maybe with a little more influence and time, I can change things for the better.
Glen Austin
|
Post #113,405
8/10/03 5:55:56 PM
8/21/07 12:44:57 PM
|
So you're ready for Squeak
I'm beginning to be a BIG fan of interpreted environments, because machines are so fast now, that most people can't tell the difference between a compiled application, and and interpreted one. Yes I can't tell the difference anymore between Squeak apps and compiled ones. I can spot a swing application a mile away though. I'm doing a presentation of Seaside this thursday evening at the Boulder Web Frameworks users group. (With hopes that maybe somebody will hire me to show them how to use it). You maybe ought to give Seaside a look if you are doing web applications (like intranet ones - if you need to build Amazon then I don't think the scalability is there yet). FWIW, Seaside has also been ported to Ruby and VisualWorks - there can be no port to Java because its not possible to do continuations in Java. Its maturing fast. If you want to read more about Seaside try [link|http://www.beta4.com/seaside2|http://www.beta4.com/seaside2] For my presentaton I built the Wafer weblog reference application - it took me a day (mostly because I was learning the framework while I did it). [link|http://www.waferproject.org/weblog-prototype/index.jsp|http://www.waferproj...ototype/index.jsp]
Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations. --AndyBower
|
Post #113,411
8/10/03 8:24:10 PM
|
Need scalability.. And not necessarily a Web App...
Our "core" product uses Internet protocols, but it's not a true "Web Application". Also, our largest customer runs it as a multi-threaded application on 2 larger HP/UX boxes. It is a command line application written in C++, with a VBScript GUI that accesses the database.
We use http/https, but not HTML.
But, more recently, I'm working on a prototype. The company owner has a "demo" in about 2 weeks, but really hasn't even decided what languages to write it in, yet.
My direct report wants it done in C++.
I've been doing my pieces in C++, knowing that it will be portable to Java or PHP, which are distinct possibilities. It will either be a Web-app in PHP, or a Java or C++ app in either JBuilder or Visual C++.
But, my part is to parse X12 messages, and that can be done pretty simply in pretty much anything. It would be nice to be able to do it in Java or PHP, though.
We still have to do a GUI, and it will have to be in something more than straight C++, IMHO, to win this account. PHP is a possibility, JBuilder, or Visual C++.
I guess I can "get aggressive" here and just get it coded in a language where we can do the show. I guess I'll just pick the language, and he'll have to demo it for the show.
Actually, I think the owner doesn't care, bottom line, as long as it looks good and performs well at the show. It doesn't have to multi-thread or really scale, but it does have to be done, and the owner trained in about 2 weeks.
I already know Java and C/C++, some VB/VBScript, and a host of other languages from my mainframe life (REXX, COBOL, Assembler).
Our "base" language at the company is C++. Our core product is in C++. I'm sure my direct report wants it in C++.
Glen Austin
|
Post #113,413
8/10/03 8:41:12 PM
|
To be fair...
While I'm personally a big fan of interpreted environments, I haven't quite made the sale at work. A lot of people there are not fans of interpreted environments. In fact, we have one developer who is suspicious of C++, recommending only C language, for maximum portability.
So, I need to figure out how bold I want to be with this. I want to remain employed (especially in this kind of work environment), but for new prototypes, I really think we need to work in something that is portable, GUI end user experience, and faster development.
Our core product can remain in C++, but maybe this new stuff needs to be in PHP or Java.
Glen Austin
|
Post #113,412
8/10/03 8:38:52 PM
|
Happened to me before
it was the law firm that had me using simple stuff in VB because the boss didn't understand OOP, etc. Look what happened to me there.
|