@codewithvoid Yes & no. The easiest code to read is the one with minimal added nonessential complexity. Code that does exactly what it needs to do. If it's a complex problem, then it's sliced into meaningful components with well-defined behavior. But devs think that's "too simple to be good".
@codewithvoid Not really. Too many try to get clever and write one liners or indent randomly (not in python of course). What happened to comment your logic and don’t skip steps? If you treat an algorithm like a math solution it’s not hard to follow. Coding is just the language you execute in.
@codewithvoid Hard to write initially maybe, but once you get something working, going back over it and making it easy to read is _usually_ not hard.
@codewithvoid A noob's opinion: easy to read code, official document, and even some stack overflow answers are not the easiest to read. But I'd be a noob and idiot if I expect everything I need will be masterfully written and simply present in front of me
@codewithvoid Personally i refactor code until it reads well enough for me. I’m not looking to obfuscate but in general i want the code to be readable for the time in future when i get back to it.
@codewithvoid At the very least, it takes longer to write (but the results are worth, both aesthetically and maintenability wise)
@codewithvoid But whatever you want to do It really appears difficult for the first time, but only one thing you have to do stay focus and the you will see there's nothing is really difficult
@codewithvoid If you have best practices in mind you can write clean code that helps you write code faster. If a problem is giving you a hard time and it's getting complex, go back and clean it. Your future self will thank you.
@codewithvoid It takes multiple iterations of refactoring to achieve but of course it’s very hard to write in the first attempt.
@codewithvoid Same with verbal or other written communication. It’s easy to write stream of consciousness but hard to concisely convey an idea
@codewithvoid Easy to write, hard to read. Try to be tech lead or something like that in a minor company and you'll see what i'm talking about.
@codewithvoid It's crazy that we prepare for "shortest line of code" or "most efficient", but in actual companies we prefer more lines with less efficiency if it improves readability/maintainability/extensibility
@codewithvoid It's hard to write if you don't have experience
@codewithvoid Yes! 💯 It takes years to write easy-to-read code. It takes more years of experience to write code that solves a problem and not get legacy. The key: write tests.
@codewithvoid Easy to read code is not especially hard to write, but it is time consuming to write. It normally takes me three or four attempts to find something that's able to really clearly express my intent and free from extraneous noise.
@codewithvoid Matter of practice. While it may be difficult to do at first, if you discipline yourself enough to do it consistently, it will become natural eventually.
@codewithvoid Reading and writing are different 💀
@codewithvoid Yes and no: It's hard to reach the point when you can do that intuitively and without too much effort, but when you reach that point, it's not hard at all.
@codewithvoid No, simple and understandable code is easy to write
@codewithvoid Honestly, no. If my code isn't super organized I have no idea what I'm writing. But maybe I'm a rare specimen!
@codewithvoid If it’s easy to use, it was difficult to create 🙏🏽
@codewithvoid Not once you understand the problem you're solving and its domain. Otherwise you'll end up with a loveless piece of code that might do what it should mechanically but doesn't convey the business process.
@codewithvoid heck yes. coding is like writing. the more you do it, the more you get good at it.
@codewithvoid If irony was a post it will be this
@codewithvoid High quality code will significantly require more effort to write.
@codewithvoid Agreed. I just wrote some very messy code and was thinking about how hard it would be to understand if I wasn't the one who wrote it 🥴
@codewithvoid It’s more like an iterative process: first you literally “barf” some barely functional code on there. Then you proceed making better, more performant, better readable, testable,..