Latest News

Thursday, 12 February 2015

Code Refactoring

Website developed/managed by prakhar thapak




















You're looking at a block of Python code. It's not immediately obvious what it does. It's sort of a mess and you realize it needs to be refactored. But how? What mental algorithm do you use?
Here's a trick I just figured out how to put into words. You first add comments to your code to make it easier to explain what it's doing in each part. Then you restructure the code until those comments are no longer necessary, using the comments as a guide to creating high level constructs that not only tuck complexity neatly away, they also explain the purpose of the surface.
What tricks do you use? do comment!
  • Assassin Survivor Comments
  • Facebook Comments

1 comments:

  1. We assist various content development services Content Development Services to top-notch clients across the globe. At Acadecraft Australia, there is a pool of experienced, dedicated professionals who are well-equipped with the nitty-gritty of the content development process and have years of experience behind their backs. Moreover, our 24/7 assistance to the clients, error-free content, pocket-friendly, 100% accuracy, and a guaranteed return on investment.

    ReplyDelete

Item Reviewed: Code Refactoring Description: Rating: 5 Reviewed By: Unknown
Scroll to Top