PDA

View Full Version : Favourite programming language



Glom
2011-Sep-06, 07:05 PM
In order to continue my march toward becoming the Ultimate Power in the Universe, I seek perspective on where to focus my learning efforts. So I ask honourable members what languages they like to use and why?

Moose
2011-Sep-06, 07:16 PM
Language I like to use: C.

Language where you should focus your learning efforts: It depends on your goals and needs. Are we talking commercial demand or interest learning?

NEOWatcher
2011-Sep-06, 07:38 PM
Visual C with Visual Basic a close second. It depends on how much efficiency I want out of the program vs how fast I want to get it done.

Of course, a lot of it has to do with the programming and debugging environment and how easy a cross reference lookup is when working with it.

But; I also value a language that is easily readable.

So; for a learning environment, I would suggest Visual Basic. It's an easy start, but still has a lot of object oriented structure that you can grow into.

Glom
2011-Sep-06, 07:50 PM
Language I like to use: C.

Language where you should focus your learning efforts: It depends on your goals and needs. Are we talking commercial demand or interest learning?

Commercial I guess. What will make me and my stuff marketable?

HenrikOlsen
2011-Sep-06, 07:52 PM
Whichever fits the problem.
Unless another one is already being used, in which case I use that.

Matej Velko
2011-Sep-06, 08:21 PM
C++ is definately my favourite. I bought a huge book about it and I started to learn it. It is THE HARDEST programming language there is, but it is the most valuable programming language, too.

Moose
2011-Sep-06, 08:31 PM
Commercial I guess. What will make me and my stuff marketable?

[grunts under breath]

Okay. The good news is that any of those languages are marketable under the right circumstances. The strategy you need to market them will vary heavily, though.

*sigh* Now for the unpleasant part. Yes, there is bad news, and you can probably guess what it is. That said, I sincerely don't want to discourage you. Do you want to hear the rest, or would you prefer to find out the rest for yourself?

pzkpfw
2011-Sep-06, 08:37 PM
Now, I'm not making this as a recommendation nor am I saying it's my favourite, but in terms of current or soon-current marketability don't forget to look at HTML5/CSS3/JavaScript.

HenrikOlsen
2011-Sep-06, 09:43 PM
Commercial I guess. What will make me and my stuff marketable?


*sigh* Now for the unpleasant part. Yes, there is bad news, and you can probably guess what it is. That said, I sincerely don't want to discourage you. Do you want to hear the rest, or would you prefer to find out the rest for yourself?

Your knowledge of any programming language isn't in itself marketable.
Experience in using one is what's marketable.

Learning and knowing a complete development/testing/QC/production environment is likely to be more marketable that knowing any specific language, learning a wide set of technologies is likely to be more marketable as well.

Not to discourage, but if you know beforehand you're better able to prepare, both for the initial disappointments and after those, for the future.
Oh, and it's been over a decade since programming was the playground for anyone who'd read a book on a language and had written 20 lines of code that worked, these days you have to expect to compete with experienced professionals for the jobs that are there.

DonM435
2011-Sep-06, 11:17 PM
I'll have to recommend Visual C# (and Visual Basic, which is now quite similar).

But Fortran served us well for decades, and still does.

Nowhere Man
2011-Sep-06, 11:17 PM
I have a soft spot in my head heart for Pascal. It's what I learned in college, and used for 20 years of career in advertising and insurance. Turbo Pascal through Delphi. I've been making the switch to Java via NetBeans for the past few years.

LISP was fun (in school) and Forth* is second only to APL** in its ability to create write-only code.

* Did some playing around.
** Never touched it. I just look at code samples and laugh...

Fred

swampyankee
2011-Sep-06, 11:36 PM
For me, it's a tie between Fortran and Perl. Of course, I have written a database engine in Fortran-77, so I may be a trifle off the beaten path. ;)

Donnie B.
2011-Sep-06, 11:47 PM
As a pro writing code for embedded systems, I can tell you that plain ol' C is far and away the predominant language in my bailiwick. C++ is making some inroads but is still very much a minority player. Every other language is in the noise. (The most recent figures I've seen showed vanilla C with over 80% penetration of the embedded space, with C++ filling most of the rest.)

So my first question to anyone wrestling with this type of question is, what kind of machine will your code be running on? If it's a PC or smartphone, the answer will be very different than, say, an MP3 player or car audio system.

HenrikOlsen
2011-Sep-07, 12:27 AM
For me, it's a tie between Fortran and Perl. Of course, I have written a database engine in Fortran-77, so I may be a trifle off the beaten path. ;)
I wrote a piece of specialized graphical design software in Fortran-77 on a DEC-11 back in the Tektronics 4014 (http://en.wikipedia.org/wiki/Tektronix_4010) + pen plotter days. Path well beaten by now. Good times.:)

Perl's my favorite for "just kludge something together to pull out these data, in this format, and they should preferably be on my desk yesterday" situations.

HenrikOlsen
2011-Sep-07, 12:32 AM
C++ is definately my favourite. I bought a huge book about it and I started to learn it. It is THE HARDEST programming language there is, but it is the most valuable programming language, too.
You've obviously never heard of APL.
Here's Conway's Game of Life implemented in APL (http://catpad.net/michael/apl/):

⍎▯,∈N⍴⊂S←←▯←(3=T)∨M∧2=T←⊃+/(V⌽"⊂M),(V⊖"⊂M),(V,⌽V)⌽"(V,V←11)⊖"⊂M
Feel free to explain how C++ is harder:)

PaulLogan
2011-Sep-07, 12:46 AM
Commercial I guess. What will make me and my stuff marketable?

the most important advice i have: don't be a one-trick-pony.

in order to compete these days, you should have good knowledge in a few languages. for a wide range of applications the most important ones are
C++, C#, Java, HTML.

it's good to focus on one - and i would suggest C# - but be well versed in the others i mentioned.

you don't really need to know C that much any more these days, unless you will do a lot of embedded systems. but even in this area C# is becoming more and more common (depending on the concrete application and on the company of course). i have developed embedded systems for medical instruments, car navigation and a smartcard traffic system for a large provider and all were done in C#, but there are still many who use C for those systems, particularly companies who have large source libraries in C.

C++ is very powerful but not very elegant. it is still very much alive (the latest standard is from 2011) and there are loads and loads of (open-source) libraries for it and lots of help available on the internet.

personally, i find C# just beautiful and a real pleasure to work with. it is fully object-oriented (which C++ isn't, although close) and it was developed by very smart people with lots of experience and you can tell. also, .NET has been developed with constant feedback from developers and again: it shows. also, there is lots of help available for it and many libraries out there that make your life easy.

one of the main strongholds these days for C++ is game programming. most of directx and also opengl is done in C++. if you want to specialize in those areas, c++ is a must, but even in this area C# has become an option.
i am currently developing a large system for medical researchers (especially neurologists). it is being developed entirely in C# and a large part of the system is the data visualization engine, which is directx based (using an open-source C# wrapper for directx called slimdx). some games are even developed using C# and slimdx, but C++ is still dominant.

so, in order to be marketable these days you should know a few languages but - as others have pointed out - experience is the biggest seller. as a beginner this may be somewhat discouraging but it's the nature of the beast. a good strategy to obtain lots of experience quickly is to start out as a freelancer and try to get gigs in as many areas as you can to make your CV more impressive. being a freelancer is more risky of course and not every personality type is suited for this option but it's a good strategy nonetheless. i have done it for close to 3 decades and it worked out pretty well for me...

DoggerDan
2011-Sep-07, 01:30 AM
APL, although it's been so long ago I barely remember what it stands for. Vector operations were a snap.

NEOWatcher
2011-Sep-07, 12:05 PM
APL, although it's been so long ago I barely remember what it stands for.
That's because it's too simple to remember. "A Programming Language".

Here are some that I have experience with that are based on acronyms:
Common Business Oriented Language.
Formula Translation.
C (which came after B).
Beginner's All-purpose Symbolic Instruction Code.
Digital Business Oriented Language.
Lost In Stupid Parenthesis. *
Digital Command Language.
Structured Query Language.

*Ok, that one's not based on an acronym. It is named after Franz Lisp.

jokergirl
2011-Sep-07, 01:17 PM
I work with embedded systems. Thus, I use C for most things, but that's not an option in your poll.

Languages I can (and occasionally do) write in would include (at various levels of non-expertise) C++, C#, Java (ugh), Perl, Python and whatever the FlashBuilder language is called these days (it used to be ActionScript but that was long ago and in a different build environment...).

But yes, it always depends on what you want to work with. The trademark of a good programmer is not what they know, but what they can learn in how little time.

;)

ToSeek
2011-Sep-07, 02:53 PM
You've obviously never heard of APL.
Here's Conway's Game of Life implemented in APL (http://catpad.net/michael/apl/):

⍎▯,∈N⍴⊂S←←▯←(3=T)∨M∧2=T←⊃+/(V⌽"⊂M),(V⊖"⊂M),(V,⌽V)⌽"(V,V←11)⊖"⊂M
Feel free to explain how C++ is harder:)

I had a long list of sayings about "Real programmers don't use...". The line about APL was "Real programmers don't use APL unless the entire program can fit on one line."

ToSeek
2011-Sep-07, 02:56 PM
C++: Very powerful but very ugly. Easy to be clever (once you know what you're doing). Even easier to write code that's completely incomprehensible to anyone else.
Java: C++ for dummies. I voted for it, anyway, since it fixes a lot of the issues with C++ (while of course taking out a significant amount of the power). Half the time you don't actually have to write an algorithm, you just have to look through the libraries until you find what you need.
Visual C#: Never used
Perl: Great for scripting and string manipulation, so easy to use you almost feel like you're cheating. But I don't think of it as a general-purpose language.
Fortran: Only really used this one in school, and that was a long time ago. It was good for mathematical stuff, to be sure.

HenrikOlsen
2011-Sep-07, 05:03 PM
I had a long list of sayings about "Real programmers don't use...". The line about APL was "Real programmers don't use APL unless the entire program can fit on one line."

But that's the first axiom of APL: Any program can fit in one line, provided you use APL.:D

jokergirl
2011-Sep-08, 01:29 PM
Java: C++ for dummies. I voted for it, anyway, since it fixes a lot of the issues with C++ (while of course taking out a significant amount of the power). Half the time you don't actually have to write an algorithm, you just have to look through the libraries until you find what you need.

That was actually my main gripe with Java. 99% of the time I spent with it was spent cursing, hunting for a library doing what I needed, cursing again, figuring out which library did almost-but-not-quite what I needed, cursing some more and hacking a workaround so that I could actually do a task that would have taken half the time would I just have been allowed to code it myself.

;)

selden
2011-Sep-08, 02:45 PM
Since you're posting to a scientific Forum, I assume you're interested in commercial scientific programming. That means Fortran, C and C++. Other programming languages usually are used as wrappers, but not as often for the code that does the work.

If you're interested in commercial business programming, then you'll need to know Cobol, as well as other languages which can handle fixed point arithmetic.

While some of the johnny-come-lately languages are used for recently developed packages, there is a vast body of existing code written in older languages which needs to be understood, used and maintained. In particular, you must not limit yourself to proprietary Microsoft languages like C#

swampyankee
2011-Sep-08, 04:03 PM
Do remember old programs never die; they just get maintained. Vernor Vinge's Deepness in the Sky had something about this....

jfribrg
2011-Sep-08, 04:07 PM
The approach I take is that I try to do as much work in the database as possible. I use Oracle and therefore PL/SQL is the language that I use, but other databases have similar languages (ex: T-SQL in SQLServer). It is much quicker to do the calculations in the database than to transfer the data to a client program, do calculations, and then send the results back to the database. There are however many situations where this is not reasonable mainly because the data is not in the database to start with and also because database programming languages are typically not object-oriented.

I've been using C# in a Visual Studio environment heavily for the past few years. As with any Visual Studio development, one huge benefit is that the program uses managed memory. In C and C++, the program is responsible for keeping track of memory usage. Managed code (C# and VB in .NET as well as Java in JRM ) is different because the program runs on a platform that keeps track of memory usage and automatically determines when allocated memory is no longer needed by the program. This IMO makes it easier to program and it eliminates many of the buggy aspects of unmanaged code (ex C and C++) and in my line of work the drawbacks of allowing the platform to do the automatic "garbage collection" are minimal compared to the benefits of having far fewer memory leaks and easier testing/debugging. The drawbacks are that the program has less control over memory usage and limited control of when the garbage collection occurs which could be an issue if you are writing device drivers and other software that must be guaranteed to finish in a very short time frame. Managed code programs are usually slower and more memory intensive. Some programming constructs are not as available in managed code. For example, the union structure in C and C++ (which is analgous to the REDEFINES structure in COBOL) is in general not supported. If it is really necessary, it can be implemented as object properties, but this is the responsibility of the programmer. If the programs implement a user interface front end with a database connection behind the scenes, then the slowness of the managed code is usually negligible because the limiting factor is almost always the bandwith of the network connection with the database and not the speed of the client code. With the faster hardware available today, some applications that used to be too slow for managed code are now able to run sufficiently fast. My personal feeling is that unless a program is extremely computationally intensive with relatively little I/O, then managed code is the easiest way to get the program from concept to production.

Chuck
2011-Sep-08, 04:40 PM
I like the FoxBase+ database system which I've been using since 1987.

jfribrg
2011-Sep-08, 05:17 PM
I like the FoxBase+ database system which I've been using since 1987.

been there done that. I agree that it was a very good system. I used Foxbase and then FoxPro for DOS, which IMO was the best database system available for MS-DOS. After that came FoxPro for Windows which was a big disappointment. Then came Visual Foxpro which I have heard good things about but which I have never used.

If you are still using FoxBase+, then you should probably upgrade to Visual Foxpro. Things have improved in the past 20+ years. There's no reason not to take advantage of these improvements.

PaulLogan
2011-Sep-09, 03:35 AM
The drawbacks are that the program has less control over memory usage and limited control of when the garbage collection occurs which could be an issue if you are writing device drivers and other software that must be guaranteed to finish in a very short time frame.
you can assert pretty much full control over the garbage collection - if you really need to, which so far (using it for close to 10 years) i never had to do. the recommended "dispose" pattern actually utilizes a forced garbage collection in order to free up memory quickly.


Some programming constructs are not as available in managed code. For example, the union structure in C and C++ (which is analgous to the REDEFINES structure in COBOL) is in general not supported. If it is really necessary, it can be implemented as object properties, but this is the responsibility of the programmer.
true, there is no union as language element but it is very easy to implement using the "FieldOffset" property. a little more verbose but - to me - actually more readable.


My personal feeling is that unless a program is extremely computationally intensive with relatively little I/O, then managed code is the easiest way to get the program from concept to production.
i am using c# to develop systems that receive brainwaves (and other physiological parameters, like emg (muscle tension), skin conductance, temperature, breath rate, etc) from medical instruments (via usb), do digital signal processing (lots of number crunching!), display the data in advanced (i.e. slick and computationally intensive) virtual (directx based) instruments and in addition to that also provide audio and video feedback - all of this in real-time, and all of this developed exclusively in C#. the systems are heavily multi-threaded and for virtually everything - except the above mentioned dispose pattern - i leave the garbage collection up to .net. i am doing this stuff since the 90s (in C++ back then) but have switched to C# a few years ago (for those systems) and i have not regretted it and i have yet to encounter a limitation (speed or memory wise). oh, and those systems are designed to run on average windows based pcs with average graphics cards - no special hardware required.

i am sure there are systems one would not want to develop in C# and .net but if it can handle those advanced biofeedback systems (in order to provide meaningful and delay-free feedback for patients and researchers all the number crunching and display and feedback must be accomplished in less than 50ms, ideally 10ms (which we usually achieve)) it can handle pretty much anything.

p.s. i am not associated with microsoft in any way (i would never work for them because i don't like them as a company). i am just trying to correct common misconceptions about C# and .net - simply because i really like it and it really works.

TimmayB
2011-Sep-09, 05:08 AM
Hands down it's perl. Does it all. Doesn't care about typecasting. Awesome reg exp, DB, listing and searching. Still don't like it on Windows though.

tnjrp
2011-Sep-09, 05:26 AM
I was very interested in the theory of programming languages and compliation at the uni. My answer to the question would be: none of the above. But obviously the languages I really like (such as Ada, Oberon and even the AFAIK purely theoretical Alphard) are perhaps a bit on the rare side...

Nowadays I work almost daily with Ansi-C (no plusses) and daily with Oracle's PL/SQL command language. So a fat lotta good those studies of mine did, eh? ;)

Of the ones mentioned in the poll, I've worked a little with both C++ and C#. If I wanted to conquer the universe in general, I'd focus on the former and if I just wanted to topple the Microsoft environments then I'd go for the latter.

Didn't vote.

ggremlin
2011-Sep-09, 07:35 AM
Before selecting a programming language, try to build the skill set that any good programmer needs. Once you have those skills, you can take any programming language and use it to fit the needs. Yes, it sounds like Captain Oblivious speaking, but it is ever true.

Documentation - This one gets missed a lot, learn to document what you are doing even if just for yourself. YOU will thank yourself later, I guarantee it.
Communication - The Human kind, people think you are mind reader. Nothing is worst then completing a project and finding you that wasn't what they wanted.
Know the Hardware - This use to be a lot easier when you could actually SEE a circuit, but it is still valuable. When a sort eats the physically memory available and goes to the paging file, this is going to be a while.
Think Literally - CPUs are automated idiots, they will do what you program them to do. What happens if the data isn't exactly right?
Organizational skills - Project management is Only a part of it.
Telepathy and Speaking to the Dead - These are advanced skills required when working with Dead or almost Obsolete code which was created before you were born or last month by that guy that left last week before you were hired. By the way that code runs the payroll system!

To point: Java(Script) or C (version whatever) are currently the most marketability.

kamaz
2011-Sep-09, 09:21 AM
C++, Java, Visual C#: That's three different dialects of one language, basically.

Perl: Very useful but the language encourages you to write unreadable code. Yes, you can write readable code in Perl, but this requires a lot of self-discipline to avoid all shortcuts the language offers.

Fortran: No, unless you want to work with legacy physics code.

I suggest you take a look at Python. You'd be actually learning programming and not idiosyncracies of the language.

NEOWatcher
2011-Sep-09, 12:12 PM
I was very interested in the theory of programming languages and compliation at the uni. [...] So a fat lotta good those studies of mine did, eh? ;)
I found my education of that type of study invaluable. It helps me jump from one language to another, not because of syntax, but because I get a good feel for what's happening behind the scenes. So; I can more easily determine how to build efficiencies into the program and understand better when things go awry.

This can also be a minor curse when working with more abstract (once called 4gl) languages. Instead of letting the language control the flow of the task, I tend to get an idea of what I want to do and end up trying to outsmart what the language wants to do.



Before selecting a programming language, try to build the skill set that any good programmer needs. Once you have those skills, you can take any programming language and use it to fit the needs.
I agree with your points, but a minor chicken and the egg problem is learning how to apply them without knowing anything about a language to apply them to.

DonM435
2011-Sep-09, 01:04 PM
Windows: I've occasionally wanted to test some mathematical point via iteration, edit a series of files, or do some other complicated thing, and have been stuck with a computer that has MS Office but no programming languages. So, I just open MS Word or MS Excel -- doesn't matter which -- and use the built-in Visual Basic for Applications, which is almost exactly like the older Visual Basic 4.0--6.0 , and in which I can do almost anything.

Linux: I'm learning bits and pieces about awk and sed, and imagine that one can accomplish virtually anything with these.

jfribrg
2011-Sep-09, 06:36 PM
Linux: I'm learning bits and pieces about awk and sed, and imagine that one can accomplish virtually anything with these.

Knowing these tools is fine for quick and dirty once-and-done type programs, but Perl supercedes the functionality of both. I still use sed with command line piping, but I haven't used awk in over 10 years. I used to use awk quite frequently, but the day I started learning Perl was the last day that I used awk. They are both easy to use, are useful for the same types of problems (manipulation of streams of text data), but Perl has many more features and is useful in areas that awk is not. I consider Perl to be more of a a general-purpose language while awk is a special purpose language that offers no benefit over Perl.

Tensor
2011-Sep-09, 10:03 PM
Before selecting a programming language, try to build the skill set that any good programmer needs. Once you have those skills, you can take any programming language and use it to fit the needs. Yes, it sounds like Captain Oblivious speaking, but it is ever true.

Documentation - This one gets missed a lot, learn to document what you are doing even if just for yourself. YOU will thank yourself later, I guarantee it.
Communication - The Human kind, people think you are mind reader. Nothing is worst then completing a project and finding you that wasn't what they wanted.
Know the Hardware - This use to be a lot easier when you could actually SEE a circuit, but it is still valuable. When a sort eats the physically memory available and goes to the paging file, this is going to be a while.
Think Literally - CPUs are automated idiots, they will do what you program them to do. What happens if the data isn't exactly right?
Organizational skills - Project management is Only a part of it.
Telepathy and Speaking to the Dead - These are advanced skills required when working with Dead or almost Obsolete code which was created before you were born or last month by that guy that left last week before you were hired. By the way that code runs the payroll system!


I'd add, Learn to Edit. Recognizing when there is a period, comma, or other symbol is out of place is one of the most helpful skills you'll ever use when you hit run and you start getting zeros in all your fields or your program gets locked into a infinite loop. This goes back to your "think literally", as that misplaced symbol completely changes how the instruction is carried out.

That said, the languages I've used (except for C) are pretty much not used anymore. So, except for small experimental stuff for iOS, I'm not sure I'd be any help.

swampyankee
2011-Sep-10, 12:01 AM
For the "learning to edit" bit, get a programmers' editor, like emacs (http://www.gnu.org/software/emacs/) or vim (http://www.vim.org/). Both will do handy things like automatically indent, highlight keywords, and check for balanced delimiters. For small stuff -- a few score lines -- I tend to use vim, but for larger stuff, I use emacs. Luckily, vim and emacs are on almost every platform (iirc, neither have been ported to z/OS), and sensible shops allow their use.

tnjrp
2011-Sep-12, 08:28 AM
I found my education of that type of study invaluable. It helps me jump from one language to another, not because of syntax, but because I get a good feel for what's happening behind the scenes. So; I can more easily determine how to build efficiencies into the program and understand better when things go awrySure, there is that but still the fact is that in my work I use none of the languages (or even types of languages, really) that I studied back then.


This can also be a minor curse when working with more abstract (once called 4gl) languages. Instead of letting the language control the flow of the task, I tend to get an idea of what I want to do and end up trying to outsmart what the language wants to do.I suppose that sort of problem ties in with having been trained primarily in imperative languages, for me anyway. Your tools do shape the way you think, even if it's a cliche much overused by the ATM crowd that "if all you have is a hammer, all problems look like nails". I found it very hard to program in Prolog back in the day, for example - I kept trying to solve the problems imperatively.

NEOWatcher
2011-Sep-12, 08:40 PM
Sure, there is that but still the fact is that in my work I use none of the languages (or even types of languages, really) that I studied back then.
Neither do I. But it still helps.


I suppose that sort of problem ties in with having been trained primarily in imperative languages, for me anyway.
Partially. I am more concerned with the ease of use by the user. I do tend to think in terms of those languages, but I am extremely concerned with user ergonomics.
I have found the standard error handling and flow of user changes become very cumbersome for the user.
Sometimes, trying to communicate what they did wrong is grossly inadaquate in the native flow.
Sometimes, errors are not caught until it's too late (or even not caught at all)

jrkeller
2011-Sep-12, 08:54 PM
FORTRAN is the only one I really know. Hence my vote.

tlbs101
2011-Sep-13, 03:22 AM
I like the FoxBase+ database system which I've been using since 1987.

I wrote some serious modifications (mostly adding barcode read/print capability) to a large military stock room program -- all using FoxPro.

My favorite is still Visual Basic and VB macros for MSOffice products. I have written some pretty mean engineering app. Excel front ends for Access back ends.

kamaz
2011-Sep-13, 08:48 PM
For the "learning to edit" bit, get a programmers' editor, like emacs (http://www.gnu.org/software/emacs/) or vim (http://www.vim.org/).

Seriously, what is it that vim and emacs can do, that a sensible modern editor like Notepad++ cannot, that warrants spending tens of hours just to learn the editor?

GeorgeLeRoyTirebiter
2011-Sep-13, 08:53 PM
Run in Linux.

HenrikOlsen
2011-Sep-13, 11:51 PM
Run in Linux.
Just use NetBeans.

dgavin
2011-Sep-14, 12:16 AM
Coming from a predominately Mainframe/Cobol background. I have to admit that I find Visual C# one of the nicest languages I've used. Although I do have have a few nit's to pick even with it.

Memory/Object allocation:

It's lousy, programs tend to use much more memory and far many more calls to getmain's then they really need, even to be thread safe. This could be streamlined by ditching the 'alway encapsulate' the .NET core used and allocate block of memory to each object (sith sub object being part of it), with each varuial then being an offset. This would also increase speed of variable access times as these would then use direct machine code address/offset instructions. It would also elimiate the need to Marshaling of legacy data opects into OO. Or Better keep the Object base type as is, and have a new MemoryObject type thats also base, that allocates using a more agressive variable offset architecture instead of the stack/heap arcitecture. This would also significantly spead up the GC when it's freeing a Memory blocked type object, and allow for a much more streamlined interface to 3d Card API's as well as some others.

.Net datatypes locked:

If i want to Inherit a String directly to change it from a imutable type to an mutable, then LET me! Some times you have reasons to change a specific portion of the original string object, and not wind up with a new string object, with the old one still taking up memory until the GC grabs it.

Chuck
2011-Sep-14, 12:34 AM
I also like UBasic (http://archives.math.utk.edu/software/msdos/number.theory/ubasic/.html), a BASIC interpreter with 2600 digit precision. I usually use it interactively and write small programs.

jfribrg
2011-Sep-14, 12:42 AM
I also like UBasic (http://archives.math.utk.edu/software/msdos/number.theory/ubasic/.html), a BASIC interpreter with 2600 digit precision. I usually use it interactively and write small programs.

High integer precision is always high on my list of wants, but once you get beyond 50 then why not make it an arbitrary precision. I know that UBASIC is old and back then there were memory and wordsize constraints that no longer exist, although even older functional languages like Lisp and Scheme always had it. If you need arbitrary precision, then you can use Java, Perl, Ruby and Python. Of these, I find that arbitrary precision is easiest in Python.

swampyankee
2011-Sep-14, 12:47 AM
FORTRAN is the only one I really know. Hence my vote.

It's not FORTRAN anymore; it's Fortran, so say ISO and ANSI.

Chuck
2011-Sep-14, 12:47 AM
High integer precision is always high on my list of wants, but once you get beyond 50 then why not make it an arbitrary precision. I know that UBASIC is old and back then there were memory and wordsize constraints that no longer exist, although even older functional languages like Lisp and Scheme always had it. If you need arbitrary precision, then you can use Java, Perl, Ruby and Python. Of these, I find that arbitrary precision is easiest in Python.

I can use UBasic pretty much as a calculator without have to write many programs. I find it handy.

NEOWatcher
2011-Sep-14, 12:30 PM
It's not FORTRAN anymore; it's Fortran, so say ISO and ANSI.
Maybe so, but I've always considered it to be ForTran.

swampyankee
2011-Sep-14, 11:02 PM
Maybe so, but I've always considered it to be ForTran.

;)

Do you remember FORTRANSIT?

Moose
2011-Sep-14, 11:32 PM
Actually, here's a question: It's possible I'll someday be tapped to take on a high school CS class. Are there any reasonably modern languages that are still within the grasp of an average less-than-motivated high schooler? I'd be hesitant to try and get them started on anything object oriented or anything microsoft. There's just way too much baggage there for beginners. C's a possible old standby, but the edges are just a bit jagged.

Would flash be a reasonable option to get across the concepts of functions, variable assignments, and simple procedural thinking, without having to spend half a month just to get to the "hello world" stage?

(Chuck, I've already made a note of UBasic.)

pzkpfw
2011-Sep-15, 12:20 AM
"Kids corner": http://msdn.microsoft.com/en-us/beginner/bb308754.aspx


Are you a cool kid who wants to impress your friends and family with your mad skillz? Check out the Kid's Corner for lots of fun, easy to understand lessons on programming!

Some adults just shouldn't write for kids.


----

Then there's this: http://www.microsoft.com/presspass/features/2010/jan10/01-12kodu.mspx

To me reads like Logo for the current millenium.

swampyankee
2011-Sep-15, 03:10 AM
Actually, here's a question: It's possible I'll someday be tapped to take on a high school CS class. Are there any reasonably modern languages that are still within the grasp of an average less-than-motivated high schooler? I'd be hesitant to try and get them started on anything object oriented or anything microsoft. There's just way too much baggage there for beginners. C's a possible old standby, but the edges are just a bit jagged.

Would flash be a reasonable option to get across the concepts of functions, variable assignments, and simple procedural thinking, without having to spend half a month just to get to the "hello world" stage?

(Chuck, I've already made a note of UBasic.)

Ruby. http://www.ruby-lang.org/en/

Logo http://www.eecs.berkeley.edu/~bh/logo.html

Squeak http://squeak.org/

Overall, Ruby is probably the best language for a high-school or even undergraduate class, especially for people who don't plan on going into cs for a living.

Grey
2011-Sep-15, 11:59 AM
Actually, here's a question: It's possible I'll someday be tapped to take on a high school CS class. Are there any reasonably modern languages that are still within the grasp of an average less-than-motivated high schooler?If the goal is primarily to introduce them to the concepts of programming and how to think about it, without worrying so much about syntax or learning a general purpose language, I've heard very good things about Alice (http://www.alice.org/).

Moose
2011-Sep-15, 12:56 PM
The goal is primarily to reinforce the concepts of functions, variable assignments, and procedural thinking. Basically, the goal is to piggyback their math learning to make the entry to programming smoother, then to let their practice programming reinforce their math and reasoning skills. While making this process as covert/subtle as possible.

I don't want to use any strongly OO languages to introduce the concept of programming. Maybe as a followup, but not as an intro. There's just too much immediate baggage there for students who aren't strongly self-motivated and who aren't (in general) very resilient.

The basic ideas I'd want to get through are: Vocab/operators -> Procedural thinking -> Assignments -> Functions. In roughly that order. Everything else is gravy/advanced class material. I'm looking for reasonably friendly modern equivalents to BASIC and Turbo Pascal so I can ramp them up gradually and not destroy their fragile potential interest through frustration.

jfribrg
2011-Sep-22, 03:42 PM
I'm looking for reasonably friendly modern equivalents to BASIC and Turbo Pascal so I can ramp them up gradually and not destroy their fragile potential interest through frustration.

You might want to check out Python. I have criticized Python because whitespace is significant, but I've also heard many "newbies" sing its praises because there aren't any curly braces or if...endif structures. With the required indentations, the program does resemble how one would write an outline the functionality of the program. Its not self documenting, but its structure apparently helps a beginner to visualize how the program works. It is also a powerful language, so you're not limited to simple programs. One nice thing is that the "hello world" program is a single line long, which should probably be a requirement for any language used in a intro course on programming.

DonM435
2011-Sep-22, 03:57 PM
You probably should use a language with which you are comfortable for quick-and-dirty work, immediate problem solving and the like. Obscurity should be no problem here.

You may also need a more elegant language for big projects that involve planning and teamwork and will eventually be maintained by others. This choice may indeed be forced upon you.

I don't have any problem with the dichotemy, although if you can adapt one particular language to both types of task, that's good.

The Backroad Astronomer
2011-Sep-22, 04:14 PM
I have taken courses for fortran and c++.

At the call center I worked they have a program that allows the person who monitors phone calls set when they want to listen to certain agents. It is like setting a vcr to tape something. Sometimes on the phone I said "thats what the program into the computer for rates." The person who does the quality control told me programming wasn't typing things into the system but programming is what she did when set up her program to record us. I just bit my tongue at that moment.

icebreaker
2011-Sep-22, 08:41 PM
Perl, my first attempt at learning, pascal for my college algorithm course, and java for college programming course. I'm sticking with perl, however. Kinda first impression and because most students and teachers at my college don't touch perl at all.

jfribrg
2011-Sep-23, 08:30 AM
As I mentioned before, I've used Perl quite often, but I don't think it is appropriate for an intro to programming course because its syntax is very cryptic. It relies very heavily on regular expressions which is a very important concept, but probably not the first thing that you want to discuss. Regular expressions are usually taught in a course on computability theory, not intro to programming. Also, Perl programming is a paradigm unto itself, which makes it difficult for a beginner to apply the concepts learned to other languages.

Quadrazar
2011-Sep-23, 09:54 AM
C++ is defenitly my favorite. (it's a powerfull language that allows a managment of memory, powerfull options for object oriented programming). Recenty I've been doing some microchip programming. You can program these chips in C(++) or Assembler code.

I also like PHP, but it wasn't on te list.

HenrikOlsen
2011-Sep-23, 06:07 PM
Also, Perl programming is a paradigm unto itself, which makes it difficult for a beginner to apply the concepts learned to other languages.
The Perl paradigm seems to be "There's always at least one more way to solve this problem", compared to many other languages where the paradigm is "There's at most one way to solve this problem" with the different languages each having their own "one way" to solve it.

jfribrg
2011-Sep-29, 06:09 PM
C++ is defenitly my favorite. (it's a powerfull language that allows a managment of memory, powerfull options for object oriented programming).

IMHO, any program that allows the programmer to do memory management should not be used for an intro to programming course. Memory leaks can be very subtle and difficult to debug. Pointer problems can also cause some very puzzling buggy behaviors. It is best to avoid this when first learning how to program. When you are programming device drivers and microchips etc, then you need memory management features, but prior to that it only distracts the student from basic programming concepts.

Nicolas
2011-Sep-29, 07:23 PM
Visual Basic 6. Good ole veebeesix. Granted, commercially speaking it won't get you very far nowadays. Though quite some applications (photo boots) and even Windows Defender were made in it. But it's just so fast and easy to create something in it. I love it! Especially when combining it with a 3D engine; then it becomes very capable. I use it as a hobby to create 3D games.

I have little other programming experimenting. JAVA (hated it due to a bad programming environment, not the language itself) and middleware running C++. Or C#, but IIRC it was ++. I also did some "bare" Direct3D programming in that C++ middleware (for a simulator). Though I must say that it is easier to use a 3D engine to program 3D stuff than using bare Direct3D commands.

jfribrg
2011-Sep-29, 07:43 PM
I also did some "bare" Direct3D programming in that C++ middleware (for a simulator). Though I must say that it is easier to use a 3D engine to program 3D stuff than using bare Direct3D commands.

I gave up on managed Direct3D. I never tried OpenGL. Are there any decent free or nearly free 3D engines?

Nicolas
2011-Sep-30, 12:45 PM
TrueVision3D (TV3D) is free and decent. And quite fast and capable. Moreover, it is compatible with many programming languages and a forum that is not completely dead (but dying).

Here are some screenshots of a game I made in VB6 and TV3D. My artistic capacities are not to be debated here. :)
154301543215431

I should add that in order to get the max out of this engine (or any modern engine), you should be able to program "shaders". I cannot, and that limits the possibilities somewhat. There isn't much shader support for the VB6 community on the forum, though there is for other more popular languages. But even without shaders, you can get impressive and fun results with this VB6 + TV3D combi. TV3D also gives you a physics engine (Newton) included. It has some issues (I need to speed up things by a factor 2 to get correct results for some unknown reason), but overall it works nicely. In my game, I use it so that you can throw down trees and buildings with catapults. You also get some sound support, but I'm not that experienced with its sound support. For keyboard support I use a separate DLL rather than TV3D's support.

Sorry for the mild thread hijack.

PaulLogan
2011-Oct-01, 12:39 AM
I gave up on managed Direct3D.

managed dx has been discontinued for years. it has a few bugs that make it useless for certain applications. it is a bad idea to use managed dx for any new project.

there are, however, a few (open-source) libraries that provide a managed wrapper. i have tested a few and ended up going for slimdx. the documentation is very minimal but since it is for the most part a simple wrapper around standard dx calls, it is not too bad if you know those (which is a requirement, really). aside from the doc issues i am quite happy with it and have so far not had a reason to look elsewhere. it's fast and reliable.

PaulLogan
2011-Oct-01, 12:52 AM
I should add that in order to get the max out of this engine (or any modern engine), you should be able to program "shaders". I cannot, and that limits the possibilities somewhat. There isn't much shader support for the VB6 community on the forum, though there is for other more popular languages.

i agree with you on the importance of shaders but i don't quite understand your statement about shader support for vb6.
i have learnt shader programming way before modern high level shader languages (hlsl for directx and glsl for opengl) and they have always had their own language which is independent of the language you use for the rest of your project. the old language was a simple op-code based construct, which was a pain in the neck. hlsl and glsl are c-based languages, which make shader development a lot more comfortable.

i don't know anything about tv3d but i'd be surprised if it didn't provide the standard interface for inserting shaders into the pipeline. and if it does, all you need to do is search the web for "hlsl tutorial" and you should be on your way to develop shaders in no time. there are also tons of shaders available for free that will get you going when you try to understand them. there should be nothing vb-specific about shader development in tv3d, unless they really messed up.

you could improve the look of your game tremendously by using a few simple shaders for lighting effects.

pzkpfw
2011-Oct-01, 01:27 AM
managed dx has been discontinued for years. it has a few bugs that make it useless for certain applications. it is a bad idea to use managed dx for any new project.

there are, however, a few (open-source) libraries that provide a managed wrapper. i have tested a few and ended up going for slimdx. the documentation is very minimal but since it is for the most part a simple wrapper around standard dx calls, it is not too bad if you know those (which is a requirement, really). aside from the doc issues i am quite happy with it and have so far not had a reason to look elsewhere. it's fast and reliable.

Is XNA still considered current? I thought that was kind of the "next thing" for Managed DirectX.

http://en.wikipedia.org/wiki/Microsoft_XNA

PaulLogan
2011-Oct-01, 02:09 AM
Is XNA still considered current? I thought that was kind of the "next thing" for Managed DirectX.

http://en.wikipedia.org/wiki/Microsoft_XNA

yes, it is still current. the latest version 4 was released end of 2010.

i decided against xna for my purposes because it did not support certain directx functionality i needed (directx 10 and 11 plus shader model4), which may or may not have changed by now, i didn't see the need to learn yet another framework built around directx and certain low-level directx calls i needed which were not easily accessible in xna.

also, afaik, there is no way to fully marry wpf and xna (i.e. without running into wpf airspace issues), which was a most important requirement for me. wpf is based on directx and it doesn't like to share a window with a pure directx application. there are ways around it that circumvent pretty much all wpf airspace restrictions but they don't work for xna.

George
2011-Oct-01, 03:49 AM
dBase III+. It's highly intuitive and fast for the guy that needs more fishing time. Of course, it isn't something you'll see on the race track as it doesn't have "limitless capabilities", as one Apple salesman described the early Apple computer with Basic. :)

jfribrg
2011-Oct-01, 06:54 AM
dBase III+. It's highly intuitive and fast for the guy that needs more fishing time. Of course, it isn't something you'll see on the race track as it doesn't have "limitless capabilities", as one Apple salesman described the early Apple computer with Basic. :)

I'm surprised how many older languages that folks continue to consider to be better than the recent ones. I used all of the dBASE related systems (dBASEII, dBASEIII+, dBASEIV, Clipper, FoxBase, and FoxPro). These were OK at the time but they all are 20+ years old and very, very limited compared to more recent systems. Any recent database system (ex. Access) is far better than any of these with the possible exception of FoxPro.

Jeff Root
2011-Oct-01, 04:23 PM
Glom,

Are the answers you got the kind of answers you wanted?

-- Jeff, in Minneapolis

swampyankee
2011-Oct-01, 06:56 PM
A lot of the older languages have been heavily modified by practitioners, so while they don't have the pure elegance of <insert latest fad language here>, they do have a) a lot of legacy code so you don't have to write a solver for stiff PDEs, Voronoi diagrams, and what have you and b) a lot of experienced people who can teach a COBOL program to sing like the proverbial horse (http://www-personal.umich.edu/~jlawler/aue/sig.html).

Nicolas
2011-Oct-01, 10:51 PM
i agree with you on the importance of shaders but i don't quite understand your statement about shader support for vb6.
i have learnt shader programming way before modern high level shader languages (hlsl for directx and glsl for opengl) and they have always had their own language which is independent of the language you use for the rest of your project. the old language was a simple op-code based construct, which was a pain in the neck. hlsl and glsl are c-based languages, which make shader development a lot more comfortable.

i don't know anything about tv3d but i'd be surprised if it didn't provide the standard interface for inserting shaders into the pipeline. and if it does, all you need to do is search the web for "hlsl tutorial" and you should be on your way to develop shaders in no time. there are also tons of shaders available for free that will get you going when you try to understand them. there should be nothing vb-specific about shader development in tv3d, unless they really messed up.

you could improve the look of your game tremendously by using a few simple shaders for lighting effects.

Shaders use their own programming language indeed, and TV3D uses the industry standard. Commercially interesting if you know that one btw. What I meant is that you need to know how to make the shaders work within TV3D used in VB6. And on the TV3D forum, you won't find much information about that. You will find examples of how to use shaders in TV3D with C++ though. As I can't get custom shaders to work (there is a fog shader built in, I can run that one) within VB6 (I'm a newbee on that front), my games look a bit "dated" as you can see on the screenshots.