<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
<title>Phil Dawes Stuff: refactoring</title>
<id>http://phildawes.net/blog//tag/refactoring/</id>
<link rel="alternate" type="text/html" href="http://phildawes.net/blog//tag/refactoring/" />
<link rel="self" type="application/atom+xml" href="http://phildawes.net/blog//tag/refactoring/atom.xml" />
<author><name>Phil Dawes</name></author>
<updated>2006-10-08T09:14:00Z</updated>


<entry>
  <title type="html">Refactoring and the Repl</title>
  
  <category term="General" /> 
  <category term="lisp" /> 
  <category term="programming" /> 
  <category term="refactoring" /> 
  <category term="scheme" /> 
  <category term="workfriendly" />
  <id>http://phildawes.net/blog/2006/10/08/refactoring-and-the-repl/</id>
  <updated>2006-10-08T09:14:00Z</updated>
  <published>2006-10-08T09:14:00Z</published>
  <link rel="alternate" type="text/html" href="http://phildawes.net/blog/2006/10/08/refactoring-and-the-repl/" />
  <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
	
<p>I'm still perservering with Gambit scheme, and progressing pretty slowly it has to be said. The first thing I've been missing is the lack of refactoring tools for scheme.</p>

<p>I wrote the basic python refactoring functionality in <a href="http://bicyclerepair.sf.net/">bicyclerepairman</a> a long while ago, and having it as part of my daily toolset has strongly influenced the way I program. 
For example, I tend to follow the 'bash out some code and then clean it up' style of development. In particular, I have a habit of naming variables and functions badly and then renaming them later as I code. </p>

<p>So my initial thought is: no problem - I'll just knock up a bicyclerepairman for scheme! The problem is that I'm not quite sure how to do automated refactoring with a <a href="http://www.answers.com/topic/read-eval-print-loop">repl</a>. You see Python has no real repl culture (sure it has a repl, but nobody uses it except for trying out simple expressions). People tend to run their program/unittests from scratch each iteration, which means the entire environment gets re-evaluated on each run.</p>

<p>The challenge with running a repl while you develop is keeping it in sync with your refactored code: E.g. if I rename a function that's used in multiple places, that results in lots of code that needs re-evaluating. Can this be done automatically (e.g. could it be made to work by just re-eval'ing files?). 
Hmm.. I think I need to talk to somebody with a lot more scheme experience than I have. Unfortunately I don't actually know any experienced schemers, especially not in London or Birmingham; maybe somebody from <a href="http://www.lshift.net/blog/">lshift</a> can help?</p>

      </div>
  </content>
</entry>




</feed>
