Showing posts with label refactor. Show all posts
Showing posts with label refactor. Show all posts

Thursday, October 18, 2012

Dependency Graph Tool for iOS Updated

Recent iOS project was using ShareKit via "git submodule" command, which added a LOT of items into dependency chart generated by objc_dep utility. Additionally I didn't have any control of those files, just used them as they were given.

To make dependency chart usable again, I added a command line parameter to ignore a subdirectory.

Friday, January 6, 2012

Dependency Graph Tool for iOS Projects

One of the tools, which I used to use with Symbian C++ projects, was an automated dependency graph generator. Can't recall the name, had totally forgotten anything like it ever existed. Totally happy in my ignorance. Blissful happy-go-lucky cowboy coding.

Until I found this tool: objc_dep.py at GitHub by nst, which does "Graph the import dependancies in an Objective-C project".

Oh the memories! Oh the horrow, when I checked my current projects...

Tuesday, May 11, 2010

Refactor or Die (or burden of maintenance)

Agile development says when something is done, it stays done. Don't touch it again! On the other hand refactoring is an extremely important part of agility. How do you combine these, possibly conflicting requirements?

Refactoring is a planned action. When you develop something, it is done as well as it can be at that specific moment. It is scheduled, planned, designed, implemented, tested, documented and released as well as needs to be at the specific moment. When it's done, it's really done.

Developing a new feature, additional requirements or fixing bugs might bring in new information, which makes it possible to improve something already done. Make it more generic, robust or faster. Search for reusing something old.

Refactoring is a fact of life. Experiment, seek alternatives, gain more experience, receive more detailed information, learn from own mistakes or from experts who have made more mistakes than you. Use this for your advantage. Refactoring is not experimenting, but cleaning up afterwards to the most suitable solution.

Don't refactor for the sake of refactoring. If something works, don't touch it without really good reasons. Developing something twice is quite ok, requires less time than refactoring. More safe. Refactoring has to be an improvement.

When you find need for a third similar object/module, then take a moment to consider advantages and dangers of refactoring. Will the be more similar cases in future, how critical areas are you dealing with, how stable have they been bug and feature wise. Would refactoring be worth the risk and investment of time and effort?

Don't refactor for fun. Only when needed, understanding risks.