• Category Archives School
  • Home lunch replaced with garbage from school

    Original article: Preschooler’s homemade lunch replaced with nuggets

    To me, this is a total travesty. It is an indication that the nanny state of our government has over-reached its bounds. From the article: “…a state agent who was inspecting lunch boxes decided that her packed lunch — which consisted of a turkey and cheese sandwich, a banana, apple juice, and potato chips — ‘did not meet US Department of Agriculture guidelines'”.

    So what did they do? They replaced the child’s lunch with a cafeteria tray that had chicken nuggets on it. Frankly, I consider the kid’s sandwich to be a hell of a lot more wholesome than those nuggets… do a search on just what chicken nuggets are typically made from (these probably came from a frozen package distributed by Sysco or something) and tell me that a turkey and cheese sandwich is less wholesome than reconstituted chicken parts that have been bathed in ammonia to kill off E Coli and other bad stuff.

    I think that the mother should be developing a lawsuit against the school. I think that Jamie Oliver should be up in arms (actually, he already is, but perhaps hasn’t focused on this particular story yet). I think Anthony Bourdain is probably just shaking his head and saying “I told you so!”

     


  • Software specifications suck

    OK, so a class I am taking right now is going through the whole software specification thing. This is the full-blown deal, with a specification being written up by committee, etc. I just got done writing the data design portion of the specification, which was the only thing that I had to write.

    Of course, what they don’t mention is that in order for someone to write this particular section, you have to know just about everything else about the specification first. Why the hell this is part 2 of an eight part section is beyond me, because it is probably the last thing you really want to do in the specification, at least when it comes to finalizing the specification.

    Anyway, it is nice to know that this portion is just about done. For this class we all have to give an oral presentation on parts of it. I already did my presentation about a month ago on a portion of it, so I am completely done in that regard. Makes life nice and easy for me now, because all I have to do now is run around and look busy and stuff.

    Coding this beast is going to be interesting, I should mention. I am not a java programmer by any means, so learning how to program this thing should be different and an experience for me. At least I’ll be able to take this thing and eventually play with it in other ways once the class is over.


  • Presentations Cont.

    Well, the presentation went well. I was able to deliver exactly what I wanted to the class with the meager slides that I had created, which is exactly how I feel it should be done. The slides ARE my cue cards, dammit!

    After class went to a LUG meeting, which pretty much bored the daylights out of me. They did a long presentation on the programming language “Clojure”, which is just another variation on a theme and to me does not seem all that practical since it requires the JVM to run and a number of other things running at the same time just to get off the ground. There are some bonuses for using languages that compile into proper binaries or are dealt with through a light-weight interpreter.


  • Presentations

    So today I have to do a presentation for a class I am in. For the last day or so I have been worrying about this presentation, feeling this overall feeling of dread that I am going to screw up. To top it off, I have not been feeling all that great and I am a bit congested.

    However, in the last ten minutes or so I have started to feel a lot better about it. The slide presentation that is going to go with it looks to be solid and readable, without getting too cramped. My section of the presentation actually has the only slide I feel is cramped, and that is because of the nature of the slide. I will make apologies and stuff concerning it.

    Regardless, I am feeling a lot better now because things seem to be falling together properly for what is going on.


  • More project work

    Just got over a major hurdle on my kd-tree project. It was segfaulting and I had no idea why it was doing so. Now I know, and that is one of the biggest hurdles in figuring out why something is going wrong. The fix is usually much easier to deal with once you know what is going wrong.

    This project was going well until I hit this snag… at which point I became disillusioned with it and stopped working on it for a good five days now. Finally I can work on it again with the knowledge that the problems that I run into are going to be small things, not big whoppers like this one.

    In other news I am going to be heading to Storage Networking World 2008 down in Orlando next month. It should be quite interesting to go to, as the subject matter is of interest to me. There is going to be some work to be completed prior to heading down there, such as gathering some facts of our work at the HPC Center to be able to talk about.


  • Assignments and stuff

    I finally got my programming assignment for my databases class yesterday. We have been wondering in class when this was going to show up, and what it would pertain to. Now we know… and I have a feeling that there is a good portion of the class that is going to be hopelessly screwed.

    Why? Because this is a REAL programming assignment. That’s why.

    You see, these days in college level courses, at least at the University of Florida, we have been getting things like “make a program that takes these numbers and gives the average, mean, and standard deviation.” Of course, all of these programs are written in Java.

    This is different. With this assignment we are doing an exploration of search algorithms based on different indexing techniques. The first, our baseline, is simply a sequential search. I am still mulling over how exactly I am going to do it, as there are a couple of tweaks that I can perform even with a sequential search to get the best performance. After that we are to perform a kd-tree search on the data (the data is two-dimensional points, so a d-tree type indexing makes sense in this case) and then a Vkd-tree, which I have yet to actually figure out the specifics of.

    We have a month to do this assignment, and I have already started. Let me be the first to say that those that wait on working on this assignment are going to be screwed, because I am seeing issues with it already. I have sent three emails to the professor asking questions about the assignment (not for help, mind you, but about the specification) because certain things about it are not completely clear to me yet, such as the range on the points, whether or not they can be real numbers or if they are strictly integers, and just how many points there can be in a database file in the first place.

    All of these things matter, because if I write the program to use short integers and then the point values exceed 216 we get a buffer overflow. Same goes for if I want to store all of the points in memory, as I have a finite amount of space and need to define the number of points I am going to load. The sample database has 2 million points in it, which blew up a normal integer array size but survived in a short integer array. If the number of points is going to be larger than this, then I will have to go back to stuffing everything onto disk instead. Ah well.

    I have, however, decided that the output of all three methodologies are going to be output to disk first, sorted, then displayed. In this way I can get the same output and ordering regardless of search methodology, and I shouldn’t have to worry about sorting the original data first.


  • Modulo Arithmetic Issues

    Interesting… I don’t know if I got the bonus question right or not, but now I am finding some interesting things about it. It turns out that I am both right and wrong about the properties of taking the modulo of a negative number.

    I did quite a bit of testing to make sure that when you take the modulo of a negative number, you receive either a negative number or zero. This was true whether I used php, emacs, bc, or an online calculator I found.

    However, apparently when programmers were first writing the modulo routines they decided on a slightly different approach as to what modulo actually meant and came up with the current solution, which generates a negative number. Hence:

    The mathematical definition:

    http://en.wikipedia.org/wiki/Modular_arithmetic

    The Computer Science definition:

    http://en.wikipedia.org/wiki/Modulo_operation

    So, looking at these there is a difference between the two, but I favor the computer science version in this case since we are dealing with indexes that are to be used on a computer system where this is defined in the CS method.


  • Hash tables and bit buckets

    So I was working on homework for my database II class this morning (very early this morning, I might add) when I came across the final problem asking what a hashing table with the following hashing formula with various values of B plugged into it would be useful for:

    H = n2 mod B

    Now, using the value of 10 for B doesn’t really help all that much, as you leave four of the buckets empty at all times and four of the other buckets will get double filled, assuming an equal distribution of values for n (0,1,2…) But there is a reason to use this! What happens if you set B=2, and start plugging in negative values in for n? Well….

    • 102 mod 2 = 0
    • 112 mod 2 = 1
    • 122 mod 2 = 0
    • etc.

    We get alternating values of 0 and 1. But we could do this without going the extra step of squaring the value and get the same result, right? Well, yes and no… what happens if we input a negative number for n?

    • (-10) mod 2 = 0
    • (-11) mod 2 = -1

    Uh-oh! Now we have a situation where we are getting a value that does not fall into a bit bucket that exists! What to do, what to do? Well, if we square the value of n in this case, all of the even values of n, whether they are positive or negative, will fall into the 0 bucket, and all of the odd values of n, positive or negative, will fall into the 1 bucket:

    • ( -10)2 mod 2 = 0
    • (-11)2 mod 2 = 1

    Thus, problem solved! Now I just hope that I got this right and I get the nice extra credit that I so richly deserve for being a fucking genius. 🙂