PDA

View Full Version : Which language to start with?



NDS
08-01-2008, 01:42 AM
First, a bit about my background. My primary tinkering focus for a long time has been building air cannons, but Ive just recently been shut down after my projects got a bit too destructive.
So Ive been looking around here for a long time and I really want to start a little trackbot soon with a pan/tilt assembly for a camera. The one thing is, I haven't gotten any instruction before in programming. I'm taking a C++ course in like 5 months, but I would really like to start sooner. So What do you guys think I should start with? I don't mind getting an early jump on C++ if it's a desirable language for robotics. (I'm working from a mac)

Thanks so much, and sorry if I'm noobing up your forums.

Adrenalynn
08-01-2008, 01:51 AM
Welcome to the TRC!

If you're taking a c++ course anyway, then by all means jump in there!

C++ can easily do everything you'll ever want to do in robotics. Going from C++ to C for microcontrollers is also trivially easy, so you'll be able to jump around when the desire strikes.

NDS
08-01-2008, 01:58 AM
Wow, thats great news. I actually thought about writing a few lines tonight but I cant find a free "plug and play" compiler. Is that just too good to be true?

Adrenalynn
08-01-2008, 02:22 AM
What OS are you running?

XCode is still free. http://developer.apple.com/technology/xcode.html

Alex
08-01-2008, 08:17 AM
If you plan on taking a C++ course already, then go with that language. There's a lot to learn with C++, and it certainly doesn't hurt to get a head start on it. It's an excellent language to learn, especially in regards to robotics.

Totally ignorant question here, but isn't the Borland compiler free? I did a quick Google search and found this:

http://www.codegear.com/downloads/free/cppbuilder


The last time I used Borland, I was in college (about 4 years ago), so I'm not sure if this one is even any good anymore...

EDIT: Almost forgot, welcome to the TRC:D

NDS
08-01-2008, 10:52 AM
Looked into xcode, downloaded 1060 megs worth of packages and crap. I cant seem to find the download for the actual app?

Adrenalynn
08-01-2008, 11:03 AM
Is there a Mac download there somewhere Alex?

--

I'm sure there is, NDS. It's the full XCode DVD. The actual apps are in the DVD image.

NDS
08-01-2008, 07:19 PM
Alright, got it going. thanks. all I have to do now is learn to code </sarcasm>

Gorbag
11-08-2008, 10:30 AM
I would have to say it depends on your goals.

If you want to hack together low-level robot behaviours using embedded systems, C (not C++) is going to be your best bet for efficiency and ubiquity.

If you want to learn more advanced techniques such as 3-layer architectures, Java or C++ (but learn object oriented programming first, then learn the language. C++ is really a terrible attempt at OOP, and you should understand OOP first to avoid being polluted).

If you want to learn to *program* in the computer science paradigmatic sense - learn Lisp. Then everything else will be easy - every other language (with the possible exception of constraint logic languages, but just get Screamer which is a macro package for Lisp) is a paradigmatic subset of Lisp.

If all you care about is quick hacks, I dunno - visual basic? If you want to go to grad school in robotics, Lisp, then java. C if you want to stay close to the metal and/or do vision, but do the others first, it'll keep you from pragmatic nearsightedness.

Adrenalynn
11-08-2008, 10:58 AM
Ok - we're recommending Java over C++ why? I *must* be getting old. I should probably ship myself off to a glue factory or something.

I come from a time when it was important that the computer be getting the work done _this week_, and that it do it without the app crashing in the standard libraries every few seconds.

In my perhaps biased view - Oak - err, I mean Java = Toy. Half-baked toy

If you really want to avoid being "polluted" - you learn assembler first like we did back in my time. :)

lnxfergy
11-08-2008, 11:24 AM
Java has been made somewhat faster over the last few years (it can, and often is, still be a dog though)...

Sadly, businesses everywhere have moved, and are moving, to Java. If your goal is to get a job programming, Java is often a must know.

It has especially taken over academia. The college board moved the AP test to Java (from C++) about 4 years ago. Many, if not most, college out there are now teaching many of their introductory courses in Java, as well as thier higher-level OO classes. When I took CS1 at Cornell in 2003, it was in Java. SUNY Albany moved to Java 3 semesters ago, after an extensive study of visiting many of the hottest companies out there revealed it was the dominant language in businesses out there.

But again, depends what you are doing... device drivers will never be written in Java... we can hope.

Lastly, might I recommend Python as an awesome language to learn programming in. We are about 10 weeks into a semester length introduction to programming course using robots that I have been TAing. The course is taught in Python, and we have seen students from non-CS backgrounds learn much quicker in this language (there isn't all the stupid overhead as you have in Java... system.out.println()... hahaha). Pyserial is a cross-platform serial port accessor that allows python to interact with many robotics devices out there (and is so much easier to use than Java's javax.comm or rxtx)

</rant topic="java">

-Fergs

Adrenalynn
11-08-2008, 11:39 AM
I think my problem with kids coming out today thinking Java answers _everything_ is that they have no grasp of what's going on under the hood. The majority I interview couldn't write tight code to save their lives. The answer to java being slower than the second coming? Add more/faster cores. Their answer to it sucking up RAM? Add more RAM. The answer to it sucking up system resources? Add more computers.

IMHO, no would-be programmer should be given anything larger than an ATTINY48 until they've proven they understand how a computer actually works.

Have you played with the Arduino's environment tools? There's a stellar example of what Java buys. 12Ghz of processing power, 4GB of RAM, and I have to wait 15-20 seconds for the serial monitor to launch? Any time I have to re-run the IDE, I start it and then go nuke food. Generally it will be up or just coming up when I get back a few minutes later. I can hand-compile small apps on paper faster than its verifier (literally).

[shrug] Time marches on. When my generation is gone, Java programmers will have replaced us (and will worship whatever BIOS and other low-level code is left. There will be altars built to the "forgotten ones"...) Mark my words, you read it here first. ;)

wireframewolf
11-08-2008, 12:55 PM
So much Java bashing! I feel like I have to step in here and defend it a little bit :P Adren, if you Arduino IDE is taking several minutes to start, stop using your PC from 1995 :P The only computer I have that takes more than 10 seconds to start it is my Libretto notebook circa 1997.

Sure, C and C++ are faster, but there are several advantages to working with Java. The biggie is definitely ease of use. The standard Java libraries come with pretty much anything a newb could possibly want. You don't have to work with make files, or understand linking, etc. Generally once you set your environment variables, your code will compile without problems.
Second, you don't have to worry about memory management. This is probably the biggest argument most people use when defending Java and rightfully so. If you ever spend hours trying to fix multiple leaks in a bunch of C code you'll know what I mean.
Lastly, I think it's a great way to learn Object Oriented Programming (OOP). It's an excellent method of organizing code that is useful for... pretty much everything except the lowest level sorts of programming. Sure you could learn OOP from C++, but you're likely to get frustrated and give up on it if you've never programmed. I'd personally rather code C in an OOP manner than tangle with C++'s syntax (and I usually do!)

Anyway, if you're gonna do robotics, you'll inevitably be using C, but as a starting learning language, Java is pretty easy and it'll open up a lot of opportunities to you in the field of computer science. For business and webapps, Java is just as qualified, if not more qualified, than .NET bulljive, which would be the other route most large corporations take for the apps.

And now you know!

Rudolph
11-08-2008, 01:03 PM
...learn Lisp. Then everything else will be easy...

Learn BF (http://en.wikipedia.org/wiki/Brainfuck) or Whitespace (http://en.wikipedia.org/wiki/Whitespace_&#37;28programming_language%29), _then_ everything else will be easy.


Adrenalynn (and anyone else with input), I picked up an arduino earlier this year as my foray into microcontrollers and robotics. Part of the reason I chose it was it's syntax, it looked fairly similar to the perl and PHP I'm used to. I never learned C or C++, but I have recently picked back up the C++ book from my university days and am trying again after ten years. Anyway, I guess my question is, do you think the Arduino environment will be a hindrance to my learning how to use the AVR? If so do you have a suggestion as to a better route to take (in addition to my trying C++ again)?

Should that paragraph be a seperate topic?

edit = I should mention I'm a linux user (not a linux hacker, just a user) so all the gnu avr stuff is readily available, but stuff like AVR Studio is not (near as I can tell)

Adrenalynn
11-08-2008, 01:12 PM
Well, it's a little old, I give it that. It's only a quad-core clocking around 12Ghz total with 4GB of 1066 RAM and a 5 drive SATA2 RAID. I suppose it needs to be scrapped because people don't know how to write code that can run in only 12Ghz... ;)

As far as all the jobs being Java - I think we look at different job postings. ;) Anyway - I've said my thang, so I'll let it go now...

Rudolph, naw, it won't hinder you at all. It's very C-like. You should feel pretty comfortable moving over to AVR-gcc later. The concepts will be there, you'll just need to break yourself of some syntax gotchas and learn the C libraries.

lnxfergy
11-08-2008, 01:32 PM
I think my problem with kids coming out today thinking Java answers _everything_ is that they have no grasp of what's going on under the hood. The majority I interview couldn't write tight code to save their lives. The answer to java being slower than the second coming? Add more/faster cores. Their answer to it sucking up RAM? Add more RAM. The answer to it sucking up system resources? Add more computers.

IMHO, no would-be programmer should be given anything larger than an ATTINY48 until they've proven they understand how a computer actually works.

Have you played with the Arduino's environment tools?

[shrug] Time marches on. When my generation is gone, Java programmers will have replaced us (and will worship whatever BIOS and other low-level code is left. There will be altars built to the "forgotten ones"...) Mark my words, you read it here first. ;)

The problem with "kids coming out today thinking Java answers _everything_" is that they clearly didn't take a balanced schedule of classes. I'm only a CS minor (although I've done signifigant work on my own, and I'm beginning graduate studies in CS next year), but I have programmed in C on AVRs, Java on desktops, C/C++ for linux device drivers and other low-level stuff, some assembly (again mostly AVR), PHP for web apps, and python for scripting (and quick graphical tools). Unfortunately, I also know far too many people who are CS majors and somehow only took 2-3 classes in programming, only know Java and a very small amount of C/C++, and barely know it at that. I also have a friend who graduated with a 3.9 GPA from Cornell with a CS degree, and can't program in any languages to save his life (he instead decided to go to law school).

Oh the Arduino tools, that's what you get when you give a bunch of artists java....

-Fergs

lnxfergy
11-08-2008, 01:40 PM
Adrenalynn (and anyone else with input), I picked up an arduino earlier this year as my foray into microcontrollers and robotics. Part of the reason I chose it was it's syntax, it looked fairly similar to the perl and PHP I'm used to. I never learned C or C++, but I have recently picked back up the C++ book from my university days and am trying again after ten years. Anyway, I guess my question is, do you think the Arduino environment will be a hindrance to my learning how to use the AVR? If so do you have a suggestion as to a better route to take (in addition to my trying C++ again)?

edit = I should mention I'm a linux user (not a linux hacker, just a user) so all the gnu avr stuff is readily available, but stuff like AVR Studio is not (near as I can tell)

Rudolph,
Arduino uses C, with classes from C++. AVR-GCC is what runs in the backend of Arduino. As you learn C/C++ you will find that AVR-GCC actually isn't a full C++ compiler, specifically, you can create class definitions, but cannot create dynamic instances of classes (there is no "new" keyword).

You can actually program the Arduino chip without the Arduino environment, as the arduino is really just an AVR with a bootloader, so that you don't need a hardware programmer. If you don't require the Arduino libraries, you can program the Arduino using regular AVR-GCC and AVRDUDE (the programmer that puts the code onto the chip). That said, you can also program any old AVR in arduino, and thus use the same libraries, as long as you put a bootloader onto the AVR chip (note: the Arduino libraries currently only support ATMEGA8/168, although a few extensions for the 128 and 324 are floating around in cyberspace...)

As far as using linux, so do I! AVR studio isn't required. All it does is give you a compiler (but you have avr-gcc), and a programmer (which you have as AVRDUDE). The simulator part is a little lacking on Linux, but it is under development.

-Fergs

metaform3d
11-09-2008, 02:10 AM
I've always thought that Python would make a very good mid-level language for robotics. It's relatively small, fast and easy to learn. Doing simple things is very simple, and yet it has room to expand into a lot of power. For PC-based robotics at least it could act like the software version of the breadboard that you find on a lot of robot kits. With proper interfaces it could be very quick to prototype algorithms -- without soldering, if you will.

Beyond that I won't engage in language-bashing. I've been chastised -- I think correctly -- for doing that on this forum in the past. They're all good choices; whatever floats your boat.

Gorbag
11-09-2008, 06:35 AM
Ok - we're recommending Java over C++ why? I *must* be getting old. I should probably ship myself off to a glue factory or something.

I come from a time before either. Neither language is great, but Java gets less wrong than C++. Efficiency is a different issue, and as I said, you best use C if you care about that.


If you really want to avoid being "polluted" - you learn assembler first like we did back in my time. :)

I'm talking polluted in the "theory of computation sense" - i.e. what computer scientists should be studying. CS folks don't program (or at least, that's a relatively minor part of the curriculum). When I went to grad school, AI/cognitive folks like me usually didn't even know how to program (I was an exception having come back to school from industry). Theory folks didn't program either. Only the systems folks programmed, but lacking any objective standards I'm not sure systems folks did "science". (Scientifically, what is the difference between Java and assembler?)

So why recommend Lisp you should be asking - because lambda calculus is as close as you can get to recursive function theory, which is the basis of computation.

Computation (not a particular computer implementation) is really the core, and the only way to avoid pollution. Assembler teaches you only how one particular computer designer thought they should build a machine. Lisp teaches you about how computation is different from pure logic.:wink:

Gorbag
11-09-2008, 06:57 AM
Learn BF (http://en.wikipedia.org/wiki/Brainfuck) or Whitespace (http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29), _then_ everything else will be easy.

You misunderstand my intent. I seriously recommend Lisp (and it's pretty much the only programming I use unless I have to write some glue code to a library) as being the best first language to pick up. (And while I don't know what they're teaching today, Abelson and Sussman was the text for intro computation at MIT for many years which used Scheme - a Lisp dialect). Why? Because you will learn to understand computation unfettered by syntax, bad ideas of what should be easy/hard forced on you by a programming language designer, and getting closer to the actual mathematical underpinnings of recursive function theory unfettered by bad ideas of what should be easy/hard forced on you by a computer hardware designer. Without worrying about such assembly language level concepts like "pointers" - virtually everything is a pointer because everything is passed by reference.

Lisp was the first language that introduced GC. They do it very well. Of course, Lisp was the first language that introduced conditionals, recursion, and is still the only language that is its own meta-language (data = code = data).

Plus Lisp macros are really really cool. What other language lets you extend the language syntax and tell the compiler how to compile code while it's compiling?:cool:

But hey, I don't expect folks to be like me and use Lisp to program their robots, that day has passed (Shakey (http://www.sri.com/about/timeline/shakey.html)). I just recommend it as a language to better understand computation. You can then better understand the strengths and shortcomings of all other languages without getting bogged down in parochialism.

Rudolph
11-09-2008, 12:34 PM
You misunderstand my intent.

I was making a joke. Though, looking back, I failed to add a smiley face.

Thank you for the explanation though. I will be adding a "read about Lisp" entry to my list o' todos.

billyzelsnack
11-10-2008, 12:09 AM
C is a hammer.
C++ is a hammer on one side and a sledge hammer on the other.
Java is a petite hammer on one side with a lolli pop on the other.

C is what you're most likely going to use with your robot. I'm a c++ programmer for a living and there is no way in hell I would recommend it to anyone that has not been passionately programming for at least a year. Switching to c++ will make you a crappier programmer for at least a year while you figure out how to carry it because it's HEAVY.

Java is good once you're an ok c++ programmer. It'll make you a better c++ programmer after your little fling.

Adrenalynn
11-10-2008, 12:31 AM
Actually - I'd contend around these parts you're more likely to be running C# on your robot than you are C...

And I agree with you re: C++ - I've seen C++ so beautiful it'd make you weep - but the vast majority will just make you cry... ;)

metaform3d
11-10-2008, 02:59 PM
I used to have some of these (http://www.cs.man.ac.uk/&#37;7Epjj/cs211/language.html) on my office wall about three careers ago.

Adrenalynn
11-10-2008, 04:27 PM
Oh man, I haven't seen those in YEARS! Thanks!

4mem8
11-10-2008, 05:22 PM
I like that analogy, real cool, I think I have decided which to go for.he he.

Adrenalynn
11-10-2008, 07:27 PM
Most of those are "dead languages", 4Mem.

xero
11-11-2008, 10:04 PM
I am a little suprised by the comment that business's are switching to java. I certainly don't wan't to to say that is not true and can only speak fom myself and what I see in the Denver area development community. The vast majority of programming jobs here are C# and range from small agile projects to extremely large enterprise environments. I have friends who have now branched out into using c# for embedded systems and GIS programming also. All my java friends have switched over to .net with the excpetion of one. The only people I know still doing java are the ones in academia but not to many in the business world can make an arguement for java anymore.

4mem8
11-12-2008, 04:27 AM
Adrenalynn: I was talking about C# as my choice, As you have so often stated.

Gorbag
11-12-2008, 05:48 AM
Well, I'm not really a "programmer" (as I've mentioned), but at my very very large company with 5000+ programmers

Ada is now dead (you can probably guess what kind of company this is)
C++ is the most used, but in decline
Real-time Java is on an upramp but still small (percentage wise probably the largest increase in project starts)

C#, from what I understand, is just M$'s version of Java - since Sun sued them for changing Java (embrace and extend). Most projects will not use it as a matter of principle for that reason. (Windows is used as a delivery platform, but so is Linux, other UNIX brands, VxWorks, etc. Cross-platform languages are encouraged, but (new) UI code is close to all Java if not auto-generated at this point). I don't know of any usage of .net (but that doesn't mean it isn't use), I do know of extensive ESB work.

However, the future is none of these: model driven architecture, etc. are where the heavy investments are being made turning most software engineers into systems engineers (understand the requirements, create and test the high level model, then use a commercial product to generate code for validation and verification). Yes, even for embedded systems (see, e.g., Mercury Computer products - generation of finite state machines for FPGAs for instance from higher level models).

So from that point of view C# vs. C++ vs anything else getting you a job in 5 years is probably irrelevant unless you want to do maintenance.

But none of that is particularly applicable to the original question.

ahab
11-12-2008, 11:07 AM
I have the feeling Adrenalynn would appreciate this article: Where Are the Software Engineers of Tomorrow? (http://www.stsc.hill.af.mil/CrossTalk/2008/01/0801DewarSchonberg.html)

Java is a nice safe language... typing is stronger than C/C++ and you can't shoot yourself in the foot with pointers. Its good to actually accomplish things in as you can pull from the massive library and there is lots of documentation. The speed isn't too bad: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=all Java regularly beats Pascal, Fortran and other compiled languages.

I have no desire to ever program in Java again.

To restore the faith of some of you, so far in my CS program I have learned in class: Java, Ada, MUMPS, C, Scheme, MIPS assembly, Bash, and I'm sure I'm forgetting some...

I've picked up Python, Perl and AutoIt on the side. For assignments with no language requirement anything under 150 lines is Perl, anything over is Ada.

If you're just starting out use a static language. The compiler will help you out a lot with debugging your code that way and you'll save yourself some hair pulling. Theres nothing better than Ada for compiling errors... but I would have no problems recommending C#, or Java. For the first language someone learns control structures, program flow and hopefully exceptions, and those two do it pretty close to right.

xero
11-12-2008, 11:16 AM
Hey Gorbag, it is nice to hear different opinions on the software industry as I am only exposed to one market currently. First of all here is a good article I found which I mostly agree with the authors opinions. Let me know what you think. http://duartes.org/gustavo/blog/post/programming-language-jobs-and-trends.

I would assume that you are in a large consulting company like CH2M Hill? Either way I have worked for large consulting companies and I cringe at the thought of their "autogenerated" applications. Consulting companies have been selling business's these kind of solutions for a long time and I have been re-writting them a long time also. They tend to be very rigid and inflexible and may only meet the business need for a very short time. I am a much bigger fan of SCUM or agile development methodologies because you are more likely to leave the customer with a very flexible easy to understand system that can be maintained by anyone with a .net skill set. Business's move so fast that iterative development in my opinion is the only methodology that really works in the business environment.

If you look at the continueing explosion of businesses using .net as a platform I highly doubt c# will be a legacy language in 5 years although it wont matter to me because I will be programming in the highest demand and highest paying platform regardless. After all I have to pay for my lifestyle!

Adrenalynn
11-12-2008, 01:51 PM
>> C#, from what I understand, is just M$'s version of Java

Naw, C# is an actual compiled language. After linking, it generates machine code that looks stunningly similar to MS' C++. There's nothing Java-like about C# when you take the hood off. Basically any of the .Net languages share a linker.

That said, their web-version stuff is their answer to Java.


I have the feeling Adrenalynn would appreciate this article: Where Are the Software Engineers of Tomorrow? (http://www.stsc.hill.af.mil/CrossTalk/2008/01/0801DewarSchonberg.html)



Gawd yes. It was like going to a sermon that I could get behind. Thank you for the link! A valuable well-reasoned treatment, even though I didn't necessarily agree with it 100% of the time. I felt the underlying points were entirely sound.


This is a great thread, thank you and Gorbag and others for contributing in such a mild and reasoned fashion. I really think it's something that needs to be explored - we all are, after all, the future of computing. The groundwork we lay today becomes the inheritance of the programmers of tomorrow, just as we inherited the last generation's explorations.

4mem8
11-12-2008, 05:23 PM
M'mmm interesting article ahab, Thanks for posting it.

Gorbag
11-13-2008, 04:49 AM
I have the feeling Adrenalynn would appreciate this article: Where Are the Software Engineers of Tomorrow? (http://www.stsc.hill.af.mil/CrossTalk/2008/01/0801DewarSchonberg.html)

That's an interesting article, but they get the subtext about Lisp (at least) wrong. While it is possible to use Lisp functionally, and generally good form to do so, modern versions are imperative (you have a fixed evaluation order and side effects). Truly functional languages would have no side effects and support lazy evaluation.

As for the Java comments, while I agree that the largest use is in UI, it's starting to be used for even embedded real-time at my company, so I think it's breaking out of that "box". If my company is using it for real time (where they will pay dearly for failing to meet customer requirements), it must be doing something right.


Hey Gorbag, it is nice to hear different opinions on the software industry as I am only exposed to one market currently. First of all here is a good article I found which I mostly agree with the authors opinions. Let me know what you think. http://duartes.org/gustavo/blog/post/programming-language-jobs-and-trends.

Well, at least the first two languages follow the hiring trends we see, but that's adding to a very large pot of C++ and even Ada programmers. (The Ada folks are getting retrained in Java). What the study leaves out is that a really huge amount of "programming" work is not done by "programmers", but by systems and electrical engineers. Systems engineers generally use MatLab (and then programmers later rewrite it in C++ or Java), and EE folks use a bunch of different tools including MatLab, C (They mostly stay away from OOP), and more esoteric languages.

As a side note, I was surprised they found even that much Lisp on a general board. If I want to recruit Lisp folks, I don't go to monster.com.... (and generally speaking we wouldn't recruit a Lisp programmer anyway, we'd recruit AI folks, for example, who use Lisp - that is if we're not looking for some kind of specialized knowledge, we'd just get another generic Java or C++ programmer).


I would assume that you are in a large consulting company like CH2M Hill? Either way I have worked for large consulting companies and I cringe at the thought of their "autogenerated" applications.

Something like that. I try to keep my online "persona" under Gorbag separate from my professional "persona" for liability reasons ;-). I work with software, but am in research. I'm in a tiny tiny minority at my company. We are not a research company (though we do internal research, it's mostly very near market stuff, e.g., how to manufacture rather than how to do, with some exceptions for areas where we are world leaders and/or we see future markets - my work falls into the latter case); we partner with others to get access to their research (and in fact much of my day is in directing such research where we are paying others to do the work).

While I share your evaluation of typical autogenerated content in the past let me mention two substantial trends we see (and I'm not claiming we're representative of the whole market, just a non-trivial part of it - there are a number of companies in our domain in the US let alone globally, and they are all seeing these trends)

1. Domain knowledge is not in the heads of the software engineers. Making it easier to express domain knowledge (e.g., the right way to do a LIDAR, Sonar, or whatever to bring it to robotics) is in our company in the heads of the systems engineers. They are the ones (for the most part) who have the domain experience, connection to the customer, and do the algorithmic work. The primary job of the software folks are to take those algorithms and (re-)implement them in a proper manner - that fits in with the rest of the system, has the right ilities, etc. As I stated above, most of these system engineers work in matlab. The trend is toward domain specific languages that make it easy to describe concepts within a particular domain. But as I stated, the software folks don't understand the domain (and we're talking about systems folks who have 20-40 years of experience in a narrow field so it's not something a casual conversation with a software geek is going to lead to a massive knowledge transfer), so we expect those languages to generate something the software folks can work with. To the extent they don't have to touch it except for optimization (the 80/20 rule), so much the better.

2. Our management techniques (earned value management) preclude for the most part techniques like agile. Now I personally have been doing agile (or more accurately double helix - the build a little, test a little, show the customer - because we don't really fully understand the customers problem and the customer doesn't fully understand the possibilities of the technology to transform how they get stuff done) and iterate) my whole career, but I'm in research. For the large $100M+ contracts that kind of approach doesn't give the customer the warm fuzzy you know what you are doing, and you will complete on a specific date. So most of the work is waterfall or spiral as really a phased waterfall. I hate working that way and fortunately for the most part don't have to, but the management problems of dealing with really large, reliable, often real-time systems drives a lot of choices. So that said, cost containment and predictability are the large issues, and for that, auto generated code that comes directly from specifications (i.e., from system engineering tools like UML) are making inroads.

Can the autogenerated code be used directly? No, not always of course, but it does provide a useful starting point to be able to start doing simulations and testing the characteristics of the entire system. Problem areas can then be identified and software engineering efforts concentrated on those specific areas rather than the entire system. As we improve specific areas to some extent those improvements can be fed back to the tool teams and the autogenerated code be improved in the future. So the autogeneration here is in some sense more like a "programmers apprentice" approach - blocks of known working code that just needs parameterization, than the sorts of very high level languages that generate assembler you've seen in the past and perform so poorly.

Sorry for such a long post! :o Hope it helps someone.

Adrenalynn
11-13-2008, 11:16 AM
I do think we need to be a little careful painting an entire industry with the brush of a single CTO/CIO/CSO...

Dice, Monster, CareerBuilder, Linked-In don't seem to concur with Java = Auto-Win...

metaform3d
11-13-2008, 02:40 PM
Teaching programming is hard. It's relatively easy to learn the basic concepts and be able to cobble together working programs. It's much more difficult to grasp the theoretical underpinnings of what makes for good programming style, let alone good system design. The problem with some languages, especially with extensive built-in GUI support and fancy IDEs, is that they actually provide too much help. The beginning programmer can get very professional looking results with little effort, so they feel that they have mastered programming when they hardly know what they're doing at all. It's like learning to write essays with a typesetting word processor. It may look great on the page, but the content is still crap.

The introductory programming class at Berkeley in the 80's took the opposite approach, starting programmers with a limiting language in a tough environment. CS 1 students had to write their programs in FORTRAN. Compiled and run on the IBM 360. In batch mode. On punched cards.

OK, maybe they took it too far, but I think there is a case to be made for learning programming with a limited language. Perl or block-structured BASIC might not be bad choices, but you'd have to wean students off them fairly quickly. Give them projects that are hard to implement in typeless languages and let them struggle for a while, so then when you show the elegant solution in C they understand why it's superior. Projects that highlight the weaknesses of C would likewise be a good introduction for OO approaches.

As for auto-generated code, let's just say I'm not a fan. I slap down my engineers when I find them cutting and pasting code; why the hell would I want power tools so they can cut bigger and paste faster? Proper engineering practice for code reuse is explicit reparameterization.