Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Ok, so currently in my Java course on Udemy we are going more in-depth into scope and visibility, and I'm currently doing the challenge for it.
So I'm doing it and the challenge is to have every single name of a variable or method be called 'x' (just to better understand scope and vis, he mentions how this is not a good practice AT ALL) with the exceptions of the classes and scanner var (but there is an optional challenge to also make them named x).
Now that I progressed into it, I noticed something. This challenge is literally making me make my code so DRY and outside-the-box-thinking that, what if, this could be a practice?
Not the naming everything in your code the same var name, but doing that at the start and then renaming the variables after coding. Because right now, I feel as though I am using SO MUCH less code than if I had the liberty of naming my classes, methods, and variables different things, it's actually kinda cool.
I'll attach my code from the challenge to this after by it really amazed me how well my code looked compared to my previous challenges and even personal projects!
rant
java
discovery
name-everything-x