Skip to content

The Refactor Challenge

Kayla Nussbaum edited this page Oct 29, 2015 · 3 revisions

Understanding code written by other developers is often a challenge within itself, but then being asked to refactor their code to structure it into a more efficient solution is where the true challenge lies.

I was given the opportunity to refactor the "createNetwork" python file. The goal of this file is to connect to our database, and create a list of graph objects on two month intervals. It then generates attributes for the graph's nodes (developers) and edges (collaborations) and finally, outputs these graphs to files located in "graph_degree_files".

Working with this set of data was new for me as well as trying to analyze and refactor the code that manipulates it. From this exercise, I now became familiar with the networkX library as well as the construction of a graph in python.