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

Having tried to tutor beginning programmers in Java, there are a lot of things that bug me. There is a lot of boilerplate and cruft that must exist in order to get anything done, and the type system and visibility just gets in the way until you want to teach people how to architect large programs.

Each class must be in its own file, and the execution starts from "public static void main(String[] args)" inside it. Then you have to deal with complex data types very early: python's set of primitives is much richer, which is great when teaching. Also, doing IO in Java is a pain unless you distribute a library.

To those who think Python's significant whitespace is a problem, I think you need to watch an otherwise intelligent beginner struggle with an error on line 80 because they mismatched their braces on line 20. If you aren't properly indenting your code, it becomes an unreadable mess anyways, so why not enforce it at a language level? And if you think an IDE can do this for you, think again. People just complain that it does things wrong when it indents half their methods by 2 extra tabstops because they missed a brace. They don't really get it, they just get into a feedback loop where they say, "Oh, it won't compile. Let me scan the entire program counting braces" which is a waste of everyone's time. I've seen people go entire semesters without ever learning to write readable indented code.



I "got" indentation after spending 2 days hunting down some bug in calculations only to have the teacher take 1 minute to reformat the code and another minute to point out an instruction that was sitting in the inner loop. With proper formatting it was a glaringly obvious mistake...




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: