Categories
Code

Curriculum Innovation or Confusion

It is an early Monday morning just prior to the beginning of the semester.  A faculty member walks into the institution where he teaches.  He will be working on a curriculum project. He thinks through the steps to be completed.

  • 50% of the content be new or requiring modification
  • Curriculum Contract
  • Selected Modality
  • Credit for Prior Learning (CPL) exam
  • Guideline/Documentation Checklist
  • Curriculum Repository
  • Learning Management System
  • Peer Review
  • Approval 

The aforementioned checklist has multiple sub steps. Your institution may have a different process. I would bet, though, that your process has encumbrances that hinder your ability to provide current curriculum in a timely and cost-effective manner. If you were to flowchart the steps, would it look simple and easy or more like a Rorschach test?

The largest hurdle might simply be the speed at which knowledge advances. Consider the simple act of information exchange. If the amount of information exchanged electronically were converted to newspapers, each individual would receive approximately 55 newspapers in 1986 and 175 in 2007 (Hilbert, 2012).

I encourage you to do some reflection. Is your institutional processes a hindrance? What changes can be made to make you more effective as a faculty member/department? How often are you able to make changes? Are you using the waterfall-like ADDIE (Analysis, Design, Development, Implementation, and Evaluation) process? I would encourage you to look to Agile methodologies to improve the process – make it more efficient, less costly and more enjoyable.

Resources


References

Hilbert, M. (2012). How much information is there in the “information society”? Significance, 9(4), 8-12. doi:10.1111/j.1740-9713.2012.00584.x

Categories
Code

Creating a Promise

Promises are used for asynchronous code. It is a temporary holder for a value that gets returned by an asynchronous call. For example, a call to a web service might use a promise. You can call the web service with a promise and once it is fulfilled, you can run some code. Here is the syntax…

let myPromise = new Promise(
    function(resolve, reject){
        setTimeout(resolve, 1000, ‘a value’);
    }
);
console.log(myPromise); 

Here we are creating a promise. Within the promise method, we have an anonymous function that is making the promise call. In here is where you might find a call to a web service. In our example, we are simply running a setTimeout function to simulate a call to a service that might take a second. Notice the two parameters in the function…resolve and reject. Those are the two things that can happen to a promise. It can be rejected. We can then handle the rejection, or it can be resolved (fulfilled). This settles the promise and we can programmatically handle the response.

In our code, you should see the promise logged to the console. It is in a pending state because we haven’t settled it. We haven’t done anything with it yet. Feel free to change the resolve to reject in the setTimeout to see the difference.

Happy Coding!

Clay Hess

Categories
Code

Developer Defined Errors

We can also throw our own errors. This is done with the “throw” keyword using the “new” keyword and the Error method. Here is the syntax…

try {
    let animal = newAnimal;
    throw new Error(‘This is a custom error being thrown’);
} catch(error){
    console.log(‘error: ‘, error);
} 

Why would we do this? There might be times when your code logic won’t throw a JavaScript error, but something happens that you want to catch so no issues show up later for the end user. For example, you can test whether a variable has a value and if not, throw an error.

Happy Coding!

Clay Hess