You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

CronoDAS comments on More intuitive programming languages - Less Wrong Discussion

4 Post author: A4FB53AC 15 April 2012 11:35AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (89)

You are viewing a single comment's thread. Show more comments above.

Comment author: CronoDAS 16 April 2012 02:28:43AM 1 point [-]

A related question: how much would a beginner have to study before being able to write Tetris? As I said, I graduated with a degree in computer engineering without being able to code Tetris, because I have no idea how to write anything except console programs that use cin and cout to do all the input/output work. "Draw something on the screen, and have it move when someone presses a key" would seem to be a fundamental task in computer programming, but apparently it's some kind of super-advanced topic. :P

Comment author: Emile 16 April 2012 06:14:12AM 2 points [-]

The focus on cin / cout as opposed to GUI is probably because cin is simple and always works the same way (mostly because nobody uses it, no need for a zillion libraries), whereas there are a lot of very different GUI libraries with different ways of doing things; learning one of those would take time and not help you use another one much.

If you want to learn yow to make a GUI you can probably find a "hello world" example for your language/os of choice and just copy-paste the code and then adjust it to suit your needs.

Comment author: CronoDAS 16 April 2012 08:41:45PM 2 points [-]

Yeah... everything is in libraries these days and the libraries are all incompatible with each other. :(

Comment author: ShardPhoenix 16 April 2012 03:18:10AM *  2 points [-]

It's not as hard as it might sound. Modern languages have nice libraries and frameworks that make input and basic graphics very easy. Here's a tutorial for Slick (a Java-based 2D game framework) that walks you through how to do exactly what you ask: http://slick.cokeandcode.com/wiki/doku.php?id=01_-_a_basic_slick_game

Here's a tutorial for how to make Tetris: http://slick.cokeandcode.com/wiki/doku.php?id=02_-_slickblocks

I'm sure similar things exist for C++, especially since it's the most popular language for making games in.

edit: If you want to actually follow one of the above tutorials, see this setup info first: http://slick.cokeandcode.com/wiki/doku.php?id=getting_started_and_setup

Comment author: Nornagest 16 April 2012 09:11:56PM *  1 point [-]

Probably not too long. I wrote (a crappy version of) Breakout in my second semester of high-school programming, and that was using Pascal plus some homebrewed x86 assembler for the graphics (both of which were a nightmare that I wouldn't recommend to anyone), so simple games clearly don't require any deep knowledge of the discipline; if you've got a computer-engineering background already and you're working with a modern graphics library, I'd call it a couple weeks of casual study. Less if you're using a game-specific framework, but those skills don't usually transfer well to other things.