Category Archives: Uncategorized

Loops and Such

There are several different types of loops in ColdFusion and sometimes it can be difficult to know which one to use and what properties are required to use it. This post is designed as a resource in deciding on the best loop for the job and how to write that particular loop. Also included is a quick reference PDF to print out that will help you remember which ones to use.

List Loop

At the top of our list is the list loop. The list loop is used when looping over any data that can be broken apart as a list. Remember in ColdFusion you can use different delimiters for lists, so you aren’t limited to just commas. For our example, lets consider a non-normal list such as a URL like so: I’ve actually had to parse over a URL like this before. Looking at this string we can break apart the list by each forward slash. For our example, I don’t want the “http” so I’ll remove it as well.


File Loop

The file loop is exactly like the list loop, except the list isn’t a string you give it but a file that can be read by ColdFusion. Using the same syntax above but changing the delimiter to the new linefeed and carriage return, we can output over each line of the file.


Index Loop

The index loop is the simplest of the loops. It simply loops from point a to point b that you specify. It’s not that smart but it can get the job done when need be. For our example, we’ll pretend we want to loop based on the size of an array. In an index loop, there is a special character called an index that holds the value of the loop we are one. The index starts at the value you enter for start and counts up until it reaches the value of to.


Conditional Loop

The conditional loop is one of the few loops with real logic. The conditional loop will continue to run until the condition it is checking returns false. Once it does, it moves on. If you setup your conditional loop incorrectly it could crash your program as it will possibly run forever. In our example we’ll run our loop until we find strawberries.


Query Loop

The query loop is probably the most used as typically when grabbing data from a database, you need to output it. The query loop is designed to loop over data until all rows have been looped.


Collection/Structure Loop

The collection/structure loop is very similar to the query loop in that is loops over the keys in a structure in the same way a query loop runs over the rows in a query. With the collection loop however, the item holds only the key of the structure. One draw back to the collection/structure loop is that structs aren’t in a particular order like queries.


Download the quick reference guide to see limited syntax of these loop types for quick reference.


Instructor Walk-Through

We have developed a web application for USU instructors to access some pertinent information about their courses as well as submit and approve a few items before they teach. This system informs instructors of the status of their courses, payment information, as well as requests from them their syllabus and textbook information. This walk-through is for instructors and how they use their system.



After they login they are presented with their dashboard which shows them some quick information about their courses and information we have on file for them. Also included in their dashboard are helpful contact information and some links to common USU services. When instructors are ready to view their course details they can click on one of their courses in the list or click on “Course Info” in the main navigation.


Course Info

Once at the Course Info screen, each course they have been assigned to teach will be listed by term. One each row the instructor can see the course information including enrollment, location, delivery method, payment details, syllabus, textbooks, and materials submission. On the left side of the course information, the status is indicated by an icon. The course status changes as it is approved by USU, submitted to banner, the textbooks are submitted and finally published.



A syllabus must be on file for every course to display to the students prior to registration. The system will check in Canvas for an active syllabus and use that one if it exists. If none exists, or you want to display a different syllabus to students looking into the class, you can upload one here. Often times instructors upload a syllabus without specific dates so they can reuse the same one every semester. Once a syllabus is either in Canvas or submitted you can view the syllabus from here as well.



Textbooks are also required by law to be on file for students at the time of registration. We cannot assume you want to use the same textbooks from last year and even if no text is required you must submit a textbook order saying no text is required. If you have not submitted your textbooks there will be a submission button on the screen. If you have, a link to view the textbook order will be in the place of the button.

Blog Comparison

Let’s look at WordPress, Blogger, and Square Space. Square Space isn’t a blogging platform per-say, but rather a website editor with blogging tools. One can argue this is what wordpress has tured into anyway.

If I were to rank these for blogging I’d probably put then Blogger, WordPress, and then Square Space. The reason being is, with blogging you really only need an easy publishing tool, and it doesn’t get much easier than blogger. It’s straight forward, easy to use and really only does one thing. WordPress has evolved into a very in-depth web authoring tool and as such can be a bit harder to hit the ground running. Square Space has blogging as a feature more than anything else.

If I were to rank these by best overall tool however, I’d probably put them WordPress, Square Space, and then Blogger. WordPress is extreamly extensible, has access to probably millions of plugings, and the source code is 100% editable. It’s easy to stand on the shoulders of giants with WordPress and make some amazing things. Square Space is a great authoring tool, with some amazing built in customization features, but is a bit less open to edit. Blogger is very limited and very hard to edit. I’ve had experience with how cumbersome it is.

When choosing one though you still have to factor in other things, like the fact that Square Space isn’t free. Blogger ONLY runs on it’s platform and the underlying code I don’t believe is customizable at all. The large majority of developers know wordpress (at least some what) and could help if needed. These are just some other factors that come into play when choosing one.

Best Practices

It’s going to be hard to separate my personal beliefs I’ve held in my profession for years and those I am trying to read about today. While not an avid blogger, I’ve been involved in many blogs for years because of my profession. So without any particular order, the list.

Search Engine Optimization

While this encompasses and effects much of what you do on your blog, I think it’s almost the most important. You write a blog to get read, and generally to get read it must get found. Taking into account how search engines find your work and rank it will dramatically affect how you go about blogging.

Content is King (

I’m going to lump a few tips into one here. People come to your blog to get to your content, and as such, some things matter much less. What that is depends on your blog. I don’t care much about the design, pictures or writing style of the progamming blogs I read. I care about the clarity and examples. If I were a photographer I would care much less about the words and more about the images. When I read sports blogs I care much more about the creative writing style and images than I do in some other areas. Think about your auidence, why they are there, and whatever content they are looking for. Make that content king.

Involve Readers (

I think one of the other most important thing is involving the readers. There are a few blogs I’ve visited where I can’t comment on the posts. This can be bad when I have questions or would like clarity on topics covered. It’s not needed for every setting, but in most cases, comments can’t hurt.

Educational Blogs

Most of the internet I frequent I would consider to be educational blogs. At least, they way I see it, blogs that teach or train would be educational, not just blogs that focus on traditional education. In fact this blog I am posting to is one I used to teach the webmasters I worked with how to use our system and to perform their tasks. I don’t aspire to be a teacher so I think these are much more applicable to my career. Though, some of these blogs are used in conjunction with or referenced from training I have attended.

I think the most useful thing about blog software in regards to teaching is the ease in which teachers can show examples and answer questions or otherwise interact with students and have the thoughts of all shared with everyone. It’s pretty great actually. One of my favorite is Norman Nielsen’s article blogs. ( Sure he calls them articles, but if you read through them they are pretty much in blog format and do a great job of teaching as well as selling their services.

Ben Nadal ( is a great example of sharing his skills and expertise through his blogs. He never hesistates to interact with his readers, follow up on their questions, and touch on trending topics.

Smashing Magazine ( has daily articles as well which resemble NNG’s posts above. In all these example they provide what amounts to free training for those interested.

Redesign Launch – May 21st

Just to let everyone know, I will be releasing the new homepages to all of the sites on Monday May 21st. This is due to the fact that I am going to be on vacation from May 5 through May 16. I could release the new design next week, but I’d hate to release stuff before I leave in case changes need to be made. In conjunction with this change, the course search “button” will disappear on this date as well. I would put a course search link in your left menu on the pages in which you want it to appear.

On a final note, in preparation for this change as well, you are going to need a new menu for the home page. Personally what I would do is duplicate the current “Quicklinks” list that is on your home pages. If you want to be prepared for launch day, simply go to any page and create a new custom menu, name it “Home Page Menu” or “Quicklinks” or whatever you want, and build those links, then set that page back to whatever menu you want. On May 21 all you will then need to do is login, go to your homepage and change the menu to your “Quicklinks” menu, and you will be all set. If you want to make a course search link that links directly to course search with your campus already selected you can follow the guide I made on how to do that.

If you have any questions please email me but all that is required is for you to do two things to each of your sites:

  1. Put a course search link on the pages you want it to appear.
  2. Create a custom menu to use on your homepage for May 21.

CSS Tips: Padding, Margin, & Backgrounds

I’d like to post a series of CSS tips on here for everyone to have access to so that you have the ability to manipulate the content on your pages more effectively. I won’t be going into extreme detail because I would imagine everyone is at different levels when it comes to web editing. I would also think you are primarily focused on getting content out there and not too much on changing design elements. However a basic understanding of some CSS styling techniques will go a long way to empowering you to take control of the content you publish on the sites. I will use a couple of practical examples from existing pages and share a few tools to help you out. As always feel free to ask me questions if you have the desire to do something on the site that you are not quite sure how to accomplish.

Continue reading