livingdeb: (Default)
This is a post with a question for my programming friends. I was going to say that it might also be useful for people who are having trouble falling asleep or who would like to just space out for a while, but then I got all flowery with the language. Still, this is likely the most boring thing you would ever read that involves handcuffs, a gym teacher, a freeze, and beings with a thousand hands.

So, my colleagues are creating a new degree audit system and one of its features is that processing sequence will not be controlled using the same mechanism as is used for creating unique identifiers for each requirement.

Specifically, in the current system, you might number your requirements in multiples of five in the order you want them to be processed. This leaves space to add in extra requirements between current requirements. No matter how many requirements you add or delete, the long-time ones will always have the same "rule number." We actually refer to some requirements by rule number. "Rule 20" is the rule that kicks out duplicate courses.

In the future system, each rule will be numbered in sequence starting with 1 and not skipping any integers. Each time you insert a new rule, the sequence numbers for all the following rules will be adjusted upwards. Meanwhile, each rule will also be assigned an unchanging unique identifier so that references that stick can still be made to it. This all makes sense to me and is obviously a good idea. "It's like Netflix."

Well, Netflix is a great example, but it involves a single list of movies. The degree audit rules are sets of several lists. First you have the list of university-wide rules. Then you have the list of college-wide rules. Then rules for all the BA's in your college versus all the BS's in your college. There are also department-level rules and up to two additional levels of rules. This system thus allows us to, for example, create university-level rules once and update them once each time the requirement changes instead of updating them separately for each of the thousands of current degree programs.

The rules for the different levels can be interspersed. For example, first you calculate the GPA, a university-wide rule. Then you throw out all courses that can't count toward any degree (such as courses with grades of F). Then you throw out all courses that can't count toward your specific degree (such as physics for nonmajors classes in physics degrees). Later you check that the student has taken all the science classes required by the state. Then you check for additional sciences classes required for all degrees earned in the college of natural sciences. Etc.

In the current system, every rule has a number so no matter what level the rule is at, it is after all rules with lower numbers and before all rules with higher numbers. If you want to make sure that the university-wide second-science rule is processed before any college additional-science rules, you find all the additional-science rules in the individual programs and make sure your number is lower than those numbers. That takes a long time, but you can do this--and even have the colleges renumber their rules to make room for your new one--before you add your new one. The degree audit system is working the old way right up until the new rule is added and then it is working the new way. For everyone.

In the new system that won't be possible. There aren't various empty places to choose from in which to slide your requirement. The current proposal is to just stick the rule in somewhere between the first-science rule and the visual-and-performing-arts rule, and then freeze the system until all the programs have been checked, adjusted if necessary, and then officially approved. The new university-wide rule has to be created first; the rules at other levels have to be adjusted afterwards.

Great, so what happens if a degree plan is frozen for two weeks while someone is on vacation, thus preventing anyone from certifying progress toward degree for a football player who will now have to sit out two games? Well, the world would come to an end, that's what would happen.

Is there any other way to do this? Part of my problem is that I don't even know how you program sequence numbers in this situation. There are sequence numbers showing in the front, but how are they connected in the back? I'm imagining rules holding hands (and university-level rules have the most hands of anyone) in a big two-dimensional gymnasium floor. So when you've got two university-level rules near each other, perhaps even holding hands with each other, but sometimes also holding, in their many other hands, several jump ropes made of other rules holding hands with each other. And now you're going to insert another university rule between the these two university rules, but how does that new rule decide where to pull apart all the different jump ropes so it can join them?

Is the default to just stand there, waving its other arms around while all the jump ropes yell, "Red Rover, Red Rover, let the new rule come over!" until the gym teacher picks the spot in each jump rope where it is to stand? Or does it automatically just stand next to the lower-numbered (or higher numbered) rule grabbing that guy's hand plus those of all the other rules that guy was previously holding hands with? Or does it pick places at random? Or does it find the mathematical center?

And what does holding hands mean? Does it mean that the rule associated with one unique identifier is handcuffed to a rule associated with another unique identifier? Or is it more like they are surfing adjacent waves in the sea? My programmers say there are many ways to insert a rule, but the only one I have been told is the add-after method (it gets connected directly to the rule you specify it is to be added after--no parts of any jump ropes would find themselves between those two rules).

Can any of you tell me about some of the ways to do this, specifically how hierarchies are handled in sequencing tasks? I don't even know how to google for the information or how to look it up in a programming book.

P.S. Sadly, I have simplified things somewhat, though I don't think it will affect the answer I am looking for. Specifically, there is also trumping. In the current system, you can have rules at several levels with the same rule number. For example, the university-level requirement that a student have a minimum total GPA of 2.0000 can be trumped by a Plan II Honors Program requirement for a total GPA of 3.0000. When the system sees more than one rule with the same number, it automatically applies the more specific one

P.P.S. I think it goes without saying that I am not a programmer. If you just show me some lines of code, that may or may not do anything for me. I know you guys are good at describing strategies in English, too, a language with which I am much more bettery than programming languages.
livingdeb: (Default)
Energy Star has what looks like a really good refrigerator energy usage comparison calculator. (Yikes, five nouns in a row! I'm so glad English is my first language, geez.)

It looks good because you can enter your exact refrigerator model and the exact amount you pay for electricity from your bill. When I do that, it tells me that I would cut my energy use in half and thus can save about $2 per month if I replace my awesome but twelve-year-old refrigerator with a new Energy Star refrigerator.

Interestingly, they say that my current refrigerator uses 688 kilowatt hours per year, but the big yellow sticker that came with my refrigerator says that it uses 598 kilowatt hours per year. I've come up with four possible reasons for this which are not mutually exclusive:
* Energy measuring methods have been improved, thus leading to different figures.
* My refrigerator is expected to have lost some efficiency over the years.
* Energy Star is deliberately overestimating the energy use of my old refrigerator to try to get me to buy a new one.
* The original figure was deliberately underestimated to try to entice me into buying that model.

Regardless, I am in no hurry to trade up.

That's even though my city will pay $50 to recycle an old but working refrigerator. I'd rather hang on to mine until it doesn't work and lose the $50. At a new refrigerator cost of $1000 earning only 2% interest, it would take only 2.5 years of putting off replacing my refrigerator to earn $50 anyway. Supposedly refrigerators last 15 years on average. Some of the more affordable new low-energy refrigerators are having trouble with their compressing going out prematurely.

However, part of me thinks that recessions are a good time to look for bargains in expensive things like Energy Star refrigerators.

One more relevant piece of data is that our next refrigerator will probably be bigger. Our current one is 18.5 cubic feet, which is on the small end of normal. It's located at the end of a counter, so we can fit in a new one of any width. We'd probably like to move up to at least 21 cubic feet which might just about cancel out any energy savings anyway.

Programming update - I have now completed nine of the twenty-four hours in my programming book. Everything still seems to make perfect sense, which is good.

I remember when I took a workshop on Javascript, I got totally lost during the discussion about array variables. They are just variables that have multiple data values such as test scores for 30 students. In that case, you might name the variable TestScore and the score for the first student would be at TestScore(1) and the score for the second student at TestScore(2), etc. What could be easier? But I seem to remember they were trying to use multi-dimensional ones, not one-dimensional ones like this one. Which means they could hold multiple test scores for each person. Um, still doesn't seem hard. Maybe it had four dimensions and they didn't explain well how to keep track of them. I don't know.
livingdeb: (Default)
Today I watched a video on how to make Chocolate Espresso Pots du Creme without the sound. I found myself adding in silly narratives such as:

Pour a big bucket of cream in.

Then pour just a little more in. You can never have enough liquidy fats in your life.

This brown stuff is a delicacy. Admire it, but try not to slobber on your keyboard.

I am holding a large chocolate bar. But really, you should put in several bars. (I am going to be doing that off camera.)

Break the bar up into pieces. You don't have to break it down into individual squares, you can just leave two together. No, actually I can't stand to see the chocolate like that, so I have broken them down to single squares.

Actually, I will add just a few more squares of chocolate on camera.

That is the stove. This is a big toy for big men. You are not allowed; let me just bring this pot over to the counter where it's safe.

You can see that the chocolate doesn't mix well with the cream, but that's okay.

I have my magical wire whisk, though, so actually, this does work.

The only utensil you really need in life is a wire whisk. It's good for stirring. It's also good for scraping the sides of the bowl.

Now I'm pulling out a sieve to pour this through. It's totally unnecessary, but hey, I don't have to do my own dishes, so why not?

Now, as you can see, I did have money for a second utensil. I could have gotten a rubber spatula, but instead, I got another wire whisk. Yeah, baby.

I have lined this pan with a beautiful cloth. This helps make a comfy nest for my cute little yellow cups. If you take care of your little cups, they will take care of your creme.

You must pour exactly the right amount into each little cup. Note how the levels of chocolate match perfectly.

Oops, a drop landed on the edge of one of the cups. I will have to lick that off, off-camera. Make sure you hold this pan until it's done dripping before moving on to the next little cup.

As you can see, I screwed up and have to put a little more batter into the cups.

Wait, were the cameras rolling when I licked my finger? You weren't supposed to see that.

Other people pour water around the cups instead of nestling them between the folds of fabric. Oh, wait, I do too.

That oven is for the big boys, but I still don't trust you to get near it. Let's just say that I am man enough to put this in the oven myself.

You can find out if it's ready by jiggling the dish. The puddings should wiggle but not squirt when you poke at them, just like the breasts of non-lactating women.

Now that we're done, there is room to add even more cream and more chocolate. These are natural and organic, so they are totally healthy.

Blog entry of the day - The Happiness Project's Five Tips for Getting a Little Kid to Take No for an Answer - "I realized that although she doesn’t want to hear “no,” my daughter responds very well to certain kinds of explanations. While “It’s not healthy,” “We don’t have time,” and “I don’t want to buy that” don’t work very well, other justifications for saying “no” are more effective:"

#2 is the funniest and #4 is my favorite for most usable. I've actually used #2 on myself--when I go into an expensive place, sometimes I tell myself to pretend it's a museum. I admire all the pretty and interesting things, show my friend(s) my favorites, and then move on.

I also noticed a similar thing at work. It's easier to keep them from saying "no" to me if I use this phrase: "It's a data integrity issue."

(Warning: link contains untruths which I do not endorse or condone. That doesn't mean they're not funny.)

Comic strip of the day - xkcd's Cover-Up - this one also made me laugh.

Programming update - I have decided to switch to a different recommended book I found, SAMS Teach Yourself Beginning Programming in 24 Hours. "In just 24 lessons of one hour or less, [I] will get a thorough introduction to computer programming and learn to write simple programs in Basic and Java using the tools provided on the CD-ROM." Actually, I won't be using that CD-ROM because it's for Windows and I have a Mac. Otherwise, this sounds more like what I'm looking for, knowledge that's intended to be generalizable. Also, this book is from my public library which means I have "only" three weeks before I have to renew as opposed to the entire semester I have at my workplace, so there's another excuse for focussing exclusively on it for a while.

Although more than 24 hours have gone by since I got the book, I am not yet a programmer. However, I have completed six chapters and the chapters really did take less than an hour each, even though I'm taking notes. I feel that I will, in fact, be able to finish this book, probably after renewing the book only once. I am on a mission!

After that, I may focus on Java again (useful, though not used by my employer) or I may focus on Javascript instead (maybe more fun, though it's just a scripting language) or maybe both. Currently, my main goal is to prepare for the trainee job at my employer (though I just read an article stating that the entire system is going to institute hiring freezes). My other goal is to remember that programming is supposed to be fun and to try to have fun.
livingdeb: (Default)
I have decided once again that it might be a good idea to learn the basics of programming. Yes, I have already sort of learned some of this a few times, but it's all very tenuous.

The Planning

This time, I am not starting with a crappy book like I always have in the past. For example, I looked up Beginning Programming for Dummies on Amazon, and the reviews make it clear that I do not want that book.

Instead I am starting with Beginning Programming with Java for Dummies, available as an electronic book at my employer's library. While reading that, I decided to put together a glossary of terms. Things generally make perfect sense when I read them, but then I forget them. So my first strategy for this is making a glossary. My second strategy (which I may not be so great at) is to try to do something related to this topic daily, to keep things whirring in my brain.

History of Programming Languages

I also checked out Java for Dummies by the same author. The first thing I learned that I found interesting was a little history of languages:

* ? - BASIC (This is not mentioned, but it's what I learned in high school.)
* 1954-1957 - FORTRAN, the first modern computer language, is invented. It is great for scientific programming. (I had a class in this in college.)
* 1959 - COBOL, intended for business. (I had an opportunity to do Y2K work in this language, but didn't take it--one of my regrets in life. I have friends who had a blow-up dinosaur they named COBOL.)
* 1972 - C
* 1986 - C++, supports object-oriented programming, better for updating and re-writing code you already have. (This is the language I recommended that my mom learn when I recommended she become a programmer.)
* 1995 - Java, allows only object-oriented programming, now more popular than C++.

My employer uses NATURAL, which I had always assumed was a home-grown COBOL-like language (because it's rare and old). However, recently I learned that we aren't the only people who use it and that it replaced COBOL, so it must be better. I don't know if it supports object-oriented programming, but I do know that the programmers where I work are still using it to do the re-write of the degree audit system.

Playing with Javascript

When I got to the worst chapter in the book, the chapter about downloading the language and the tools to work with Java, I stopped and googled using Java on a Mac. It turns out my computer is already loaded with Java. While I was following some directions on how to find it, I came across a Javascript tutorial.

Since the tutorial was right on the Integrated Development Environment (programming tool with a window for code, a window for watching what happens when you run your code, and, in this case, a window with a tutorial in it), it didn't involve any nasty set-up procedures. Everything was already there.

I went through the entire tutorial this weekend. The explanations were minimal (I added hardly any terms to my glossary), but I got to actually write some programs. My favorite was a countdown program (to practice a while loop) and making a rock/paper/scissors game (to practice working with random numbers). Mostly I just liked programming in sillier messages than the tutorial sample had. ("Mwahahah! I chose rock! Oh, it's a draw.")

Profile

livingdeb: (Default)
livingdeb

June 2025

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 4th, 2025 10:47 pm
Powered by Dreamwidth Studios