2

I am doing my dissertation project on NP-Hard Problems: I am going to implement various algorithms for problems such as the partition, the subset sum, the knapsack, etc and then compare the results, the running time, etc. Also, I am going to see what happens with the algorithms when you modify the problem (how does the algorithm behave on the reduced problem, etc).

Now I picked this topic as my project because I am interested in theoretical computer science but I am also not sure if I want to go on as an academic/researcher or join a company/startup and this project has both a theoretical and a practical (actual coding) side.

My question is, which programming language should I use? Should I stick to what I feel more familiar with (Java and maybe Python), or should I go with the web languages (HTML, CSS, PHP, RoR, etc), having in mind that web development skills are on high demand nowadays?

EDIT: HTML and CSS would be obviously used just for the UI.

I want my project to be something that will impress in an interview (for either a job or a masters course) and I am not confident that "yet another project in Java" can do that. I understand that as long as the work on it is good and the result is satisfactory I should be ok but if, let's say, using Ruby can give me some points I am totally going with that. In the same time, I understand that deciding which language to use is part of the project so I am not willing to complicate things just to try and look cool.

Thanks in advance!

EDIT: In case this changes any of the answers, this is a undergrad. dissertation project, not a PhD one.

4
  • 3
    Not a bad question, but I don't think stackoverflow is the best place for it.
    – Pointy
    Nov 1, 2010 at 21:34
  • I thought so but it looked like the most appropriate one (compared to all the other stackexchange places). Maybe Programmers or OnStartups?
    – user103798
    Nov 1, 2010 at 21:39
  • How are you planning to implement such algorithms in HTML and/or CSS?
    – Bart Kiers
    Nov 1, 2010 at 21:51
  • I guess I should edit my question to make that clear, I thought it was obvious: HTML and CSS would be used just to build the UI.
    – user103798
    Nov 1, 2010 at 21:53

8 Answers 8

5

First of all this is a subjective question, not perfectly suitable for SO, but we forgive you :)

Contrary to popular opinion here (looking at the previous answers), if you're trying to solve NP-Hard problems, I would definitely not write the programs in C or C++. Mainly because dynamic programming methods tend to look like absolute dog poop when written in low-level languages. For example, here's someone's dynamic programming solution to the knapsack problem: http://www.joshuarobinson.net/docs/knapsack.html.

It's well-written and well-formed, but barely readable simply due to the sheer amount of malloc, memcpy, and free you need to do. Go with Java or Python, no question about it. You want people to actually read (and maybe even enjoy?) your dissertation, I would assume.

Don't write it in PHP or Ruby because those languages aren't particularly applicable to computer science theory. With that said, if you're applying for a web-dev job and you're trying to impress your future employees with a knapsack problem or dynamic programming NP-Hard solvers, it's like shooting a sparrow with a cannonball.

3
  • Interesting that we live in a time where C++ is considered a low-level language. By comparison, I'd say you are correct.
    – Brad
    Nov 1, 2010 at 22:23
  • I sort-of cringed when I typed that and lo and behold someone caught me :P Nov 1, 2010 at 22:25
  • +1 for "like shooting a sparrow with a cannonball" - so right.
    – Skilldrick
    Nov 2, 2010 at 9:23
5

If your project's subject is impressive, no one will care what language it's in. Do it in the language you feel is appropriate for the task. Knowing how to make the appropriate language choice and defending that choice should be more impressive than "OMG I used RoR XSL ActionScript CSS!!!"

Also, how long do anticipate this project will take? If you go with a language that's flashy and trendy today, do you know it will still be cool and popular when this project wraps up? Just saying in another way, popularity is not the reason to choose the language for something like this.

1

if you can invest effort and time, then i recommend c/c++. it will be an impressive add-on skill.

0

My language of preference would be Python. You could use Django and, in my opinion, it would be very applicable to things that are being done in the industry (especially with startups). Plus, you can't beat Python when it comes to readability and speed of development.

0

I would have thought that Python would be doing too much clever stuff under the hood to really be able to measure relative performance accurately.

Wouldn't it be better to use a lower-level language like C? Employers would respect you more for that than using something because it's "cool".

1
  • I actually did a few algorithms implementations on C, for it being low level, but objects are going to make it much more easier. I take it your suggestion is C++ then?
    – user103798
    Nov 1, 2010 at 21:45
0

The languages you know look fine to me. The old saw is that a CS PhD makes you unemployable anyway, so I wouldn't worry about it. :-)

The other ones you mentioned are mostly specialized web presentation languages. I'm not real sure how one even goes about implementing the knapsack problem using CSS...

2
  • He doesn't. I was thinking HTML & CSS to create the UI and then PHP or another language to do the actual coding. Then again, I don't know, that's why I am asking.
    – user103798
    Nov 1, 2010 at 21:41
  • @sebkom - Ah, well there's certianly nothing wrong with doing that. Still, PhD's are enough work as it is. I wouldn't tack on learning four unfamiliar programming languages. Unless one of your advisors is a fan that is. :-D
    – T.E.D.
    Nov 1, 2010 at 22:06
0

Well, as much as this might look fine on the web page, it seems to me that Java would do a better job doing what you need.

PHP, HTML and CSS knowledge is good for job finding, but not applicable very much on the subject you picked.

Also, I noticed a bunch of answers, so I guess this is a question very much related to personal taste and opinion. Hm... You asked for it, anyways ;)

0

Since you're already familiar with Python, I'd recommend using it. You can use the popular scipy and numpy libraries for your project. You'll probably find something of use in them.

That would be the core, or backend part of your project. When this part is finished, you should think about polish and presentation. You don't want to have an impressive looking presentation with wrong calculations.