Archive for category ColdFusion

Version Control?

So, as I’ve mentioned before, I’m definitely not an advanced-level developer by any stretch of the imagination. I know how to do the things that I want to do, and that’s about it. Also, most of the projects that I’ve worked on have been things where I’m the only developer. Because of that, I’ve never used any kind of version control when coding (git, SVN, Tortoise, etc).

I read several blogs by various developers, and over time I’ve seen them all mention at least once that there’s “no excuse” for not using some kind of version control even when you’re a single developer. The only thing I haven’t seen to go along with any of these statements is an explanation as to WHY one needs to use version control for a project where there is only one developer. It seems to me like it adds an unnecessary layer of complexity. From what I can tell, though, using it seems to be something that EVERYONE agrees on. If someone could just explain it to me, I’d like to understand.

Apparently, I’m doing it wrong.

Tags: , , , ,

Using Google Checkout

Has anyone had any experience interacting with Google Checkout via ColdFusion? I’m just wondering if it’s easier / better / less evil than using PayPal. Trying to figure out the best way to go for a new project.

Mass-Delete Tweets with ColdFusion

Earlier today I decided to clear out all of my existing tweets and start over again.  After looking around for a bit on Twitter, I saw that my options were to either delete my account entirely (and lose all of my contacts) or delete all of my tweets one by one.  Neither one of these was an acceptable solution to the problem, so I took two minutes to do it in CF.

I know this is really only useful in somewhat rare circumstances, but if you need it, now you have something to copy / paste.

<cfhttp method="GET" url="http://twitter.com/statuses/user_timeline/foo.xml?count=200" username="foo" password="blarg" />
<cfset theList = xmlParse(cfhttp.fileContent) />
<cfset loopCount = arrayLen(theList.statuses.status) />
 
<cfloop from="1" to="#loopCount#" index="i">
	<cfhttp method="post" url="http://twitter.com/statuses/destroy.xml" username="foo" password="blarg">
		<cfhttpparam type="formField" name="id" value="#theList.statuses.status[i].id.xmlText#" />
	</cfhttp>
</cfloop>

Just change ‘foo’ to your Twitter username and ‘blarg’ to your Twitter password and all should be good. As it stands this will run through and delete 200 tweets each time the script is executed. You could always enclose the whole thing in another loop that keeps going until you’re all wiped out if you want.

Also, this takes longer than 60 seconds to run, so if you have a 60 second execution timeout on your server it’s going to throw an exception. Either way, it saved me a metric assload of time this morning.

UPDATE: In the time since this was posted, Twitter has switched to requiring OAuth for all API calls, which means this will not work any longer. Hopefully it was helpful to a person or two while it worked.