Allman-style option


#1

Hello guys!

I've been hanging around this website for some time now, and I really value the courses here. I consider myself a novice scripter with some knowledge of C/C++. I like spending time on the courses here, such as the one for PHP, and I appreciate how in-depth most of the lessons are considering I have a significant learning-disability.

However, one thing that stumped me a lot and has made me refrain from completing some courses is the indent style. I know this might sound like a nitpick, but the "K&R" style really makes code a lot harder to read for me, and thus makes me spend a lot of time reading or editing the code to "Allman" style so I can easily scan my eyes across the code and get an idea of what it does. Now, I don't want to get into a debate on what the "best" style is, since this is purely subjective and mostly just based on preference, but I think it would be really neat to have the option to view the lessons in "Allman" style. It would

I apologize if this topic is in the wrong section, by the way. If it is, I hope a moderator can move it to it's proper (sub)forum.

Greetings and thanks for reading.


#2

I moved your post to the feature suggestion category. I hope your idea gets taken into consideration.


#3

It might help your suggestion if you were to explain what those were :slight_smile:


I think that's an interesting idea. I'm not sure how it would be implemented - does the course author have to put in two different code styles, or does the computer automatically do stuff? - but I think that it would make programmers with at least some experience happier if they could use their preferred style in courses :slight_smile:

Something to keep in mind though, is that a lot of Codecademy's learners are, at least right now, beginners and don't have a preferred style, so this could very well be a waste of time to implement at the moment.


#4

Thanks for replying!

I personally think that it would be a neat idea to be able to view the same code in two different styles (choosing between two versions), since that is probably also the most efficient way of doing it and the least hassle to implement.

I think that the Allman style of coding is much better for beginner coders, in order to view the code easily and understand what's going on. When they grow more experienced in coding and prefer to condense their code, they could always switch to something like the K&R style. That's my two cents!

I'm also aware of the fact that styles are also kind of inherent in the way most of them are taught (such as PHP and JavaScript where K&R style is more or less the 'standard' way of coding for most people), but that still doesn't change the fact that in my opinion it makes it harder to read, especially when you get to more complicated code-examples that fill the screen.