What programming language would you suggest to learn to a novice? I study C/C++ at university and I feel genuine hatred towards it. I also had Lisp classes in the previous term which I liked much more better, but people say it has not much application these days.
So far Python is always going to be my hands-down top suggestion for a first computer language to learn. It does away with the vast majority of stupid syntax things, albeit at the expense of some of the more advanced things they let you do, and lets you focus on learning the ideas behind the code that are similar amongst
all (or at least most
) languages.
That said once you have the basics down I'd honestly suggest revisiting some of the languages like C++. Not struggling to know the ideas behind the language (and therefore just needing to remember the little syntax gotchas) makes them much more palatable, and helps you to see the things that they are good for.
I can understand your hatred towards C/C++. It seems like a world of workarounds, hacks and quick ugly fixes for awful design decisions made ages ago (like that awful compilation process).
I used to feel that way too, at least until I actually looked into the reasoning behind a lot of those "workarounds, hacks, and quick ugly fixes", which is often just a sensible choice of "cost of X for benefit of Y". Things like compiling making a lot more sense once you realize that the cost in things like debugging on the fly and time are paid back by
huge increases in areas like optimization and running speed of the finished program. (If you manage to find me an interpreted language that can outperform a natively compiled language running the same code content then I'll applaud you
).
-snip-
One thing that that comes to mind is that because you weigh your diagonals the same as your orthogonal, the actual optimal path between any two cities is going to be a diagonal line for a number of squares equal to the minimum dimension followed by a number of orthogonal ones equal to max dim - min dim (though that's more for after you've actually solved what route you want to go).
If you haven't already you might want to check out the
Computing a Solution section on the wikipedia page on the problem. It has a variety of different optimizations and potential algorithms that function more efficiently than the naive one, and at this point you probably know more about the exact specifics of your problem (which can make a big difference in which implementation to select) than we do.