5 ms·
This is a very good question and it is a hard one. I tend to have a standard set of problems that I use to take my first steps with a language. A very simplist
by cessor 13y ago
This is a very good question and it is a hard one. I tend to have a standard set of problems that I use to take my first steps with a language.
A very simplistic thing to do is to generate a "signature survey": http://c2.com/doc/SignatureSurvey/ http://c2.com/doc/SignatureSurvey/
This generates a simple metric over c-type language code and includes walking a project folder structure and print out all {} and ; (blocks and statements) to get an overview over the complexity of the project.
Another one is "Folder Cleanup". I am a compulsive (Windows-) desktop hoarder. After a while my desktop gets so crowded with symbols that I move them into a certain folder, which I usually name after German dumpsites for nuclear waste. The script sorts files by their types and puts them into certain folders.
This one helps one to explore basic syntax, code structuring, modularity, fs access, working with data structures (recursive descent into dir trees), blacklisting of certain filetypes and so on.
These are very simple generic problems that one can do that in any language; it helps to compare the learing effort for the language and its syntactic and semantic power, for it is a very controlled, well understood problem. Beats hello world, but I am aware that these are not specific to show off what "side" a language "is on".
With python anything will do, but writing a webserver in r can be quite tedious I believe. If a langauge claims to be a general purpose language (as do f# and haskell) the aforementioned problem could do the trick.