Thursday, November 12, 2009

Learning: Filling in Gaps

I know that what any one developer needs to know is dependent on what said developer does.  There's also some set of common knowledge that could reasonably be considered the 'base.'

If I've been using ColdFusion for eight years, obviously there are some things that I can do pretty well (and hopefully using best practices).  However, I know that there are many large gaps in my knowledge.

Can anyone recommend any books that do an especially good (thorough, organized) job covering ColdFusion basics in a tutorial style? I would really like to read/skim through an excellent guide, taking time on the parts I don't know, so that I can feel there are fewer gaps. I want tutorial, as opposed to reference, so that the material is presented with the intention of teaching me something.

Wednesday, October 28, 2009

Installing and Setting up Git

I thought this was going to be hard, but between the time I downloaded the OS X installer earlier today and now, I came across Bob's Blog post on Setting up a Mac to Work with Git and GitHub. I've barely had to use my brain! You rock, Bob.

At Bob's "Import an Existing SVN Repository," I didn't have an existing repository--this is my first adventure in version control. I'm listing some steps below that are the alternative to that step.  Once I completed Bob's Step 2, a friendly page was returned by GitHub with information specific to me.  I copied, pasted, and edited the first section of those as described in Bob's "Configure your Mac to Talk to GitHub."  Continuing in that section, I created a public key and gave it to GitHub.  When you're done with that GitHub will tell you "our RSA fingerprint is..."--you will need this in a minute.


Now you can begin to use the commands from second section of the GitHub summary page (or manually type the following) in your terminal window.

mkdir projectname
cd projectname
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:username/projectname.git
git push origin master


At this point, you will get a message saying the authenticity of the host can't be established and the value of the RSA fingerprint. It should match the one provided by GitHub when you entered your public key. Once you continue connecting (assuming the fingerprints match), you will get a message telling you what Git has done.


I need to review the Git documentation I've been reading, but I believe that I have matching empty repositories locally and on GitHub at this point.
git status
returns:
On branch master
nothing to commit (working directory clean)

I hope that means I'm good to go, but I'm too tired right now to find out more.



Tuesday, October 27, 2009

Version Control Survey Results

Eleven people responded to a simple 5-question survey (via SurveyMonkey) The results show (only some of, I'm sure) the variety of version control options available. I learned quite a bit reading through it, and I hope you will too. Currently, I'm mostly reading about Git (having read a fair amount about SVN) and talking to others about ideas. (I feel like someone just needs to push me in the pool!) I encourage any additional discussion and/or advice.

Do you use some system of version control? 11 total respondents all said yes
SVN or Git (or other; could mark both) 10 SVN; 5 Git
Do you work alone or with other developers? (could mark both) 8 alone; 7 team
Please give a brief description of your setup, including your client.
  1. Mac; Versions as well as Subclipse in Eclipse (Flash Builder & CF Builder)

  2. for personal (where I work alone), I use Unfuddle.com (free; SVN & Git); at work, I run our own internal SVN server; in either case, I use both Tortoise and Subclipse in Eclipse

  3. Mac, use Subclipse for SVN, command line for Git, both free and paid servers for hosting

  4. git, git-gui, eclipse plugin

  5. Eclipse w\ subversive plugin for the client; RIAForge on the server backend. I'd used Microsoft's Visual Source Safe way back when I was doing VB programming, but hated it-- it was a PITA.

  6. My team uses SVN. I've moved to Git and use the git-svn interface to publish changes, which works great. I keep some personal things on GitHub. I use the command line client.

  7. Subversive in eclipse, command line svn, svn on internal server

  8. Using ColdFusion/Java/Flex: Subversive client for Eclipse. Everything is done using the command line.

  9. Some clients have their own SVN servers. For my projects I host at ProjectLocker.com for $5 / month. My SVN client for everything is Subclipse plugin for Eclipse.

  10. SVN for 6 years, just checking out Git. I use both the command line SVN and the Subclipse Eclipse plugin in an Ubuntu development environment. I run some of my own SVN repos locally, but also some at www.assembla.com.

Anything else? (selected comments shown)
  • I can't believe it took me so long to start using remotely hosted SVN. It makes it so much easier to work on the same project on different machines (laptop, pc, etc). And it adds a level of safety I wouldn't want to live without. Plus, it's free. Doubleplus, it's easy as can be

  • Very new to SVN, so I'm probably using maybe two or three percent of its feature set.

  • If SVN hadn't been mandatory for using RIAForge, I'd probably not have had the nerve/drive to use it.

  • This free book at http://svnbook.red-bean.com/ helped me wrap my brain around the basic concepts.

  • GUIs are helpful at first, but my proficiency with them soon reaches a plateau. I prefer to use the command shell. I understand much better how everything works and continue to learn new things.

  • Svn teamed with trac to give integrated ticketing, milestones and using mylyn in eclipse

  • I use VCS for generally VC, of course, but also for experimental branches, tagging releases and vendor branching.


Wednesday, October 21, 2009

Getting Your CF Server to Trust Another Server

I am creating all my new apps to use Central Authentication Services (CAS) for the authentication portion of login.  When I did this for the first app, I didn't have a good understanding of SSL, and my server administrator didn't have a good understanding of the ColdFusion and CAS parts of the process.  It was the blind leading the blind down many wrong paths!  Once we got it working, I simply breathed a sigh of relief and started taking care of all the things I had been ignoring while madly trying to go live with that project.

Roll the clock forward to Sept 2009 and we're trying to upgrade to ColdFusion 8.  Everything is going great except for the communication with CAS.  I use a <cfhttp> with an https address containing the ticket I'm validating in the url attribute.  I expect cfhttp.filecontent to contain an XML file with user information.  Instead I get a connection error.  I remember this connection error from the previous experience.  This time I am determined to understand!

First I post the wrong question to Twitter.  Nevertheless, @iotashan provides me with this article that really helped clarify SSL for me. http://www.webapper.com/blog/index.php/2007/02/09/troubleshooting-javaxnetsslsslhandshakeexception/
I recognize one error that I made before that helped to confuse the issue even more--the host name didn't match the common name provided by the certificate.  Won't make that one again.

The part that seems to be most tricky is into which CA list to import the certificate.  The pertinent one is the one used by the ColdFusion JVM.  I found mine at the default location of C:\ColdFusion8\runtime\jre\lib\security with the default filename of cacerts.  I used the keytool (found at C:\ColdFusion8\runtime\jre\bin) to modify the cacerts file.  There are some good instructions for doing so here: http://www.herongyang.com/crypto/jca_keytool.html.

Tuesday, September 22, 2009

ScribeFire

This is really just a test.  I downloaded and installed the ScribeFire plugin for Firefox.  I haven't been terribly happy with the editing capabilities of the built-in editor, so I decided to try something else.

My requirements were
  • free
  • runs on Mac
Wow, that was easy.  Wonder how it will look...

Wednesday, September 2, 2009

ColdFusion vs. PHP

A commenter to a previous post asked, "Why for example, would someone chose CF over a traditional LAMP setup?" (I looked up LAMP to find that it means Linux, Apache, MySQL, PHP.)

I may not be a very good person to answer this question, but I will give it my best shot, and I will ask some who are more versed to comment.

I believe that many people use Linux, Apache, and MySQL with ColdFusion (it's been camelCase rather than two words since version 3 or 4), so the main issue is PHP vs. CF. (My particular setup is Windows, IIS, Oracle, and CF, and I don't know the web server part at all.)

I have used PHP a bit but only for very simple stuff, almost like a server side Javascript. I liked the way it seemed very simple to make it modular in the procedural style I had learned in school.

When I learned CF, I learned it from someone who doesn't really "do modular." I mostly learned basic CRUD, done poorly. I took over and maintained lots of bad code and am only now finding the time to learn how to do things well. The thing I've found most difficult about CF is learning its modularity. Much of that problem has to do with my department's slowness at keeping up with updates and my slowness at learning the new things that each update had. After attending CFUnited, I found out that there are many ways to be modular in CF (including OO, which I didn't learn in school), and I just needed to learn them.

The things that I know are great in CF (much easier than in PHP) include connecting to and querying the database, writing out to Excel or Word, and sending email. Since so much of the work I do is database related, I am convinced that CF is the better tool for lots of database work.

I would certainly not hesitate to use PHP again, but would probably avoid it if possible for large database projects.

Thanks, That Web Guy, for your question.

Thursday, June 25, 2009

Twitter?!?!

Ideally when one creates a blog, one has something useful to share with others. I am working toward that point, and I have definitely made some progress at getting involved in the CF community online. I was shocked by where it is taking place too--on Twitter. I had some sense that Twitter was being used for something valuable when I noticed a few people tweeting from CFUnited last year. I still had a strong sense that Twitter was pretty useless, being used to let people know what you eat for dinner, what time you go to bed, and more personal or more useless information.

After Phillip Senn directed me to Twitter and asked people to follow me, I am getting to know some people there. I have posted several questions and gotten answers. I've discussed things a little more in the irc #coldbox chatroom. I really feel like there are people out there who I can ask about something when I'm stuck.

So for now what I have to offer someone new to CF or someone trying to get involved in the community is to join Twitter. Get Tweetdeck, (or some Twitter client) which gives you more features than running Twitter in a browser. Start following CF people. If you don't know where to find them, follow me, @cf_sarahk, and see who I follow. Also track the hashtag #coldfusion. These will get you started. There are friendly people out there and they are amazingly willing to help!

About Me