Abstract answers and actual code snippets are both welcome π
For further actions, you may consider blocking this person and/or reporting abuse
Abstract answers and actual code snippets are both welcome π
For further actions, you may consider blocking this person and/or reporting abuse
Rishita Shaw -
Jimmy McBride -
Jimmy McBride -
Ben Halpern -
Once suspended, daniel13rady will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, daniel13rady will be able to comment and publish posts again.
Once unpublished, all posts by daniel13rady will become hidden and only accessible to themselves.
If daniel13rady is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Daniel Brady.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag daniel13rady:
Unflagging daniel13rady will restore default visibility to their posts.
Top comments (9)
My favorite lines of code is those which saves me typing and makes my code cleaner. Like:
global log = console.log
Over the time that line grow to a full module, but I think that saved me hundreds of console dots.
I love doing things like that with my output statements! It lets me swap out the implementation or even disable output entirely without modifying every log statement in my code. π
To be honest, that line was later refactored to:
To create a log history to be flushed later, and redirect all console.log() to log(). But lost a little bit of its beauty.
Maybe not the most elegant example, but this line in Cloud Foundry's deprecated v2 API let us implement rolling "no downtime" app deployments on v3 without breaking the legacy stuff.
It basically let have more than a single "web" process for an app at a time, but let v2 continue to only concern itself with the newest.
The beauty of Ruby is that we could mix it in to all of the v2 controllers that needed it!
A wise old wizard I used to work with once said,
It's taken me a few years, but I've finally caught on to that appreciation.
And a wise old wizard I currently work with offers up a bottle of Scotch during our company's annual Hackathon to the dev who creates a PR which deletes the most code while maintaining bug-for-bug compatibility without adding new code. ππ
My favorite line of code is that I will never delete, because is perfect and cannot be replaced.
That sounds great, but I'm not sure I'll ever be good enough to write a line of code that never gets modified before being deleted. Seems like a good goal to strive for!
Sorry for the 'never'...
I mean, a line of code to be "perfect" must:
But my really favorites, "the perfect ones" are those that beyond that, yet saves me the typing of another lines. :D