General Programming Language

A place to discuss the science of computers and programs, from algorithms to computability.

Formal proofs preferred.

Moderators: phlip, Moderators General, Prelates

Scytheandsickle
Posts: 7
Joined: Sun Mar 15, 2009 1:04 am UTC

General Programming Language

Postby Scytheandsickle » Sun Mar 15, 2009 2:04 am UTC

What is a good general programming language? It seems to be C or C# in my opinion, but from what I've heard C# is Microsoft Java but I don't know if it is that extreme. Is C# as slow as Java or is there a better general programming language?

User avatar
Xanthir
My HERO!!!
Posts: 5423
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: General Programming Language

Postby Xanthir » Sun Mar 15, 2009 2:37 am UTC

What do you mean by "general programming language"?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
Strilanc
Posts: 646
Joined: Fri Dec 08, 2006 7:18 am UTC

Re: General Programming Language

Postby Strilanc » Sun Mar 15, 2009 3:35 am UTC

I think he means high-level, in which case C# is a great language.
Don't pay attention to this signature, it's contradictory.

Scytheandsickle
Posts: 7
Joined: Sun Mar 15, 2009 1:04 am UTC

Re: General Programming Language

Postby Scytheandsickle » Sun Mar 15, 2009 4:15 pm UTC

Not "high level" but like for independent programmes. I guess what is a language with good File I/O and easy to make GUIs?

Sorry. I can't think of a better definition.

Captain_Thunder
Posts: 83
Joined: Tue Mar 27, 2007 9:18 pm UTC

Re: General Programming Language

Postby Captain_Thunder » Sun Mar 15, 2009 4:30 pm UTC

Python is a very easy language that has libraries for all common tasks, including GUIs and any type of IO you want. C# and Java are also suitable choices (although Java's support for non-Microsoft platforms is better than C#'s).

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: General Programming Language

Postby headprogrammingczar » Sun Mar 15, 2009 6:03 pm UTC

Java GUIs end up looking god-awful though, unless you make an effort to know what you are doing.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: General Programming Language

Postby Emu* » Sun Mar 15, 2009 7:13 pm UTC

Java and C# are not slow. Programming "for speed" will waste more of your time than the sum total of the time saved for your users unless you're working on an OS or Office package.
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

User avatar
Yakk
Poster with most posts but no title.
Posts: 11129
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: General Programming Language

Postby Yakk » Mon Mar 16, 2009 1:29 am UTC

If you want a language in which you can do systems programming, and application programming, and solve high level problems, you want either C or C++.

If you have no interest in systems or low-level application infrastructure, then many many programming languages make it much easier than using C/C++ to solve the problem. But doing really low level stuff in a language like C# or Java on generic hardware (not hardware designed to run Java bytecode, for example) is not practical.

If your goal is to use programming to make your non-programming tasks easier, learning a scripting language like python will be the best route. Python is powerful enough that creating simple or applications completely in it is good. And you can use it to hook into a lower level engine in the performance sensitive part of the game.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: General Programming Language

Postby Shriike » Mon Mar 16, 2009 3:07 am UTC

Scytheandsickle wrote:I guess what is a language with good File I/O and easy to make GUIs?

In my personal experience no language has made it easier to do file IO then Python. Also in my experience no language has made it easier to generate GUI then C# (though I know a lot of people will argue with me about that).

If a nice looking GUI is your main concern, I say by all means go with C#, if you want to be able to do a lot of tasks easily, I say Python.

Also as a note, with Python you can use something like Glade to generate GUI for you, I've tried it once, haven't had the best luck with it, so I didn't stick with it. I only bring this up because I know someone will talk about something like that as a reason why Python has easy to generate GUI.
Image

User avatar
scarecrovv
It's pronounced 'double u'
Posts: 674
Joined: Wed Jul 30, 2008 4:09 pm UTC
Location: California

Re: General Programming Language

Postby scarecrovv » Mon Mar 16, 2009 6:03 am UTC

Emu* wrote:Java and C# are not slow. Programming "for speed" will waste more of your time than the sum total of the time saved for your users unless you're working on an OS or Office package.

It's true that for most GUI applications for most users, speed is unimportant. However, if you're doing real time, or very computationally intensive things, like flight simulators, finding prime numbers, place-and-route software for FPGA programming, etc, execution speed is paramount. In some cases, in fact, it's better to be fast than to do a good job.

User avatar
Yakk
Poster with most posts but no title.
Posts: 11129
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: General Programming Language

Postby Yakk » Mon Mar 16, 2009 2:28 pm UTC

In GUI programming, latency and responsiveness are important.

Which, surprisingly, has little to do with 'speed' and more to do with "it doesn't lock up on me".
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: General Programming Language

Postby Emu* » Mon Mar 16, 2009 2:45 pm UTC

ie keep your processing and gui generation code in separate threads, with appropriate use of hourglasses and progressbars!
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

User avatar
kromagnon
Posts: 26
Joined: Thu Jul 19, 2007 10:06 pm UTC

Re: General Programming Language

Postby kromagnon » Thu Mar 19, 2009 7:26 pm UTC

Anything with a GUI - C# : Visual studio 2008.NET is free* and has hands down the best GUI creator I've ever used.

Command Line - Python: Simply an amazing language, very intuitive and quick to learn.

Code: Select all

import antigravity


Learn both of these, one is not better than the other, they both work great for completely different problems. (I know, I know, you can use either language for both purposes, but I think this way is best)



*the free version is free.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: General Programming Language

Postby headprogrammingczar » Thu Mar 19, 2009 8:20 pm UTC

You can hook a Python interpreter into C(#/++). That gives you the best of both worlds. One guy on the forum uses Python as a developer's console in his game.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

elminster
Posts: 1560
Joined: Mon Feb 26, 2007 1:56 pm UTC
Location: London, UK, Dimensions 1 to 42.
Contact:

Re: General Programming Language

Postby elminster » Thu Mar 19, 2009 9:12 pm UTC

The Visual Studio .Net environment and C# together make for quick and easy file IO and GUI applications.
In most cases speed isn't a factor; in the rest, a well crafted algorithm will make more difference than the language in most cases.

Also, what Yakk & Emu* said. Users get frustrated that programs aren't telling them what's going on or aren't allowing them to interact, not that they have to wait 5% longer.
Image

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: General Programming Language

Postby OOPMan » Fri Mar 20, 2009 9:10 am UTC

If you'd like to develop GUI applications that are not platform locked then Java would be a better choice than C#.

Mono !== .NET or Banshee would already be up and running on Windows.

I would like to punt Python and PyQt for cross-platform GUI development, but at this point PyQT is still fairly hackish and getting the apps up and running on non-Linux platforms takes some work :-/
Image

Image

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: General Programming Language

Postby Shriike » Fri Mar 20, 2009 2:16 pm UTC

OOPMan wrote:If you'd like to develop GUI applications that are not platform locked then Java would be a better choice than C#.


I'll admit C#'s really better on windows (mono doesn't have everything), but could you recommend a tool for desiging Java GUI's? Not that I doubt they exist, I just feel your recomendation to use java is incomplete without it.
Image

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: General Programming Language

Postby Emu* » Fri Mar 20, 2009 2:34 pm UTC

Eclipse or Netbeans?
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: General Programming Language

Postby 0xBADFEED » Fri Mar 20, 2009 2:42 pm UTC

Emu* wrote:Eclipse or Netbeans?

When I was doing Java development daily I used both. I much prefer Eclipse for general development, but at the time (a couple years ago) the Netbeans GUI builder was just so much better than anything on Eclipse. I don't know what the current state of Eclipse GUI builders is. Maybe they've improved since then.

Also, I was doing Swing development. If you're using SWT then I would imagine Eclipse is no-brainer.

User avatar
awec
Posts: 48
Joined: Fri Dec 12, 2008 1:48 am UTC

Re: General Programming Language

Postby awec » Fri Mar 20, 2009 6:21 pm UTC

Whilst NetBeans can make pretty good java gui's, it's no good to learn with because it generates a lot of unneeded code and hides it etc etc.

Making a GUI (the manual way - no gui builder) in Java is incredibly simple, just google or get a java book and you can set them up in minutes. Honestly.

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: General Programming Language

Postby Shriike » Fri Mar 20, 2009 6:43 pm UTC

awec wrote: Making a GUI (the manual way - no gui builder) in Java is incredibly simple, just google or get a java book and you can set them up in minutes. Honestly.


I disagree with this, sooner or later you should figure out how to make gui's the manual way, but for most things you'll want to do some kind of automated gui builder (especially if you really care how it looks), just to save time.
Image

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: General Programming Language

Postby 0xBADFEED » Fri Mar 20, 2009 7:03 pm UTC

awec wrote:Making a GUI (the manual way - no gui builder) in Java is incredibly simple, just google or get a java book and you can set them up in minutes. Honestly.

This really depends on how complex the ui needs to be and what LayoutManager you use. If you don't really care about positions of elements and can get away with something like FlowLayout or BoxLayout then you're right, it's very simple. Once you start wandering into GridBag territory though it quickly becomes a pain. GroupLayout (which is what the Netbeans GUI builder uses) is pretty straigtforward once you get the hang of it but is really designed to be used in conjunction with an automated layout tool and is kind of a pain to code against directly.
Shriike wrote:I disagree with this, sooner or later you should figure out how to make gui's the manual way, but for most things you'll want to do some kind of automated gui builder (especially if you really care how it looks), just to save time.

You should understand how your GUI builder works internally, but whether you start out with a GUI builder or doing it manually is not really important. Both have their up-sides and down-sides and I think an equally strong case could be made for starting out on either.

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: General Programming Language

Postby Emu* » Fri Mar 20, 2009 7:53 pm UTC

So long as you use appropriate layout managers and don't forget to consider nesting the containers, it's not that bad. I don't like having to work hard to understand what the gui builders write for me.
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

User avatar
awec
Posts: 48
Joined: Fri Dec 12, 2008 1:48 am UTC

Re: General Programming Language

Postby awec » Fri Mar 20, 2009 9:05 pm UTC

Emu* wrote:So long as you use appropriate layout managers and don't forget to consider nesting the containers, it's not that bad. I don't like having to work hard to understand what the gui builders write for me.

This is what I was trying to say. :)

The GUI builders generate code that is far more "bulky" than anything I'd write to do the same thing. A lot of the stuff I actually have to go lookup to see what the hell its for.

notallama
Posts: 236
Joined: Fri Jun 01, 2007 4:28 pm UTC

Re: General Programming Language

Postby notallama » Fri Mar 20, 2009 9:45 pm UTC

good general purpose languages:
python
lisps (mainly clojure and plt scheme. common lisp is a bit of a dinosaur)

maybe perl or ruby or something. i have not tried those ones, though.

i'd stay well away from java/c++/c# without a team of people.
c is good for small text based programs. other than that, it falls in the same group as java and such.

User avatar
Mach1ne
Posts: 35
Joined: Tue Feb 24, 2009 5:20 pm UTC
Location: This exact location but 3 minutes from now

Re: General Programming Language

Postby Mach1ne » Sat Mar 21, 2009 2:13 pm UTC

I would agree that a good general language and not to complex to dive into would be python. JAVA is also not that hard.

C\C++ are good too but that are not strongly typed languages and have other features that make them a little more difficult to fully grasp (atleast I thought so) but they both can be extremely powerful.


Return to “Computer Science”

Who is online

Users browsing this forum: No registered users and 5 guests