It is currently Thu Oct 31, 2024 4:28 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 92 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
Offline
 Post subject: Choosing a Programming Language
Post #1 Posted: Thu Nov 11, 2010 4:34 pm 
Lives in gote
User avatar

Posts: 448
Liked others: 127
Was liked: 34
Rank: Tygem 4d
GD Posts: 24
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

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #2 Posted: Thu Nov 11, 2010 5:03 pm 
Lives in gote
User avatar

Posts: 450
Location: Portland, OR USA
Liked others: 257
Was liked: 287
KGS: 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...

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #3 Posted: Thu Nov 11, 2010 5:59 pm 
Lives in gote
User avatar

Posts: 448
Liked others: 127
Was liked: 34
Rank: Tygem 4d
GD Posts: 24
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

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #4 Posted: Thu Nov 11, 2010 6:45 pm 
Lives with ko

Posts: 255
Location: Miyazaki, Japan
Liked others: 353
Was liked: 66
C++ is not a simple language.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #5 Posted: Thu Nov 11, 2010 6:48 pm 
Dies with sente
User avatar

Posts: 97
Liked others: 2
Was liked: 12
Rank: 3k
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.

_________________
19/02/2011: this grumpy person takes a voluntary holiday from L19.


Last edited by schilds on Thu Nov 11, 2010 6:54 pm, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #6 Posted: Thu Nov 11, 2010 6:52 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: 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.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #7 Posted: Thu Nov 11, 2010 8:10 pm 
Lives in gote

Posts: 302
Liked others: 70
Was liked: 8
Rank: DDK
KGS: Sujisan 12 kyu
OGS: Sujisan 13 kyu
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.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #8 Posted: Thu Nov 11, 2010 9:20 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Python isn't web based in the way that PHP or something is. There are web frameworks for it, of course.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #9 Posted: Thu Nov 11, 2010 10:12 pm 
Lives in gote
User avatar

Posts: 448
Liked others: 127
Was liked: 34
Rank: Tygem 4d
GD Posts: 24
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

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #10 Posted: Thu Nov 11, 2010 10:36 pm 
Lives with ko

Posts: 178
Liked others: 1
Was liked: 22
Rank: 2 dan
GD Posts: 10
KGS: 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....

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #11 Posted: Thu Nov 11, 2010 10:42 pm 
Dies with sente
User avatar

Posts: 97
Liked others: 2
Was liked: 12
Rank: 3k
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.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #12 Posted: Thu Nov 11, 2010 10:55 pm 
Gosei
User avatar

Posts: 1744
Liked others: 704
Was liked: 288
KGS: greendemon
Tygem: greendemon
DGS: smaragdaemon
OGS: 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.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #13 Posted: Fri Nov 12, 2010 3:05 am 
Lives in gote
User avatar

Posts: 643
Location: Munich, Germany
Liked others: 115
Was liked: 102
Rank: KGS 3k
KGS: LiKao / Loki
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.

_________________
Sanity is for the weak.


Last edited by Li Kao on Fri Nov 12, 2010 3:23 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #14 Posted: Fri Nov 12, 2010 3:14 am 
Gosei

Posts: 1348
Location: Finland
Liked others: 49
Was liked: 129
Rank: FGA 7k GoR 1297
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

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #15 Posted: Fri Nov 12, 2010 3:25 am 
Dies in gote
User avatar

Posts: 38
Location: Cachan, Paris, France
Liked others: 0
Was liked: 14
Rank: FFG 5k
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

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #16 Posted: Fri Nov 12, 2010 4:14 am 
Dies in gote

Posts: 61
Liked others: 57
Was liked: 19
I don't know what your main goal is, but if this is mainly to broaden horizons and further your education you should consider functional languages as well, like haskell or something like scheme. If you stick with programming you will never regret learning one of these.

Also, the project does indeed seem quite ambitious, maybe if you start with only an SGF parser you will be busy for a few weeks, and decide to switch languages based on your experience then :)

If you only want something to put into your CV, Java is still your best bet. Same goes if portability is an issue. The performance will not be an relevant with normal sized databases (<100k), or at least not due to language limitations.

Then again i mainly use C++ and it does have it's advantages, and for a go playing engine it would be my first choice.

If you do think you can stick with such a large project, i cannot recommend any scripting language such as Python, Ruby or Perl. These are the modern day Visual Basic in my opinion, good for small scale stuff and quick hacks, easy to learn and more lenient with some bad practices but unsuitable for any large application.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #17 Posted: Fri Nov 12, 2010 6:51 am 
Lives in sente

Posts: 1040
Liked others: 0
Was liked: 182
I agree that learning programming "functional" rather than "procedural" not necesarily a bad idea (the "functional" programmers usually know that they can prove equivalent but the "procedural" programmers usually haven't clue about the "functional" alternative)

But I disagree that this is necessarily a matter of choice of language. You can treat C as a functional language even though 99% of C programmers/programs use it procedurally. After I retired and began doing things like learning C and on a list where a language argument broke out I got challenged to rewrite one of my learning exercises as a pure function. Wasn't that hard. BTW -- you can ignore my use of C instead of C++. Just means I'm one of the old hands who would be writing the object defintions for a project. So I'd normally "roll my own". Hey, in the original C book the exercises were constructing your own definitions for the functions that came built in (the "standard library").

Programming languages is not the place to start. You need to learn how to design programs (algorithms or functions) irrespective of in what language they will be implemented. It's normal to learn this in the context of a particular language but that's only because you need some way to try out what you are learning. If at the end you only can conceive of doing it in that language (too concrete) then you haven't learned programming.

Don't try to run before you can walk. You will need to start out with simple problems.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #18 Posted: Fri Nov 12, 2010 7:45 am 
Lives with ko
User avatar

Posts: 295
Location: Linz, Austria
Liked others: 21
Was liked: 44
Rank: EGF 4 kyu
GD Posts: 627
nagano wrote:
... but also be faster than something like Java ...


Java is faster. Seriously. If you want faster than Java, C/C++ is pretty much your only option, but only if you know how to exploit the performance advantages of C++. If not, Java is faster.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #19 Posted: Fri Nov 12, 2010 8:02 am 
Lives in gote

Posts: 338
Location: Las Vegas, NV
Liked others: 163
Was liked: 62
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.


I agree with fwiffo.

Even though I am typically a C++ zealot.

People get down on python because interpreted languages are "slow". I once wrote a serious project in python for work. The philosophy was we would rapid prototype in python, and when we finally hit the performance wall, we would re-implement key algorithms in c++ for speed. guess what? We never had performance issues. the final product shipped 100% python code.

Even though at the start of the project I was an experienced C++ programmer, but a first day beginner to python. I know for a fact that the total time to learn python AND complete the project was faster than if the team had done the project in C++ from the start.

Top
 Profile  
 
Offline
 Post subject: Re: Choosing a Programming Language
Post #20 Posted: Fri Nov 12, 2010 9:19 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Quote:
People get down on python because interpreted languages are "slow". I once wrote a serious project in python for work. The philosophy was we would rapid prototype in python, and when we finally hit the performance wall, we would re-implement key algorithms in c++ for speed. guess what? We never had performance issues. the final product shipped 100% python code.

^^^ This

95% of the time if your project is running too slow it has nothing to do with your choice of programming language. It could be IO bound. It could be a badly designed algorithm. It could be computationally intractable. Premature optimization is usually a bad idea (you should get it working correctly, then optimize), and preemptive optimization through choice of language is particularly bad.

@nagano: Given that you don't have much programming or CS background, this might be a pretty ambitious project for a first programming project. Searching a database of go games efficiently is something I would describe as a Hard Problem. You might want to choose something simpler for a first project.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku


This post by fwiffo was liked by: jdl
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 92 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group