views:

357

answers:

4

In visually testing interfaces where code might live what do you use for your particular language for a standard? "Hello World" is not sufficiently complex enough in most cases. I am particularly interested in Perl but C#, C, C++, and Java are coming up.

Per the comment:

Lets say you created a new IDE, color scheme, or a web page where code will be placed by you or others. You want to see what your changes look like with stuff that looks like with typical code. Lorem Ipsum is used by type setting programs but it isn't really code.

A: 

I think you may have a hard time fitting what you are after all on one page. You should make sure to utilize all keywords. Check out the Perltidy Style Key, as that might help you.

Christopher Morley
A: 

a quick wikipedia search of "<name of prog language> keywords" will give a nice article for most that contains the keywords.

things you can test (top of my head):

arithmetic operators

object creation and deletion (if supported)

declaration of types

importing external libraries or functions

Scott M.
+1  A: 

I'd probably open up one (well, a few) of my code files. Because they contain the sort of code I work with on a daily basis.

Artelius
+1  A: 

I'd suggest you create a code sample for each such language you're interested in, and have it in a file.

e.g. sample.c, sample.py, sample.java, etc.

Editra uses such files to test syntax coloring and stuff.

http://svn.wxwidgets.org/svn/wx/wxPython/3rdParty/Editra/tests/syntax/

hasen j