Choosing a Programming Language

For discussing go computing, software announcements, etc.
Post Reply
User avatar
nagano
Lives in gote
Posts: 448
Joined: Wed Apr 28, 2010 6:44 pm
Rank: Tygem 4d
GD Posts: 24
Has thanked: 127 times
Been thanked: 34 times

Choosing a Programming Language

Post by nagano »

I have a mind to try and create a go database program, something similar to Mastergo or Moyogo, but better. I don't have any real experience with programming yet, but based on what I've read C++ sounds like the best choice for this type of program. I'd be curious about your opinions about this. And yes, I know I'm insane to be so ambitious. :)
"Those who calculate greatly will win; those who calculate only a little will lose, but what of those who don't make any calculations at all!? This is why everything must be calculated, in order to foresee victory and defeat."-The Art of War
User avatar
wms
Lives in gote
Posts: 450
Joined: Tue Apr 20, 2010 4:23 pm
GD Posts: 0
KGS: wms
Location: Portland, OR USA
Has thanked: 257 times
Been thanked: 287 times
Contact:

Re: Choosing a Programming Language

Post by wms »

Ummmm...you know the dangers of asking the internet about the best programming language, don't you? It could get very hot in here very soon...
User avatar
nagano
Lives in gote
Posts: 448
Joined: Wed Apr 28, 2010 6:44 pm
Rank: Tygem 4d
GD Posts: 24
Has thanked: 127 times
Been thanked: 34 times

Re: Choosing a Programming Language

Post by nagano »

Yes, but I'm not asking for the "best" language... I guess what I'm looking for is a language that would be simple enough to code but also be faster than something like Java and versatile enough to deal with databases and server connections well.
"Those who calculate greatly will win; those who calculate only a little will lose, but what of those who don't make any calculations at all!? This is why everything must be calculated, in order to foresee victory and defeat."-The Art of War
imabuddha
Lives with ko
Posts: 255
Joined: Tue Apr 20, 2010 12:40 pm
GD Posts: 0
Location: Miyazaki, Japan
Has thanked: 354 times
Been thanked: 66 times

Re: Choosing a Programming Language

Post by imabuddha »

C++ is not a simple language.
User avatar
schilds
Dies with sente
Posts: 97
Joined: Thu Jun 03, 2010 8:09 pm
Rank: 3k
GD Posts: 0
Has thanked: 2 times
Been thanked: 12 times

Re: Choosing a Programming Language

Post by schilds »

What platform are you targeting? I assume it'll have a GUI?

The latter 2 issues you listed (databases, networking) will have similar library support whichever language you choose as long as it's reasonably mainstream. I think platform and tools/libraries are the first things you need to consider.
Last edited by schilds on Thu Nov 11, 2010 6:54 pm, edited 1 time in total.
19/02/2011: this grumpy person takes a voluntary holiday from L19.
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Choosing a Programming Language

Post by fwiffo »

Since you don't have much programming experience, I suggest Python. It's a very good learning language, and fun to work with.

C++ has its place, but it is much more difficult.
Suji
Lives in gote
Posts: 302
Joined: Wed May 19, 2010 2:25 pm
Rank: DDK
GD Posts: 0
KGS: Sujisan 12 kyu
OGS: Sujisan 13 kyu
Has thanked: 70 times
Been thanked: 8 times

Re: Choosing a Programming Language

Post by Suji »

imabuddha wrote:C++ is not a simple language.


No, it isn't. However, there is a learning curve to every programming language.

fwiffo wrote:Since you don't have much programming experience, I suggest Python. It's a very good learning language, and fun to work with.

C++ has its place, but it is much more difficult.


Just a random question, isn't python web-based?

Nagano: You might want to consider PHP, too.
My plan to become an SDK is here.
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Choosing a Programming Language

Post by fwiffo »

Python isn't web based in the way that PHP or something is. There are web frameworks for it, of course.
User avatar
nagano
Lives in gote
Posts: 448
Joined: Wed Apr 28, 2010 6:44 pm
Rank: Tygem 4d
GD Posts: 24
Has thanked: 127 times
Been thanked: 34 times

Re: Choosing a Programming Language

Post by nagano »

schilds wrote:What platform are you targeting? I assume it'll have a GUI?

The latter 2 issues you listed (databases, networking) will have similar library support whichever language you choose as long as it's reasonably mainstream. I think platform and tools/libraries are the first things you need to consider.

I am mostly focused on windows, though I would like it to have as wide a compatibility as possible. Of course it will have a GUI! :shock: I'm aware that most languages can support those features, but I read that languages such as Java or Python are slower than C++ and not necessarily as good with data intensive applications. I don't know if its just because many of those applications haven't been coded well, but I've noticed Java applications tend to run slower than most other programs on my computer. I'm talking about very large databases here, think Chessbase (>1 million games). As for the libraries, I don't know enough about the differences to really say. I guess that's one of the areas I could use some help. Question: what was Chessbase written in?
Suji wrote:Nagano: You might want to consider PHP, too.

I want the program to be accessible offline. Is that possible with PHP?
"Those who calculate greatly will win; those who calculate only a little will lose, but what of those who don't make any calculations at all!? This is why everything must be calculated, in order to foresee victory and defeat."-The Art of War
usagi
Lives with ko
Posts: 178
Joined: Mon Jul 19, 2010 10:32 am
Rank: 2 dan
GD Posts: 10
KGS: usagi
Has thanked: 1 time
Been thanked: 22 times

Re: Choosing a Programming Language

Post by usagi »

fwiffo wrote:Since you don't have much programming experience, I suggest Python. It's a very good learning language, and fun to work with.

C++ has its place, but it is much more difficult.


Nods to python. Personally I used to be a big C++ programmer but the syntax became laborous. It always ended up feeling more like C.

Nowadays I stick to Java for one reason only; it's the only language that lets me code a mind map (I prefer idea based, top down design).

I think the choice of language should come mainly based on how you are thinking of writing your program. If it's a giant project and you hope to actually finish it, and you're not an extremely experienced programmer, I could only recommend a strongly typed object oriented language. Possibly completely object oriented. I'm trying to stop myself from saying ruby. Maybe Java.

FWIW I never did ever finish anything I ever wrote in C or C++. But I finished everything I tried writing in Java....
User avatar
schilds
Dies with sente
Posts: 97
Joined: Thu Jun 03, 2010 8:09 pm
Rank: 3k
GD Posts: 0
Has thanked: 2 times
Been thanked: 12 times

Re: Choosing a Programming Language

Post by schilds »

php would normally imply some kind of web application served through a browser (php on the server end).

With regards to speed, you're somewhat correct, but it's more a question of what sort of processing you're doing and how much of it. If you're trawling through a million games, disk i/o might end up being the bottleneck, rather than calculations, in which case you could pick a language based on comfort (or whatever).

Do you know what sort of number crunching is involved? Might something like R (http://www.r-project.org/) provide appropriate libraries?
19/02/2011: this grumpy person takes a voluntary holiday from L19.
User avatar
emeraldemon
Gosei
Posts: 1744
Joined: Sun May 02, 2010 1:33 pm
GD Posts: 0
KGS: greendemon
Tygem: greendemon
DGS: smaragdaemon
OGS: emeraldemon
Has thanked: 697 times
Been thanked: 287 times

Re: Choosing a Programming Language

Post by emeraldemon »

fwiffo wrote:Since you don't have much programming experience, I suggest Python. It's a very good learning language, and fun to work with.

C++ has its place, but it is much more difficult.



Quote For Truth. I program regularly in C++ and python (and some other things) but if you don't know any programming language, I'd say learn python first. Second choice would probably be Java. Yes, python is slower than good C++. But if you actually get the whole thing working and it's just too slow, you can use a python/c api to speed up the critical sections. I doubt that will be your main problem, though.

That said, whatever language you choose, good luck! The best way to learn programming is to have a project you're interested in.
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Choosing a Programming Language

Post by Li Kao »

C++ is a quite complex language and has many pitfalls. I'd rather avoid it as a beginner.

I'd use either C# or Java for this project. Java is currently better supported on platforms other than windows and has more libraries in certain areas, and C# is the more powerful language. In particular C# supports custom value types and Linq.

The performance of programs written in either language isn't too bad compared to C++ (they are statically typed and thus easy to compile to efficient code), but they usually use quite a bit more RAM than a comparable C++ program. But that's more relevant if you write a background program running all the time, which isn't the case for you.

You could use a dynamically typed language such as python. They typically create slower programs since it's hard to optimize dynamically typed code. They miss the safety net of static typing, i.e. many errors are only noticed at runtime and not at compiletime which is the reason I personally don't like them much. On the plus side they are more flexible and code written in them is usually a bit shorter.

Performance is C++ > C#/Java > Python&co

Personally I'd recommend C# since you are working on windows and it's powerful and a good compromise between performance and ease of use. With Visual Studio Express you also get a good IDE for free. (If you decide to use Java you probably want to use Eclipse which is free too). It is possible to use C# programs on Linux with the Mono runtime.

And use version control even if you are the only developer. I currently use Git with the SmartGIT GUI and prefer it over Subversion since it's less intrusive and doesn't litter .svn directories everywhere.
Last edited by Li Kao on Fri Nov 12, 2010 3:23 am, edited 1 time in total.
Sanity is for the weak.
tj86430
Gosei
Posts: 1348
Joined: Wed Apr 28, 2010 12:42 am
Rank: FGA 7k GoR 1297
GD Posts: 0
Location: Finland
Has thanked: 49 times
Been thanked: 129 times

Re: Choosing a Programming Language

Post by tj86430 »

If you are developing only for yourself, then it's fine to develop to the platform you are using (although you might kick yourself if you decide to switch later). If you are targeting a wider audience, I see no reason to limit the usage to one platform. Choose an universally available platform (I'd go with Java).

As many have pointed out, C++ is not easy. You may be able to write the program in about the same time, but as you are not an experienced programmer, you will spend at least one order of magnitude more time on debugging and hunting down all those weird errors caused by incorrect pointer arithmetic etc.

e: WRT Java IDEs NetBeans is a good, also free, alternative to Eclipse (and you can use the same IDE for JavaFX, Ruby, PHP, Groovy and C/C++ as well)
Offending ad removed
User avatar
Gilles
Dies in gote
Posts: 38
Joined: Sat Apr 24, 2010 1:28 am
Rank: FFG 5k
GD Posts: 0
Location: Cachan, Paris, France
Been thanked: 14 times

Re: Choosing a Programming Language

Post by Gilles »

nagano wrote:I have a mind to try and create a go database program... I don't have any real experience with programming yet...
You will end with a huge amount of experience.
nagano wrote:something similar to Mastergo or Moyogo
You forget kombilo (python) and libkombilo (c++). Both are open source.

By the way, Moyogo, as Drago, is written in Delphi.
Drago is freeware
Post Reply