Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had an idea for how to reduce errors when programming among many languages. You choose a language to 'get in the zone with' (in your profile you have already put all the languages you work with.) So, say you choose "C++". It would flash some code and what it's supposed to do, and you put in whether it's right (compiles and does what the comment says) or wrong (doesn't compile or doesn't do what the comment says).

The key is that the examples it flashes exactly try to cover the code mistakes/syntax errors (even things that don't compile!) that you would normally create in the first few minutes or hours - before you're 'in the zone' when coming from one of the other languages in the list. Things like leaving off a semicolon when coming from Python to C++. You can be an experienced C++ programmer, but after long hours of python, you need a period of adjustment. Isn't this the most dangerous time to code?

So if you put that you want to get in the zone with C++, but in your profile Python is listed, then some of the examples will be missing a semicolon while being indented properly. If you put a language that uses eq instead of ==, . instead of +, this is brought up a couple of times. All the things that separate languages - so that in the first few error-prone hours of transition you leave them out or forget them at times - are brought right to the front so that you can produce much higher-quality code in your 'target language' after 'zoning up.' What do you guys think?

Pedagogically, it may be better not to flash incorrect code, but instead make you write the code. But ask you to write code such that it explicitly tests something that may trip you up coming from one of your other languages.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: