Boring Coding Entry with Interesting Link
Sep. 22nd, 2006 11:14 pmIt's so nice to finish working on a problem by the end of the day. At least I think I finished.
The problem was to code the following foreign language requirement: First you need fourth-semester proficiency in a European language. (Easy, we have a rule type just for this.) Then you need either six upper-division hours in the same language or any six hours in a second European language so long as they are not all from one course.
We can keep from counting the same courses again, but not from counting courses from the same field again. We have to specify either hours or courses or everything listed on the table; we can't specify hours and courses and just some things from the list. Nor can we specify "more than one course."
The solution:
1. Part I: Fourth-semester proficiency in a European language. Use FL rule type, specify fourth-semester proficiency, list all allowable languages.
2. Mask hours beyond 5 of every European language course that can be taught in versions exceeding 5 hours. This way a single course cannot fulfill the whole requirement.
3. Mask hours beyond 5 of the other courses that wouldn't fit in the previous rule due to space limitations.
4. Part II, option a: require 6 upper-division hours from one option, each of which is a different European language. This could end up being either the same or a different language. If the same, it works. If it's different, it's option b, so it still works.
5. If the previous rule is not satisfied, skip it and do this rule; otherwise skip this rule. (This "branching" is to be avoided if at all possible because students working on the previous rule can't see their progress until they have satisfied the rule, so it's confusing. Oh, well.) Part II, option b: Can't use an FL rule because it counts courses, not hours. Use an LL rule type, require 6 hours from European languages the list of courses that satisfy foreign language requirements. Due to similar courses getting rejected in an earlier rule, this should not be possible in the same language as chosen for #1 above. If students use other courses, they won't count. An override to the system will be required. But that's probably just as well so that courses they want to count toward their major don't end up counting here instead. And most people will just take the courses listed here.
6. Unmask the 6+ hour courses so any extra hours can be counted towards other requirements or electives.
Whew.
(Hey, my programming friends sometimes write about coding or write actual code. Oh, but that's in case you want to copy the code or modify it yourself or have ideas on improvements. Oh, well. Not a single one of you would ever care about this. Unless my boss found this journal. Hi, Boss!)
Link of the Day: Merle Sneed's On the Road to Walmart - Read about different transportation strategies and other thoughts connected with a trip to Walmart and how they relate to personal finance. "It is amazing how hard some people have to work to do stuff we take for granted. . . . I saw a one-armed guy today smoking a cigarette while pushing a shopping cart loaded with merchandise toward the bus station. The cart kept veering to the right and he kept fighting it with his one arm, periodically pausing to take the cigarette from his mouth."
The problem was to code the following foreign language requirement: First you need fourth-semester proficiency in a European language. (Easy, we have a rule type just for this.) Then you need either six upper-division hours in the same language or any six hours in a second European language so long as they are not all from one course.
We can keep from counting the same courses again, but not from counting courses from the same field again. We have to specify either hours or courses or everything listed on the table; we can't specify hours and courses and just some things from the list. Nor can we specify "more than one course."
The solution:
1. Part I: Fourth-semester proficiency in a European language. Use FL rule type, specify fourth-semester proficiency, list all allowable languages.
2. Mask hours beyond 5 of every European language course that can be taught in versions exceeding 5 hours. This way a single course cannot fulfill the whole requirement.
3. Mask hours beyond 5 of the other courses that wouldn't fit in the previous rule due to space limitations.
4. Part II, option a: require 6 upper-division hours from one option, each of which is a different European language. This could end up being either the same or a different language. If the same, it works. If it's different, it's option b, so it still works.
5. If the previous rule is not satisfied, skip it and do this rule; otherwise skip this rule. (This "branching" is to be avoided if at all possible because students working on the previous rule can't see their progress until they have satisfied the rule, so it's confusing. Oh, well.) Part II, option b: Can't use an FL rule because it counts courses, not hours. Use an LL rule type, require 6 hours from European languages the list of courses that satisfy foreign language requirements. Due to similar courses getting rejected in an earlier rule, this should not be possible in the same language as chosen for #1 above. If students use other courses, they won't count. An override to the system will be required. But that's probably just as well so that courses they want to count toward their major don't end up counting here instead. And most people will just take the courses listed here.
6. Unmask the 6+ hour courses so any extra hours can be counted towards other requirements or electives.
Whew.
(Hey, my programming friends sometimes write about coding or write actual code. Oh, but that's in case you want to copy the code or modify it yourself or have ideas on improvements. Oh, well. Not a single one of you would ever care about this. Unless my boss found this journal. Hi, Boss!)
Link of the Day: Merle Sneed's On the Road to Walmart - Read about different transportation strategies and other thoughts connected with a trip to Walmart and how they relate to personal finance. "It is amazing how hard some people have to work to do stuff we take for granted. . . . I saw a one-armed guy today smoking a cigarette while pushing a shopping cart loaded with merchandise toward the bus station. The cart kept veering to the right and he kept fighting it with his one arm, periodically pausing to take the cigarette from his mouth."