Monday, November 11, 2013

Pushing a ColdFusion git Repository to Kiln

Fog Creek's Kiln is a version control service from the same people that brought you the FogBugz bug tracking software and the StackOverflow behemoth. It's free for tiny teams and the user interface is pretty decent. Although they don't mention it much, FogCreek servers are "storm-tested". Hurricane Sandy passed through New York but the servers did not fail.

Had a bit of trouble trying to set up a git repository containing a ColdFusion project on Mac OSX Mavericks, so I thought I'd share what I did:

  1. Download git from here, after reading this post.
  2. In ColdFusion Builder 2, installed EGit by using Help -> Install New Software after reading this post. Once it is installed, select a project and create a repository by clicking on it, using the "Team" option and following the instructions.
  3. In Kiln, create a new empty repository to which you will need to add files. Open the OSX Terminal and navigate to your local git repository (using the cd command). Once in the .git directory, copy and paste the commands in the Kiln page, which should look like "git remote add kiln https://[yourname].kilnhg.com/Code/Repositories/Group/[yoursoftware].git" and "git push -u kiln master".
  4. If you get a progress message, then you're set up.

Sunday, May 8, 2011

Eliminating Type Clutter in RealBasic

RealBasic is a great no-nonsense platform for writing personal software that can run with very minor modifications on Windows, Mac OSX and Linux. Its coding language is very close to the Basic in Microsoft's Visual Basic and different from Javascript or C in that each command cannot extend multiple lines.

So, for example, what in Actionscript 3 can be written as:

var a:Number = aClass.myFunction(myVariable1,
myVariable2);


in RealBasic has to be written as:

Dim a As Double = AClass.MyFunction(MyVariable1,MyVariable2)

A problem is that if the line becomes too long, it will extend beyond the width of the editor and be harder to read. Many times this occurs because you have to add CType tags to avoid compilation warnings. For example, if MyFunction accepts only Single type variables and MyVariable1 and MyVariable2 are Double type variables, your line will look like:

Dim a As Double = AClass.MyFunction(CType(MyVariable1,Single),CType(MyVariable2,Single))

which makes the code slightly less readable.

Hence, a solution is to modify AClass adding an intermediate function that accepts Double variables and then calls the original function.

Sunday, September 26, 2010

Collection result contains a duplicate item

Got this error today using Flash Builder 4, Coldfusion 9 and a CallResponder.

Fix:

As the error reads, the ArrayCollection that was returned by the ColdFusion server contained two items with the same index. I first tried to see if I could process it within FB4 and remove the extra item. However, the solution was in looking at the source and finding out that a SQL JOIN I made was delivering duplicates because two tables were joined on only one variable. I added the second variable and the problem was fixed. End of story.

Hope it helps.