Slashdot Mirror


The Power of Multi-Language Applications

wbav queries: "I've been programming for a number of years, and someone always asks, 'What language do you use, Java or C++?'. Now personally, I find that question a little biased, mainly because, of how I program. Rather than making one massive program, adding in all the support I need to make up for weaknesses in languages, I prefer to make several different apps that call each other, each using the strengths of that particular language. I tend to use C++ as my controlling program, and then execute Perl, PHP, or Java depending on what will give me the best performance for and cause me the least amount of pain to accomplish the task at hand. Do you guys use this kind of method, or do you try to do everything in one program? What advantages or disadvantages do you see in creating one program compared to many programs?"

413 comments

  1. Depends by Anonymous Coward · · Score: 0


    Sometimes I do. Sometimes I don't.

    1. Re:Depends by dnotario · · Score: 1

      You completely missed the point. CLR enables you to mix and match languages very easily. This is great when you have to interoperate. Obviously it's objective isn't making every programmer writing a given function in a language chosen in an arbitrary way.

    2. Re:Depends by Anonymous Coward · · Score: 0

      Umm... You compleately missed the point. Maintaince of a .net project where everyone used a different language is going to be horrible.

      Manager: "I'm looking for a contractor to extend our XYZ system. It's written in VB, C# and COBAL."

      Consultant Co: "Great. Bob can get to you next month and will only cost you $400 an hour."

      Good for Bob. Not so good for the customer.

    3. Re:Depends by HBD · · Score: 0

      i still can't figure out how 2q post right off the news item, so i am posting here, i use a single app if i need it to be distributed outside the use of myself, and other members of my dev team, i use multi-apps when they are faster and more mem efficient and are inside the dev team, just to keep the end user from having to deal with multiple things, especially on windows since it has those annoying sounds people don't normally shut off.

      --
      -- Note to self - 'Don't push that button'.
    4. Re:Depends by scrytch · · Score: 2

      Whereas if the app was written in Cobol without the CLR (I'm going to assume there is some kind of COBOL.NET), you not only can't maintain the app, you can't even script the pieces with another language. Standards are good, but sometimes that standard happens to be cobol (proof that there is no god).

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    5. Re:depends by Ozx · · Score: 0

      Obviously if you've read the proposed method the questioner put forth, you'd clearly see that these are seperate processes... We're all quite familiar with in-process COM.

    6. Re:Depends by Anonymous Coward · · Score: 0

      Right below the article, on the right, there's a button that says 'reply'

  2. Occasionally by ctkrohn · · Score: 1, Informative

    When I develop web applications, I tend to mix languages. That's really the only time, though.

    1. Re:Occasionally by wbav · · Score: 1

      Well, as you may have guessed, I do a lot of web programming along with regular programming. I feel you have a fairly vaild point, I mix languages the most when I'm doing webstuff. Who wants to implement xearth in php? But on the other hand, I've found moving this model to regular programming has helped me develop faster, and with less bugs.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Occasionally by waveclaw · · Score: 1
      Mixing languages (and paradigms) can be complicated, but it is a lot more common than most people think. I've had to start doing this for Senior Class projects in my CS curricula: SQL embedded in C code (ala Oracle.) While not exactly that same a writing separate programs in separate languages, it does share a lot of the features:
      • Database access code is separated into ASNI SQL statements that exist beside C/C++ functions and operations
      • Native C/C++ parsers can't understand the SQL so Normal IDE's have *fun* trying to colorize, organize, or typeset the code.
      • Without Translation into C by extra SQL preprocessors, the code is un-compliable.
      • Easy debugging at the source level doesn't happen - essentially, the SQL and C/C++ are designed together, written separately, tested separately and merged together afterwards. Due to the complexity of the interactions of the two languages, errors in one language may or may not affect the detection of errors in the other.

      Where they differ:

      • SQL must be handled from the point of view of preprocessed (and just a likely reorganized) source file that no longer resembles anything you wrote. While this can been seen as little different than the debugging of optimized sections problem for a compiler/debugger suite, at this point you're still dealing with your source code - which has been changed *for you* to facilitate the usage of two languages rather than one. The code can be very hard to maintain - it is essentially two different programs in two different language paradigms - one declarative and one procedural - are combined into a single set of source files. However, it gets the job done.
      • Usually, due to 'type mismatches' in the approaches (found even with two standardized and mature languages such as SQL and C) the best bet is to wall everything off behind library code and interface layers - creating a set of libraries written in SQL, which are called from C programs. (More of a similarity than a difference on second thought.)
      So to a certain degree, yes I have been writing 'applications' in multiple languages and so have a lot of other people in the database community for a long time. SQL is good for accessing databases. C/C++ is good for driving programs. The two work well together (most of the time) even if it often feels like a marriage between a hedgehog and a mole rat. (I guess that'd make Perl modules with Apache served HTML like shrimp and seagulls being married by humbacked whales at the speed of an http 1.1 GET, but I digress.)
      --

      "You cannot have a General Will unless you have shared experiences. You cannot be fair to people you don't know."
    3. Re:Occasionally by Computer! · · Score: 1

      creating a set of libraries written in SQL, which are called from C programs.

      Stored procedures.

      --
      If you fall off a building, go real limp, because maybe you'll look like a dummy and people will be like hey, free dummy
  3. What if you get hit by a bus? by easter1916 · · Score: 4, Insightful

    This sounds like a nightmare for PHBs. What if you were to shuffle off this mortal coil, it would be difficult for them to find someone with a similar skillset to maintain those applications, would it not? On the other hand, from a technical POV, this seems eminently reasonable.

    1. Re:What if you get hit by a bus? by dparnell · · Score: 1

      It does help with job security, and at the moment this can be seen as a "good thing" ;)

      --
      There is no spoon
    2. Re:What if you get hit by a bus? by aridhol · · Score: 2, Insightful

      Any code that is written as job security is inherintly a bad thing. Reducing the maintainability of the product to the point that only you can work with it prevents errors from being caught. As we've all learned, the person least likely to find an error is the person who made it. When that person is the only one who can possibly find the error...well, you do the math.

      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
    3. Re:What if you get hit by a bus? by Anonymous Coward · · Score: 0

      I wouldn't worry.

      According to the popular press about Linux, busses only run over important people like Linus and Alan Cox and not to the rest of us.

      I'm not really that important, but if the unthinkable happens, it'll take a while for the bus to get from California to the UK and back to the US. I'll have plenty of time to run for cover.

    4. Re:What if you get hit by a bus? by easter1916 · · Score: 1

      You could always hide when it stops to get petrol.

    5. Re:What if you get hit by a bus? by dasunt · · Score: 2


      Actually, being the only one locally with even simple linux skills, that's the exact same fear I have promoting samba over win2k fileservers.


      Just an interesting viewpoint.

    6. Re:What if you get hit by a bus? by chris_mahan · · Score: 1

      I think that's not what the author meant. In our day and age, the mighty paycheck is a welcome sight.

      I think that combining technologies makes the company more reliant on skilled, experienced programmers, rather than bright-eyed 24 years old with a MS Cert and 6 months of VB.
      Which in turn means the company can deveelop more robust, complex, and maintainable software systems, and destroy its competition in the marketplace.

      There is a place for the Porsche roadster, and there is a place for the 3/4 ton truck. The trick is not to have to haul hay in the Porsche because you "downsized" the truck.

      Yes, the truck is much less sexy, racy, and might even be muddy, but when the rubber meets the road, you've got to have the functionality of the heavy-duty.
      Anyone for another silly analogy? I've got two for sale... See me on eBay (not).

      --

      "Piter, too, is dead."

    7. Re:What if you get hit by a bus? by HBD · · Score: 0

      not any code that is written, some is just so that you can work with it better and happens to be job security.

      --
      -- Note to self - 'Don't push that button'.
    8. Re:What if you get hit by a bus? by zEvilOne · · Score: 2, Insightful

      hm, so you guyz are saying that most developers only know 1 language? Now I'm really scared...
      Basically most languages have at least 1 thing they are good at fe: Java has good networking, and PROLOG is great for AI but please don't open a socket with it..Using languages where they excell is key for rapid prototyping. Personally, I think you shoud really be afraid of the '<language XYZ > isn't performant, I'll code it in C' excuse that some hackers have for there ignorance. development cost comes first and since maintenance is a function of KLOC, you should prefer compact solutions (even if that means gluing code written in several languages together).

      have fun.

    9. Re:What if you get hit by a bus? by Sentry21 · · Score: 3, Funny

      Not to sound insensitive towards my employer's position, but if I got hit by a bus, my company is the last thing on my mind.

      --Dan

    10. Re:What if you get hit by a bus? by kfg · · Score: 1

      True, the last thing on your mind would be the front bumper of the bus.

      Or vice versa.

      KFG

    11. Re:What if you get hit by a bus? by Skapare · · Score: 3, Insightful

      This is why it is so hard to find a decent cool job. The PHBs are always looking for the lowest common denominator. And this is despite the fact that there are plenty of good people around to be had. The key to this is their inability to find. Why would a decent programmer or a decent system administrator come to work for a PHB who is so concerned with being able to replace them with any jerk scrounged up off the street in a moment's notice?

      --
      now we need to go OSS in diesel cars
    12. Re:What if you get hit by a bus? by curlif · · Score: 1

      Nah. The last thing on your mind is your arse.

    13. Re:What if you get hit by a bus? by easter1916 · · Score: 1
      hm, so you guyz are saying that most developers only know 1 language? Now I'm really scared...
      On the contrary, I said that from a technical point of view, that this would make sense -- horses for courses, the right tool for the job, etc. From a *management* point of view, though, it would make recruitment and replacement of staff much more difficult as the selection criteria would narrow the range of available candidates.
  4. You scare me. by supabeast! · · Score: 2, Insightful

    Is it just me, or does the thought of debugging an app controlled with C code the executes code in PERL, shell, java, and whatever else sound really, really horrible?

    1. Re:You scare me. by MWright · · Score: 3, Interesting

      Actually, I think you could argue that it would make debugging easier. The program is proken down into parts, each doing a certain task. If one part has a bug, you only need to debug that specific part, rather than wading through masses of code that aren't related.

      --
      "But really, I think life is just a game of Mao Nomic." -Purplebob
    2. Re:You scare me. by non-poster · · Score: 0

      Wow! That sounds like modular programming. Imagine.. having separate parts of the program do different things, and being able to test and debug each individually..

      Surely you realize that -every- language implements this fundamental concept. We don't need to have separate languages to do this!?!?

    3. Re:You scare me. by Steveftoth · · Score: 1

      Assimung of course that you have a good software design.

      Debugging is only as hard as you make it. If your original design for your system is modular enough to be debugged in parts then you can do that. But if your modules are not really self contained and depend on each other in weird and unpredictable ways, then debugging is really tough.

    4. Re:You scare me. by Ayende+Rahien · · Score: 3, Insightful

      Unless you tend to make the mistakes in the calling code.
      I did, and spent a couple of hours trying to find out what is wrong, because I knew what I *meant* to put in the calling code, and never tried to look up what I actually wrote.

      --

      --
      Two witches watched two watches.
      Which witch watched which watch?
    5. Re:You scare me. by morbid · · Score: 0

      Not if the interfaces are well designed and it is clear what each piece of code is supposed to do [and you have the source to look at].

      --
      I'm out of my tree just now but please feel free to leave a banana.
    6. Re:You scare me. by NathanL · · Score: 0
      Yeah, I'm scared too. Basically, what the poster is saying is that instead of programming around language weaknesses they program it to make it a lot more difficult for the end user to install.


      I mean, all those are great languages and I'm all for using the right tool for the job. I can only imagine the installation procedure for this package:


      1. Go to this website and download the perl runtime.

      2. Go to this website and download the php runtime.

      3. Go to this website and download the java runtime.

      4. Install them all. Be careful to use all the default options or else you have to look on pages 5345-5390 and type all the shell variables into your .bashrc file.

      5. If the above websites can't be reached, contact each vendor and ask them to mail you a CD or a bag of floppys containing the runtime engines you need.


      Don't call us for help until you have the product completely installed.

    7. Re:You scare me. by Atzanteol · · Score: 1

      Not all programmers are working on 'downloadable' applications, or even applications for typical 'end-users'.

      I'm a consultant, and write custom software for one (1) client. We build the systems, write the code, and maintain it for a time. We have complete control over *everything* on the system.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    8. Re:You scare me. by MWright · · Score: 1

      No, you don't need separate languages... I never said it was the only way. However, I don't think that using separate languages would be a huge obstacle to debugging.

      --
      "But really, I think life is just a game of Mao Nomic." -Purplebob
    9. Re:You scare me. by t · · Score: 1
      It has a very useful benefit, it puts each program into it's own protected memory space. That way when one wanks up it will only kill itself. Makes it easier to zero-in on which program actually has the fault.

      If your clever and figure out a way to log the communications/IPC then you can just feed it right back in and start figuring out what went wrong.

      t.

    10. Re:You scare me. by Anonymous Coward · · Score: 0

      Yeah, its called Apache

    11. Re:You scare me. by Anonymous Coward · · Score: 0

      Hmmmmmmmm. I do this all the time in Visual Studio.

    12. Re:You scare me. by SnapShot · · Score: 1

      Exactly. Not to get into a flame war regarding DLL "hell" or the potential programs with breaking out code, but there are major advantages to this way of doing things.

      The code I'm writing is C++ for the processing part and an interpreted RAD environment for the GUI. GUI is quickly and easily modified. Processing is fast. All the interfaces are through a standard C API.

      It works for me.

      --
      Waltz, nymph, for quick jigs vex Bud.
  5. well by djweis · · Score: 5, Interesting

    I can see some merit in that, but if you pass on maintenance to someone else, you could have just increased the number of people required to support the project, or require the new developers to learn more new languages before they can be useful. It's easier to find someone skilled in foo than to find someone that knows foo, bar, baz, etc.

    1. Re:well by ez76 · · Score: 2, Insightful

      I can see some merit in that, but if you pass on maintenance to someone else, you could have just increased the number of people required to support the project, or require the new developers to learn more new languages before they can be useful.

      I see your point, but if all teams used this reasoning, how would better languages (technologies) ever get developed? How does a system evolve when it has reached the limits of its underlying language/technologies?

      There is always a learning curve when learning a new language/technology, but the more experienced (or talented) you are, the less steep this curve is, and the less a cause of concern it becomes when considering future maintenance requirements.

      I don't think I'm alone when I say I actually look forward to working with a new language/technology, because it increases my skill set. At this point in my career I've worked with enough tools/technologies that I don't balk when a new one falls into my hands because I know it will probably work pretty similarly to others with which I'm already familiar: very few (good) technologies these days are so revolutionary as to confound even veterans.
    2. Re:well by dhamsaic · · Score: 5, Funny

      And that, my friend, is called job security. :)

      --
      Every once in a while I like to masturbate a new word into my vocabulary, even if I don't know what it means.
    3. Re:well by jabbo · · Score: 2, Troll

      Dude, this is like saying that you shouldn't use VB or shell scripts because then you'll have to hire a [language Foo] guru.

      Anyone who can understand C++ or real C code can pick up Perl or Python or PHP in a few hours.

      --
      Remember that what's inside of you doesn't matter because nobody can see it.
    4. Re:well by Anonymous Coward · · Score: 0

      Any maintenance on code usually involves changing a few lines here and there or perhaps adding a little bit of code. Either way the biggest difficulty is in finding what needs to change where. Syntatic differences add little difficulty there and once you find where the change needs to be made, you've already looked at enough of the new language's syntax to figure out how to make most minor changes.

      Think about it, the first time you saw something written in a language you didn't know, did you have to go write a "hello world" program from scratch before you were able to change it?

    5. Re:well by Neon+Spiral+Injector · · Score: 2, Insightful

      People always seem to say that. Sorry I don't want to stay in the same job for the rest of my life. And I'd rather not have people curse my name after I leave.

      Of course if you if you leave a complicated, but otherwise well functioning system perhaps they'll say "wow, that guy was really sharp, too bad we didn't realize what we had, now we are going to have to hire 4 people to replace him." That is how I'd like to be thought of.

      Oh well...

    6. Re:well by purd · · Score: 1

      Remember, the same things that keep you from getting fired, keep you from getting promoted...

    7. Re:well by djweis · · Score: 1

      There are idioms in any language that if you just decide to pick up a language, you could miss. I spent an hour when I was trying to learn Perl to figure out how to read from stdin. Once I figured out that $_ was useful, it got easier. If you are used to one language, or a pair of syntactially similar languages (C & php, for example), no amount of head scratching will help you figure out perl.

    8. Re:well by partingshot · · Score: 1

      until the boss sees the spaghetti & promptly fires your arse.

      --
      Anonymous posts are filtered.
    9. Re:well by Nelson · · Score: 2, Interesting
      I agree. I hope he described his system poorly and really meant something else.


      The fact is, lot's of large projects are multi-language based right now. Not always in ways you might expect but for example, a large project I worked on for a very large and successful computer company had a large C++ code base. It has a set of no less than 35 support "scripts" written in Korn shell, it has an elaborate build process written in "make" which has portions that break out into Korn or Bourne shell to read environment variables and do various things. If you want to be pedantic you could easily point to pure C in the code base as well... And that doesn't include the java based client that was written later. Honestly I don't know of an easier or better way to run it, not for something like that. It was a very large "system" and not really an "app" or a "program" there were dozens of programs in the system that were sold as a package.


      With web based apps I don't think it's terribly uncommon to have C or C++ doing some kind or service oriented task and then have something like perl or php interface to it and format some HTML. I could easily see a C++ server with some support scripts in Bourne shell (perhaps entries in /etc to start it up) feeding XML type data to a PHP or Perl script running on apache or something like that. As long as things are kept sane I could see it being a very easy way to develop an app and probably a sane one. I don't see someone writing C or C++ code to do what PHP does any better than PHP does it or producing the product very quickly. As a consultant, most of my clients would gladly pay for a few lines of php if it means I get done in 2 months instead of 4 months.

    10. Re:well by Tower · · Score: 1

      That argument only holds when promotion means a move to a different assignment, rather than an increased responsibility level and higher level focus (tech team lead, architect, etc... - non management).

      There are places where promotion opportunities don't need to take you away from your current work (unless you want them to).

      --
      "It's tough to be bilingual when you get hit in the head."
    11. Re:well by ekrout · · Score: 2

      That may be the standard (and evil) practice of a significant percentage of programmers who work in the private sector, but I really hope that not documenting code and making simple code difficult to analyze don't spread to other areas. If you think about it, research is one area where associates must share information and newly-discovered ideas in order to extend their knowledge in a specific field. The world would be a better place without obscure code lying around on every machine.

      --

      If you celebrate Xmas, befriend me (538
    12. Re:well by Aceticon · · Score: 2

      I can just see the talk:

      Manager 1: So, you finally fired the guy?
      Manager 2: Yes, we finally did. We gave him a company car when he demanded one. We gave him a boat when he demanded one. We gave him each and every salary raise he asked for ... except this last one ...
      Manager 1: What happend with the last one?
      Manager 2: He would've costed us more than hiring 4 guys to take his place, so he became redundant...

    13. Re:well by tommck · · Score: 1

      Honestly, there are a few situations I can see this being valid:

      1) small apps
      2) "oh sh*t!" apps (gotta get this done yesterday) that will be rewritten someday soon.
      3) well-chosen, specific, pieces of a distributed system.
      4) apps written by developers who don't have the skills to design and write modular software, regardless of the language they use.

      just my $0.02

      Tom

      --
      ---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
    14. Re:well by Tiltar · · Score: 1

      yes, let's crucify the ego, before it's far too late, to leave behind this place so negative and blind and cynical... ^_^

  6. A good idea... maybe... by xxxtac2 · · Score: 1

    Ive always felt that using multiple languages for applications is a very good idea. The ability to use perl for something like parsing data for a c program comes to mind as a very obvious example. You get the performance of C with the ease and power of programming (the parsing part atleast) in perl. However i think there are probably some serious preformance drawbacks to using this method, though im really not sure. Anyone care to enlighten?

    --

    Oh Well, Whatever, Nevermind...
    1. Re:A good idea... maybe... by jcoy42 · · Score: 1

      The most obvious problem with a multi-language approach is with support.

      You can certainly find a programmer to help you write code, but can you find a programmer that can read, write and debug perl, java, C++, and whatever else you have decided to use?

      If you've got some good programmers that can all program well with all the languages of choice, and they aren't snatched up by some soon-to-be titsup.com, then you are okay. But if you are the only person that can cover all the bases, *you* are going to be the one that has to spend the long nights debugging.

      Then, once you end up with the wonderful position of being the only guy who can fix it when it breaks, you'll find you don't get to deveop anymore, because you'll end up spending all your time debugging.

      --
      Never trust an atom. They make up everything.
    2. Re:A good idea... maybe... by brsett · · Score: 2, Insightful

      Well performance might not be so much a problem as scaling. Spawning threads and processes has some amount of overhead, and in some OS'es can lead to stability problems. If you were to take this proposal too far you could write applications that essentially became fork bombs, or processor pigs.

      I do think it is a good idea to give up the quest for teh single best programming language, currently there are just too many tradeoffs that programming languages and applications need to make for a single programming language to be sufficient, on the other hand I would suggest picking a single programming technique and applying that to your entire application at least. For example, you might use only imperative languages that support real objects, or you might use strictly procedural techniques. But with good enough reason you could vary from that (of course the maintenance costs might skyrocket in that case -- but a prolog based rules system could be cool in a Java business app -- and incredibly slow).

      Offtopic: regexp and regcmp are very good parsing utils for C. In general I don't have any problems with Perl, but I am of the opinion that some of its touted advantages don't exist for good C programmers -- of course that is a skillset many do not wish to attain, and I can hardly blame them

    3. Re:A good idea... maybe... by dmelomed · · Score: 1

      There are if the performance doesn't satisfy your requirements. Taking output of a C program and piping it into AWK is a common practice. Piping output of several programs together is also common. If output is long, it can take forever even on fast machines.

    4. Re:A good idea... maybe... by kenl999 · · Score: 1

      Well, one factor would be "which languages"? If the blocks are coded in (for example) C/C++, Perl, and Java, then I would hope that any reasonably competent programmer would not have any problems.

      If it's coded in 68000 Asm, Eiffel, and Cobol* then, well, it's the PHB's fault for allowing that to happen.

      *These three chosen not to imply a slur that they are obscure, just that they're different and expertise in them might not be that common.

    5. Re:A good idea... maybe... by Anonymous Coward · · Score: 0

      I suggest you reply to your own post with the following:

      "I would like to apologize to everybody on slashdot whose time I've wasted with the previous post.

      "I've been pretending to be a programmer here on slashdot, but I'm afraid I'm not doing a very good job of it. I was hoping that nobody would notice that I really have no idea what I'm talking about. In fact, all I really did was ask the same question as original author.

      "Once again, please accept my apology and know that I'll never post again."

  7. depends by jwbozzy · · Score: 1

    It really depends, I tend to combine Perl and C/C++ alot for SSI's and utilities that I write. I suppose whatever works...Might be tough if cross-platform developing matters to you though.

    --
    perl -e 'printf("mmm %x\n", 3735928559)'
  8. C and Java mishymashy by StuffMaster · · Score: 0

    I like mixing C and Java statements in my programs. It makes writing easier, and drives the compiler crazy!

  9. Optimization across processes can be tricky... by gatkinso · · Score: 4, Interesting

    ...just the cost of the context switch can be enought to deter one from this.

    Cross platform development just got that much more complex.

    Add in the cost (not always $) of additional development tools, maintaining such a beast, and obtaining the required knowledge/skills can make your approach daunting - esp on large scale multideveloper projects.

    --
    I am very small, utmostly microscopic.
    1. Re:Optimization across processes can be tricky... by dmelomed · · Score: 2, Insightful

      However, the cost of context switch, though very high for an OS, is not high for some installations. Depends on application. Your disks might as well be the bottlenecks. Profiling is necessary in any case.

    2. Re:Optimization across processes can be tricky... by horster · · Score: 4, Informative

      > ...just the cost of the context switch can be
      > enought to deter one from this.

      not really - breaking up your app by process adds a few efficiencies with a nice, simple, easy to understand model.

      1. multi-processor scaling, generally a no brainer with seperate processes, if they are broken up intelligently

      2. reduced memory foot print - well broken up processes mean you don't have to worry about loading up a ton of libraries all at once, you can let the os deal with memory as processes are kicked off and finished

      3. security - different processes can be run as untrusting groups, a great boon especially if one processes needs to run as root!

      a great example of this is qmail, the original mta that took a monolithic app like sendmail and used the unix process model to break it apart into well defined pieces. the result is a faster, more secure, easier to understand and generally much simpler application.

      h

    3. Re:Optimization across processes can be tricky... by lkaos · · Score: 3, Interesting

      I hear these arguments alot, but they are just not right.

      1. multi-processor scaling, generally a no brainer with seperate processes, if they are broken up intelligently

      This is what threads are for. Now, there has to be communications amoung the processes and the overhead to accomplish this is greatly reduced if done in a single application. Now, you can bitch about programming threads but if you can break the program into entirely seperate processes, you shouldn't have to worry about race conditions since you code is already so seperate.

      2. reduced memory foot print - well broken up processes mean you don't have to worry about loading up a ton of libraries all at once, you can let the os deal with memory as processes are kicked off and finished

      Well, one would hope that if multiple processes need to be using a common library that it be made into a shared library. There is only ever one instance of a shared library in memory. The little bit about avoiding memory leakage by having processes restart frequently requires a great deal of latency when actions occur. If your application can handle this latency, and you want to be that lazy about programming, then just have your application restart every n minutes.

      3. security - different processes can be run as untrusting groups, a great boon especially if one processes needs to run as root!

      There are very few circumstances when a process should ever have to run as root. Why do a bunch of apps have to run in a group whereas a single app can't? If an application absolutely requires some bit of access to resources only given to root, then having that application just exist presents a huge problem since you are effectively making a resource that many smart people think shouldn't be given to arbitrary applications and giving it to them.

      qmail is written in C, and this is definitely the C way to do things, but in C++, objects present a much cleaner interface to all of this. That is the beauty of OOD. qmail really should be written in C++ if there is such to encapsulate things. (although OOD is accomplishable in C, albeit very, very ugly).

      --
      int func(int a);
      func((b += 3, b));
    4. Re:Optimization across processes can be tricky... by Anonymous Coward · · Score: 0
      2. reduced memory foot print - well broken up processes mean you don't have to worry about loading up a ton of libraries all at once, you can let the os deal with memory as processes are kicked off and finished

      Assuminig you are using only dynamic libraries and depending upon your system this might be true. But I doubt it because a typical program will need to load a kernel. It is true that some operating systems will not truly return freed memory until a program exits, but even so the overhead of creating a new process (including what the OS hides from you) is daunting. So you reduce the memory footprint of one process at a cost of creating another process whose footprint will probably be greater than the native implementation, especially with scripted languages.

      3. security - different processes can be run as untrusting groups, a great boon especially if one processes needs to run as root!

      I must point out that this can equally be a security hole. By executing another process, you may compromise your application from the vagaries of a person's path and other installed software. If you take the effort to secure this (by several methods each with its own shortcomings and strengths) you will increase the size of the software and add overhead to the context switch.

      I use multiple languages to produce applications in a small number of circumstances.

      • Fast Hacks
        These often prove a concept and can use as many languages as I find useful to complete the thing most rapidly. No need for elegance, just completion.
      • Support Tools
        Little tools that automatically test a module, automatically generate tedious code segments, or the like. No need to be pretty when no one who matters can see it.
      • Integration
        During integration, the language used must be most appropriate to the task at hand. Perl may be a great language, but if it is not available on your default platform installation it may be inappropriate.
    5. Re:Optimization across processes can be tricky... by bkocik · · Score: 1
      This is what threads are for.

      Am I the only person who finds it really irritating and distracting when someone emphasizes the wrong word in a sentence?

    6. Re:Optimization across processes can be tricky... by lkaos · · Score: 1

      Ahh, you speak to quickly without understanding my point (I imagine your not a programmer).

      People abuse threads trying to solve all of their problems with threading. People instantly think threads make their program better but often times they are used incorrectly.

      The proper use of threads involves multiple distinct aspects of an application that need to communicate with each other but in no other way would benefit from being a single thread. I was emphasizing a point outside the scope of what I was discussing in my post. This also is why I took the trouble to emphasize at all.

      --
      int func(int a);
      func((b += 3, b));
    7. Re:Optimization across processes can be tricky... by bkocik · · Score: 1
      Ahh, you speak to quickly without understanding my point (I imagine your not a programmer).

      You would imagine incorrectly. And it's "too quickly" and it's "you're". As in, I imagine you're not a writer.

      Anyways, I was being flippant. Don't let it worry you.

  10. Maintainability by cfadam · · Score: 4, Insightful

    When you start using several different languages, you now need a person with several skills to maintain it. Trying to find a mid-level programmer who is strong in 5 unrelated languages is much more expensive than a mid-level programmer with 2 primary languages in his toolbox.

    Personally, I write something end-to-end with one language because its nice to be consistent.

    - A

    1. Re:Maintainability by cmowire · · Score: 2

      Most programmers I know who actually have a CS degree or equivelent (That didn't come from Bob's Orange Smoothie and School of Computer Science) can pick up a new programming language fast enough to be useful.

      But then, my definition of a mid-level programmer must be different than yours is.

    2. Re:Maintainability by DA_MAN_DA_MYTH · · Score: 1

      I agree lower division CS classes focus on syntax, while the upper division classes should teach you fundamentals of thinking in algorithims and data structiures, which if you can think in legos you can build castles.

      --
      "It takes many nails to build a crib, but one screw to fill it."
    3. Re:Maintainability by hearingaid · · Score: 2, Insightful

      5 unrelated languages?

      Are there 5 unrelated languages?

      Okay, let's see. There are assembly languages. There's ALGOL-family languages, which include every language I've seen mentioned here except maybe Perl (and it's usually written in an ALGOL kind of style). There's LISP, Forth, Prolog.

      Okay, there are five unrelated languages. But C, Java, C++, Pascal, ADA, FORTRAN, COBOL, BASIC, Modula-2, and lots of others are all related, and frankly are pretty easy to learn once you know one of them well.

      --

      my old sig used to be funny, but then slashcode ate it and now it's not funny anymore

    4. Re:Maintainability by Anonymous Coward · · Score: 0

      Any programmer should have no problem picking up a new language within a few weeks. Managers sometimes have trouble with this concept. For example my manager ( who is not a programmer) is worried about training because we have decided to use Python for our scripting needs. Every member of my team is telling him that all we need is a few books. Only two of us have a CS degree. Most started life as technician who have learned programming on the side. A few are currently working on CS degrees. We are about as low level as you can get ( and payed like it!) For us, picking up a few new languages is no big deal. Of course we may be an exception as we got into programming because we love to do it, and several like me have been doing it for longer then many /. readers have been alive. I personaly have worked in some 15 languages, some of wich were truely bizzare creations. It is far more important for a programmer to be able to learn new languages then to be an expert in only one. Technologies change and so do languages.

      Members of a programming team will tend to work in and become experts in particual areas. Other team members will tend to consault the experts when delving into a new area. Therfore it is not necesary for everyone to be a guru of every language used.

      Personaly I like the idea of using Python for the top level interface stuff, Make for building and installation tasks, and C++/Java ( Ada95!) broken up into several executables for the meat.

  11. use 'em all by gerardrj · · Score: 2, Interesting

    I personally like the 'use whatever gets the job done' technique.
    Writing differnt parts of apps in difernt languages is the easiest way for me to accomplish a task, and to support the software later. For instance, writing some things in AWK or PERL will dramatically reduce the complexity of a C++ program. I Write some things in C or Assembly (I gave up machine language with my 6809) for speed or source code control.
    There is something to be said for developing a library of code all in one language, but for my purposes the multi-language approach works best.

    --
    Article X: The powers not delegated... by the Constitution...are reserved...to the people
  12. oh god yes by jabbo · · Score: 5, Interesting

    I'd go insane if I tried to use a compiled language for frequently-changing applications (eg. web interfaces to purchasing systems, database large object manipulation & indexing, etc.) but likewise I'd grow old waiting for things to happen if the cores weren't in C.

    Personally I dislike C++ because I find it harder to port than ANSI C. But I wrote plenty of it when I was learning how to program (before I learned Scheme and Perl and Java and got some latitude in my paradigms). Either C or C++ is great for speed and hooking into the OS or an Apache module or whatever. It's also less tempting for admins or rookies to mess with C code because bad code may not compile.

    On the other hand, object-oriented (or at least modular) PHP and Perl code, and decently-written Java code, is much easier to adapt to changing demands. I stick with PHP and Perl, myself, and I use Perl as kind of a glue-core layer between C applications and PHP interfaces. If I had more time I'd probably write the hooks as PHP extensions, but Perl is just so damn powerful when you use it right.

    I'm not sure what people are thinking when they specify that everything on a project "needs" to be done in Java or whatever. It's not particularly hard to use my code, since it's all just calls to libraries that automagically do the hard stuff. More importantly, I tend to use POD or Javadoc-style comments in everything, and don't put it anywhere else. That way I am forced to keep it all up to date, because that's where *I* remind myself what arguments to feed what methods!

    --
    Remember that what's inside of you doesn't matter because nobody can see it.
    1. Re:oh god yes by pi_rules · · Score: 5, Insightful

      I'd go insane if I tried to use a compiled language for frequently-changing applications (eg. web interfaces to purchasing systems, database large object manipulation & indexing, etc.) but likewise I'd grow old waiting for things to happen if the cores weren't in C.

      Tisk tisk... if it's changing so often why it is integrated right into the logic of the code? Simple, it shouldn't be. Find a way of breaking the presentation layer out of the actual code; and write a config file for other options, one that's expandable. Don't suffer from C programmer's diesease thinking that changing #define statements and recompile is a "user friendly" way of doing things.

      On the other hand, object-oriented (or at least modular) PHP and Perl code, and decently-written Java code, is much easier to adapt to changing demands.

      I can't really think of any basis for this to tell you the truth. Well designed c/c++ projects shouldn't be any harder to modify than any other language. If they are then the initial design is too inflexible which usually means the original coder didn't know the language at hand well enough to properly put together a project.

      I'm not saying that you've picked the wrong languages for whatever you're working on... just disagreeing with the overall "blanket" type nature of the post.

    2. Re:oh god yes by SecretAsianMan · · Score: 3, Funny

      got some latitude in my paradigms

      Yeah, I bet it really helped you to leverage your synergy to grow your productivity.

      --

      Washington, DC: It's like Hollywood for ugly people.

    3. Re:oh god yes by Anonymous Coward · · Score: 0

      object-oriented (or at least modular) PHP and Perl code,

      Eeek... can't say "object oriented" and "perl" in the same sentence!
      If that's the case, your better off with Java or Python.

      Perl is a great little tool for admin'ing and scripting, but I find other languages better for "products".

    4. Re:oh god yes by foobar104 · · Score: 2

      There's an old adage that sooner or later every argument will devolve to the point where one side or the other compares the subject of the argument to Hitler. At that point, the argument is over.

      (Too lazy to look up a source for that right now. If you know who said that first, share and enjoy!)

      Similarly, every discussion of the merits of one programming language or practice versus another will devolve until eventually somebody plays the "well-designed system" card.

      "In a well-designed system, changes would be easy."

      "In a well-designed system, implementations would be both opaque and portable."

      "In a well-designed system, code would be self-documenting."

      Now that we're through counting the merits of well-designed systems, could we please get back to talking about real-world experiences?

    5. Re:oh god yes by SecretAsianMan · · Score: 2

      Snort! Thank you for the comic strip link. It rocked my uncannily Dilberty world! Now, please excuse me while I try to stop rolling on the floor. :)

      --

      Washington, DC: It's like Hollywood for ugly people.

    6. Re:oh god yes by adubey · · Score: 2

      *sigh* another know-it-all :)

      Tisk tisk... if it's changing so often why it is integrated right into the logic of the code?...write a config file for other options

      Right. C isn't interpretted. Don't be stupid and use an interpretted language. Just be smart and write an interpretter in C!!

      There are definately cases where this approach makes sense (i.e. if you're writing a web server for millions of admins who really don't want to tinker with your code). There are cases where it is overkill (i.e. you need to toy with the UI of a small custom app). The danger of being a know-it-all is that you give people hammers when they definately don't have nails.

      I can't really think of any basis for this to tell you the truth. Well designed c/c++ projects shouldn't be any harder to modify than any other language. If they are then the initial design is too inflexible which usually means the original coder didn't know the language at hand well enough to properly put together a project.

      I can think of plenty of basis for this. Have you ever used any of the other languages? Have you ever felt the freedom from not having to chase stack overwrite bugs or memory leaks? Of not having to design your interface to track memory AND implement an algorithm rather than just designing it to implement an algorithm? The time spent on doing these needless tasks makes things harder to modify. And these are tasks which C++ forces you to do.

      ...just disagreeing with the overall "blanket" type nature of the post.

      My sentiments exactly.

    7. Re:oh god yes by swillden · · Score: 2

      Right. C isn't interpretted. Don't be stupid and use an interpretted language. Just be smart and write an interpretter in C!!

      Or, even better, use one that is already written in C. It's a bad idea to use a full-blown interpreted programming language where a simple tool to define name-value pairs will suffice. If the reason isn't obvious, I'll leave you to ponder it for a few years. You'll figure it out.

      I can think of plenty of basis for this. Have you ever used any of the other languages? Have you ever felt the freedom from not having to chase stack overwrite bugs or memory leaks? Of not having to design your interface to track memory AND implement an algorithm rather than just designing it to implement an algorithm? The time spent on doing these needless tasks makes things harder to modify. And these are tasks which C++ forces you to do.

      I don't know about the other poster, but I've used a great number of different programming languages. I've also used C++ since 1990, and I can tell you that if you're having to deal with stack overwrite bugs, memory leaks and implementing a memory management system, you're not using C++ correctly.

      Stack overwriting is generally caused by using C-style strings and arrays. Don't. Use the STL or, if you can't use that because you need to port somewhere that doesn't have a decent C++ compiler, find or write classes to fulfill these purposes.

      Memory management in C++ is a breeze if you use smart pointers religiously. The only decisions I ever have to make about memory are performance-related, really. I could just use reference-counted smart pointers for everything and not worry about it (well, simple reference counting doesn't deal with cycles, unlike a real GC, so there is some need to watch out for those). But reference counting is a bit inefficient and more often than not I know that the lifetime of a particular object is bound to an ownership relationship with a stack variable or another object, so I can use an ownership-passing smart pointer. Also, I often know that instances of a particular class are going to be allocated and destroyed very frequently, so I choose to use a pooled allocator, rather than relying on general-purpose memory management.

      Not only is memory management no big deal in C++, neither is any other sort of resource management. While garbage collection frees the programmer from worries about managing memory, it is no help whatsoever with other resources. C++ destructors are a very nice general-purpose resource management tool. I can easily close files, release drawing contexts, deallocate semaphores, etc., etc., etc. in precisely the same way that I free blocks of memory. Yes, I know Java has finalize methods and, no, they're not useful.

      C++ does provide all of the power required to make programming quite safe and easy, if you use it. It's far from a perfect language (it's complexity is such that I hesitate to use it on any project with a large number of novice programmers) but please don't put down the language just because you haven't learned how to use it correctly.

      BTW, all of the above should make it clear why I think it's really inaccurate to discuss "C/C++" as though it were two dialects of one language. C++ is vastly more usable than C, one one has learned it.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    8. Re:oh god yes by Tiltar · · Score: 1

      altering a c/++ app or extension or whatever should be no problem if you designed it well in the beginning. when i write an app, i go to very distant extents to ensure that my code is scalable and upgradeable. if you work hard in the beginning, to build a very stable, concrete structure, the rest is just filling in some blanks.

  13. Yeah by Corporate+Troll · · Score: 0
    Here we go for another Java/C++/C# flamewar added with a spicy argument on how the Unix philosophy is small programs acting toghether. Don't read on you'll only find:
    • Java Rulez, yippie
    • C++ Rockz and Java is bloated and slow!
    • Real programmers code directly in hex anyway
    • C# is the future....Get assimilated!!!!
    • Unix simplicity over all
    • The windoze API allows much more than you damn wimps with awk and grep!
    1. Re:Yeah by sbrown123 · · Score: 1

      You forgot someone bringing up a Mac in the conversation. I dont know why, but someone always seems to sneak a Mac in a Java & C troll war.

    2. Re:Yeah by Anonymous Coward · · Score: 0

      That's because Macs drool while PCs rule. Windows PCs, that is.

  14. Did you really MASTER any program? by BrentRJones · · Score: 1

    Your question sounds like you are fairly good at several programming languages, but have not really mastered a major one.

    May I ask why use many programs when perhaps one will do? In your case C++

    --
    Help end the use of Sigs. Tomorrow
    1. Re:Did you really MASTER any program? by wbav · · Score: 1

      The point you didn't consider is, for example (and I've had to do this) on a php web page, I've need to get the title from a pdf.

      To get a title from a pdf you must parse the end of the file, to find an index number. Then starting at the top you use this index number to find the actual title of the pdf (and not the title of some text box.)

      My boss (no he wasn't a phb, he was cool about stuff) and I sat down and wrote programs to do this in our favorite languages, mine was c++, his was perl. As it turned out they both ran about the same speed, but his was 8 lines, mine was 100+ and used a whole lot more memory.

      Now if you used the perl to get the title rather than using c++, but then used c++ as the interface (it handles argc, argv and ui better than perl) didn't you write less code, and make it easier on your self?

      It's not a question of mastery, it's a question of which is a better use of my time. Writing 8 lines of perl then playing games for an hour while I wait for the next project, or spend considerable time writing it all as c++ native and missing out on my game time?

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Did you really MASTER any program? by Anonymous Coward · · Score: 0

      You guys have it all wrong. Write your code in as many obscure and varied ways as possible. 100+ lines of poorly documented c++ code vs. 8 lines of perl script is called JOB SECURITY ;) That way when they lay you off and can't figure out how to update you're program they'll have no choice to hire you back as a consultant... at a much higher rate I might add.

    3. Re:Did you really MASTER any program? by wbav · · Score: 1

      There is truth in your point.

      See: Scott Adams; The Holy Grail of Technology

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    4. Re:Did you really MASTER any program? by Anonymous Coward · · Score: 0

      That is the whole point!!! If you are not writing master programms in any of the languages, anybody with a clue about programming should be able to maintain the code, just by looking at the code. He does not need to know the languages in depth.

  15. Some Disadvantages by ickpoo · · Score: 1

    I can see the merit in building applications out of several languages. Several programs here at work are mixs of several langauges. But, interfaces between the languages need to be build (or borrowed via libraries), and these can add significant amounts of work. Also, debugging, it can be painful.

    --
    I am not a script! .Sig?
  16. Release and maintenance problems. by Hiro+Antagonist · · Score: 5, Insightful

    I will do this sometimes for code that is intended for short-term, internal-only use, as I can often save quite a bit of valuable time.

    If the code has to be maintained, forget it; what if I leave the company? Not only does my employer need to find someone who can code in C, C++, Java, Perl, Python, shell script, and assembler, but they have to find someone who knows how all the languages work together. Debugging is also a bit more difficult, as you have to jump between languages, and it can nastily confusing.

    For code which is supposed to be release-quality, this is out of the question; you can't expect all of your clients to install Python because GUIs in Java are grotty, or install Perl because you don't want to screw with hashes and regexps in C. Release code also needs to be maintained, and there is going to be some developer turnover; it'll be easier to replace coders who leave when you don't need to list five languages as "required" on the employment-availablity posting.

    --

    --
    I Hit the Karma Cap, and All I Got Was This Lousy .sig.
    1. Re:Release and maintenance problems. by aridhol · · Score: 1
      I will do this sometimes for code that is intended for short-term, internal-only use, as I can often save quite a bit of valuable time.


      And what happens when a suit decides that what you have is just what the company needs for its next product? No, we don't have time to change it. Just ship it as it is.
      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
    2. Re:Release and maintenance problems. by Atzanteol · · Score: 2, Insightful

      I didn't get the impression that he was talking about using 5+ languages on a project. Two or three is perfectly reasonably, under certain circumstances.

      I personally use Perl, C/C++, and PL/SQL in tandem with each other. Each language performs certain tasks better (or easier) than the other. I find this can make supporting the code 'simpler.' It's much easier to write a small PL/SQL stored proc for some actions than to muck around with C/C++ for the same task. And Perl is great for automating file movements (ftp files from a to b, run processes q and z on them).

      Use what gets the job done. It's not *that* difficult to find developers who know 2 or 3 languages.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    3. Re:Release and maintenance problems. by KyleCordes · · Score: 4, Interesting

      [Not only does my employer need to find someone who can code in C, C++, Java, Perl, Python, shell script, and assembler]

      You are certainly right in the extreme case, but this is often overdone. If your employer is not hiring people who can learn a bit of Python when they need it, perhaps they should hire different people. If you can save a lot of time and money why adding a second language to a project, it may well be worthwhile. Adding the 5th language very likely is never worth it.

    4. Re:Release and maintenance problems. by DA_MAN_DA_MYTH · · Score: 1

      And you too are right, a good programmer can pick up the syntax to a different language in minimal time about an hour or less, to be somewhat effective in reading and debugging code, even writing code. (Even though some programmers don't like picking up that new language, for example me and VB)

      --
      "It takes many nails to build a crib, but one screw to fill it."
    5. Re:Release and maintenance problems. by zenyu · · Score: 1

      I will do this sometimes for code that is intended for short-term, internal-only use, as I can often save quite a bit of valuable time.

      I tend to rewrite the code a couple times before I subject another user to it, so it starts out as a soup of languages. The UI might be in Java the core code in C the management in C++, and some scripting languages to tie things together. To avoid CORBA or whatever platform dependent linking riddle I'm faced with I'll just tie it together with sockets using TCP or UDP.

      But then if it goes anywhere I'll consolidate to one or two languages. I'll use a regexp library instead of the full fledged scripting language. If the C & Java are on the same hardware I'll link them, if not I'll set up CORBA, etc. until it's all manageble. I've learned to do this from the experience of having some old really cool projects become almost impossible to get running again because they required 10 different language environments to be functioning together as they did 5 years ago... And hey sometimes other people end up maintaining my code.

    6. Re:Release and maintenance problems. by JBv · · Score: 1

      That is part of the not-so-fun part of linux application dependencies that leads to a huge amount of wasted time in upgrades.

    7. Re:Release and maintenance problems. by Pheersum · · Score: 1

      Why do you give a shit about what happens to your employer once you leave the company?

    8. Re:Release and maintenance problems. by Malcontent · · Score: 2

      Two things.

      "what if I leave the company?"
      You should exhibit loyalty and compassion towards your company exactly as much loyalty and compassion they have towards you (and maybe less).

      "You can't expect all of your clients to install Python because GUIs in Java are grotty"

      This is rather irrelevent. I can't count the number of times MS made me install IE or patch IE or install the latest version of MDAC or the MSI installer to install some other program. If MS can make you install 60 megabytes of stuff just to run it's XML parser then why should you care if someone has to install a tiny perl interpreter.

      --

      War is necrophilia.

    9. Re:Release and maintenance problems. by dangermouse · · Score: 1
      Because unless they just randomly sacked your ass and hate your guts, you'll want to use them as a reference when you go for your next job.

      Also, this doesn't just come up when you leave the company... it comes up if you're promoted or moved to another group within the company. What happens, then, if they can't find anyone to take over your weirdass code? It doesn't make you look like an asset, it makes you look like a liability.

  17. Maintainability by Xawen · · Score: 4, Insightful

    I think that by designing one larger program, you leave the maintainer (even if it is yourself) with an easier job. It is much much less painful to use one compiler to change one set of source files, in one language. Maybe it's just me, but I always seem to have problems shifting gears between more than two languages at once. And C compilers don't like perl a whole lot.....

    This goes double if your code is open source. There is enough hard to read, poorly organized code out there that anything that is unified (in style, language, etc.) is helpful. Call me old fasioned, but simpler is usually better.

  18. Generally, a bad idea by Ars-Fartsica · · Score: 5, Insightful
    People mix languages out of necessity for accomodating legacy code.

    Mixing multiple languages creates huge maintainence issues - will the API for integrating the languages give you enough breathing room in the future?

    How about performance? Integrating multiple languages means invoking multiple runtimes and address spaces.

    What about debugging? The small amount of experience I have had integrating Perl and C clearly indicates that debugging large apps written in multiple languges is extremely difficult - forget about your IDE or traditional single debugger.

    1. Re:Generally, a bad idea by evbergen · · Score: 2, Informative

      Depends on your interfaces, of course. If you want to bind the modules together by having them freely call each others functions, this can and probably will become a debugging nightmare.

      However, for those cases where you'd already go for a multiprocess design, using a clean protocol that's spoken between the modules, it can be quite a good idea to exploit the simple fact that some languages are better at some things than others.

      Eg. my current project, OpenRADIUS has a C core that does low level packet handling, job scheduling, etc., and a module that happens to be written in Perl to easily deal with simple and more complex formatted ASCII tables.

      If I would have had to write that module in C as well, it would *definitely* have taken me a lot more time.

      --
      All generalizations are false, including this one. (Mark Twain)
    2. Re:Generally, a bad idea by tgke · · Score: 2, Insightful

      You are right that languages are often mixed because of legacy code, and mixing languages can create maintanance issues.

      But, those issues can be reduced if a proper the entire system is properly design, with clean and well documented interfaces.

      And performance IS an issue, but only in certain, often small sections of the entire code base. Rapid development in a protoyping language as Python, and optimizing using compiled C modules does not sound like a bad idea to me.

      Time you win during the development cycle can be well spend in the important testing and refactoring stages.

      And don't worry, in larger projects, refactoring WILL be needed. ;-p

  19. A question by lobsterGun · · Score: 1

    I'm curious. Under what circumstances do you call each of the languages you mentioned?

  20. Languages are a means not an end by javester · · Score: 3, Insightful

    Use a screwdriver to drive in screws. Use a hammer to drive in a nail. And sometimes, if I need something really quick and dirty, you can just staple it in.

    Having language religion is bad!!!!

    Also, there's much to be said about the life of applications. Save for COBOL, how many old-style two-tier client-server apps are still around with no plans of being retired.

    Also, I second the motion that using scripting languages is not a bad idea. For those parts of a system that get executed repeatedly, it makes sense to go with a compiled language.

    For those program paths that are called occasionally, its not a bad idea to use "glue code".

    1. Re:Languages are a means not an end by peteshaw · · Score: 2

      I am reminded of the expression

      "If your only tool is a hammer all your problems begin to look like nails."

      Look at what development is going on today. VB and Java represent a huge and growning number of large business data driven apps. Why? Ease of use, rapid prototyping, simple(r) debugging.

      But these languages are limited by their design. VB is platform dependant, and is a good arms length from the OS. Also, it isn't very fast. Java is slow too, and its platform independance separates it from the OS as well. .Net is another framework of 'Glue' languages.

      Any of these, require occasional tweaking with something more low level, and that usually meanse C++, Delphi, ANSI C, whatever.

      --
      www.avacal.com -- the home page of pete shaw
  21. Software Engineering by smoyer · · Score: 1
    I'm sitting here trying to envision the architecture and detailed design documents that a large software project requires when so many languages are involved.

    With more than one developer, this would also put a significant strain on the person in charge of maintaining (and levelling) the development schedule. Whew!

    1. Re:Software Engineering by Yunzil · · Score: 1
      I'm sitting here trying to envision the architecture and detailed design documents that a large software project requires when so many languages are involved.


      Luckily for me, I've never seen a design document where I work. :-b

    2. Re:Software Engineering by Atzanteol · · Score: 1

      It's not as difficult as you would think. On my project (10+ developers, 10+ analysts) we use a healthy blend of Perl, C++, Pro*C, PL/SQL, VB, Javascript (in web pages), and VB Script (asp pages).

      We use the language that is best for the job. Multiple C++/Pro*C programs controlled by Perl scripts, calling PL/SQL functions on a database works surprisingly well for back-end batch processing.

      The PL/SQL stored procedures can also be called by our VB GUI application! Code-reuse. :-)

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    3. Re:Software Engineering by Anonymous Coward · · Score: 0

      At school, they taught me that this is called Modules. Now a bunch of little modules create a program. It doesn't matter what language is used, as long as your MIS's are concise everything will work out.

      (Module Interface Specification)

      Doesn't everybody love math?

  22. From a UNIX standpoint by Anonymous Coward · · Score: 0


    This is the way to go. This is what makes UNIX wonderful. Small apps which call other small apps to get things done. It's what UNIX is built on.

    Should be a no-brainer unless you come from the Windose world...which I know little about. ;-)

    1. Re:From a UNIX standpoint by Anonymous Coward · · Score: 0

      It is called COM you dipshit! Pick you language, have it used by any other program in any other language.

  23. Doesnt really matter by sbrown123 · · Score: 1

    I do the complete opposite and code in Java and use it to control C/C++. Ive found this to work best due to C/C++ can give me a "closer to machine" than Java whereas my main logic, being in Java, ports real fast. An example would be creating a game and using C/C++ to do the graphics and using Java to do all the games logic or functionality.

    Whatever works for ya.

  24. Policy... by AcidDan · · Score: 2, Insightful

    Actually, I can agree with the "right tool for the right job" which is what you are saying however, I can see points for the other side of the coin (especially in a large corporate environment).

    - Standardisation upon one language and/or platform drops training costs for the org (and keeping people up to speed to maintain parts of the system).
    - This allows one guy on one project to be shifted to another with minimal re-training (just some familiarisation time).

    I will make the point though, that as developers we should be able to language-hop easily as we know the concepts common to all languages.

    However, from a business point of veiw - it does make sense to put all the eggs in the one basket (though at times you feel like all your problems look like nails because you've been given a 'hammer' to work with).

    -- Dan =)

  25. Python - C, C++, Java by Mochatsubo · · Score: 1, Offtopic

    Sounds backwards to me. I usually use Python as my "control program" You can extend Python with C or C++. And use Java libraries directly when programming in Jython.

    Python: www.python.org
    Extending Python: www.python.org/doc/current/ext/ext.html
    Jython: www.jython.org

    1. Re:Python - C, C++, Java by Anonymous Coward · · Score: 0

      Yeah...using C++ to control everything, and scripting languages or Java depending on what gives "best performance," seems sorta backwards. Most people tend to do it the other way around...

    2. Re:Python - C, C++, Java by rpg25 · · Score: 1

      I'm not a python user, but I use perl and Common Lisp a lot. I agree with this poster, why would you want to use C++, which is a low level language, to control high level languages? Wouldn't you be better off starting out with a high level language and then doing the high-cost bits in C/C++?

      For that matter, the Kernighan and Plauger book (I think that's the one), although it reaches the opposite conclusion, clearly shows that you're probably just as well off writing perl as C++, for efficiency purposes.

  26. A little simplistic by harangutan · · Score: 5, Insightful

    There are a lot of factors you haven't mentioned: will you need to reimplement the same features in multiple languages? Will you have messaging between programs that don't support identical datatypes and structures? Will you have unicode support in all the languages when you need it? How about futureproofing? Will all those languages continute to have the necessary degree of orthogonality two years from now when you need o overhaul the system to meet some new requirement or paradigm?

    These are all risks that you take, and this is just off the top of my head.

    I mix languages on occasion, mainly for client-server apps where I need the server to be fully optimized and not necessarily portable, but the client must be portable and can stand to be less optimized. But you introduce a lot of risk and redundancy if you don't have very good reasons for doing everything you're doing.

    1. Re:A little simplistic by jackb_guppy · · Score: 1

      Your view is a little to simplistic too.

      I been doing mixed systems for years. It is the only way to go. C++ is bad as a device dirver. C is bad as screen or file handler. ASM gives speed. Basic gives control langange. Not to forget... RPG, COBOL, IBM/ASM, APPC/APPN, TCP/IP, HTML. You may not think of these as languages but they are. Oh - throw in (s)(f)printf also. Do not forget sed / gred / find / the OS of choice...

      All system are mixed, period. The question is how deep... 1%, 5%, 20%.

    2. Re:A little simplistic by Anonymous Coward · · Score: 0

      HTML is a *Markup* language, not a programming language.

    3. Re:A little simplistic by Anonymous Coward · · Score: 0

      Due to this comment and some of his above it, I'm going to call this one a Troll.

  27. Python and then whatever else by TheHaas · · Score: 1

    I usually just use Python, and then code an extension module or find an executable to use a system call out to some executable for the processor/memory intense parts -- but those are few and far between. I've also used a little Jython, which is Python's Java implementation, and that works well, too, especially when interfacing with Java apps.

    I once wrote a fairly complex XML to HTML converter, the GUI in wxPython, the conversion in XSLT, and Python code to "manage" it. Works wonderfully.

  28. Re:The Turd Report 11/20/2001 by avandesande · · Score: 1

    I see you have taken my advice from yesterday

    --
    love is just extroverted narcissism
  29. Not a fan.. by Xzzy · · Score: 4, Informative

    I spent some time dorking with tcl a ways back and it's always been touted as a "glue" language for bringing lots of pieces together.

    Ultimately I decided I didn't like it because unerringly, at some point, you'll want your "pieces" to talk to each other more intimatley than your "glue" will provide (without substantial effort anyways). Keeping my pieces to modules or at the very least individual C libraries means I can have my stuff talk amongst itself in whatever form the language provides.

    My suspicion is that having lots of executables laying around increases run time / memory usage as well because the system has to deal with that many more processes getting created.

    And that's not even getting into the readability issues of having a piece of software use a random number of different languages..

    The only "language" I've ever found the glue idea even remotely useful was in shell scripting, because the massive bulk of my scripts are just done to automate repetitive shell commands and it's a lot easier to type ./foo.sh than it is to dork with the up arrow.

    1. Re:Not a fan.. by dmelomed · · Score: 1

      "My suspicion is that having lots of executables laying around increases run time / memory usage as well because the system has to deal with that many more processes getting created."

      Yes, but it certainly modularizes the system, and catching errors is easier since you know which process to look at (same language or not). And the kernel overhead might not even be that important for the software you're writing. For example, you might be blocked by the slow disk or serial I/O, where kernel overhead is not a factor with many processes, but flexibility is desired.

  30. Languages are tools by ez76 · · Score: 2, Insightful

    I think your approach (and ones similar to it) make the most sense.

    Programming languages are like sets of tools; the challenge is picking the right set for the job(s) at hand. I'm sure that given enough resolve, one could code a 3-D FPS game in perl (knowing our community, this has probably already been done). You can also get away with using a butter knife instead of a powerdrill in some instances. It doesn't mean it's the best use of tools or technology.

    I've always been puzzled by people who are fanatic about a single language (or any single technology for that matter). You'd never hear a carpenter say, "I always use a chisel and hammer, no matter what the task."

    1. Re:Languages are tools by Anonymous Coward · · Score: 0

      Your tool analogy is flawed. Java, C++, C, VB, Delphi, etc are not a single tool. Each can do what the other can do. They have strengths and weaknesses, but I don't think you can say that C++ is a hammer, while Java is a screw driver.

    2. Re:Languages are tools by ez76 · · Score: 1

      I could have been clearer, but when I said "programming languages are like sets of tools," I meant that each language was a set of tools, not that languages are collectively a set of tools. My bad.

    3. Re:Languages are tools by flonker · · Score: 1

      I'm sure that given enough resolve, one could code a 3-D FPS game in perl (knowing our community, this has probably already been done).

      In one line too, no doubt.

  31. YIKES! by geekoid · · Score: 2

    what a nightmare!
    Here is that Bank software you waned, the interface is written in VB, Java and C++, the middle tear is in C, PERL, and fortran, and the back end is cobol, fortran and informix.
    yeah, that would be good.
    Too often when someone says a language has a weaknes, what they really mean is "Its too hard to learn the language really well".

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    1. Re:YIKES! by scott1853 · · Score: 2

      Was this suppose to be funny? You've actually descibed my perception of corporate applications to a tee. Lots of little individual things written in whatever language the consultant of the year wanted to use.

    2. Re:YIKES! by EnderWiggnz · · Score: 2
      ahh yes, the average IT type -

      USE ONE LANGUAGE!!! we are all idiots who can only learn one language, and we MUST use it for every single project, on matter how inapplicable it is.

      Informix 4GL doesnt have file access? who cares, make a temporary database table!!!

      VB isnt known for its alogorithm capabilities, screw that, write a schedulign algorithm in it...

      BUT whatever you do, dont use something that works, everything is a nail, and we've got this golden hammer.

      no thanks, been there, done that. you end up with code that is written in languages ill-suited for the purpose.

      --
      ... hi bingo ...
    3. Re:YIKES! by broody · · Score: 1

      Informix 4GL doesnt have file access?

      That is not true. Sure 4GL for file access is not the most concise but it reusable if you have a half way decent design.

      Generate a REPORT with 0 values for the MARGINs and a 1 line for PAGE LENGTH and poof you got a flat file.

      Sure you can just LOAD what you need but one can always use something like this when it's the right tool for the job.

      Sure there is more to it then some of the alternatives but it works just fine. Gods it's a scary, scary day when I defend Informix's 4GL.

      --
      ~~ What's stopping you?
    4. Re:YIKES! by wbav · · Score: 1

      It seems that you sort of missed the target.

      see this reply for some background on weakness in languages

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    5. Re:YIKES! by EnderWiggnz · · Score: 1
      i did an obscene amount of 4gl development :-)

      and i understand all those methods of getting around the file access problem...

      however, i had the "joy" of writing an app that took in an arbitrary flat file, parsed it according to arbritrary specs, and inserted it into the corresponsing tables correctly...

      perl, about 2 weeks... 4gl - 6 months easily with use of every single damn "trick" in the book, and some not in it...

      >Gods it's a scary, scary day when I defend
      >Informix's 4GL.

      yes, indeed - what other language do you know that DISPLAY "" will cure most segfaults?


      i've moved on beyond an IT job, into a much more "geeky" field... and i'm much happier now...

      --
      ... hi bingo ...
  32. i get to choose? by diesel_jackass · · Score: 1

    i just program in whatever language my boss tells me to. if i don't know it, then i'll learn it. (hooray for google) typically for web programming i'll use vbscript server side and javascript on the client side.

  33. Depends by Frijoles · · Score: 3, Insightful

    "Do you guys use this kind of method, or do you try to do everything in one program?"

    Depends on the situation. In a workplace environment, which is where I do most of my coding, we code in the same language. I just attended DevDays from MS. One of the strengths of the .Net CRL that they touted was that each developer could write in whatever language they were comfortable with. mkay, that's nice. The problem is when A) programmer quits B) programmer goes on vacation C) programmers is assigned elsewhere. Just my opinion, but in a workplace environment, a standard language should be adopted. Otherwise you have another programmer who doesn't know Cobol trying to debug the app.

    What you do on your own time, that's a different story. Whatever suits your fancy.

    --
    -Frijoles-
  34. I've had a lot of similar experiences by Anonymous Coward · · Score: 1

    Nearly all of the projects I've worked on for the last 4-5 years have had significant portions written in multiple languages. Different tools can really help out in certain situations. With component based designs, it really isn't that different from gluing together different submodules written in the same language. From the user's perspective, they don't know if their using something written in Matlab, C, or Fortran (I'm in a scientifc computation research area if you can't guess from that).

    For the current project I'm working on, there are Java front-ends that the user sees and a parallel computation engine in Fortran 95 + MPI running on a remote Beowulf cluster on the back end. We've also got a single system back-end written in C that we can plug in. But each component is typically handled by a different group so it's not required that everyone know each language being used.

  35. Boy, I hope I never run into one of your programs. by Wakko+Warner · · Score: 2, Interesting

    Imagine trying to install it on a machine without one of the 80 billion interpreters or libraries or virtual machines your code needs in order to run? Is it multiplatform? How do you maintain this stuff? Do you get paid to write it, or is this simply stuff you write for yourself and use by yourself? I guess, if the former, there's quite a bit of job security there. But I'd shoot code that looked like that, just by the sound of it.

    --
    "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
  36. HA HA by alta · · Score: 1

    Whew, at first I thought he was serious (but perl dead.) Then as I went further and further I thought "I'm no programmer, but if IIRC from my early CIS classes, C was faster than the likes of java. By the time we got to Alan Cox and the Kernel in VB it was way to obvious it was a joke.

    Thanks for a good laugh.

    --
    Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
  37. Everything and Anything by The+Bungi · · Score: 1

    My day job revolves around distributed systems architecture. I haven't met a software architect that was not fluent in at least five programming languages. The reality is, you use whatever happens to be required for the task. The right tool for the job, period. It doesn't matter if it's kewl or not, just that it gets things done.

    Sometimes you also have to use whatever it is that the client (or your employer, if you're not a consultant) decided to standardize on, and that's not always fun (FoxPro comes to mind).

    My point is, we are in the business of creating solutions to problems through software, not feeling cool because we get to use this or that language that we happen to just *love*. That's for hobbyist coders.

    As a bonus, this mindset will always take you far higher than the standard "well, I only know F++, and I really don't care for anything else" attitude among programmers.

  38. What do you mean? by aspillai · · Score: 2, Insightful

    I'm confused about what you're saying. Are you saying you break your problem into small chunks, solve those chunks in the language most suitable, and put them together? If so, how do you call the other chunks? Using exec() or other synonymous calls or using CORBA or SOAP? That's the main problem I have with this.

    If I'm solving a large problem, your solution makes sense. I can use CORBA or SOAP to do the parameter passing and the solution will be elegant. The only problem will be the learning curve. I'd have to learn the protocol used. However, it'll pay off in the long run because each is solving the problem the most elegantly. You'd save performance and maintence costs. (Provided you're actually know the multiple languages well and even then, in a large team it'll be iffy.) In a large program, using exec() is probably not acceptable. (Unless, you really know what you're doing.)

    But what if I'm solving a small problem that nonetheless can be broken down into smaller chunks that can be best solved using different languages. Would I? Probably not, because the solution you're proposing would complicate the entire development cycle. I'd have to build the small chunks and then try and assimilate them together some how. The problems that I can encounter are a lot and it's not worthit. Also, the increase in performance will be negligible because it is a small problem.

    Having said that, for fun, I'm thinking of doing what you're proposing. I know it'll be complicated and I'll have headaches, but it's fun programming something like that.

    Me

  39. Re:C: A Dead Language? by Anonymous Coward · · Score: 0

    What an asshole

  40. Inter-language Calling by aridhol · · Score: 1

    Instead of running separate processes, how about using the bindings that the languages have for each other? Most languages can bind with C; all you have to do is use that capability of the languages, rather than worry about forking and pipes.

    --
    I can't say that I don't give a fuck. I've just run out of fuck to give.
  41. Yes and No by fractalus · · Score: 1

    The most common form of language-mixing for me is using inlne assembly in C++ code. Obviously this isn't portable (unless I can #ifdef in a C++ version of the code for other architectures) but there have been several occasions where this is useful because portability isn't a concern. I don't want to write my entire application in assembly, but for raw number-crunching, hand-coding a tight routine using a good algorithm can be hard to beat. In this case, the cost of the context-switch is very low.

    Other environments may be different. If you're building something that is essentially a shell script, then you're already calling various tools to do your work, be they written in C, Perl, or whatever. In this case, the shell is your "glue".

    Back in the Windows world, plenty of projects use VB for their glue, and the gurus are left to build components using C++. Or web apps are built with ColdFusion, and middleware written by a different team using Java.

    I think this kind of multi-language approach is more common when you have easily separatable tasks and the cost of using a different language is not large. (In the middleware example above, using Java instead of CF for your middleware might not be a big problem if the middleware is already running on a separate server and you're using SOAP or something similar to access your middleware's API.)

    Certainly where I work we use different languages for our projects, but we're in a web environment where it's easier to build things this way.

    --
    People are never as simple as their stereotypes. This applies equally to Christians, Muslims, and Emacs-lovers.
  42. My point of view by Ayende+Rahien · · Score: 2

    First, I think that a developer needs to know several languages, both LLL and HLL.
    Now, I think that it's prefferable to do a project in one language, that way it's much easier to mention, and you don't have to move from one way of thinking to the other.
    That said, there are some inherited weeknesses and strengths to languages, which is why I think that sometime it's important to mix languages. (For example, creating a fortran library to do the number crunching, or c dll for string handling)
    When I mix languages, I usually end up in writing roughly 90% of the application in one language, and using another just to support its weak points (VB for major string handling, frex.)

    --

    --
    Two witches watched two watches.
    Which witch watched which watch?
    1. Re:My point of view by Anonymous Coward · · Score: 0

      I think that it's prefferable to do a project in one language, that way it's much easier to mention.

      Oh I agree wholeheartedly. Like "PySol" as opposed to something like "PyFortJavPerCSol"

  43. doh! by Chundra · · Score: 5, Insightful

    Looks like you have it backwards. If you're going to mix languages, why not do your control code in some high level language and then call your c++ or c from that? I guess it really depends on what you're doing, though.

    Lately I've been using python a good deal. I write the major features in python because it's wicked fast and yet scales well. Once you have a program written in python it's pretty damn easy to convert modules to C or C++ (especially with SWIG) for optimization.

    My reasoning is simple. Hack out the major features quickly, look at where your bottlenecks are, then optimize those 1) in python if possible (maybe just a bad algorithm)...otherwise 2)in c/c++. It just seems counter productive to me to have some c/c++ code calling modules written in some higher level language. The glue languages of choice are perl, python, and shell.

    Then again, if what you're doing works well for you, by all means use it.

  44. when you leave, what will we do? by Anonymous Coward · · Score: 0

    The disadvantages should be apparent:

    M A I N T E N A N C E

  45. Well, it depends. by jshep · · Score: 1

    Do you guys use this kind of method, or do you try to do everything in one program? What
    advantages or disadvantages do you see in creating one program compared to many programs?



    I would tend to shy away from the term program. Instead, I try to think in terms of objects/components/modules/modular-piece-of-your-p aradigm (we'll just say 'object' for now) and then identify the most concise, clean, and efficient way to implement the individual objects. If Java has a clean way to implement it, do it in Java. If it makes more sense to write it in Perl, do it in Perl.

    The real problem that arises is how to hook these different languages together. If these objects can or will ultimately reside on different boxes, then CORBA or some other object brokering/naming service could suffice. Or you could just talk via your own protocol (whatever you choose) over sockets since many languages support sockets. The reason I make a big deal about the interconnections between objects is that I've seen this done badly before. I once worked for a DoD-contractor and the program was written in C, Ada, and ksh. The interface between the different languages' modules was so horrible you couldn't tell what was calling what and when the program crashed, the exception handling mechanism was so bizarre that you couldn't actually tell what happened. This was due in part to the dissimilarity of the error checking facilities in the different languages.

    So, the gist of it is use different languages if it makes sense. If using different languages is not absolutely necessary, don't do it because you'd only be making the system harder to maintain by requiring a maintainer or mainteners to have experience with languages X, Y, AND Z instead of just language X.

    --


    "Computer Science is no more about computers than astronomy is about telescopes." - E.W. Dijkstra
  46. Quite the Contrary by spoonboy42 · · Score: 3, Informative

    Actually, I've been working on a pretty large programming project recently, and I find that breaking up the task into several different small programs, written in different languages for convenience, actually makes debugging easier. This allows me to test each program chunk individually under controlled conditions. Compare this to a single monolithic executable, and seeding loops with printf commands to figure out just where it segfaults. This also enables me to identify problem code much earlier in the development process.

    --
    Anonymous Luddite: "What do you think of the dehumanizing effects of the Internet?"
    Andy Grove: "Not Much."
    1. Re:Quite the Contrary by plover · · Score: 5, Interesting
      I, too, am working on a large programming project. It's primarily written in C++, but I use other languages to write quick-n-dirty tests for the objects.

      A curious side benefit I've found is that when I cross language boundaries, I tend to expose more flaws than if I just had a small main() testing the objects. Crossing language boundaries forces me to code the interface to each object very properly and distinctly.

      John

      --
      John
    2. Re:Quite the Contrary by Ayende+Rahien · · Score: 2

      I think that if you need to use different language to break the task to small parts, then you might want to review your design methods.
      You are supposed to do it anyway, after all.

      --

      --
      Two witches watched two watches.
      Which witch watched which watch?
    3. Re:Quite the Contrary by NathanL · · Score: 0

      Yeah, try being the only guy that knows all the languages used in a project at a small startup company. On top of that, make sure the app is what brings in 52% of the company's yearly gross. Guess who gets to debug all the crisis causing bugs? Guess who gets to get involved in every support issue harder than an RTFM issue?

    4. Re:Quite the Contrary by Thatman311 · · Score: 0

      Apparently you are only an applications programmer. Us kernel guys use a cool new tool called a 'debugger' where we can control execution of the program and look at data values while we trace through the program.

      --
      Silly Rabbit...Sig's are for kids.
    5. Re:Quite the Contrary by Anonymous Coward · · Score: 0

      Sounds ok to me. You have them by the bollocks, if you're not happy with your terms & conditions, just squeeze

  47. Languages are just tools... by CaptIronfist · · Score: 1
    Do you guys use this kind of method, or do you try to do everything in one program?

    I try to keep everything under one roof, it's easier for maintenance and debugging.

    What advantages or disadvantages do you see in creating one program compared to many programs?

    Well on the advantages side, i can only see one. You can actually design well enough to use specific languages for specific jobs and get their full strength. However, i find that most of the time, your productivity or amount of headaches aren't really affected by this advantage.

    On the bad side, i usually picture multiple languages applications as big spaghetti bowls. However, this isn't true in many cases.
    ( ex: using pre-compiled C apache modules in Perl really, really helped my project a lot and it didn't affect the quality of its structure. )

    Conclusion: No matter the tools, everything always falls down on the developer's shoulder. Whether you use multiple languages or not, it won't affect the quality of your applications, only your skills at using them will.

    A hammer is only effective in the hands of a well skilled carpenter.

    That's also true for the entire toolkit.

  48. Quick, general reply. by crashnbur · · Score: 1
    one massive program: more user-friendly.
    several communal programs: better for "power-users".

    That about sums up my opinion on the matter.

    1. Re:Quick, general reply. by wbav · · Score: 1

      What about using one programming language as the UI to a program written in another language? Doesn't that make it more flexable for any enviroment?

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  49. Mac by Corporate+Troll · · Score: 1
    Yes, bringing up Mac in that context is not too hard, especially rumours go that OSX is a great Java platform. ;-)

    I have to see that for myself first...

  50. This is not human languages! by bluGill · · Score: 5, Insightful

    this is computer programing. I know people who tought themselves Basic in a morning. I belive that I can learn any computer language you wish me to program in, in under a week. I can read well written programs in most lanuages without any learning time. I'm not special, any compitent programer can do it.

    However after attempting to teach myself Spanish for 6 months I still couldn't hold even a basic conversation (and I had a year of spanish a few years back). Once I learn spanish I won't have much a head start should I need to learn Russian or Chinese. Learning those two wouldn't give me much advantage if I need Hebrew.

    People think of programing languages as if it is something special to know a lot. Really you know zero (most people), one (a lot of people, normally basic), or all of them, including ones that have not been invented yet, though you will need a refresher before you would use one.

    Mastering a programing language takes expirence, and that only comes with time, but a good programer in his first week with a new language can already prove that good programers are 10 times as productive as bad programers, even if the bad programer has been using that language for 10 years.

    I know people who know 20 programing languages, I'm not impressed. I know people who are fluent in 17 human languages, and I'm impressed. In school I was once given the task of learning 12 languages in 10 weeks, and I had 2 other classes besides. It was no big deal, in fact learning 3 languages was trivial compared to using one language (C) to write a program in anouther class, even though I knew that language very well.

    Use the language that is right for the job. TCL is designed to make your programs scriptable. Perl is great for string manipulation. There is no reason you can't combine both, someone who needs to maintain you code will not find it difficult to learn the ones needed.

    PLEASE PLEASE PLEASE make sure that you write nice, well commented code. As an example of the above, monday I was digging into someone else's C++ code. Even though I haven't done C++ is years, it was no problem reading C++. However the lack of comments was a problem. I can make changes, but I can't be sure I make the right ones without knowing what the programer was thinking. this is far more important than what language it is written in.

    1. Re:This is not human languages! by eison · · Score: 1
      this is computer programing. I know people who tought themselves Basic in a morning. I belive that I can learn any computer language you wish me to program in, in under a week. I can read well written programs in most lanuages without any learning time. I'm not special, any compitent programer can do it.


      Gee, perhaps you should learn English now!
      --
      is competition good, or is duplication of effort bad?
    2. Re:This is not human languages! by andrew+cooke · · Score: 1

      What languages have you used? That sounds very much like you've only used procedural-ish languages. I consider myself a decent programmer (and I speak Spanish pretty well too :-), but could only make that claim about languages with very similar backgrounds. Could you really produce decent programs (ie not procedural programs battling against the language) in, say, Haskell or Prolog?

      --
      http://www.acooke.org
    3. Re:This is not human languages! by RedWizzard · · Score: 2
      this is computer programing. I know people who tought themselves Basic in a morning. I belive that I can learn any computer language you wish me to program in, in under a week. I can read well written programs in most lanuages without any learning time. I'm not special, any compitent programer can do it.
      Yes it is easy to pick up a new language. Languages are not the problem, it's the libraries. If the multi-language apps are all using the same libraries or are fairly self contained, then fine. Otherwise there's a lot of knowledge invested in the different libraries each langauges is supported by.
    4. Re:This is not human languages! by protonman · · Score: 1

      > Haskell or Prolog?

      OMG! Prolog! Don't get me started! Reading prolog code! I'd rather read unary assembler written in dirt by a dyslectic, disabled, drunk, foot painter! The Horror! The Horror!

      (but Haskell is quite nice actually)

      --
      The man of knowledge must be able not only to love his enemies but also to hate his friends.
    5. Re:This is not human languages! by jred · · Score: 1

      However after attempting to teach myself Spanish for 6 months I still couldn't hold even a basic conversation (and I had a year of spanish a few years back). Once I learn spanish I won't have much a head start should I need to learn Russian or Chinese. Learning those two wouldn't give me much advantage if I need Hebrew.


      That's why I learned Latin (disclaimer: aeons ago). It's the basis for all the Romance languages, and is surprisingly helpful for ones that aren't. Even a rudimentary understanding of Latin helps. Although I consider myself an English-only type of person, I can usually get the gist of most (written) languages.
      --

      jred
      I'm not a mechanic but I play one in my garage...
    6. Re:This is not human languages! by sahala · · Score: 1
      I'm sorry, but this has been one of the most convoluted, verbose, and pointless posts I have ever read on Slashdot. Let me summarize the monstrosity:

      It's not that hard to learn computer languages compared to human languages.

      Use the language that is right for the job...

      I (original poster) have a hard time using the human language of English

    7. Re:This is not human languages! by scrytch · · Score: 5, Interesting

      Imperative languages are pretty much isomorphic. Learn one that's sufficiently rich and you pretty much know 'em all.

      The story gets different when you start with other paradigms. Try teaching yourself Haskell or prolog in a morning. And it's languages like that that are often a reason to pick one over the other, because the problem space demands it. I could write a web form processor with db access in any language ... but trying to write a fraud detection system in C is like trying to build a house with a hammer (actually the fraud detection system I'm thinking of was written in APL ... yowza)

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    8. Re:This is not human languages! by Lumpy · · Score: 2

      I belive that I can learn any computer language you wish me to program in, in under a week.

      you obviously never experienced perl.

      Some parts of perl confuse even Larry Wall at times.

      The only language on the planet that is obfuscated from the start! (That is a loving joke... I love to program in perl... but some expressions are fricking bizzare.)

      --
      Do not look at laser with remaining good eye.
    9. Re:This is not human languages! by Dante'sPrayer · · Score: 1
      Once I learn spanish I won't have much a head start should I need to learn Russian or Chinese. Learning those two wouldn't give me much advantage if I need Hebrew

      Well, that is not necessarily true. I am a native speaker of spanish, and know some basic of russian, and the understanding of spanish may give actually give you a bit of a start for russian.

      A simple example that I just tought a while back: the japanese language has a pronunciation for the vowel 'i' that makes it short and almost inaudible. The hebrew has a similar one, that is indicated by two dots instead of one under the consonant. Knowing how the hebrew vowel works is easier to understand the japanese phonetic.

      Translating the abstraction to a programming environment, remember that on the computer science classes you learn algorithms, design, etc. that are to be used on any language. A concept hard to understand on scheme, once fully understood, will be easy to implement on c. The more you learn, the most confortable you will feel to learn a new one.

    10. Re:This is not human languages! by mangotiger · · Score: 1

      The key to bluGill's entreaty to comment code is the ability to understand intent. THIS IS IMPORTANT. Comments are not. They should be used when the intent of the code is not clear. It is preferable to make the code clear in and of itself. In most cases, the use of descriptive varible names joined with functions that organize logic do quite nicely.

      Remember Norm Schryer's dictum:

      If the code and comments disagree, both are probably wrong!

      The best way to avoid this

    11. Re:This is not human languages! by slashdot2.2sucks · · Score: 1
      I learned prolog in one sitting.

      Do you know prolog, because I thought that it was pretty damn simple.

      Haskell on the other hand is a bit far out. But I think a good programmer could learn LISP one week and Haskell the next.

      Otherwise I agree with you.

    12. Re:This is not human languages! by Anonymous Coward · · Score: 0

      While it is possible that you are as good at learning new programming languages as you claim (though personally I doubt it, as despite your vehement comments about the importance of documentation, you have many grammatical and spelling errors in your message, including your torture of such common words as "programming"), this is certainly in no way the norm for other more mortal computer programmers. Most people would be, if not unable, then certainly unwilling to go to the effort of learning a new language simply because it had better string handling. Better to use 100 simple lines of Java to perform some complex string handling function that to break out to a one-line piece of Perl for that function.

      This is not to say that multi-language development is bad - for any serious performance-sensitive multi-tier project a mixture of, say, database stored procedures, shell scripts and Java for example is inavoidable - but simply to say don't introduce new languages arbitrarily and gratuitously and assume that all programmers are expert enough to cope.

    13. Re:This is not human languages! by Mike+McTernan · · Score: 1

      Ahh, Haskell - there's elegance for you :)

      --
      -- Mike
    14. Re:This is not human languages! by rsipin · · Score: 1

      Great points about programming. Any good programmer can maintain well commented code, even if it's in a language that they are not familiar with. (not to discount times when depth of knowledge in the body of class libraries is important). Knowing where and how to look for the right questions to answer is a much more difficult skill to master, and harder to fill when it comes time to hire a programmer.

      Most importantly, what makes a good programmer is someone who knows when there are questions bigger than "what flavor of gas to fill up the car with" so to speak. Many, many, many customers will get much more value from IT professionals who can first ascertain whether it's a data problem, business process problem, or a problem that can be solved by writing code. As a good software engineer (and occassional PHB), it's what I look for whenever I hire someone.

      Let's not forget to collect all of the relevant constraints to the problem first. If there's an obvious solution to be found by utilizing a combination of environments and tools, by all means, that should be explored first (ie. some new stored procedures in the database, enhanced data validation in the user interface level, more relevant data capture in the business process, and a bit of additional analysis via a piece of specialized code), before one has the luxury of selecting from the available languages and tools, and deciding whether performance, maintenance, extensibility, interapplication communication and integration make any draws toward one choice over another.

      So many users, PHB's and customers do not understand why IT folks spend so much time worrying about the color of the windows on the caboose, when all they care about is whether it's the right train to get on to get where they want to go! A good software professional solves the users' problems within the constraints of the environment, and when it makes sense, chooses one, two or five tools and languages, depending on what's appropriate.

    15. Re:This is not human languages! by hearingaid · · Score: 2

      Sure, some bits are hard.

      But realistically, a good programmer can learn perl well enough to do useful things with it in a week.

      The only basic thing that's hard is regex, and that's not unique to perl.

      --

      my old sig used to be funny, but then slashcode ate it and now it's not funny anymore

    16. Re:This is not human languages! by Pseudonym · · Score: 2

      I know Prolog, and I consider myself a fast learner. (Java 1.01 in one day.)

      Writing interactive code to determine family relationships in Prolog is easy. Writing a full application which scales is much, much harder. When your medium-sized program fails with no explanation or space leaks for no apparent reason, you really have to know the tricks.

      You're right, though. Once you know the paradigm, adapting to anything else in that paradigm is easy. If you know Lisp, Haskell, ML and Erlang will all come easily. If you know Prolog, Mercury and Goedel will come easily. If you know Java, Eiffel and Sather will come easily.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    17. Re:This is not human languages! by glauben · · Score: 1

      Hmmmm.... I've made a good living fixing the systems of the "programmers" who learned (Basic, C, C++, Delphi, etc..) in a week. I just don't buy it. I've seen hundreds of lines of code produced, when one call to a built-in function would do. I've also seen hours of searching for a similar function wasted because it was in one language and not the other. Don't get me wrong, cross-over does help. But not a the level you speak of. Experience is the key.

    18. Re:This is not human languages! by nathanh · · Score: 2
      People think of programing languages as if it is something special to know a lot. Really you know zero (most people), one (a lot of people, normally basic), or all of them, including ones that have not been invented yet, though you will need a refresher before you would use one.

      Except the people who honestly believe this (and you are one) write C++ like they were writing C, and Perl like they were writing C, and Java like they were writing C, and Postscript like they were writing C.

      So in the end we have a bunch of languages with individual strengths, and some smart-arse who believes they know them all, and a bunch of crappy code that all looks like semantically broken C.

      Stick to one language. Learn it well. Stop pretending that you know them all. I'm sick to death of people who "know C++" but really just write C code with a different extension.

    19. Re:This is not human languages! by Anonymous Coward · · Score: 0

      My cat's breath smells like cat food.

    20. Re:This is not human languages! by Anonymous Coward · · Score: 0

      Funny. My breath smells like cats. (or should that be Katz, considering I'm posting this on /.)

    21. Re:This is not human languages! by Anonymous Coward · · Score: 0

      I remember reading in a magazine (think it was Byte or DDJ?):

      The syntax of a language takes a week to understand, Programming takes a lifetime to master

    22. Re:This is not human languages! by firecode · · Score: 1

      You're right, but only partly IMHO. Learning new languages (syntax) is easy but learning all the names of library calls etc. can take considerable amount of time because you simply have to learn N (N = big) new symbols and how to use them. And if you don't know them by heart it can take very much time to find the right function from documentation.

      It also takes time to get a deep understanding of a new language (how it's implemented, what is fast, what is not, how to combine it with other languages, portability, differences between different compilers/compiler versions etc.)

    23. Re:This is not human languages! by vectro · · Score: 1

      Actually, pretty much all programming languages are isomorphic. Church-turing thesis and all.

  51. Multiple-Tier Apps by aridhol · · Score: 1

    This could be useful, for multi-tier apps, or for various parts of app development.

    For multi-tier apps, you could have a domain-specific language at the back end. This interfaces with C, which is the main server app. Then various languages come above that, for various views. For example, a web interface could be in PHP or Perl, an interactive interface in Java or C++, etc.

    The project I'm working on is mostly C. The build system, however, is mostly Perl. The two parts of the system are cleanly separated, and there's very little reason for them to talk to each other (although the build system does pass build-time configuration to the app).

    --
    I can't say that I don't give a fuck. I've just run out of fuck to give.
  52. As a young progger by Anonymous Coward · · Score: 0

    I've worked for CDS for three years, and I hate the people who write crap I can't understand, but am expected to support. Make it clear to management what you are doing and use lots of libraries. *please*

  53. To keep flogging this horse... by Halo- · · Score: 1

    Having worked on a rather large chunk of code which my group "inherited" from another stable of developers who liked to "learn new technology" I have a few words of caution:

    Using multiple languages is a Good Thing(tm) if, and only if, they are not used to take shortcuts, learn on the job, or avoid writing "hard" code. I'm a rabid anti-Java zealot, not because I think the language is bad, but because it is often used in places it shouldn't be. I've had to maintain a lot of fairly poor quality Java code because the previous developer was learning it at the time. The number of times I've seen a really bad use of Java because it was easier than writing good C is depressing. On the other hand, I've seen people build vast empires of C to replace what clearly should have been a nice Java or Perl program, simply because they perfer C, and have a personal adgenda. (heh... I've never done that.... nooo....)

    The other fun thing to consider is that if you're calling interpretated languages, you need to remember that the burden for prereq's on your target platform is going to be huge.

    Using the right tool for the job is a nice thing, but I've found a lot of developers (myself included) tend to want to use the language they are currently tinkering with wherever possible. The old saying about "when your only tool is a hammer..." extends nicely to "when the closest tool is a hammer..."

    1. Re:To keep flogging this horse... by Magumbo · · Score: 2
      Using multiple languages is a Good Thing(tm) if, and only if, they are not used to take shortcuts, learn on the job, or avoid writing "hard" code.

      If you worked for me, I would fire you on the spot.

      According to this logic, a programmer shouldn't take some extremely useful c/c++ libraries, write some perl or python wrappers around them, and then whip up an application in perl or python utilizing them? Suppose doing that would be something really useful and it would simplify their job. For the sake of argument, suppose that Joe Hacker was doing this at work, and that he hasn't written those particular wrappers before. He would:

      • take shortcuts
      • learn on the job
      • avoid writing "hard" code
      • learn new technology

      And therefore break every one of your grossly misinformed guidelines. At the same time, he would be creating something that would alow other people to get their jobs done easier. Welcome to the world of abstraction, my close-minded friend.

      if you're calling interpretated languages, you need to remember that the burden for prereq's on your target platform is going to be huge

      Please explain. If you mean prerequisite memory and cpu cycle consumpiton, yeah I'll agree. Usually a constant (time and space complexity-wise) penalty is NOT a problem though, and it's hardly a "burden". If you mean prerequisite Things You Need To Do To Get Things Working, then that's simply not true.

    2. Re:To keep flogging this horse... by Halo- · · Score: 1

      Yikes! Fortunately, I'm still employed. :)

      There is a huge difference between "simplifying their job" and "simplifying the product". Writing a wrapper around existing code is fine. Sometimes even good.

      More times than not I see inferior solutions written because it was easier in the short term.

      I work in cryptography. Obviously for math intensive stuff like this, something like C/C++ is much more appropriate most the time. A lot of times I see developers "cheap out" by using some of the API's built into Java to do annoying parsing tasks. That's great for Java programs which are leveraging those technology, but NOT acceptable for an underlying engine which is already written mostly in C/C++. And yes, I've seen this happen. I've spent three hours writing and intergrating a C program to replace a section of code like this recently, and increased throughput by %250. All because someone wanted to save a few minutes the first time out.

      Things You Need To Do To Get Things Working

      I strongly disagree will you here. The largest problem the product I'm talking about has is installation issues. We've got 15 pre-reqs. Big, heavy things. I've been flown all over the world to help major customers simply get the damn thing installed. I'm not support, I'm a developer. That is bad news. And I'm sure you can imagine what a nice impression it makes on a customer to have the product go belly up before it even does something useful. A little more time in the development cycle to save the customer time on install is priceless in my opinion.

  54. that's why I only write in machine code by nomadic · · Score: 2, Funny

    0100100100100000011101110110000101110011
    0010000001101010011101010111001101110100
    0010000001101011011010010110010001100100
    0110100101101110011001110010111000100000
    0010000001010110011001010111001001111001
    0010000001100110011001010111011100100000
    0111000001100101011011110111000001101100
    0110010100100000011101110110111101110101
    0110110001100100001000000110001001100101
    0010000001100001011000100110110001100101
    0010000001110100011011110010000001100100
    0110111100100000011101000110100001100001
    0111010000101110

    1. Re:that's why I only write in machine code by jandrese · · Score: 2

      0101100101100101011000010110100000101100
      0010000001100010011101010111010000100000
      0111010001101000011011110111001101100101
      0010000001110111011010000110111100100000
      0110001101100001011011100010000001110010
      0110010101100001011001000010000001010011
      0110110001100001011100110110100001100100
      011011110111010000101110

      --

      I read the internet for the articles.
    2. Re:that's why I only write in machine code by verrol · · Score: 1

      correction: bit 24 & 35 is wrong.

    3. Re:that's why I only write in machine code by Anonymous Coward · · Score: 0

      So what should they be?

  55. XMLRPC is your friend. by Nicolas+MONNET · · Score: 1

    It's implemented in just about every language. It's a silly concept, but it works; and is not that hard to get working.

    I'm currently writing an app in Perl & Java; back end in Java, web front-end in Perl. I could have switched Java for C++, doesn't matter. Or Perl and PHP.

  56. Naw by Anonymous Coward · · Score: 0

    I use this language, for everything I do:
    http://www.webcom.com/nazgul/intercal.html

    There is no need for other languages, as this one does it all.

  57. Keep it simple - minimize the number by Kefaa · · Score: 4, Insightful
    I stick with one, or in some cases two. The basic reasons are:

    Common understanding by Developers- while I know a variety of languages, the next person probably does not. Nor can I expect to know all those that someone else might. Limiting choices provides a means to decide if an individual has the skills necessary to participate and to introduce training.

    Resource Consumption- Each transition of languages, one to the next and back is resource consumptive. This tends to make applications with multiple languages more expensive (CPU, Memory, and response time) over single languages.

    Developer Time- Very similar to machine resource, multiple languages tend to be more difficult to debug and more difficult to maintain. As developers now tend to be the most expensive part of a project, this can have a real impact on the budget

    All that being said, there can be very good reasons to use multiple languages. Some languages have inherited limitations that would make a secondary option worthwhile. However, that needs to be weighed against the prior notes to ensure we are getting something for the extra effort.

    Finally, all language transitions should be completely encapsulated. While a good idea regardless, try to make it as easy as possible replace a unit and especially to replace it without requiring changes to everyone calling it.

    1. Re:Keep it simple - minimize the number by camusflage · · Score: 2

      As developers now tend to be the most expensive part of a project

      Now that we've done away with those silly things like analysis, design, requirements gathering, integrated testing, et al, I guess that does just leave developers holding the bag.

      --
      The truth about Scientology, Xenu, and you: Operation Clambake
    2. Re:Keep it simple - minimize the number by CoderDevo · · Score: 1

      Actually, Developers are the ones doing analysis, design, requirements gathering, integrated testing, et al. At least they are where ever I've worked.

      Well, hopefully integrated testing is performed jointly with a subset of the User base. But other than that, Developers. I don't particularly like to work with people who are Coders only, unless it is to mentor them into becoming Developers.

    3. Re:Keep it simple - minimize the number by camusflage · · Score: 2

      I don't particularly like to work with people who are Coders only

      I think that's a pretty fair statement for any developer. Coders care about functionality. Developers care about functionality, supportability, performance, stability, and all those other "little" things. This is, of course, the problem with contracting out development. Typically, it's going to be to coders, not developers.

      As to all those other things, other people should be involved. Analysts in analysis, architects in design, business analysts in requirements, and users in testing. In most places I've worked, as is your experience, that kind of thing falls to the developers, to the detriment of the code.

      --
      The truth about Scientology, Xenu, and you: Operation Clambake
  58. It's called "Alternate Hard and Soft Layers" by avdi · · Score: 4, Insightful

    This approach to software has been codified into a Design Pattern: Alternate Hard and Soft Layers. From the WikiWiki page:

    By virtue of the FirstRuleOfOptimization, go ahead and write most of your code in the highest level language you can find.

    By virtue of the ThirdRuleOfOptimization, when you must, use a profiler and find the slow parts of your program. Take those parts, and write them in a lower-level language.

    In other words, use a "soft", dynamic language for the parts of your program that may change, and that don't require extreme effeciency. Use "hard", static, compiled languages for the parts of the program that must run as fast as possible; or that need to do low-level memory-twiddling. To put it even more succinctly, use the right tool for the right job.

    Lately I've found that using SWIG makes this pattern very easy to apply in real life.

    --

    --
    CPAN rules. - Guido van Rossum
    1. Re:It's called "Alternate Hard and Soft Layers" by YoJ · · Score: 2

      Why not have the best of both worlds, and develop everything in a high level statically typed and compiled language? You lose some flexibility that a dynamically typed language has (like the ability to call functions that don't exist, and still have the program work up until that call). But I think for most applications this is not a problem. This method also removes the transition from one language to another, which can be costly. So write your programs in OCaml!

  59. C++ Base, Tcl/Tk Applications by Josuah · · Score: 1

    For Mash, we have a C++ base that provides all of the lower-level multicast multimedia functionality and we use Tcl/Tk to create the applications. The C++ code lets us implement the low-level functionality (such as JPEG decoding, RTP transport, etc.) efficiently, but using Tcl/Tk to interface with the C++ makes it very easy to develop applications, test new ideas, and not worry too much about cross-platform UI.

    Of course, you can't take a normal Tcl/Tk binaries and just arbitrarily call compiled C code, so we do require custom tclsh and wish binaries which have the C++ objects built into it. Our custom binary lets you define a C++ class as a subclass of TclClass. Then, we use otcl and tclcl within tclsh and wish to refer to those C++ classes as Tcl objects.

  60. Oxymoron by DigitalDragon · · Score: 1

    The title of the article is an oxymoron. In my practice I've seen people only trying to stick with one language, it becomes a real mess and a performance blow heterogeneus environment is used.

    All JNI stuff is still pretty weak and there's a performance trade off.

    just my 2 cents

    --
    http://dtum.livejournal.com
    1. Re:Oxymoron by wbav · · Score: 1

      I take, from you post that you haven't used a language like php for server side processing of web requests. I say this becuase, when you get into a web enviorment, especially a lan, performance is key. Let's take the idea of a shell script. Now let's say you wanted to change your .profile when you logged in to list the latest weather conditions. Would you re-implement the script weather, (which is already on most linux systems) or run the command through perl to strip out the junk and just dump it into your .profile. Although this example isn't very usefull, it proves my point.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  61. mixing it up by zephc · · Score: 2

    mix Python, a language that is fast to write with, with time-critical functions as libs written in C (using the Python/C API)... get the best of both... use python as a glue for your C code

    --
    "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
  62. Language independent process by sterno · · Score: 2

    The process you described is irrelevant of differences in languages. It's always better to break down your code into components and debug the components as much as possible seperately. Coding those chunks in different languages is just adding possibly unnecessary complexity in doing integration testing between the components.

    From personal experience using JNI, I found it to be a giant pain to try to debug the code. Sure you can test the underlying C++ code on it's own and test the Java on it's own, but when you glue them together you get new bugs and debuggind between the two layers is much more difficult than if it was all Java in the first place. In that case we had no choice but to use two languages so we put up with it.

    As for using printf's, what does that have to do with how you wrote the code? If you choose to debug using printf's that has nothing to do with if you have one big mound of spaghetti code or a well designed modular architecture.

    --
    This sig has been temporarily disconnected or is no longer in service
    1. Re:Language independent process by Anonymous Coward · · Score: 0

      This speaks more about how intentionally difficult Sun made interfacing Java with other langauges than about how hard interfacing multiple well designed languages is. Its hard to lock people in if they can easily use other tools, and lock-in is the name of the game.

      Try using doing cross language development with COM, or XPCOM or better yet, CLR to see how easy it can be if your languages were written to be useful, by intelligent, experienced people.

  63. It's all about balance. by Anonymous Coward · · Score: 0

    There's nothing wrong with using the best tool for a given job, and with mixing and matching the tools you have to solve a problem quickly. I could build an okay table with just a chisel, but work would proceed faster and better if you let me use a hammer, a saw, and a plane as well.

    That said, I think it's important to think hard about the expense that multiple languages will bring to the care and feeding of a project. If your system is written in four languages, your project will require maintenance from either one engineer who knows all four languages, or four engineers who each know one of 'em. What's more, you've now got four tools to maintain ("Hey Joe, what version of the compiler were you using when you wrote this? It won't build for me.") If you're talking about writing quick and dirty tools for short term use, then fine. If you're talking about building a system that's important to the long term health of your buisiness, consider that standardizing on a more compact set of tools may save a lot of money and time in the long run.

    Obviously, there are tradeoffs. You need to find a reasonable balance between rapid development, stability, ease of long term maintenance, cost, quality, and performance. You probably won't achieve that balance either by insisting on using the same tool for every job, or by using a different tool for every job.

  64. it all depends on the architecture by ajam · · Score: 1

    it really all depends on the architecture. the idea of just writing parts of an application in different languages is nothing new, and certainly is not a bad idea since different languages might have different strengths. but the idea of just hooking up code developed using different languages, doesn't make much sense. instead, if the given application has the necessary architecture support this is another story. for example, you make your application modular, and allow then for on the fly addition of modules written in different languages. still, regardless of how it is actually implemented, one of the strengths of mixing languages in a development could be the ability of allowing, lets say, users to modify the behavior of your program in a controlled manner.

  65. Think about it by Ars-Fartsica · · Score: 3, Interesting
    I'm not sure what people are thinking when they specify that everything on a project "needs" to be done in Java or whatever.

    Building software is a function of economics. If you've dumped considerable resources into training, code licenses, an existing software base, or other real-world issues, you will be very inclined to insist that your "chosen" language be used in future projects unless there is an overwhelming issue that prohibits it.

    1. Re:Think about it by KyleCordes · · Score: 2

      You are right, but this is sometimes taken too far. Some companies / managers have a wildly over-inflated idea of the effort of switching to new tools or new languages.

  66. Fortran Forever-- by Anonymous Coward · · Score: 0

    That you believe fortran
    is dead reveals the kind of
    coding you do. I suspect
    that you spend your days
    doing cash register apps
    for 7-11. Maybe inventory
    tracking type things for
    a douche-bag company.

    Fortran has its place(for better or
    worse). Think weather forecasting,
    satellite data processing, climate
    modelling, and computational physics.

    But you dont know a PDE from
    The turd Report's special taco, so
    none of what I say matters.

    So have fun doing VB coding.
    Many of us out here are concerned with
    scientific computing, and for that
    fortran90 will be around for quite
    some time.

    1. Re:Fortran Forever-- by Anonymous Coward · · Score: 0

      FORTRAN is for engineering weenies that care for the extra 100 places of accuracy it provides.

    2. Re:Fortran Forever-- by MaxVlast · · Score: 1

      Alert! Alert! Intellectual elitism ahoy!

      Just because you're all about scientific programming and [genuflecting] are smart enough to do it, doesn't mean that you're better.

      You probably couldn't use all the money you don't earn without VB programmers making your online banking page work, or providing you with support when you deign it necessary to lower yourself and call a tech support line. Or (horror!) have deal with the ignorant masses that work at the 7-11 and give you the ho-hos you stuff in your face while denigrating others.

      (Not that I'm bitter, but four years at CMU leaves me sick of people who think they're just better because they don't have to work at 7-11.)

      --
      There should be a moratorium on the use of the apostrophe.
      Max V.
      NeXTMail/MIME Mail welcome
    3. Re:Fortran Forever-- by DHam · · Score: 1

      To haul this post back on topic, however: IMHO (and I'm also a scientific programmer working in Fortran 95) Fortran is a great case of a language which works best in combination with other languages. Yes, fortran is THE language for doing computations fast but I/O, graphics and other peripheral issues are really not it's forte. Fortran glued onto other bits by something interpreted (Python, for example) is a good way of dealing with this.

  67. Documentation. by Irvu · · Score: 1

    In my group we are implementing using a multi-language model currently. We are doing this to combine Ansi C's number crunching with MFC's interfaces and Lisp's Symbol Manipulation. Due to interface and speed requirements this is the only choice.

    We have only had one problem associated with this that is at the edges. Past experience has shown that with no documentation on the api's we are stuck unless "the guy who wrote it" is in. But this is true of any project, poor documentation and bad code causes problems. It seems to me that maintainability issues are the same, it's the code not the language(s).

  68. Java is the VB of the new millenium by Beatlebum · · Score: 1

    IMHO the Java bandwagon was jumped on by a bunch of rookies that would/could not take the time to learn C++. Java has a lot of good points, however

    1) It is proprietory. You guys would be screaming about this if it belonged to Microsoft and not Sun.

    2) It is missing features that C++ programmers take for granted- enums and templates spring to mind.

    3) It leads to bloat. Case in point- Limewire. Gnutella is a simple network protocol yet Limewire's memory footprint is 35M under windows 2000. Compare this with Bearshare (C++) which occupies around 3-4M.

    C++ is a complex language, however, if you take the time to learn it, you will be rewarded. The C++ standard library is a thing of beauty, perfectly abstract, yet efficient and extensible. I have ploughed through a lot of rookie Java code in the last 5 years and 95% of it does not use any of the OOP features of Java. That's why I refer to it as the VB of the new millenium. Rookies hack out a few classes and then claim that they written an OOP system. Sadly, a lot of Java hacks do not understand the concept of over-riding a method, of course a lesser % don't know what a virtual function is.

    1. Re:Java is the VB of the new millenium by kaffiene · · Score: 1

      As someone who has been programming for about fifteen years now, and a long time C and C++ user, I have to say that your argument seems, well, crap.

      Proprietory != evil. Closed & monopolistic == evil.

      Java misses 'features' like templates on purpose it is a concious design decision to make the language simple and maintainable. As you make larger systems, that becomes a major factor. A lot of what sucks about C++ programs often comes down to the STL - and you have the gall to complain about code bloat? (not to mention that it's not OO and that it leads to the worst compiler errors you ever imagined)

      C++ is a good language for a lot of things - but the same goes equally for Java - remove the blinkers dude.

      re: virtual functions - you ignore them in Java because everything is virtual by default - which is the way it should be in an OO language. C++ only allows you to use polymorphism if you expressly mention it for every function you write. If anything, C++ does not lend itself to OO (default non-virtual functions, templates are generics not OO, you can write C++ programs with no classes at all, etc....)

    2. Re:Java is the VB of the new millenium by the+eric+conspiracy · · Score: 2

      It leads to bloat. Case in point- Limewire.

      Rookie C++ code is going to be just as crappy, if not more so due to the complexity of the language as rookie Java code. Probably MUCH worse in terms of stability, too. C++ may be able to give you better performance, but it WON'T give you better code than what can be achieved in Java, and it certainly will be less stable, harder to maintain and be a less productive place to develop in.
      As far as I am concerned, C++ is a design error. Indiscriminant inclusion of features the the designers now regret and a STL library that anyone who wants the performance of a compiled language needs to avoid has lead to a nightmare language.
      The fact is that the biggest problems in producing good applications - stability and consistent design are not addressed by bolting OOP features onto what is really a procedural high level assembler.

      C++ is a Frankenstein's Monster of a language.

    3. Re:Java is the VB of the new millenium by Beatlebum · · Score: 1

      Guys, don't let the facts get in the way. Fact

      1) C/C++ is the default language for system software. This is no accident. Look what happened at Corel, they found couldn't make it work for an office suite. At the end of the day real programmers use C/C++.

      2) Just because C++ is feature rich doesn't mean you have to learn AND use every feature. I would rather have features available then not. Perhaps you guys can explain the absence of enum from Java. Was that another one of those clever design decisions? BTW If Java is supposed to simplify, why does a 10 line Java program require a 30 megabyte VM loaded into memory?

      3) Templates. Again, you DON"T have to use them. But there are mnay instances where templates provide a type safe extremely efficient implementation. If you're worried about bloat, don't use them, use a C style container. That's the beauty of C++, you have a CHOICE.

      4) How long is a piece of string? Crappy software can be written in both languages. The argument that C++ automatically produces crap code is ridiculous.

      5) C++ is a STANDARD, that was reached using a democratic process. Java is a propritory language owned by Sun. THEY decide who uses the language and how it evolves. It is NOT open, the Java licenses does not permit developers to extend the language. C++ is open anyone is free to write a compiler and share it/sell it.

      6) Lastly, let me say once again that I like Java, it is a very good language that certainly has its place. However, from what I've seen most of the Java code out there is PROCEDURAL. The simplicity of Java has led to a legion of programmers learning the Java syntax and proclaiming they know OOP. I believe that if you use complexity as an excuse for not learning C++ then you're probably in the wrong business. I would say the same to someone using the same excuse to learn VB over Java.

    4. Re:Java is the VB of the new millenium by the+eric+conspiracy · · Score: 2

      C/C++ is the default language for system software.

      I would say that C is the default language for system software. Not C++.

      I would rather have features available then not.

      I would rather have useful features than not. Much of what I see in C++ seems less useful than I would hope.

      why does a 10 line Java program require a 30 megabyte VM ?

      It doesn't require any such thing.

      gcj -O5 --main=hello hello.java
      ls -l a.out
      -rwxrwxr-x 1 eric eric 73117 Nov 20 22:36 a.out

      Templates. Again, you DON"T have to use them.

      Templates are evil because their definitions are not type checked in parameterized form. This often leads to problems that are the devil's own work.

      The fact is that C++ compilers are forced into heuristic methods for evaluating static type safety rather than the mathematical surety that Java's design permits. Which would you rather have?

      Crappy software can be written in both languages. The argument that C++ automatically produces crap code is ridiculous.

      I merely propose that the skill of the programmer is the primary determinant of code quality.

      C++ is a STANDARD, that was reached using a democratic process.

      In other words it was designed by a committee of people with no overarching vision of what the language should be. No wonder they started with a horse and arrived at a camel.

      Political arguments are irrelevant when evaluating the technical merits of a language.

      However, from what I've seen most of the Java code out there is PROCEDURAL.

      Sturgeon's law states that 90% of everything is crap. This is overly optimistic when it comes to code.

      One of the reasons that I originally learned Java is that it seems to have become the default language in much of the Design Pattern and OOP/OOD literature. Clearly there is a reason for this - and the reason is that Java is very good at expressing good ideas in software design in a clear fashion. I have found that in my own work this is a very valuable language feature.

    5. Re:Java is the VB of the new millenium by Beatlebum · · Score: 1

      >>gcj -O5 --main=hello hello.java
      ls -l a.out
      -rwxrwxr-x 1 eric eric 73117 Nov 20 22:36 a.out

      73,117 bytes for "Hello world!".

      QED. LOL.

      And in any case, I was talking about the working set size, not the object file size. The smallest of Java programs requires a huge VM to be loaded into memory.

    6. Re:Java is the VB of the new millenium by Skapare · · Score: 2

      What you are really pointing at is bad programmers. And bad programmers abound in any language. Higher level languages just get more of them. I've seen exactly the same thing you are talking about even in C++ where programmers believed they were doing the right thing but had no objects at all, and couldn't even explain what object oriented meant. The funny thing is, when I suggested to this one guy that he might as well just code in C, his response was "but I heard C is too hard to learn". If only it were hard enough to keep him from being a programmer.

      --
      now we need to go OSS in diesel cars
    7. Re:Java is the VB of the new millenium by the+eric+conspiracy · · Score: 2

      I was talking about the working set size, not the object file size. The smallest of Java programs requires a huge VM to be loaded into memory.

      This Java program requires NO VM to be loaded. The working set size is 73K. Java can be compiled to native code, eliminating the need for the JVM.

      73K is about 500 times smaller than your posited 30MB JVM.

  69. Meet the new "BSD is dying" by Anonymous Coward · · Score: 0

    Hopefully it can be filtered out just as quickly.

  70. More annoying question by totallygeek · · Score: 1, Flamebait
    More annoying than hearing "What language do you program in?" is "What school did you attend to learn all this computer stuff?" How about years of trial and error and late nights and weekends on computers while everyone else partied?


    As for the language -- my programs are usually small and foisted on the web, so perl, php, bash, csh, sql, and c.


    I have even used Pascal recently -- but that was just to modify some earlier made code.

  71. Ars Fartsica falls on sword. by Erris · · Score: 1
    When was code reuse bad? People mix languages out of necessity for accomodating legacy code.

    People reuse legacy code because it's easier than starting from scratch. When it's not, code reuse is bad.

    The small amount of experience I have had integrating Perl and C clearly indicates that debugging large apps written in multiple languges is extremely difficult - forget about your IDE or traditional single debugger.

    Time to get some more experience. Oh, it hurts it hurts! Make it work for you.

    How about performance? Integrating multiple languages means invoking multiple runtimes and address spaces.

    Performance is as performance does. Using more than a single variable invokes more than one address space. So what?

    --
    DMCA, Hollings, Palladium. What might have sounded like paranoia is now common sense.
    1. Re:Ars Fartsica falls on sword. by Anonymous Coward · · Score: 0
      Time to get some more experience. Oh, it hurts it hurts! Make it work for you.
      ....Performance is as performance does. Using more than a single variable invokes more than one address space.

      Did you say anything of substance here?

  72. Use what's best for the application by prototype · · Score: 1

    I don't think it's completely necessary for anyone to mix languages. Certain languages have certain downfalls so if you pick a language to do a job, you need to ensure that the selected language will indeed do what you need given the constraints of the application. Having said that, it does give you some flexibility in your app if you mix languages, particularily if you use some kind of scripting language to access your lower level code.

    A good example of this would be some kind of modelling application. You really don't want to bother spending time updating the program if you're just letting the user create widgets, and they have to wait for you to release version x to include the latest ones. So adding something like Python to a C++ app would be great for this. Let the user extend the app in whatever way he wants by providing simple primitives (that they themselves could be created with scripting) and a whole new world should open up for you.

    Of course this all depends on the application. I think modularity and language interoperability should be used with caution. Don't do it just for the hell of it and don't do it because it's cool. If you think the app will benefit from it (the benefits don't have to be immediately obvious) then go ahead and have a little fun while you're at it.

    liB

  73. Mixed languages by the+eric+conspiracy · · Score: 2

    Hmmm - I spend a fair amount of my time maintaining a web site that is a mix of PHP/Java/Perl.

    I hate it becaue basic functionality on the site is coded in each language, and has to be maintained or changed in at least 3 places every time an update has to be made.

    So I guess I would say that the lack of ability to share working code from one language base to another in this implementation is a hell of a good reason to avoid this approach like the plague.

    1. Re:Mixed languages by wbav · · Score: 1

      This sounds like, you need to develop some configuration files or such for you site (so you only have to change things in one place.) The point is to have one app do one task and return, not have the same task repeated 5 times.

      Oh and avoid clichés like the plague.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Mixed languages by the+eric+conspiracy · · Score: 2

      you need to develop some configuration files or such for you site

      Actually my preference would be to find a job where I didn't have to maintain this godawful mess.

      Configuration files aren't going to help me solve the problem of having to calculate a discount based on some business rule in PHP, Java, Javascript, AND Perl depending on where you are on the site. An external library, which has been pointed out could be written in one language, then called from others is as step in the right direction - but not good enough. If the site was written in ONE language I'd be able to structure the code rationally across the whole site, and use a system like Javadoc to generate the documentation for the site.

      Trying to use multiple languages seems to me to be an organizational nightmare for any programming job.

  74. Re:C: A Dead Language? by Anonymous Coward · · Score: 0

    I agree that Visual basic is fast, but I find it hard to port to other platform. To get both portability and speed increase I'd use BASIC.

  75. It can work by msuzio · · Score: 1

    I've done this before, and it's a valid approach in a lot of cases. What you need is a situation where the strengths of the languages, and the differences between them, is so apparent that this makes sense.

    Some cases where it works:

    1) One part of the team is significantly less skilled or experienced than another

    In this case, you may have a set of junior coders who aren't up to writing the complex, performance-sensitive portions of the application... but they understand basic programming practices and theory, and they can knock out small chunks of code in something like Perl, Python, etc. In that case, writing a C/C++ back end that can exec these scripts (or has a built-in interpreter) can be a real win.

    2) The application itself is divided up into several logical parts that have very different needs.

    This might be the case with the system above... it's a fast main driver program that can be customized via a scripting interface. Being able to write "plugins" in a simpler language can be a real win, both in development (allows rapid prototyping) and in production (more configurable for end users!)

    3) The "application" is actually several disparate systems that are only loosely tied.

    In this case, who cares what language you use? Focus on the interconnect points, make those robust, and you have a very flexible system.

    4) You need as much performance as possible, or platform requirements dictate a certain language.

    In that case, you just bite the bullet and write that C++ native library to hook into your Java app (or link in the Fortran math libs you need). I tend to dislike this, simply because it can be such a nightmare when it goes wrong... again, the interconnect points and the chances of lib A crashing app B better be well understood.

  76. You make my life HELL! by Anonymous Coward · · Score: 0

    Sure, its nice to use an array() (hehe) of programming languages. But then you get fired, then someone like me gets called to work on this un-maintainable pile of mess.

    But that's what .Net is gonna fix.... right?

    Huper the "Anonymous Coward"

    1. Re:You make my life HELL! by wbav · · Score: 2, Funny

      That's where good commenting technique comes into play. As a good programmer I always put at the top, in a comment "If you break this [program/script/set of scripts] and want me to fix it, you'll have to pay my consulting fee of 80 dollars an hour, minium of 10 hours."

      See, comments can fix any problem.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  77. Re:Why so many? by Anonymous Coward · · Score: 0

    You don't know any shit do you? If Linux Kernel is written 100% in Visual Basic, how can you say that It's only for El33T MS h4ck3rs ?

  78. I'm terrible... For web apps I use everything by Mustang+Matt · · Score: 2

    I'm starting to standardize on PHP, but for a while I would do chunks in ASP and then have them hit other chunks of the apps in PHP and it was a mess.

    It was convenient at the time though because I knew how to do pieces of the code in each language quickly and easily.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
  79. Re:C: A Dead Language? by BigLinuxGuy · · Score: 1

    Great joke!

    Let's see the errors:

    COBOL, Fortran, and Perl have yet to be retired.

    Java just turned 6, VB just turned 11 or 12.

    C is markedly faster than Java or VB

    Garbage collectors perform the same sort of memory management, often in a less optimal fashion

    The FSF has marketing people?

    Harsh restrictions of the BSD license?

    Rewrite the Linux kernel in VB?

    With Stallman's support?

    I thought Torvalds was a Finn! Darn those sneaky Swedes!

    Did I miss anything?

  80. Re:C: A Dead Language? by Anonymous Coward · · Score: 0

    Wow! you're a dork.

  81. It's good to make pieces by PacoSuarez · · Score: 1

    I personally like the idea of writting small or medium sized programs that solve pieces of the problem, much in the Unix spirit. Huge monolithic programs are difficult to read and mantain. If you make several programs with well defined behaviour, you are giving a non-programmer (say, a sys admin) the possibility to make new things using those tools.

    In my company we all know C++ and Perl, and we use a combination of both for a lot of things. I prefer not to use shell-scripts, because Perl is perfectly fine for that.

  82. multi-paradigm languages by rossarian · · Score: 1

    For problems like that, I tend to work with languages that have good support for multiple programming paradigms, or, to use fewer buzzwords, languages that let me easily abstract the problem in various ways. Some ways of abstraction will map more easily onto certain parts of large problems - logic programming, functional programming, OOP, straight old procedural thought, or concurrent programming might be the best fit for a section of a problem.

    Trying to stick a large, multifaceted problem into (for example) the OOP mode of thought is an exercise in pain.

    Languages such as those in the Lisp family (Common Lisp, Scheme, Dylan..) or my current project, Oz, all easily support various means of abstraction.

    The phrase 'easily support' is important though. It's *possible* to do functional programming in Java, but I sure as hell don't want to.

  83. Re:You'd be suprised by MaxVlast · · Score: 1

    You rule. =)

    --
    There should be a moratorium on the use of the apostrophe.
    Max V.
    NeXTMail/MIME Mail welcome
  84. maintenance by deanj · · Score: 1

    I know someone that has the receiving end of this. It's a patch quilt of "use this perl module version with this version of perl...don't use the new version, that version of perl broke it" and other maintenance nightmares. The *real* problem isn't the fact they used a certain language. It's just that it's all completely undocumented, the the code is spaghetti. If you're going to write programs like that, just document what you did for the next guy who has to deal with it.

  85. Yes, we do this by Adam+Wiggins · · Score: 2

    We do this at my company. The web apps are all written in PHP; most of the small "helper" apps are either Perl scripts or bash shell scripts, depending on the size; and the large, complex programs are written in Java. Finally, key server components that require extremely high throughput are coded in pure C in order that they run as fast as possible.

    This works well for the reasons stated in the story. However, my main complaint is that getting your development workstation set up such that you can use and debug all of these languages effectively takes a little doing. Things have gotten easier: a few years ago installing JDK's was kind of a pain, but today they come in RPM form which makes it easy. Ditto for PHP.

    The other big problem is the context switch required, not only the languages themselves (which I don't find it hard to move between, especially with a good syntax-highlighting editor like vim) but rather the different tools. The Perl debugger is very similar to, but not completely the same as, gdb. So I find myself hitting the wrong keys when I'm switching back and forth between debugging Perl and C. PHP, on the other hand, uses good ol' fashioned "printf" debugging, so no problem there. :)

  86. LOTS of languages by Anonymous Coward · · Score: 0

    Our current project (which involves lots of different hardware and platforms) uses C, C++, Java, Python, SQL, XML, HTML, specialize SNMP MIBs (sort of a language), microcode, a very machine-specific machine code, several minor scripting languages (bash and csh scripts, make, etc) and some languages made up for specific purposes.

    Somehow, it all seems to work together. One thing is for sure, a single language would never work.

  87. IMHO your approach is fine by wrinkledshirt · · Score: 2, Interesting

    I don't think there's anything wrong with your method. Certainly if you can coordinate everything, your approach has definite advantages.

    Personally, I've found that a good knowledge of C can pretty much be used to fix any limitations of any other language (and pretty much every language has better string-handling routines than C ;). It's also a great glue language, so that if you've got one language that doesn't query a database, but it can interact with C, then you can write the C stuff to query the database and have the other portion of the program call that. Pretty much everything out there has a C-based API.

    In my case, I coded a messageboard website in PHP, which does everything really well, except that when it came time to work in a search engine for the site, I figured I wouldn't want to go through some sequential parsing of all the files through PHP each time because it would probably be superslow and interpreted each time.

    Now, you can redirect from a php page to a c-based cgi page and vice-versa (just have to know your HTTP headers), and you can code sockets in c in linux pretty easily. So what I have is a daemon process running in the background in C, with all the information indexed in a binary search tree (from when it was loaded) and ready to receive connections. The php search page hands off to the cgi page, which queries the daemon with some data, receives the resulting data, and redirects the output as part of the header to a php page, which displays the results. The search daemon in the background is all c-based, with queries to postgresql, and the way it's set up now, could receive CRON commands to rebalance the tree, repopulate the tree, add new messages to be indexed, dump all the contents to an XML file, etc.

    Now, PHP has bindings to pretty much every database worth its salt, does great string manipulation, can interact with XML files, can interact with LDAP (I think), has some socket capabilities, and they're working on making it work with GTK+ and also be CORBA compatible. PHP combined with a web-browser can pretty much create the perfect client, and of course, you do whatever the hell you want with the server...

    The main problem is having a good protocol to communicate between everything. That's nothing to scoff at. But I still think your approach is sound.

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

    1. Re:IMHO your approach is fine by wbav · · Score: 1

      When I was reading your post, I couldn't help but laugh, becuase I've had to develop a message board, and used (guess what) PHP with an odbc backend. (NT enviroment, and I needed it done in a week)

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  88. Re:C: A Dead Language? by mugnyte · · Score: 1


    Are you sure you're on the right board? Perhaps you should read the tagline under /. (thats pronounced "Slashdot")

  89. Stupid Question by xagon7 · · Score: 1

    This is just a stupid .."I know 15 languages" ego trip question. Get with the program and ask somethign worthwile. (pun is intentional)

  90. People do, but don't realise by stuart_farnan · · Score: 1

    These days, XML must be the most overused tool around, great in the right situation, painful in the wrong ones.

    My point is that so many apps in big companies feel they have to incorporate XML and often XSLT aswell. Now while you may not consider XML as a language in itself (more of a data representation) XSLT certainly is a language - it just so happens that the programs are XML compliant. So many apps that are 'Pure Java', are really using 2 languages Java and XSL and its all too easy for business logic to seep into the stylesheets.

    Not knocking the commonly used idea totally, it is great when applied in the right situation.

  91. alternate answer to this question... by Anonymous Coward · · Score: 0


    I hate it when people ask me this question. I'm a computer scientist, and a language is simply a tool that I use to get my job done. I may have more or less direct experience with one language, but I have been trained to understand the foundations upon which all languages were built. One project I worked on, I did some really advanced things with JavaScript (I don't like to admit this), and when I started, I had never used JavaScript before.. but I am a scientist, and I used the language like I have been formally educated to.

    Just my $0.02.

  92. Using multiple langauges by dmuth · · Score: 1, Redundant


    I tend to use C++ as my controlling program, and then execute Perl, PHP, or Java depending on what will give me the best performance for and cause me the least amount of pain to accomplish the task at hand. Do you guys use this kind of method?



    Absolutely. You should always use the best tool for the job.

    Case in point, at where I work now, I inherited a Perl script which handles software sales on our website. It's an ugly bastard of a thing -- 1300 lines, like 60K long, no naming scheme on the variables, etc.

    So, rather than try to figure out all this code, I instead wrote a nice little Perl module that I use to call PHP code. Even went so far as to design a little communications protocol so that the PHP code can pass back values and the Perl can parse them and pass those variables to other PHP scripts.

    Is it a bit resource intensive? Yep. But the tradeoff is that I did this in a fraction of the time that it would have taken me to hack on the existing Perl code, and since there's a big crunch to get this done on time, the boss is happy and I look good. :-)
  93. Benefits... by sporty · · Score: 2
    Since everyone is bashing the concept, I'll gladly take the stance accepting it.


    If you write the core of the program in C/C++, the part that's slower or extreemely common and then let the rest be implemented in say, Perl or PHP (or some other script language) you have the benefits of higher maintainability with quick and easy development.


    Take any perl program and port it to C, it might be a little harder. Imagine how much more of a hassle a BBS (or slashcode) would be if written only in C.


    Now imagine the same program written only as perl. You don't get the beneifits of speed (lets not assume mod_perl :)).


    Now what if the core parts of slashcode were written in C and less complex or higher maintained parts were written in Perl, you get the best of both worlds. This is how shell programming almost works, no? You write the simple logic which would be a pain to write in C to use C programs that do other things well.


    It adds the complexity of knowing 2 languages, but if both lanugages are not bad languages (don't dare pick on perl :P ) no one should have a problem learning them. One shouldn't use more than 2. SQL and regexp are acceptable since they are very limited, but adding a third or fourth into the mix only adds complexity as it takes away either from quick development or maintainability.

    --

    -
    ping -f 255.255.255.255 # if only

  94. dotNet by int69h · · Score: 1

    Isn't this exactly what Microsoft is trying to achieve with the CLR in dotNET? Write objects in any language, and call them transparently from any other language. I know ActiveState has ported PERL and Python. I'm not sure if anyone has done PHP.

    1. Re:dotNet by wbav · · Score: 1

      There are some reports of doing java with php.

      Now it scares me beyond the lenghts of the imagination that microsoft and I came up with the same idea, but I will survive.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  95. COM, CORBA, and .NET by ClubStew · · Score: 2

    This is where these technologies work great! You create modules that you can use in a variety of languages from a variety of languages. With COM, you can write it in C++ (MFC,ATL), Java, VB, and other languages. CORBA I believe works similarily. With .NET, you have a standard API set you can use in any language. Build many modules, use them in many applications, and make your applications smaller.

  96. Common in VB development by cr@ckwhore · · Score: 1

    This is a fairly common practice in VB development. I often use .DLLs written in other languages (VC++, etc) to make up for weaknesses in VB, and to generally improve performance where the VB equivalent would be a nasty piece of code.

    Other than that, I don't usually mix languages. I've some tricky things with C/PHP, but limited.

    --
    Skiers and Riders -- http://www.snowjournal.com
    1. Re:Common in VB development by wbav · · Score: 1

      So, to summerize for you, if I can, you use other languages as objects (or in your case libraries that have objects in them) and vb as the controling application. This is, in essence the same thing, as I do, but you have to wait for (or develop your own) libraries to use.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Common in VB development by cr@ckwhore · · Score: 1

      Sort of... I'm writing the code anyway, so why not put it in a library so it can be easily reused. Then, its easy to use mulitple languages in a single app, because the shared object (.dll, .so, etc) is basically a wrapper for code written in other languages.

      Also, almost every language has hooks for executing C or ASM code, which can be used for other tasks. I have many low level routines written in ASM, which are then hooked from the controlling app.

      --
      Skiers and Riders -- http://www.snowjournal.com
  97. Lots O' Languages == Lots O' Love by EccentricAnomaly · · Score: 1

    I deal with lots of legacy code in FORTRAN that is as much as 30 years old... very robust, very well tested code that would take years to rewrite in another language. I also use newer stuff written in C/C++, Matlab, Perl, Python, and some other languages developed in house.

    Being able to tie together different languages saves a lot of development time. It's very useful when I just need to solve a problem and move on... which is what I do 99% of the time and I almost never have to write code that will be used again after a few months.

    The biggest problem I run into is that most books on various languages do a horrible job at documenting basic syntax in a way I can look up in the index quickly and I spend a lot of time trying to remember if language X uses if-elsif-else-fi or if-elseif-else-end or whatever.

    ...and porting to different systems isn't that big a deal if the platforms are all different flavors of unix (which anymore means you use anything but windows)...

    --
    There are 10 types of people in this world, those who can count in binary and those who can't.
  98. One word: by Anonymous Coward · · Score: 1, Informative
    Dependencies.


    And because SlashDot.Sucks.The.Big.One won't let me post just that, here's an explanation:


    Writing a program in ALL C++ or ALL Java reduces the dependencies you need to write that program. Nothing is worse than finding a peice of software you would LOVE to use and discovering it required 60 different libraries, all of which are out of date on your system. With RPM distributions this quickly becomes a nightmare, and is currently the primary reason why I have never used Galeon, for example.

  99. Isn't this what .NET is all about? by lukegalea1234 · · Score: 1

    Isn't the MS .NET thing all about this?
    Everything compiles to a common language with a proper object linking model right?

    I get the feeling that you can right a handler for a button press in whatever language you like.. ( MS Supported of coarse!! )

  100. depends by jon_c · · Score: 2

    it really depends on how you do cross language development. For instance COM allows in process and in thread calls, even if one side is C++ and the other is VB.

    A good example of how COM and 'COM like' systems can work is with DirectX in VB. There is obviously more then one language at play: VB, C++, C and a good deal of x86. however I've seen some very impressive demos done with this exact setup the is because the overhead for calling a C++ method from VB is virtually nothing, at least if it's in process.

    --
    this is my sig.
  101. Framework by mugnyte · · Score: 2, Interesting

    For a long time, many of the readers of /. have laboured to put together a private, then public "Framework"

    While not discussing the merits of such an endeavor, they almost always have a productivity gain result, with the added propeller-head feature of making the dev team "kings of the castle" of How It Should Be Done.

    Every OS is merely an minimal acceptable level of a framework.

    By writing applications in a single language, platform or environment, you leverage your knowledge in the language. BFD. BUT! When you organize it on a grand scale as a Framework, you can make extraordinary differences...and you avoid the hodge podge of applications that may or may not live as long as your users need them.

    In my world, enterprise applications written in a massive and ever-more-portable / feature-filled / wrappable C++ framework are the norm. They last years and become somewhat of a family hierloom that we take pride in.

    We have budding frameworks (both built and purchased) for VB and Delphi - but they slip and slide through versions way too often. Ever 3 years the language is updated to take advantage of the Next Big Thing. In a lower-level framework, you can add in these features because you're closer to the understanding of basic toolset.

    Combined with a Component take on development, one can merely add a object to the mix and suddenly the security model, status reporting, version control and documentation stay compatible.

    If you are trying to use different frameworks to achieve solid goals merely from your single opinion of "best for the job" - you are missing a lot of management skills.

    mug

  102. A very useful ability by Munger · · Score: 1

    Multilingual programming is used all the time for things like games. Ever heard of QuakeC? For games it's incredibly handy to have a highly optimized back-end with a simple to use front end. Our current project at work is working along these lines. It has a C++ back-end with any platform specific code, or code that must be highly optimized (such as the 3D renderer). The front-end however is all Python. This is great. We get fast (to write), high level programming with Python and a fast (to run), optimized for the platform back-end in C++.

  103. True, but the project must be completed! by jabbo · · Score: 2

    In my opinion, the single biggest hurdle is acceptance by the client. If it's too late, or too buggy, or too rigid, no one will care whether it's in Java or PHP or Perl or Visual Fortran...

    I write code on-demand because that's what I get paid to do. I've tried being super-neat and uni-language, sloppy as hell and multi-language, and have settled on the processes that work best for me to keep our clients happy.

    I don't pretend to offer a solution for everyone in every situation, but in a small company with high-profile clients, results are the only things that matter. I find that using a fast, compiled "core" with flexible, highly-documented "glue" keeps me from having to work too much overtime, and allows other developers to get up to speed quickly.

    Documentation is KEY to my strategy. Without it, I don't think any of my other comments are relevant. I'm not an OO fascist but it sure does make documenting and segmenting code easier, for run-of-the-mill business and controller apps.

    Again, this is just one programmer's experience.

    --
    Remember that what's inside of you doesn't matter because nobody can see it.
    1. Re:True, but the project must be completed! by Anonymous Coward · · Score: 0
      True, but the project must be completed!

      Heh - it's obvious you work for a small shop. Try working a government contract sometime ;)

    2. Re:True, but the project must be completed! by jabbo · · Score: 2

      Actually, we're in DC, and I work on 3 of them. They're incredulous that things can actually get done, and I plan to keep them that way! More are lined up because of this.

      --
      Remember that what's inside of you doesn't matter because nobody can see it.
  104. Tools, they are tools by pavera · · Score: 1

    Personally,
    I think that it is perfectly acceptable to expect a programmer to know many languages (5 at least). Learning the intricacies of each language might be a pain, and keeping them straight also.. however, this is why we have multiple languages. People said "Hey, this language doesn't do 'x' very well, we need to do 'x'" and they made a new language. Furthermore, once one understands the concepts behind programming, learning a new language is not very difficult, syntax, and the different capabilities/intricacies, should not be a problem. So, I say mix and match. Use the tool that gets the job done fast/efficiently.

  105. Modular Programming by Tyrall · · Score: 2, Insightful

    Use whichever language you feel comfortable with.
    There's been a lot of comments in this thread suggesting you should use x for y job. Whilst this is true to an extent, if you can get something that works using C++, or spend an extra few hours (days?) doing the same thing in {other language}, use C++. It may be less elegant, but most PHBs don't give a crap about that.
    Whether you use multiple languages or not, modular programming is essential if your project isn't a single one-off deal.

    Incidentally, even if it is a one-off deal, it's often handy to modularise programs, as there's always the time someone from sales will wander in and say 'can I get a report kinda like that one I had yesterday, but in [blue|mauve|cyan]?',

  106. you see it in research computing by reverse+flow+reactor · · Score: 2, Insightful

    Often, in scientific research computing (my field is chemical engineering, but I am sure physics, chemistry, geography et. al. use similar techniques) we use multiple languages.

    For example, you may have a simulation that requires several hours of CPU time to run. We will write the math end of the code in Fortran. (If you really require high speed execution, you will write the most frequently run code in assembler.) We then write the GUI or the interface or file handling parts in C, C++ or Java, depending on what you want.

    -----

    --

    The significant problems we face cannot be solved by the same level of thinking that created them. -Einstein

  107. action items needed by jabbo · · Score: 3, Funny
    Indeed, going forward, I must be goal-oriented and results-driven,
    lest you facilitate a dialogue with my supervisor.

    my sourcebook for business-speak -- Action Item Man comics

    yeah, you got me... I'll go back to my TPS reports now.

    --
    Remember that what's inside of you doesn't matter because nobody can see it.
  108. Active Scripting by MrBlack · · Score: 2

    I like ActiveScripting in windows for this. I can write an application in any COM language and inculde the script control. I can share objects between script and application code, I can call one script langugage from another, and the choice of languages is fairly good (JScript, Perl, Python, TCL....O.K. - I admit I've even used VBScript for some date calculation stuff). Doing it all this way means you can debug it in one place, and leverage the strength of the different languages that are available. The final application has a lot of flexability too. Store you scripts in external files you can just edit them in a plain old text editor, rather than edit/re-compile/deploy. I agree with the other posters who note that you may be creating problems for management, but it's not like they've never create problems for developers in their whole lives is it?

    1. Re:Active Scripting by wbav · · Score: 1

      You have some very vaild points, but to keep myself balanced, I must point out, as others have, porting to another enviorment sucks. However, in relation to you it doesn't matter becuase it's all web based.

      Oh and it's not called causing problems for management, it's called job security.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  109. Cart? Horse? by Lumpish+Scholar · · Score: 3, Insightful

    I tend to use C++ as my controlling program, and then execute Perl, PHP, or Java ...

    That's very ... unusual. You're using C++ as your "glue" language, and a higher level language for the code where your inner loop resides?

    --
    Stupid job ads, weird spam, occasional insight at
    1. Re:Cart? Horse? by mrpotato · · Score: 1

      Saw it too, I have to agree. I'd see Perl as a glue language, and that could call some C++ in some cases, but using C++ as the language for the controlling program is a mistake in my opinion. Probably this is the language the submitter knows best, with experience he'll realise the errors of his way.

      --

      cheers
    2. Re:Cart? Horse? by wbav · · Score: 1

      Okay, yes, I learned c++ first, and don't know perl the best, but I tend to do stuff with files, so c++ fits me better. Any time I'm using a web interface it's php as the controling app (php is one of the best enviorments out there IMHO) and control from there. Mainly I do most of my logic in c++ becuase it's a better number cruncher, and then use perl for the regular expressions. But that's just me.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  110. Any good books... by jmccay · · Score: 2

    I have never combined languages (except when using web stuff. I would be interested in the hows, whens, whys, etc of it. Are there any good book people can recomend?

    --
    At the next eco-hypocrisy-meeting, count the private jets used to get to the meeting. Should be interesting to see that
  111. not me. by Anonymous Coward · · Score: 1, Funny

    I try to use each and every unix system call in each application i write. It is supposed to precache all of the system code so that if you ever need to call the system call again, it it already in memory.

  112. Well, if I had time to write domain-specific code by jabbo · · Score: 2

    maybe your arguments would make more sense. But I can't really be bothered to futz with the internals of Postgres or Apache or qmail or [...] every time I need to change something.

    And the other employees of the company want to change things, our clients want things changed, no spec is ever firm, etc... eventually, at least in the line of work I'm doing, it dawns on just about everyone that the "logic" and the "presentation" are not only separate, but often so totally unrelated that one or two hooks will suffice. That's where my break happens.

    The whole "MVC" idea says the same thing, in so many words. I'm just using the best tool for the job, and I've done this sooooooo many times, our business is soooooooo specialized, and our clients expect things sooooo fast (cause we always turn things out pretty fast) that, rather than being a conscious decision to eschew CMM or OOP or whatever the PHB buzzword of the week is, I simply got the damn job done, producing some reusable libraries along the way.

    It's also worth noting that all of this *COULD* be in C/C++ or Perl alone, but I don't feel that Perl is good for anything other than glue, and I don't want to dive into a shit load of C code every time a client requests a change.

    Anyways, that's just my job experience. Yours may be totally different, and probably is, if you write device drivers or microcode for a living, work on huge integrated apps, and so on. Then I'd probably want to stay in one language with *maybe* a scripting language for unit tests and prototyping interfaces.

    --
    Remember that what's inside of you doesn't matter because nobody can see it.
  113. Embed/extend? by Lumpish+Scholar · · Score: 2

    You may already be doing this ...

    If you've got a system that's half C++, half (for example) Perl, you might consider either extending Perl to support your C++ code, or embedding Perl (interpreter and your code) in your C++ code. For Perl, it's documented in chapter 21 of the Blue Camel (3rd edition). I assume the same tricks can be applied to PHP. C++ and Java can play well together with native methods, I believe.

    I'll point out the downside: This still requires your successor(s) to know both languages, plus the "glue" between them.

    (Forget about being hit by a bus; you may want to move on inside your current organization. The harder it is for your successor(s) to support this system, the more likely it'll be a boat anchor around your ankles, when it comes to job mobility.)

    --
    Stupid job ads, weird spam, occasional insight at
    1. Re:Embed/extend? by Andreas+Rueckert · · Score: 1

      Same works in Java. Embed a Python or Scheme interpreter in your Java app. Yes, you have to know both languages, but at the end, a simple a clean Scheme program should be easier to understand than a lot of hacked Java code.

    2. Re:Embed/extend? by marcellomorsello · · Score: 1

      Really good point.

      But mono-languages applications can be anchors either, depending on criticity and complexity.

      If you accept to develop alone a critical solution, you solved the company's problem.

      But if BEFORE solving the problem you don't REQUIRE someone to maintain it, you just
      create a personal career problem.

  114. VB Developer and Proud by WndrBr3d · · Score: 5, Informative

    Being a Visual Basic developer, I feel who better to know its short comings as a language. For the last few months, I've been doing cross language applications for windows.

    Basically, I develop the Application Interface and Simple Functions using Visual Basic Modles and ActiveX Classes.

    -but- For Intense Number Crunching, I weave Visual C++ DLL's that have all the function calls that would normally chew and grind Visual Basic to a halt (Floating Point Number Calculations, Loops on Data, and Byte Cyphers).

    There's a wonderful book on the topic by A! Press (I know.. I'm a Wrox man myself) called "C++ for VB Programmers" (Link) which explains the process of using Win32 DLL's and ATL COM DLL's in your VB Application.

    This process leaves VB doing what it does best, looking pretty. It also lets C++ do what it does best..... all the work ;-)

    1. Re:VB Developer and Proud by alyandon · · Score: 1

      That is exactly the role I relegate any of my VB development to... GUI related and simple ADO stuff.

      If I need custom controls I might be tempted to develop them in VB if they aren't going to be used extensively. Otherwise I tend to code any ActiveX/COM related stuff exclusively in C++ using MFC or ATL.

    2. Re:VB Developer and Proud by boxie · · Score: 1
      I was a vb developer... Moved from Turbo Pascal v6.0 to vb a few years back... then went on Vb5 and VB6... I will agree on one ting VB does look pretty and is alot of fun... but Borland Delphi is better.. ?? why should i need two languages to do the job of 1?



      Delphi Looks good - has an awesome user interface and look better (IMHO) than VB.

      btw - it also has better controls

      --
      A Tale of 2 idle hands
    3. Re:VB Developer and Proud by Etrigan_696 · · Score: 1

      VB is great for one thing I've seen so far:
      Any time it would take longer to write the code for the GUI than it would take to write the code for the real guts of the job - us VB.
      And no - that doesn't mean "VB is only good for toys" - that's plain wrong. There are plenty of good apps out there that are ENTIRELY a user interface with almost no guts. Or the UI is _SO_ much more important than the "real job" that the real job becomes trivial. FTP clients are a decent example. There's not much to a CLUI FTP client. text parser, tcp/ip connection handler, file handler/error checker - I've done that myself in under two hours. But that becomes a little more complex when you want something a la' "gftp" or "cuteftp" or "wsftp".

      That's sort of the point of this whole article. The guts of the FTP client are best written in something like C or C++, and use VB (or the closest likeness thereof on your system. QTdesigner needs help, but it's getting there.)

      People keep going on and on about things like "maintainability" and "what if you get hit by a bus" but I keep thinking this: Odds are, this guy's wanting to do exactly my ftp client example. He's got C/C++ in mind for the weightlifting and some other tool like VB or QT designer - or even *GASP* JAVA! in mind for the GUI.

    4. Re:VB Developer and Proud by SloppyElvis · · Score: 1

      This is a pretty good method, and in fact it is the one we used to use. However, you run into problems if you want to port your code to any other platform. For us, there was a push for a Mac version, and porting VB and Active X to Mac is no picnic.

      Instead of using ATL COM or Win32 Dll's, we used C++ ActiveX objects. It is nice to do this, because ActiveX objects in C++ can fire events back to VB, giving you extra control from the C++ side (in our experience, tis better to store object data and perform intensive file I/0 from C++, only GUI handlers exist in our VB). Separating the code like this has made it easier to port, since much of the C++ code was reusable. Also, you get pointers to use in your objects, which can be very nice (or evil). ;)

      Also, as you probably know (but if you don't), using C++ Dll's you can create a class that is child to CCmdTarget (MFC, allows automation calls) and make it a dispatchable object from the VS wizard. This allows you to create the object directly in VB (as you would any object in VB) and make function calls to it across the automation boundary, without going through the hassel of importing every Dll function in VB. This method doesn't allow events to be fired from the C++ object though; however, the object doesn't need to be placed on your form and declared invisible a la ActiveX objects.

    5. Re:VB Developer and Proud by plover · · Score: 3, Insightful
      I have a huge issue with this approach, however.

      We used to have our application written this same way. VB GUI front end, C++ business logic back end. The problem we had was that some people on the team were stronger in VB than in C++, and we ended up with business logic creeping into the VB. A few years ago, we decided we had to walk away from that app for future development, and here we are reinventing the wheel today. After five years, we had ended up with more business logic in the VB than in the C++. It's an awful mix. It's tough to maintain, and tough to debug.

      On the other hand, I don't think it was necessarily the language that caused the problem. What we had was people developing without understanding the underlying architecture of the application. The VB portion was originally created by a vendor in 1995, and she walked away from it as soon as it compiled. It was thrown over the fence to other coders at that vendor's site, as well as us at that time. Those of us who got in on her initial training were able to carry the design forward, but almost immediately the new hires (and the vendor developers who were not under our direct supervision) started "blending" business logic into the VB.

      I think we were doomed to this fate from the get-go because we didn't have strong project control. Any ongoing programming task is going to have issues like this creep in eventually. Multiple languages aren't necessarily the problem, and in some cases can help, but discipline is required to pull it off successfully over the long run.

      John

      --
      John
  115. Welcome to the World of Web Development by thomis · · Score: 2, Interesting
    On any given page in my current project you are seeing the results of VBscript or JavaScript running on the server (ASP), usually JS running on the browser(for DHTML effects and validation), XML/XSLT (formatting large result sets and general neato-ness), and FoxPro (the database. Don't laugh, I'm trapped in an M$ shop, and FoxPro is the most subversive dev tool we use (no licensing for server, just whip up a COM, and it kicks M$QL's ass))


    This seems pretty common in the Web world, and yes, it explains alot... but I definitely try to pick the right tool for the job (dates are easier to handle in VBS, but forget about regular expressions, that's a job for JS).
    I think I'd get bored quick if I had to develop in on language. Then again, it might lead to a deep understanding of the language.

    Of course, I could be wrong.

    --
    ceci n'est pas un 'sig'
  116. Perl + PHP by justinstreufert · · Score: 3, Interesting
    I worked at eGrail, whose flagship product is coded in a mixture of both PHP and Perl. Web user interface is in PHP with a fast internal parsing system written in Perl.

    There are definite advantages to this design; PHP is probably the easiest language in which to write a web GUI, and Perl greatly simplified the process of building the incredibly complex parser.

    The disadvantages: eGrail has (or at least had) a ridiculously long list of dependencies; one needed both a working web server with PHP4 and many extensions, not to mention Perl 5 with a host of 3rd party modules. TWO seperate database interface libraries are required.

    I think it was a good thing for eGrail, but it's a carefully balanced tradeoff.

    Justin

    --
    "Why would God give us a waist if we wasn't supposed to rest our pants on it?" - Rev. Roy McDaniels
  117. I use the kitchen sink method by Anonymous Coward · · Score: 0

    And sometimes it even works!

  118. Good and bad uses of multiple languages by Anonymous+Brave+Guy · · Score: 2

    The pros and cons of using multiple languages have been detailed already here, so I won't repeat them en masse. Suffice it to say that the pros boil down to the flexibility to use the right tool(s) for the job all the time, while the cons boil down to extra overhead getting your tools to work together, and getting your developers up to scratch in using them all.

    From personal experience, this leads to certain "good" uses of the tools, and some "bad" ones. Below are my "best choice" times to use multiple languages.

    1. On a large project, the main program is written in a single language (e.g., in my current case, C++) and other languages are used for independent supporting tools (e.g., our fairly involved build process uses Perl and Python scripts, our installer uses XML source data, etc.).
    2. If you're working on a genuinely multi-tier project, given well-defined communication protocols between tiers, what each is written in can be independent of all others. For example, given a web front-end to an e-shop, you might sensibly write the front-end using scripting tools, the back end in C++ and the database using a full-fledged DBMS.
    3. Your main bit of code is written using a relatively high-level language, and after profiling, you optimise by recoding specific routines in a lower-level language for better performance.
    I'll just note here that in each of these cases, the languages are being used in complementary parts of a project, but never simultaneously on the same part without a very well-defined interface between them.

    Personally, I'd say that going further and trying to use multiple languages on different pieces of the same basic development is asking for trouble. The drawbacks start to seriously outweigh the benefits if you're not very careful. I'm sure it has been done effectively somewhere, but I've never seen such a case myself.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  119. Organization before Middleware by vulg4r_m0nk · · Score: 1

    I've used CORBA on two projects.
    Project 1:

    1. C++ through and through (even a C++ OODBMS emulation layer (nightmare!))
    2. fairly brain-dead ecommerce stuff
    Project 2:
    1. Java, Emacs Lisp, Perl, SQL
    2. much more intricate system, designed for online document publishing

    Major relevant difference? In the first app (which I inherited, and was in no way responsible for) was so poorly designed that absolutely everything from the front end NSAPI DLLs to the backend to the db emulation code had to be compiled into one gigantic package -- absolutely zero compartmentalization of behavior.

    In the second app, we have very clear boundaries of responsibility, such that each bit of code is largely testable independently.

    The bottom line is that if you're going to use multiple languages for a single project, just make sure that each part has a clearly defined role. This helps with development, testing, and replacing team members if need be.

  120. Yes breaking things up is good... by javaaddikt · · Score: 0

    It's called a linux distribution. The *nix way... vi, tail, grep, cat, etc... The m$ way--WORD.

  121. Multi-language = Higher cost of ownership by someguyintoronto · · Score: 1

    I agree that every language has its pros and cons. And I also agree that leveraging the best from various languages is a logical, rational and utopic idea.

    But the truth is, for a business developing software in house (or outsourced), every new language equals a new skill. That skill either needs to be hired, trained or outsourced. Even if the difference is only Java vs. M$ Java (C#). If things break down and no one is around that can fix it (or knows how to, or takes too much time to), money is lost, and the performance gains are irrelevant.

    I usually recommend to clients to set standards and stick to them. If, however, multiple languages are what's truly necessary or fit the company "vision" to do the job, be consistent in their applications and usage. For example (and this purposely stupid, to illustrate my point):

    - Java for all database & data access modules
    - Visual Basic & COM for all middleware & business rule modules (objects)
    - PHP for all web application presentation
    - PowerBuilder for all client side GUIs

    Then at least a company can match skillset to experience based on the standard. The cost of ownership is at least reasonable. (Unless of course the company was stupid enough to use PowerBuilder for GUIs, then I'd quit:)

    My other recommendation is to stick with a high level languages only. Although performance is lost, the cost saved on maintenance is far more imporant for a business. A high-level language, like Java for example, that is is powerful enough yet accesible, goes a long way vs. C++ in a business environment. (I know this last line will definately cause a few flames;)

    Cheers

    1. Re:Multi-language = Higher cost of ownership by wbav · · Score: 1

      While it is true that using more languages requires more skill, but consider this. In the act of learning php, you get some exposure to java and c++ (not only syntax, but data structures and such.) So if then you go off and learn c++, doesn't it help you skills with php?

      In my experince it has, and as a result, I have gone out and learned languages becuase I could, not becuase I've had to. I know php, c++, java, perl, some tcl, vb, c, basic and a bunch of scripting languages not to mention things like sql. Now won't someone who has to learn the same skills as me, be able to understand my code with more clarity? Otherwise using pcre in php would kill off anyone trying to learn what I was doing.

      Oh, and a lot of programmers talk about java like it's the best thing since sliced bread. Personally, I don't think they apreciate toast enough.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  122. The Ultimate Language Triple by mr_gerbik · · Score: 2

    This will make you millions...

    Lisp + Perl + C

    1. Re:The Ultimate Language Triple by Anonymous Coward · · Score: 0

      Isnt that called 'Python'?

    2. Re:The Ultimate Language Triple by JamesOfTheDesert · · Score: 1

      No; Ruby. Except you get Smalltalk instead of Lisp.

      --

      Java is the blue pill
      Choose the red pill
  123. Re:Generally, a bad idea -- your view is! by jackb_guppy · · Score: 1

    All programing is mixture of languages...
    The OS is language
    The programs like sed / grep / awk / find use a languages.
    TCP is a langauge, APPC/APPN, modems

    Even if you "ONLY" write C++ - you don't. You use the editer's language to write. The compiler's language to compile.

    Every API is a langauge.

    You think not??

    They all have syntax, verbs, methods, and anything else you want to claim as only in a langauge. What else is a API but a language, maybe simple... take (s)(F)printf... but still a language.

    The only true OS/Langauge that I know is Forth. The editor, OS, & language are parts of the same thing.

  124. Re:C: A Dead Language? by Anonymous Coward · · Score: 0

    Real Basic is cross platform in ways Java can only dream of. The Ease and power of VB, but available for both MacOS and Windows.

  125. Re:What if you get hit by a bus? (other case) by wbav · · Score: 2, Insightful

    Your arguement goes both ways

    let's suppose for a second, that you're a programmer, working on you own class. Now you know it inside and out, unlike anyone else. You need to add a function to it, you know how to do it so that everything works correctly. And then you're hit by the bus.

    Sure other people will have the skills to read what you've done, but understanding why you did things will escape them; unless, you document your code. Which leads to the solution to this.

    Good documentation is key; make sure to include your consulting fee for fixing the program or script and your email.

    --

    =================
    Unix is very user friendly, it's just picky about who its friends are.
  126. uhh... by smack_attack · · Score: 2

    All I can say is that debugging must be a pain in the ass.

  127. Debugging? by Mike+McTernan · · Score: 1

    This sounds like an absolute nightmare to debug! Having lots of languages doing different bits executing as individual processes probably means that there is no posibility of using a debugging tool to generate a clear stack back trace showing functions and arguments. In fact, this type of system probably requires many different debuggers all running the various parts at the same time, something that is going to be difficult to manage, prducing diagnostics that are hard to visualise/comprehend and using a hell of a lot of memory.

    I wouldn't like a heisen-bug to get into *that* system.

    --
    -- Mike
    1. Re:Debugging? by wbav · · Score: 1

      But, that's one of the best parts. You make each program/script self sufficent and then debug it seperately. Each one has it's on part of the ram and they don't intersect (unless you use windows 95/98 and do it on purpose: see loadlin.exe)

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Debugging? by Mike+McTernan · · Score: 1

      You make each program/script self sufficent and then debug it seperately.

      So you don't test the units together? Sounds silly to me.

      I was once a part of a project that designed a system to be lots of processes communicating over pipes. Each process could have been in any language and free to do whatever it wanted internally - they were to be black boxes. The problem was that a bug in one would cause it to crash at certain times, causing a broken pipe error for the other processes, that then broke their pipes until everything dies and there was nothing more than core! It was darn hard to debug

      I'm not opposed to multi language things, just putting everything in different processes is brain dead... at least use bindings and link the stuff together into one pile that can be debugged reasonably. If it can't be debugged reasonably you're doing something wrong.

      --
      -- Mike
    3. Re:Debugging? by wbav · · Score: 1

      Debug them seperately first, then start hooking them together. I try to use files as my way to transfer data between programs mainly becuase I can simulate it running ahead of time, to help me debug.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    4. Re:Debugging? by Anonymous Coward · · Score: 0

      > I try to use files as my way to transfer data
      > between programs mainly becuase

      ... of the massive performance hit?

  128. Web programming is multi-lingual by nature by LoveMe2Times · · Score: 4, Informative

    I'm willing to bet that most of the posters on here saying that using more than one language isn't a good idea (for whatever reason) haven't done much web programming. For a fairly normal browser plugin project that I worked on, we used the following:

    1) C++ for the actual plugin.
    2) JavaScript for webpages embedding the plugin.
    3) Perl for CGI backends.
    4) SQL (duh).
    5) Wise Installer script for the installer
    6) Delphi (Pascal) for a game builder app that made games to be played in the plugin. This app loaded the plugin as a normal dll.

    If you're doing integration between technologies, you'll almost invariably wind up using different languages. Often times, you have no choice. Also, this isn't meant to be offensive, but people that think C/C++ is one language are naive. Generally, you have to ship clients executables, so you're limited to languages that compile natively (with the possible exception of Java). You generally can run whatever you want on your own servers. Then you have web browsers that are their own funky platform. If you can get away with using only one language, congratulations!, but don't expect that all the time.

  129. Re:The Turd Report 11/20/2001 by Anonymous Coward · · Score: 0

    I've had a havana omelet or 2 in my days.

    I do have to wonder who designs toilets, though. We can thank al gore's low water toilet for the fact that you can't buy a shitter that cleans up in one flush. I can only assume toilet designers are all small dicked fools. Or like washing their peckers in fecal water.

  130. Re:Generally, a bad idea -- your view is! by Ars-Fartsica · · Score: 2
    The OS is language
    The programs like sed / grep / awk / find use a languages.
    TCP is a langauge, APPC/APPN, modems

    This is gibberish. He is talking about mixing together multiuple turing-complete programming languages.find and the TCP/IP protocol do not qualify. In the case of the latter, it is a byte ordering protocol, not even a "syntax" per se.

  131. spell checking! by wrinkledshirt · · Score: 1

    Visual Basic Modles

    I can't tell what you mean here by "Modles". Do you mean VB error-checking? That's "Muddles". Do you mean the prolific use of goto? That's "Noodles". Were you commenting on VB .Net code snippets? That's "Dawdles". Or were you trying to get at the collection of components and APIs? That's "Motleys".

    Or maybe you had some dyslexic thing going on and really meant "seldom". That would make the original sentence: "I develop the Application Interface and Simple Functions using Visual Basic seldom..."

    Yeah, that's probably the best way to go. Although the correct adverbial use is "seldomLY".

    (jk. I teach VB. You need a sense of humour...)

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

    1. Re:spell checking! by Anonymous Coward · · Score: 0

      If you teach VB with "a prolific use of goto" then you deserve to be fired. And you're right, I have no sense of humor about this.

      VB works great for hacking up a quick GUI for something written in a more robust language (such as C). Beats hell out of dealing with those MFC'ing Microsoft class libraries.

      If I need to do something that's at least quasi-portable, I use Java (AWT if it needs to be relatively fas, and ugliness doesn't matter, or Swing, if it needs to be pretty and/or I know the target user has a fast machine) calling C through JNI.

    2. Re:spell checking! by wrinkledshirt · · Score: 1

      And you're right, I have no sense of humor about this.

      The moment after I wrote what I wrote I wished I could rephrase it. I meant you (as in the royal "you") need a sense of humour to teach VB.

      --

      --------
      Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

  132. I do all that in .NET by RodeoBoy · · Score: 1

    C++, C#, Perl, VB, OK I don't use VB anymore. I have always worked this way, but now I have a platform that is designed for it. It is a good thing I am more interested in programming than analysing someones business practices. Fourty below and I don't give a ...

  133. In electronic developpement by Hells+Ranger · · Score: 1

    Actually I'm a student in electronic. We often have to program some chip like the 68HC11. When we have to program this sort of thing we habitualy use some language know as small-c. In that we add some chunk of code in assembler for efficiency, because some time we have to manage with the execution time who is critical. The problem with C is the language took a lot of time to process even if it's faster to code.

  134. It's nice to have a choice, but... by sennomo · · Score: 1

    I sometimes dream of mixing languages to get the best from each. However, wherever I work, the boss tends to pick out everything for me, which usually means VB on a completely Microsoft platform.

    --
    Mi klopodas varbi por Esperanto.
    1. Re:It's nice to have a choice, but... by wbav · · Score: 1

      Use c++ to compile dlls for vb.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
  135. Porting? by MrBlack · · Score: 2

    by Porting I assume you mean going from Windows -> *nix....I guess it depends on the scripting language you choose. If you choose VBScript then porting will not be an option (and perhaps you should go and sit in a quiet dark room for a while) but if you choose something like python...you can always port you "main compiled application" to Java (assuming you didn't develop it in Java in the first place) and interact with python via jython. Or write it in C/C++. I'm not sure about Perl ('cause I have zero knowledge about it) but I assume there are ways to do it. Porting from one OS to another is fairly involved anyway (from what I hear), is that what you meant by porting? As far as being all web-based goes - what did I say that gave you the impression it was all web-based? I've imbedded active scripting into desktop apps before (and I will probably do it again).

    1. Re:Porting? by wbav · · Score: 1

      My mistake on the web stuff, I mis-read it to say active scripting pages, rather than active script. For the most part, porting perl just as easy as porting a webpage (just make sure you switch the slashes.) As for c++ (atleast the stuff that I've done) it shouldn't be too hard as long as you stay with the standard functions (but what's the fun in that?) Thanks for clearing me up on the web portion.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Porting? by MrBlack · · Score: 2

      No worries - Active Scripting is probably best known for it's role in web development, but I really love imbedding script in applicaitons too. The Doctor Dobb's Active Scripting Newsletter is quite good for info on this sort of thing.

  136. Most "applications" are not one program by Pseudonym · · Score: 2

    Think about your favourite shrinkwrapped software. Chances are it doesn't only contain one executable.

    As an example, my employer makes a product which includes a processor-intensive number crunching program, a compiler, a file format converter and a reporting tool. The number crunching program is in C++ (to keep a cap on performance). The file format converter needs to be in something which can be interfaced with C so it can use some third-party libraries. The compiler, however, has no other requirements and is not time-critical, and so is being rewritten in Haskell for ease of implementation.

    The point being that even if it's hard to get two languages to talk to each other, multi-language application suites are more common than you think.

    (Although, even Emacs is written mostly in Lisp...)

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  137. Re:Speaking of Fortran by Anonymous Coward · · Score: 0

    Sir Troll,

    I'm am a bit stunned that you got responses at all to your anti-C post. I guess Satire is visible only to those who choose to see. Me? I'm looking for a laugh, not a fight.

    Troll on!

  138. My Faves C++/ASM/PERL by Anonymous Coward · · Score: 0

    I like to pick a few languages that cover the spectrum and work in that. C++ for the bulk of the application, with a perl interpreter built in for parsing, heavy text processing, and cases where flexibility is much more important than speed. (Also perl on the server side of course) ASM for where speed is critical. (Yeah, yeah, it STILL makes a difference for the sake of portability)

  139. Efficient programming by rice_burners_suck · · Score: 2, Funny

    I think the best way to go is to write all the time-critical portions of your program in Java. Then, write a Java VM in Perl. Then, write a Perl interpreter in BASIC. Then, write a BASIC interpreter in Python. Then, write a Python interpreter in shell. Then, write a shell interpreter in C++. Then, compile that C++ program and run it under an x86 simulator written in COBOL. Then, write a COBOL interpreter in Pascal. Then, write a Pascal interpreter in Prolog. Then, write a Prolog interpreter in Smalltalk. Then, write a Smalltalk interpreter in awk, and use M4 macros to convert that into a C program, which you compile and run natively on the machine.

    Now remember, the previous paragraph applies only to the time-critical portion of your program. The other 99% of it should be hand-coded and highly optimized machine language.

  140. Debugging by wbav · · Score: 1

    Debugging tends to be easy.

    Using files as a way to save data between diffrent portions, I can put in what I want and check that each portion gives me what I want.

    It's only if you try it all at once (with out checking each part first) that you have problems.

    --

    =================
    Unix is very user friendly, it's just picky about who its friends are.
    1. Re:Debugging by smack_attack · · Score: 1

      Now that I think of it...

      Build an app... out of many languages, using a single common interface, and using a file to save data preferences. It's fuckin' Microsoft(TM).

      You know in the real world, I expect my app to work properly when I "try it all at once".

      I would go mad just writing a common error api in each language.

  141. What a load of rubbish. by carlfish · · Score: 5, Insightful

    I consider myself a good programmer. It's been my experience that depending on the complexity of the language, it takes between six months to a year of experience in a language before you are fluent. Fluency is not mastery, it's the point at which you can sit in front of the code and write in such a way that you are using the language, not wrestling with it. And you can't write good code when you're fighting the language.

    As for reading a language. Sure, you can read any program immediately, provided the syntax is familiar, and the code is well named and well commented. On the other hand, there are always unfamiliar syntaxes - take someone who's only coded in C and Perl, and put them in front of Lisp or Smalltalk, and they'll need a couple of days work just to be able to parse it.

    You can learn enough to slap a program together in a week, provided the syntax of the language isn't particularly alien, but it's not going to be one you're proud of the week after, when you've learned a little bit more. You'll know the syntax and control structures. You'll have some idea of the shape of the main libraries, and you'll know where in the documentation to look if you need to know more.

    I've done this before - I remember having three days to learn enough of a particular language to fool a customer into thinking I knew what I was doing. And I did, we got the tender, I continued to learn more over the ensuing weeks, and the customer was happy with me. Looking back, my total unfamiliarity with the language probably cost this customer many thousands of dollars in lost productivity, for all the time I took looking up library functions in the language documentation, and all the time I spent inefficiently re-implementing functions that were already available, but that I wasn't aware of enough to know to look for them.

    A week of study will qualify you to painstakingly inch through other peoples code with piles of documentation at hand, and get a pretty good gist of what the code is doing. It'll qualify you to write something artificial for your CS class. It'll qualify you to make simple logical changes real code. It will NOT qualify you to write, or make significant changes real code.

    The syntax of a language is only the smallest, and easiest part of it to learn. The libraries, the idioms are far more important. Knowing all the weird letters you can stick at the end of a regexp in Perl. Knowing that double-checked locking in Java doesn't work. Knowing which collection in the STL is most suited to the data you're storing. Would you trust the maintenance programmer you've just hired and taught C in a week not to introduce an exploitable buffer overflow?

    Charles Miller

    --
    The more I learn about the Internet, the more amazed I am that it works at all.
    1. Re:What a load of rubbish. by microTodd · · Score: 1

      Good point, Charles. I used to have the notion that "once you learn HOW to program, its just a matter of learning the syntax." But I've found that's only partially true. You have to learn how to do certain algorithms, memory management, error handling, etc.

      Example: I've done Perl for years. I consider myself "good" at Perl. I recently started coding a large Java application. Sure, I know what "if-then-else" means, so it was easy to just start writing control structures in Java. But in Perl, I did error handling by having functions return NULL. In Java you can use "throw". In Perl, I regularly used multi-dimensional hashes. You can't do that in Java...instead you create new datatypes.

      Until I get some experience, I cannot write Java code that's good. So it really is more than just syntax. You have to learn how to do things in that language's way!

      --
      "You cannot find out which view is the right one by science in the ordinary sense." - C.S. Lewis on Intelligent Design
  142. GO! GO! GO! Magic Red Hat! by Kymermosst · · Score: 0, Offtopic

    And some of my Stallmanist friends wonder why I keep supporting Red Hat.

    With a move like that, I think I'll definitely put my money into them by purchasing RH 8.0 when it comes out.

    Even if it's just for publicity, it's a stroke of genius.

    --
    "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
  143. Get really good at one by lorax · · Score: 1

    My philosophy is to get really good at one and stick with it. And I mean get really good with it. Know all the ins and outs, sleep with the O'Reilly book, know what modules are available and where to download them from. Overall, you will be more productive, because you of your deeper knowledge, because you will have a ready library of objects and subroutines to re-use, and because you won't have to expend the mental energy fixing trivial mistakes (like whenever I switch from perl to C, I spend half a day putting $ in front of the variables).

    This is especially true for rapid prototyping and one-off scripts where if you switch to a language you use less you have to pull up the man page (like bash or awk for me)

    It is less true if you are going to work on the project for a year or two because you can spend the time getting really good at whatever language you use.

    Choosing the best language for a task needs to trade off time it takes to run vs time it takes to develop and generally, cpu cycles are much cheaper than your brain's cycles.

  144. Development by discipline by pamdirac · · Score: 1

    The commonality I see in all these threads is that if the project is well-implemented (design docs, code comments, good division of labor between modules, etc.), it is ok. Otherwise it will be a maintenance nightmare.

    This can be said of almost any software project.

    That being said, if you have a MASTERED, say, C, C++, Perl, and Java, you must have a compelling reason to switch languages for a particular subsystem. I don't advise it for the singular reason that it complicates the build process. That in turn complicates the automated testing process. And on and on.

    Also, in the 4 languages I listed, there are few tasks that are not readily accomplished if you are not reinventing the wheel.

    There are some exceptions to this rule, so it is soft, but I would be loathe to switch languages. I have developed on large-scale platforms in C, Perl, and Java, and I have had to write less than 10 functions in a language other than what I was using as the main development language.

    --
    John McNair
  145. Use the right tool for the right job by Phemur · · Score: 1
    How many languages you use depends on the task at hand. If you're building a server application that has a client administration tool, then you should probably build the server with a language that will give you high performance. Since your client application is mostly UI, then build it with a language that was designed for UI work.

    On a side note, I don't think an application implemented in a few languages will be all that hard to maintain, as long the languages in question are not the more cryptic ones like Sather or Eiffel. If the main programming languages are C++, Java, Perl, VB whatever, chances are that most programmers can handle maintenance.

    Phemur

  146. My ideas on the subject by zeno_2 · · Score: 1
    **Disclaimer**
    I know very little about programming, these comments are more about the general idea of multi-language programs in a buisness world i guess you could say..

    I think from a corporate standpoint, its a tough sell. They think $$$. When something like this shows up, this is what they think:

    1 - A group of developers (or just one) wants to use a few languages to complete a project that, lets say, the company will depend on for a few years. They are unsure as of how long these people/person might be working for them, they have maintainability to think of. Sure you could tell them that it would end up better this way, but they just see it as more money being spent. More money being spent hiring better trained developers, and so on.

    2 - They see a group of developers (or just one) that can do the same project with one language. They now only have to worry about one single language, and hiring a developer that knows one language is much easier and cheaper.

    Who do you think they will chose?

    From the standpoint of a coder, I would say use the tools that are given to you. Given that, you have 2 choices:

    1 - Make a program only using one language. You feel that if you do it this way, it would be more standard, easier to maintain, but you see that there might be some parts of the project that could pose some problems. Nothing that couldn't be done of course, but you may have to do some things with your code that shouldn't 'need' to be done.

    2 - You take the same project, and see that the same language you were thinking of in the first scenario could do most of what you want pretty easily. The difficult sections, you find that there are other languages out there, such as perl, that could do something fairly easily. By doing this, you one, become a better coder, knowing not only how a certain langauge works, but how it could interface with other languages. You will start to understand that each language was written to do certain tasks.(some may incorporate many many things, but they never intended for their language to do everything humanly possible 5 years down the road).

    Each language has strong points and weak points. It is your job to understand these tools, and use them in a way that will get what you want done. If it means using one application, then go ahead and do so. Don't try to force something without knowing if there are easier options, better ways of doing things.

    It seems that people are more locked into using a single language(or even lets say a group of languages like visual basic/c++) when you are in a corporate enviorment, as you may not really be the one who decides on what you are going to use. You get an email that says do this and you do it.

    Anyway, the above is just my opinion on the subject, I am no expert and I don't claim to be. This of course does not apply to every situation out there either.. The above is more of a general way of looking at a lot of things, but I hope I got my point across..

    Zeno

  147. Re:Generally, a bad idea -- your view is! by jackb_guppy · · Score: 1

    Then you are not seeing the big picture. Have worked with too many people that just do not get it. They are all the same. Just because it is a "byte ordering protocol" it is still a language, if you do not place the bytes in the correct sequence - the message is not "under stood".

  148. 'Languages' not important; 'Syntaxes' is. by Anonymous Coward · · Score: 0

    There is so much more than the language that the executable is written it.

    You've got .properties that contain program knowledge, .ini files, .html files (or templates) .xml configuration files, $ENVIRONMENT variables squirrelling away little bytes that affect the execution.

    Anyone who writes things "100% in Java" are causing themselves problems.

    Take advantage of all the different syntaxes available to access all the different resources (data, cpu cycles, network, etc).

  149. Weird languages by YoJ · · Score: 4, Interesting
    A lot of people seem to be saying that it is dangerous to use "alternative" languages for major projects because people that must maintain the code may not be familiar with the language. This is undoubtedly a valid concern. One neat idea to get around this is to use a high-level language as a tool for creating a project written in a lower level language. For example, if the target application is some sort of GUI app, then someone may decide to use Java. But Java is not a particularly high-level language, so you decide to use Lisp. You create a Lisp "environment" that facilitates creating Java source code. Lisp functions create abstract data types representing Java programs with certain attributes, e.g. widgets and widget behaviors. Then you write a Lisp function that translates the data structure into valid Java source code. Developing the program then becomes less of a mundane Java programming task, and more high-level and fun.

    This method has a loss of productivity from the added complexity of the task, but this can easily be made up for in increased productivity at the meta-level. I.e. if your application has many buttons with only slightly different functionality, a single Lisp function call creates each button. Changing behaviors and adding or deleting parts of the program becomes simple. Best of all, the end result is a valid Java program that anyone who knows Java can understand. If the person who comes after you does not understand Lisp or the idea of program generation, it doesn't matter. They have a Java program to hack on. If they do happen to understand Lisp, even better, they can pick up where you left off with a big productivity gain. Lisp is particularly suited to this type of thing, but any good high-level language would work.

    1. Re:Weird languages by sergeaux · · Score: 1

      That's good, and I always promote writing program generators instead of programs. But I really object to the very idea of calling Lisp a high-level language :-) I find it more like an "functional assembly with good memory protection" - and thus it only deserves being generated. It lacks static typing and modules. Consequently, it becomes very hard to write big programs, and to use higher-level functions.

      I would recommend using ocaml or haskell.

    2. Re:Weird languages by Anonymous Coward · · Score: 0

      But of course Lisp is generated! That's the point of Lisp macros, to make it easy to write programs that write programs that write programs. Coincidentally, a major problem with Ocaml and Haskell is that they don't have a macro system of comparable power...

    3. Re:Weird languages by YoJ · · Score: 2

      Actually Ocaml has a macro system that (I think) is of comparable power to Lisp's macro facilities. It is called caml4p. Basically it duplicates the parser of the interpreter, but with a configurable syntax. So you can declare new control constructs, new keywords, etc., and attach semantic meaning to them. The alternate syntax can then be accepted by the compiler and interpreter through a command-line argument. So the end result is somewhat like Lisp's macro facility, but maybe slightly less convenient to set-up.

  150. LITHP Thuckth by Etrigan_696 · · Score: 1

    take someone who's only coded in C and Perl, and put them in front of Lisp or Smalltalk

    C programmers make a big deal of going out of the way to make their programs completely unreadable. They think it's fun.
    Larry Wall is GOOD enough at perl to write some truely beautiful GIBBERISH that actually does something.
    with LISP you don't even have to try.
    Almost all non-trivial LISP programs are so recursive, even an old, bald, blind LISP master who spends most days contemplating fully-functional AI can't tell you what the code will do at a glance.

    it takes some skill to write working, unreadable gibberish in C and PERL, but ALL (almost) LISP programs are unreadable gibberish.

    1. Re:LITHP Thuckth by Anonymous Coward · · Score: 0

      That sounds like you've been reading too much Scheme, instead of Lisp.

    2. Re:LITHP Thuckth by brlewis · · Score: 2

      The impoverished languages you're accustomed to using require 2-5x the amount of code to get the same functionality as in Scheme or Lisp. You have to slow down and stop scanning large blocks of code to see what trival task is being accomplished. Instead, take it one keyword at a time.

      You are right, though, that blind LISP masters can't tell you what code will do at a glance. They have to wait for their screen readers.

  151. Everything is a bad idea ... by King+Of+Chat · · Score: 2

    ... when taken to extremes (my Pair agrees with this and we've got several test cases to prove it).There are good cases though for mixing a few languages.

    Using 6 or more languages on a project is clearly not a good thing. but I can think of two reasons for using more than one language:

    1. Cost. An example, C++ is fast, powerful, flexible but good C++ programmers are scarce, incredibly sexy and expensive (although not expensive enough). It's also a painful way of doing GUIs. Given that you need the performance of C++ but only for part of the application, why not just right the performance critical bit in the "expensive language"?

    2. Architecture. Separating a system into parts written in different languages forces you to think about clean interfaces. If there is a language barrier, then there's no way of shortcutting. May seem painful to some, but the benefits will show.

    I don't think that you can ever say that you should never do mixed language programming. How many systems have, in addition to their main code, a load of SQL?

    --
    This sig made only from recycled ASCII
  152. My experience with a multi-language project by pamar · · Score: 1

    I worked for three years on a medium-sized telco project. It started in Java, and kept growing.

    Due to management decision (they did not want to invest in a proper RDBMS until the system reached a "critical" size) we had to persist most of the state of the system in a series of small files, organized in directories and subdirectories. Files were simple key/value sets, in plain ASCII text.

    It worked fairly well, because we were able to react to changes and new requests fairly fast, and by leveraging the various Unix text-processing utilities we could create simple scripts for quick and dirty statistics, reports and so on.

    When the dataset started growing we decided that plain shell scripts were not enough anymore (especially considering that the developers were not very fluent in Unix scripting). We did a brief survey, invested in a couple of books, and started using Perl to supplement our needs.

    It worked very well. Most of the utilities were coded in Perl (or recoded to substitute the original scripts), and it proved invaluably useful to finally migrate our data to Oracle when management finally allowed use to move on.

    I've left the project, but I still keep in contact with them, and for what I understand Perl is still used alongside with Java. The rule of thumb is that the main application is completely Java, but everything else (i.e. utilities, DB maintenance, ad-hoc reporting) is done in Perl.

    What we did from the start is to always keep the two things clearly separate, and use the data as the only interface point between the two languages.

    Our experience has been mostly positive, and Perl proved to be easy enough to learn/use for our needs (nobody claims to be or have become a Perl Guru, btw).

    I'd be wary to use more than 2 languages (we even minimized PL-SQL usage for exactly this reason), though. And I'd prefer not to intermingle them as the original poster seems to do on a regular basis. I'd really prefer not to invoke processes written in "X" by a process created in "Y".

    Our Perl stuff was either invoked by command line or launched by cron. Our choice could have been influenced by problems in invoking external processes in Java, but all in all I am very satisfied by the choice we made, and things worked well enough for us.

    One of the problems we had was the fact that we never found a good IDE to work on both Java and Perl (on Solaris). The best bet would have been (IMHO) VisualSlickedit, but the expense was vetoed by the management.
    (Yeah, I know, we should have used EMACS...)

    This was not a major showstopper, but I think it would have been nice to be able to check, say, usage of a constant string like "OPEN" in both Java and Perl sources at the same time, from inside the same tool, in case we wanted to replace it with "UNPROCESSED" or "PENDING".

  153. This is why my choices are C, PHP, and Java by Skapare · · Score: 2

    This is why my choices are C, PHP, and Java. And a little bit of machine specific assembler for a few architectures thrown in for fun. The core of my programming (I think bottom up, so my "core" is the low level parts) is done in C, and I do include some OO design in there, too. When I do need a full-fledged OO language, I go to Java. And PHP fills in the gaps to make quick web pages. I never got into C++ and now days I sure am glad I never made that mistake. I love C and I can do a whole lot in it where other people would flee. But where I need to do full OO, there are things in C that just should not be done and C++ loses its advantages so I might as well go with Java.

    --
    now we need to go OSS in diesel cars
  154. larger project might require more than 1 language by WannaBeGeekGirl · · Score: 1
    I've been a C++ coder for 5 years now. The project I work on is HUGE, many many lines of code, many different applications to manage and
    then theres the database management too!

    I can't imagine delivering a successful product to our customer without using some sort of scripting system (Perl preferable, but cshell works too) to manage all those applicatioins and keep everything running together happilly



    As for the DB stuff, SQL*Plus with the ProC compiler has been awesome. So theres another case of a happy fit

    As a c++ coder who specializes in Oragle SQL, I find sql*Plus a pefect fit
    Also, I use cgi/perl scripts to manage the web pages and sometime even some XML. So I say, yes, you should use multiple languages if it makes sense for your project.

    --
    ~WBGG~ "And I'm so sad like a good book I can't put this Day Back a sorta fairytale with you" ~Tori Amos
  155. funny. by leuk_he · · Score: 2

    I would have said:

    And that my friend, is called job security

    "he best job security you'll *ever* have is the ability to quickly get
    a new job."

    (I am glad the /. system moderated your article as funny, it got +1 interesting, +1 underrated and +1 funny)

  156. Re:C: A Dead Language? by MaxH01 · · Score: 1

    This was very funny the first time it was posted a couple of weeks ago. Now it is just boring.

  157. well known in science nowadays by dario_moreno · · Score: 1

    This approach is to my knowledge more
    and more used in science nowadays :
    for instance, use well established
    linear algebra or computational chemistry
    routines in FORTRAN (which I never
    saw mentioned in the discussion,
    although it is a typical example of
    a powerful high and low level language that
    many people - rightly- want to keep at large)
    and fancy graphic stuff in C/C++, scripted
    by Tcl/Tk, perl, whatever.

    --
    Google passes Turing test : see my journal
  158. Slashdot feature request by Cat+Mara · · Score: 1

    Guys, can we please have a YHBT. YHL. HAND moderation option? I can't mod this post otherwise...

  159. Perl. Linux. by mattr · · Score: 2
    Sure, you need to break a big project into pieces to keep your sanity, make it doable, and reduce errors. Seems there are a lot of people who think the maintainability issue alone is reason enough to tell you no.

    Well, guess what, Linux is pretty darn big and yep it's written in lots of languages. And Corba is built to let you do the same kind of thing for big systems. As long as you aren't building a time bomb maintenance-wise, you should consider carefully the post above about the design pattern for alternation of hard and soft layers. It's not cut and dry.

    I just posted in a previous thread reasoning about using Perl in a large project. For one thing, Perl is already a big system and it is written in Perl, C, C++, and whatever else you may want. You can call object code modules from Perl, wrap them in Perl Modules, and even write code from other languages inline inside your Perl programs (compiled automatically).

    I do think you should seriously consider scrapping PHP. It is really not that great and if you are using Perl there is no excuse not to separate design from code. Also it is backwards to control Perl, a high-level language, with C++, a low-level language. The final answer is that there are valid systems for both multi-language and single-language implementations, but your choice is likely to have a big effect on the performance, maintainability, packability, and development schedule/paradigm so think hard about it! (But please stop lobotomizing Perl by calling it from C++!)

    1. Re:Perl. Linux. by wbav · · Score: 1

      I think you seriously underrate the power of php in web applications. For UI in html there is nothing I've found that works better. Now you may say that perl can do the same thing, but the fact that you cannot integrate it within your current html code is a problem.

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    2. Re:Perl. Linux. by mattr · · Score: 2

      You may be right. My reasoning about PHP is mainly due to

      1) often needing to extend things and *knowing* I'll be able to do it in Perl.. PHP who knows?
      (I tried PHP in the early stages and whenever I come back to it, it doesn't seem powerful enough)

      and

      2) looking at existing php code which maybe is not written by the best people.. I get tired of seeing every PHP page restating the code to get a database handle for example. I believe in abstracting code into reusable modules, and separating design from code (it bites me whenever I forget to do so, and you can see plenty of rants about that on perlmonks.org). I also often think of doing something in PHP just as I realize I would have to add some preprocessing before the data gets to the screen that would be harder in PHP.

      Possibly these things could be done if I put more time into studying PHP, and certainly a very quick interface with minimal window dressing and error checking is a cinch in PHP. But I think you lose something, it just doesn't feel as powerful as Perl does.

      That said, I'd much rather do PHP than say Cold Fusion if I was asked to use it, and I do make my own Perl templates that do some of what PHP does as well. So I suppose there are shades of grey. I'd love to see some good uses of it like you mention. Thanks.

  160. How else but in pieces? by Anonymous Coward · · Score: 0

    How else are programs ever written then in pieces?
    When you compile with C you make an object for
    each source file. Technically that is as many programs as source files.

    Your question shows you as a junior person in the software field.

    Your lack of understanding on systems and software is clear in that OF COURSE systems and 'applications' are always written in parts. That is the client/server model.

    Maybe you should look at some UNIX shell scripts and see what I am talking about. Why do you think that pipes were invented? Code has always been written in pieces as tiny apps all the way back into the dark ages of the 1970s.

    Go back to school and listen this time!

    the choice of langauge is like the choice of hammer for a carpenter. Do you ask a cabinet maker what kind of hammer he uses? It is the final product that matters.

    When computers had low memory, programs had to be swapped in and out. And so, of course, they were ALWAYS written in pieces. It is a tribute to your lack of education that you would think that they should be monolithic. ABSOLUTELY NOT.

    Monolithic code is a tribute to shrink-wrap code. It is good to protect the vendor and copyright owners, so use it for that. But for anything that is for the long term legacy of software should be broken into pieces and presented as tight and useful modules. Anything else is a kludge.

    Is there a book that tells this? It should be obvious to anyone but a novice! Even Microsoft gets this which is why they have DLL.

    Or, how about this, why don't you go to a LINUX box and read the man pages of the *.a archive files, their theory and use.

    Have GUI builders really made programmers this stupid for this kind of topin on Slash DOT?

    One more point: If systems aren't designed in pieces (and who cares what language the pieces are written in) then the WHOLE THING needs to be redistributed if a small part is flawed. do I need to say more?

  161. code ding by Anonymous Coward · · Score: 0

    You've uncovered my old secret of productivity. In dinosaur times when my group was using AT&T unix with Bourne shell and C (not C++) I would crank out instant solutions with things like

    s=system('grep Mycod data.txt | tail -1');

    On a related note, Leo Chin of DEC told a class of programmers "Secret of productivity you find where somebody did something like what you want to do and make it do what you want." A wise man, Mr. Chin, but it took a while to adjust to his Chinglish (or would that be Englese?) syntax. His advice is even more meaningfull in these days of Open Software and the FSF.

  162. Re:Generally, a bad idea -- your view is! by plumby · · Score: 1

    Every API is a langauge.

    I think the difference of opinion is around when a language is a general purpose programming language or not. I seem to remember one definition of a 'proper' programming language used to be whether you could write a version of either a compiler or interpreter for that language in itself (e.g., could you write a VB program that reads VB files and executes them?). These languages (C,ASM, Java, COBOL, VB etc) can be used pretty much interchangeably, in as much as any program written in one could be written in any other (it may take considerably longer, or run considerably slower, on one than the other, but the same overall task could be achieved in any of them).

    Languages like HTML, TCP, modem AT commands etc, however, are rather specific protocols that do (usually) one specific thing, e.g. transmit data, display screens etc. I'm reasonably sure that you could not write a tool to display html pages in pure html, or write a data transfer interepreter in TCP.

    The only true OS/Langauge that I know is Forth. The editor, OS, & language are parts of the same thing.

    Never used Pick then :-)?

  163. You need different languages by AppyPappy · · Score: 1

    PHP sucks as a batch language. We need to generate tables and searches. We use C++ and SQR for batch work/update. We use SAS for reporting. PHP and PL/SQL work well for web applications although PL/SQL appears to be slower than Christmas coming to a 5 year-old.

    The more I use PHP, the more I like it. But even in web applications, I need some background threads running.

    BUT JUST WAIT FOR C#!!! Things will run faster, colors will be brighter, whites will be whiter and THE SOUTH WILL RISE AGAIN!!!!

    --

    If you aren't part of the solution, there is good money to be made prolonging the problem

  164. That dratted JVM by pkesel · · Score: 1

    Java is simply unsuited for some things by virtue of its JVM. It eliminates many of the power pieces that your OS may provide.

    I have a wonderful example that would be best served with a shared memory segment and a couple of semaphores, routine things I've done in C or C++ that simply can't be done routinely in Java.

    There's also the JVM memory limits. My web app is also routinely running out of memory at the default JVM settings. We've had to push the memory settings up and up to make sure the thing stays running. I simply hate the idea that when there's memory out there I can't simply use it. I've got to stop and reconfigure the app server and start all over again.

    Also, for apps that routinely go through large pieces of dynamic memory allocation, the JVM's garbage collector simply doesn't keep up. It's nice to not have to worrry about freeing allocated memory, but dammit, when I want that memory freed I want to do it and know it's available again. Someone needs to give me a JVM with a free method as an extension.

    For these reasons, and probably a few more, Java IMHO is not suited for large scale server processes.

    --
    - Sig this!
    1. Re:That dratted JVM by khuber · · Score: 1
      By limiting the heap in Java, you prevent one process from sucking down the machine. Of course you can do the same thing with process limits.

      I find it interesting that you say Java isn't suited for large scale server processes since I work on large scale server process in Java :).

      -Kevin

    2. Re:That dratted JVM by pkesel · · Score: 1

      Proper memory management through design will also keep the process from dragging down the machine. It'll also make it perform well when you've reached the design limits. When you reach the limits of the JVM you get all sorts of trouble.

      I work on large scale server processes in Java as well, and I find it quite annoying. Have you done the same work in C or C++? I've written a multicast file delivery system, implemented both in Java and C++. It serves over 700 locations around the US. The C++ version outperforms Java 2:1 and does so with much less performance impact.

      --
      - Sig this!
    3. Re:That dratted JVM by khuber · · Score: 1
      Yes, I've done C/C++ as well, It can be damned hard to get rid of all the leaks with C, and even with Java if you're using native JDBC drivers (and the VM's limit won't help there!). It's very common for long-running processes to leak, at least until the leaks are fixed or worked around. , so you have to have limits on production systems. Proper memory management by design is a good idea, but it's hard to design around buggy third party libraries or bad programming by other developers (or even just basic human error). Complex programs are changed extensively over time, and by people other than the designer or original implementors. GC and bounds checking at least gets you most of the way towards keeping memory problems in check.

      Frankly, I'm an imperfect programmer and Java makes it easier for me to get stuff working correctly. It's been a few years since I have done major work in C++ and I don't miss it. The STL was not very efficient at that time. Threading in C/C++ with pthreads is much harder than with Java also. I do still use C for some small personal projects that are CPU-limited, but have found my use decreasing.

      -Kevin

  165. You people are amateurs by Anonymous Coward · · Score: 0

    Don't you fools realize that any significant system -- not just your retarded pet projects or homework assignments -- is almost always coded in multiple languages? Different tasks, different tools. Complain about the "skill set" or "maintenance issues" after you get a real job and know what the hell you are talking about. Get some experience, get some wisdom and then -- oh wait, you won't be reading this site after you do that. Never mind.

  166. Best tool for the job by sfe_software · · Score: 2

    I don't have any one favorite programming language, and I tend to choose the best tool for the job. I don't know Java, and never really cared for C++, but I use C, Perl, PHP, various shell scripting, and even VB...

    If I'm writing an app for *n[ui]x, I usually stick with C for anything serious (where a shell script won't do). I may hand off certain tasks to other languages though.

    When doing Windows programming (though I mostly use Linux, I do find myself working with Windows sometimes), I always choose VB for the interface, and any computational stuff goes in a DLL written in plain C. As much as I hate to admit it here, VB is the quickest way to build a usable interface on Windows IMO (and I have lots of BASIC background). It works well with DLLs written in any language (with the right calling convention), and this is a perfect example of using the best tool for the job.

    When I'm asked what lanugage do you use, my response is simply whatever language(s) is/are best for the task at hand. Would you ask a mechanic what tool do you use, a wrench or a ratchet? Though it's not exactly the same thing, we do have many tools, some of which are more appropriate for a particular task. I wouldn't use bash to decode MP3 data, and I wouldn't use C to write a startup or installation script, though many times the choice isn't that obvious.

    --
    NGWave - Fast Sound Editor for Windows
  167. Job Security? by webmosher · · Score: 1

    Well, if you're that professionally diverse to be able to handle that many languages THAT well, I am sure your company will pretty much be forced to keep you around. Either that, or your team is pretty well set for life. I'd be surprised that this would stay a living entity for long.

    In my experience, IT managers are becoming more and more tech saavy (although probably a bit slighted by tech companies one way or another -- i.e. MS vs. Sun vs. Linux). Eventually, someone with buying power is going to look at the support mish-mash and cut you out like yesterday's rotten grapes. In my book, its best to become the best at one or three core languages and stick to those until they are dead in the water, and even then, keep tabs on those old languages. Who would have known two years ago (1999-2000) that COBOL developers would be in such high demand.

    Maintainability of the app is also core. Sure you developed it, but for who and how will it be supported. If you're a consultant, you're probably releasing this into the wild to be supported by near non-tech saavy people who at most will use the app and do basic monitoring. If you are developing in-house and supporting it locally, you might be able to afford such "advantages" as multiple languages might afford.

    In closing, remember Perl's motto... "There is always more than one way to do something." If you find a language that cannot live up to that credo.. maybe its time to look for another language?

  168. Using the right tool for the job by glenmark · · Score: 1
    As they say, when the only tool you have is a hammer, every problem looks like a nail. Mixing and matching languages in various modules to suit the task at hand is a time-honored approach. Use the language that is best for any given job, rather than blindly trying to solve all problems with one tool, no matter how awkward the results. FORTRAN for number crunching, Pascal for string handling, C or assembly for direct memory manipulation, etc. No room for language bigotry when writing quality code.

    In fact, this is how much of the OpenVMS operating system is written (facilitated by the fact that the OS has a Unified Calling Standard such that all system calls and data structures are uniformly available from any programming language). The OS and its libraries were written in a mix of C, C++, Pascal, BLISS, Macro (a sort of processor-neutral meta-assembly language), and FORTRAN, although much of it was rewritten in C to facilitate the VAX to Alpha port (and now the Alpha to IA-64 port).

    --
    *** Quantum Mechanics: The Dreams of Which Stuff is Made ***
    1. Re:Using the right tool for the job by mugnyte · · Score: 1

      Sounds like all the "right tools for the job" boiled down to one language (C) just for a port.

      There is a great concept that its *not* the laguage at all that matters, but in modular design.

      Any OS has libraries written in a slew of langs, and making system calls available to more than 1 language has been the purpose of some of these libraries for many designs.

  169. A Fine Idea by SloppyElvis · · Score: 1

    There is something so wonderful and beautiful about writing a suite of small apps to replace a singular large app.

    We are currently in the process of converting a monolithic C++/VB project to several small C++ applications glued together with Perl and using wxWindows as the new GUI. All of the code relies on STL instead MFC now, and in factoring the jobs of the software, we have been able to bring order to the code, thus making it much easier to maintain than before.

    I have noticed that some of the comments posted here indicate such factoring may complicate things. Perhaps, if you don't have programmers fluent in Perl, but for us, the opposite is true. Things are much simpler now. Compile time is greatly reduced in our situation. Instead of sitting on our butts waiting for the monster to compile, we wait only seconds for the small section to compile. Also, code is reusable without having to recompile at all; simply link it to a new project, and there you go. The automation layer has been eliminated, and thus our code base can be recompiled easily for *nix and Mac platforms. Perl is so very powerful for linking small programs together, and if it not for the sad fact that Windows pipes are a joke, well, don't get me started...

    Featuritis is the bane of the programmer

  170. Re:new metal is gay by Anonymous Coward · · Score: 0

    so for four fucking years you have listened to gay rock - isn't that saying something.

    come on you bitch.

  171. you call that job security?! by cornflux · · Score: 1

    Where I work, that is called bad engineering and will help you lose your job (not keep it).

  172. My experience by bockman · · Score: 2
    My current project (areoeospace ad-hoc s/w development) currently uses 5 languages:
    • C++ for core modules
    • Java for portable libraries and GUIS
    • PHP for some Web front-end
    • Perl in form of an off-the-net free software which does mirroing (thanks to the author of it, BTW).
    • Python in form of a quickly assembled propotype (to be refined, but it will stay Python) when my customer told me: why don't you do ... (initial reqs did not call for it, but this is much an impromptu project).
    And yes, if I leave my company would have problems with Perl and Python modules (and lesser problems with PHP, also). But in both chase it was matter of $$$ ( in terms of developer time) and I still think I've made the right decision. BTW, Python can be learned on the flight, so my only worry is the perl program (which anyway works fine and probably wont be ever touched).
    --
    Ciao

    ----

    FB

  173. I only program in-house or at home ... by jdeking1 · · Score: 1

    When I write stuff at work, a lot of the time most of the code is application-specific; Mentor Graphics AMPLE script, for example. That is augmented with shell scripts so I can awk and grep the text output to give my engineers some readable reports. When things go beyond what these tools can accomplish, I fire up gcc.

    Another PC board design tool I support runs on Windows and uses VB as its scripting language (eww!); for that, I have DOS ports of gawk, sed and grep, and of course gcc. They have added VB extensions for interacting with the internals of the design tool but BASIC just doesn't cut it when you need to parse text for handling funky reports.

    I suppose I'm not your usual developer, but it breaks up the day.

    - the Insane Multitasker

    --
    "A generation which ignores history has no past and no future." -- Robert Heinlein
  174. Not so fast! by Anonymous Coward · · Score: 0

    Eiffel does not deserve to be lumped in with your other selections.

    Any PHB that was intelligent enough to allow Eiffel to be used is worth keeping.

    Eiffel's approach to OO is the best I've seen yet for an imperative language. I highly recommend reading Bertrand Meyer's "Object Oriented Software Construction, 2nd Edition". It will make you a better programmer even if you choose to stay with a more mainstream OO language.

    Eiffel has received a bad reputation in the past for having slow compilers, and even slower, fat executables. This is all in the PAST though. The latest batch of compilers are very fast and generate fast, small code.

  175. Everybody writes C in every language, anyways. by Jayson · · Score: 1

    What difference does changing languages to most of you mean? 99% of everybody I see write a program in any language, writes C. I have seen hundreds of self-proclaimed "real Scheme hackers" use a dozen local variables in function; complex state is their definition of incredible code. I have seen even more "Perl gurus" write C with line noise, not understanding the unique features of perl that make it almost a concatenative language at times. I cannot count the number of C++ or Java twirps that have never seen the simple "TheEmptyTreeNode" as control-flow (or even worse, the ones that think it is poor style) -- these are usually the people that have never thought of the idea of removing explicit control flow from their code. Has everybody forgotten about the idea of constant data and as little state as possible, keeping with the Knuth maxim of code being as simple as possible (but no simplier). Has C wedged everybody's mind into thinking that every segment of code must be littered with control statements. Here is a challenge next time you code: write the code with as few control statements as possible, using every idiom you know and trick you can think of to remove all the if, switch, for, while, do, and related from your code and try to treat everything generically.

    As much as I have a love-hate relationship with a certain APL derivative, they have the best programmers I have ever seen. They don't worry about performance, except when needed (and they have some extreme views of what is truly fast). They use a few big generic data structures and operate on them uniformly; they do not litter the landscape with a thousand different structures (that are all mostly similar and should be handled the same anyways). They write very terse code, where one screen of text can tell you the entire picture; nobody has to page through 30 pages of code to understand even the most complex operations. Why cannot more programmers be like this?

  176. Gluing C++ to Java with Perl by BlueKitty · · Score: 1

    I'm working on a project with a server written in C++ that uses XML to communicate with a Java client.

    I wrote a lengthy Perl script that parses the C++ classes (whose instantiated objects are transmitted via XML), and generates equivalent Java classes. This allows autogeneration of the Java classes whenever the C++ classes are tweaked.

    The Java classes can parse incoming XML and populate themselves accordingly. They can also generate outbound XML. There are setters/getters for all members.

    No one at my company has ever seen this done before.

    Blue

  177. C++/Python by NeuroMorphus · · Score: 1

    I tend to use C++ as my main language, but when it comes to mixing languages, Python is always at the top of my list, and I recommend it always, especially when dealing with multiple inheritance, or parsing.

    "Journies lead to knowledge but Passion Lights the Way"

    ~=NeuroMorphus=~

    --

    python >>>
    reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))