👋 Hi, I’m @amrataabdallh
👀 I’m interested in web development
🌱 I’m currently learning Reactjs & Next.js & SQL
💞️ I look forward to cooperating on any opportunity for improvement
👋 Hi, I’m @amrataabdallh
👀 I’m interested in web development
🌱 I’m currently learning Reactjs & Next.js & SQL
💞️ I look forward to cooperating on any opportunity for improvement
First code for correctness, then for clarity (the two are often connected, of course!). Finally, and only if you have real empirical evidence that you actually need to, you can look at optimizing. Premature optimization really is evil. Optimization almost always costs you time, clarity, maintainability. You'd better be sure you're buying something worthwhile with that.
Note that good algorithms almost always beat localized tuning. There is no reason you can't have code that is correct, clear, and fast. You'll be unreasonably lucky to get there starting off focusing on `fast' though.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (4)
I don't like these if else constructions either
and work like this:
short, then short...
It's awesome syntax.
I ALWAYS go for the longer "IF" statements because of readability... :)
For me, readability of code is more important than saving a few lines of code.
First code for correctness, then for clarity (the two are often connected, of course!). Finally, and only if you have real empirical evidence that you actually need to, you can look at optimizing. Premature optimization really is evil. Optimization almost always costs you time, clarity, maintainability. You'd better be sure you're buying something worthwhile with that.
Note that good algorithms almost always beat localized tuning. There is no reason you can't have code that is correct, clear, and fast. You'll be unreasonably lucky to get there starting off focusing on `fast' though.