• Welcome to Valhalla Legends Archive.
 

Best Programming Language for Jobs

Started by Ender, January 01, 2006, 09:35 PM

Previous topic - Next topic

What's the best high-level programming language for jobs?

Java
C#
C++
Python
Ruby
Other
|

Warrior

If imagination (which seems by Yegg's standards) to make someone not efficient at programming...then no thanks.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

netytan

Quote from: Kp on January 02, 2006, 11:02 AM
Quote from: Ender on January 02, 2006, 09:20 AMOn the other hand, I think that Java is more OO then C++ and one of the most OO languages there is. IMHO, the absence of multiple inheritance is a good thing, and it was definitely done deliberately by Java's creator. Multiple inheritance just makes it so much more likely that you're going to change one of your base classes and as a result screw up your child classes. Also, you could make the mistake of accessible variables with the same name in different base classes, or making functions with the same names and parameters. I think that Java's interfaces are a very good replacement to C++'s multiple inheritance.

Agreed, Java's creators definitely (wrongly) thought it was bad to support multiple inheritance.  How do interfaces mitigate any of these risks?  You can still change the interface to break an implementing class.  You can still have conflicting prototypes come down from multiple interfaces.

Quote from: Ender on January 02, 2006, 09:20 AMI agree that Java can't be as fast as C++. Java's interpreted whereas C++ is translated. But there is a benefit of interpretation, which is better debugging! :P And Java's speed has never been an issue for me.

How does being an interpreted language have any effect whatsoever on debugging?  A C++ program built with debugging symbols can be traced more easily than a Java program can be traced with jdb.  Build something in VC7 with full debugging symbols, then try to trace it with windbg.  You get symbolic names of all the variables and original source in a companion display.  Or have a C++ program commit an access violation, and check out the core dump.  Assuming it didn't run afoul of RLIMIT_CORE, you get a full image of the process's memory at the time of the fault.

Point one, multiple inheritance is considered to be a bad idea by most if not all modern OO languages (that being those designed in the last 10 years, no there aren't many) because it makes it harder to determine the nature of your class at first glance (though only slightly IMO) and also introduces the possibility of attributes/methods clashing.

Java gets around this need by using constructs not available in C++ such as the protocol, which as far as I know appeared in widespread use in Objective-C.


I'll tell you also why interpreted languages are better for debugging, maybe not Java which is essentially a compiled language trying to be interpreted but missing the point entirely. More generally interpreted languages let you catch errors that simply can't known at compile time and obviously this contributes to the number of bugs that slip though into the final program – as you said you can get an image of the program at the time it crashed but this seems highly inelegant when compared to the facilities available to interpreted langs.

The best example of this IMHO is in CL implementation. Most good CL's allow a different style of programming to what you'd likely be used too. Under this model the program is built and debugged interactively by the programmer as it runs, allowing functions to be tested at and replaced and for you to browse and see low level details that aren't easily available in other languages very easily.

One example where this is was useful was when NASA debugged one of it's [I believe] voyagers (which incidentally used LISP) in this manner while it was hurtling through space :). How many languages have got this far, and how many would allow this to happen without disrupting operations?

Mark.

netytan

Quote from: Ender on January 02, 2006, 12:17 PM
Yeah... it would be really nice if Java had operator overloading. It's a growing language though, perhaps it will come out in the next platform, just like Enums (a wonderful addition) came out in the 1.5.0 platform.

Not to be a bitch, though I'm very capable of being one I'm sure but it's always a great source of amusement to see people go all gooey over operator overloading. It's a simply syntactic overly which really gives you nothing, not even the illusion of control and yet it's so loved. I'll have to write a paper about this sometime ;).

Consider the following incredibly simple implementation of Pythons for loop (similar to for-each in other languages), it's more pointing than operator overloading and yet only the most basic of examples as to what meta-programming can do. Just having real macros may very well blow your brains.

I can hear the C/C++ programmers  now. Shhh, you don't make macros you have text replacement and there's a huge difference.

(define-syntax for
  (syntax-rules ()
    ((for var in lst
       body ...)
       (map (lambda (var)
              body ...) lst))))


This small piece of Scheme (based on idea's developed 50 years ago) can handle just about everything the for loop in Python can with the exception that it can be extended i.e. zipped parameters could be added to the form easily enough to allow this operation too and then it's complete – unless you wish to add more :D.

I don't think anyones actually interested in this mind but even still. It's kinda funny when you compare a language near the top of the power spectrum with what most programmers consider powerful :).

Mark.

netytan

Quote from: Joe on January 30, 2006, 04:36 PM
Saying Java is nice because it works on all platforms (which really it doesn't, it doesn't work on many hobby OS's, such as JoeOS or Optimix, but lets not go there) is like saying anal sex is good because it works on all genders.

Although Java's cross platform ability is nice (kinda like anal sex), you shouldn't pick it explicitly for that reason.

Hahah love it and so true, though Java really isn't as cross platform as everyone seems to think. I can name many languages of the top of my head which are more cross platform: C, Perl, Python, Ruby, Scheme, CL, TCL, Obj-C... the list goes on.

Java has been said to have some issues with memory managment issues on some platforms.

Now on with the anal ;),

Mark.

netytan

Quote from: Networks on January 30, 2006, 09:00 PM
Quote from: Joe on January 30, 2006, 04:36 PM
Saying Java is nice because it works on all platforms (which really it doesn't, it doesn't work on many hobby OS's, such as JoeOS or Optimix, but lets not go there) is like saying anal sex is good because it works on all genders.

Although Java's cross platform ability is nice (kinda like anal sex), you shouldn't pick it explicitly for that reason.

That's the stupidest reason to choose Java IMO. I hate .NET because of virtual machines even if Vista will come standard with the .NET framework. The mass GUI interfaces on these applications is ridiculous.

IMO C++ is the best language. It makes you an efficient programmer, it makes you a more secure programmer, it makes you a more knowledable programmer, it makes you a more aware programmer.

I counter claims that C++ takes forever to code with: If you're good at it, it won't take that long.

I may be talking out of my ass but that's what I believe after having minor contact with most languages.

Oh let me count the number of things I could say about that... a lot but I wont waste my time because anyone who goes around citing "belief" is not going to see reason even when other languages are so obviously better.

C++ will not make you a better programmer, it will not make you think elegantly, it will not make you think securely (as evident by holes in most software written). Windows is a good example of an OS which uses C++/OOP in all the wrong places. That said it will make you a programmer hopelessly dependent on one specific idea – OOP. Good thing?

When you said other languages however I assume from your comment that you've stayed very firmly within the bounds of accepted industry practice – OO, imperative or procedural languages ;).

Personally I can program very well in OOP, I did for a long time but I wouldn't want anymore. After working with other "alternative languages" I've become more than a little aware that OOP is very much code bloat, and inflexible bloat at that.

You can try all the Algol/C-like  language you like and learn nothing more than how to apply syntax in different ways. Change the semantics and most of these programmers would be hopelessly lost. Maybe you're not one of them though :).

Mark.

netytan

#65
Quote from: Warrior on January 31, 2006, 10:54 PM
If imagination (which seems by Yegg's standards) to make someone not efficient at programming...then no thanks.

Personally I define a good programmer as one who comes up with elegant and good solutions, this takes imagination. Not blindly following like a sheep so in this instance Yegg is right.

IMO any language which forces you to think in unnatural and or limited ways as C++ and others do can't be defined as a good language. Hence any programmer who thinks in this way is just working within the borders provided. The number of solutions available for a given task are slashed, often the most elegant.


I would challenge any programmer here to write in C++ or Java an equivalent to the accumulator function below, in purpose and elegance. If you can't then maybe I have a point lol, if you can then I must just be crazy but I doubt it ;).


> (define (make-counter i)                   ; Defines a function which returns a closure over i.
    (lambda (n) (set! i (+ n i)) i))
>
> (define (show-counter c)                   ; Define a function which shows the value of a counter.
    (c 0))
>
> ;;; The code below demonstrates these functions being in used. This could be extended with a
> ;;; symbol parameter to emulate OOP style fully but in practice there is little point.
>
> (define counter1 (make-counter 0))
> (counter1 1)
1
> (counter1 1)
2
> (counter1 1)
3
> (counter1 1)
4
> (counter1 2)
6
> (counter1 2)
8
> (counter1 2)
10
> (show-counter counter1)
10
>
> (define counter2 (make-counter 1))
> (counter2 1)
2
> (counter2 1)
3
> (show-counter counter2)
3
> (show-counter counter1)
10



This code encapsulates a number, which should be initalized. It allows numbers to be added to the counter through the closure (a more generalized form of what you call an instance, with some important differences) and for the current value to be show in a clear and protected manner; this being the reason for encapsulation.

Think you can do it? I will of course give some concesion for the fact that types in C++ are stricter so don't worry about that, not that this should be a problem anyway.

Finally:

From the list my vote was Ruby because of it's rapidly increasing popularity, some very well known programmers are also betting that it will overtake Java as the next big language (it just overtook Python in book sales with ease) so it may well be worth learning :). Of the OOP languages it is IMO the most flexible and is available on multiple platforms. Aside from that the growing user base is producing some very nice third party libs.

Take care all I'm off to read,

Mark.

Skywing

netytan: Stop with the trolling.  You should present your arguments in a respectful fashion; I'm not going to see this discussion degenerate into a flame war.

netytan

#67
Quote from: Skywing on February 01, 2006, 11:21 AM
netytan: Stop with the trolling.  You should present your arguments in a respectful fashion; I'm not going to see this discussion degenerate into a flame war.

Sorry SkyWing :-[.

I assure you I'm NOT trying to start a flame war, I have no interest in arguing with people over which language is the best period, however the purpose of this thread was which languages would be best for work which may be taken a number of ways.

Which language will get you the best job? What is a good job? Which languages will get you a good job etc.

Everyone is free to use what they want of course and I hope they're free to express their thoughts on such subjects regardless of who disagrees? I'm simply expressed my oppinions about the posts I read as I came to them as everyone else here has. Unluckily there were a lot of good posts here and alot I wanted to reply to :).

The result is Trolling?

It's not my style to be false and keep my mouth shut – if I have something to say you can be sure i'll say it and I would hardly discribe this as Trolling but thats just me.

I wasn't trying to be disrespectful or anyone either but I obviously would like to see the equivilent if only out of personal interest, it was more to back up my claims :). People can talk until they're blue in the face and never back things up, I think I did that.

Anyway nice to meet you Sky, I've heard good things,

Mark.

Skywing

#68
I don't have a problem with you presenting arguments, but I would rather that the majority of your replies don't come barbed against those you do not share your point of view.  Sound arguments stand alone and don't need that kind of thing included.

All that accomplishes is making it more difficult for people to reply objectively to your statements.

Warrior

Quote from: netytan on February 01, 2006, 10:39 AM
Quote from: Warrior on January 31, 2006, 10:54 PM
If imagination (which seems by Yegg's standards) to make someone not efficient at programming...then no thanks.

Personally I define a good programmer as one who comes up with elegant and good solutions, this takes imagination. Not blindly following like a sheep so in this instance Yegg is right.

IMO any language which forces you to think in unnatural and or limited ways as C++ and others do can't be defined as a good language. Hence any programmer who thinks in this way is just working within the borders provided. The number of solutions available for a given task are slashed, often the most elegant.


I would challenge any programmer here to write in C++ or Java an equivalent to the accumulator function below, in purpose and elegance. If you can't then maybe I have a point lol, if you can then I must just be crazy but I doubt it ;).


> (define (make-counter i)                   ; Defines a function which returns a closure over i.
    (lambda (n) (set! i (+ n i)) i))
>
> (define (show-counter c)                   ; Define a function which shows the value of a counter.
    (c 0))
>
> ;;; The code below demonstrates these functions being in used. This could be extended with a
> ;;; symbol parameter to emulate OOP style fully but in practice there is little point.
>
> (define counter1 (make-counter 0))
> (counter1 1)
1
> (counter1 1)
2
> (counter1 1)
3
> (counter1 1)
4
> (counter1 2)
6
> (counter1 2)
8
> (counter1 2)
10
> (show-counter counter1)
10
>
> (define counter2 (make-counter 1))
> (counter2 1)
2
> (counter2 1)
3
> (show-counter counter2)
3
> (show-counter counter1)
10



This code encapsulates a number, which should be initalized. It allows numbers to be added to the counter through the closure (a more generalized form of what you call an instance, with some important differences) and for the current value to be show in a clear and protected manner; this being the reason for encapsulation.

Think you can do it? I will of course give some concesion for the fact that types in C++ are stricter so don't worry about that, not that this should be a problem anyway.

Finally:

From the list my vote was Ruby because of it's rapidly increasing popularity, some very well known programmers are also betting that it will overtake Java as the next big language (it just overtook Python in book sales with ease) so it may well be worth learning :). Of the OOP languages it is IMO the most flexible and is available on multiple platforms. Aside from that the growing user base is producing some very nice third party libs.

Take care all I'm off to read,

Mark.

If a specific method of programming has been time tested to work then I don't see the need to reinvent the wheel and possibly reduce the performance of the application as a result of it.
I don't know about you but I'm not going to let my performance suffer because  I want to have special looking code. Sure thinking outside the box is what a programmer should do, but that's when it comes to solving problems in programming and getting something done, not in terms of efficiency or using a programming style which will do more harm than good.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

netytan

Point noted Sky. Warrior what about writing smaller programs which allow for a greater degree of abstraction, which is often domain specific and includes less bugs while being more suited for the type of application at hand makes you think that your productivity would suffer by this?

Note: All of these statements may easily be proven though a short search on language  productivity and functional vs imperative programming on google.

The point was not to reinvent the wheel here but to provide an elegant functional comparison between the use classes and the more general and hence flexible closure. It was purely an excursive, and far more simple than anything likely to be done in a real program but one not as easy accomplished under less able paradigms.

If OOP, the ruling idea behind the design of modern software, can't provide an equally elegant solution to such a simple problem then how would it elegantly handle more complex uses of closures?

Take the definition of quick-sort in haskell as an example of seriously improved productivity.


qsort [] = []
qsort (x:xs) = qsort i_lt ++ [x] ++ qsort i_em
           where
               i_lt = [y | y <- xs, y < x]
               i_em = [y | y <- xs, y >= x]


Notes: ++ is the append operator and : is equivilent to cons in other languages. i_lt is a list of items less than x and i_em is a list of elements equal to or more than x.

If you've done any higher maths you should be able to follow this reasonably well right of the bat :). I'm not a math whiz lol, in fact I've never been much good with maths but I'm learning.

You're welcome to prove me wrong here using OO.

Mark.

MyndFyre

Quote from: netytan on February 01, 2006, 10:39 AM
I would challenge any programmer here to write in C++ or Java an equivalent to the accumulator function below, in purpose and elegance. If you can't then maybe I have a point lol, if you can then I must just be crazy but I doubt it ;).

I'm hardly a C/++ preprocessor expert, but here's my rough equivalent.   Note that I include cout in the macro because you're entering at a command-line and attempting to evaluate an expression, and I'm not.


#include <iostream>
// > (define (make-counter i)                   ; Defines a function which returns a closure over i.
//     (lambda (n) (set! i (+ n i)) i))
#define MAKE_COUNTER(N) (N) = (N) + 1; cout << N << endl;
// > (define (show-counter c)                   ; Define a function which shows the value of a counter.
//     (c 0))
#define SHOW_COUNTER(N) cout << (N) << endl;
// (define counter1 (make-counter 0))
#define COUNTER_1(count) for (int ___n = 0; ___n < (count); ___n++) { MAKE_COUNTER(number) }
// > (define counter2 (make-counter 1))
#define COUNTER_2(count) for (int ___n = 0; ___n < (count); ___n++) { MAKE_COUNTER(number2) }

int main(void);

using namespace std;
int main()
{
 int number = 0;  // > (define counter1 (make-counter 0))
 COUNTER_1(1)   // > (counter1 1)
 COUNTER_1(1)   // > (counter1 1)
 COUNTER_1(1)   // > (counter1 1)
 COUNTER_1(1)   // > (counter1 1)
 COUNTER_1(2)   // > (counter1 2)
 COUNTER_1(2)   // > (counter1 2)
 COUNTER_1(2)   // > (counter1 2)
 SHOW_COUNTER(number)   // > (show-counter counter1)

 int number2 = 1;   // > (define counter2 (make-counter 1))
 COUNTER_2(1)   // > (counter2 1)
 COUNTER_2(1)   // > (counter2 1)
 SHOW_COUNTER(number2)   // > (show-counter counter2)
 SHOW_COUNTER(number)   // > (show-counter counter1)

 return 0;  // syntactically correct but unnecessary if you prototype main() as void.
}


This is a poor example, in part because of the unnecessary use of macros, which I simply included because of the claim you made in the other thread about poor use of macros.  The entire program would have been much more easily written:


int main()
{
 int number = 0;
 for (int i = 0; i < 4; i++) cout << (++number) << endl;
 for (int i = 0; i < 3; i++) cout << (++(++number)) << endl;
 cout << number << endl;

 int number2 = 1;
 for (int i = 0; i < 2; i++) cout << (++number2) << endl;
 cout << number2 << endl;
 cout << number << endl;

 return 0;
}
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

netytan

#72
Awesome Mynd.

the problem is that where the output may be the same the effect is not. Data in your program isn't encapsulated/protected, its just a variable and that can be modified by simple assignment. As isn't the case with data within an object, which is what I expected someone to do so 100 out of 10 for original thinking :).

In either case though both pieces of code are longer and not as clear, in fact, where my code works by calling a function yours works via looping and incrementing a variable or in the first case though replacing text at preprocessor time.

The idea here was to provide protection for the counters internal storage; in a sense to prove the OO is not the only, or indeed best way to do this. Heres a formal specification for an accumulator function:

"A function that takes a number n, and returns a function that takes another number i and returns n incremented by i."

In terms of OO you can simply simply replace "function" in the spec, though I also added to this a way of viewing the value in the accumulator which should be present in your code:

"A class that takes a number n, and returns an instance that takes another number i (probably though a method) and returns n incremented by i."


My comment about "macros" wasn't so much that they were used badly but that they're just replacing text. Macros in a much truer sense allow complete access to the code (in fact there are examples of Macros being used to implement entire languages) this means the AST; the very guts of the code at compile time, not it's textual representation – Macros in the sense that C/C++ uses them are like a neutered puppy in comparison.

Maybe I wasn't as clear as I'd hoped while explaining what I wanted the programmer to do? Hopefully it makes more sense now, sorry :).

Mark.

dxoigmn

netytan,

Semantically, your scheme example is no different than creating a C++ class with some internal variable and an "add" method to modify this variable along with some property to retrieve the value.

You should try modifying your example so it doesn't use set! ;)

Banana fanna fo fanna

neytan, while he may be a troll, just illustrated a great point: everyone here missed the point that he was using a closure.

I voted Python.

However, eventually we are going to end up with a mix between Scheme and Smalltalk.

|