Monday, September 26, 2005

Harmful Dog Food Additives

Many dog food companies will add chemicals to dog food for various reasons. Some are added as preservatives. Ethoxyquin, BHA and BHT are commonly used synthetic preservatives. Ethoxyquin is a pesticide, and yet some companies use it to preserve dog food so that their product will have a longer shelf life. Ethoxyquin, BHA, and BHT are all potentially cancer causing ingredients, and yet they are allowed to be used in dog food. Various natural preservatives, such as Vitamin C and Vitamin E can be used instead and do not create the health issues of the synthetic ingredients.


I let Yoda run free on a 20 foot lead on Sunday. He loved it, and he also wore himself out, which was nice. A tired dog is a much better behaved dog. I will probably let him go for a run tonight as well if it isn't dark when I get home. If not, then I will probably take him for a jog on a heel. That way he will be able to burn off some of his excess energy. I have tomorrow off work, so that I can take Beth to have a test run at the hospital. It will be nice to not work until 6 one night of the week. I will be back at school in a week, and then I will home early a lot more often. It will be good for Yoda because I will be able to spend more time with him.

Friday, September 23, 2005

Distributed Computing

Distributed computing is a great thing. It is the process of sharing computation over several processors. This is the concept behind the linux farm, which is a group of Linux computers which share their computing power, in essence you have one very powerful server. This is great because not only can you have a server capable of computing faster than existing servers, but as a home user you can take several old computers and use them together to get a high speed server, for whatever you might need a high speed server for.


So today was clean out the back room at work day. This meant free computers to anyone who wanted one. It also meant, since I was doing the cleaning, I got first pick on all the reject computers. So I picked up a nice, very small 600 Mhz PIII that is going to replace my existing 450 Mhz firewall/router. It is even smaller than the current one I am using, and much faster as well. It should work out nicely. I also got two 500 Mhz PIIIs that I am going to use for who knows what. But when I come up with an idea, it will be great. I will probably just use them to fool around with different linux based servers at my house, but I might go all out and use them with the 450 Mhz I have freed up from the router in a little distributed computing setup. It would be a neat thing to play around with. Maybe I'll set it up to try and calculate the next digit of Pi or something. Not that it will be fast enough to compete with the current distributed network that is calculating digits of Pi, but I am sure there is some other obscure digit out there that no one really cares about that I could try and calculate. Let me know if you come up with one.

Thursday, September 22, 2005

Voltage, Current and Resistance

Voltage is the potential energy between two points for a flow of electrons to occur. This flow of electrons is called a current. The material over which the electrons flow(conductor) will have a certain resistance to the flow of electrons. Typically, a material's resistance to the flow of electrons will be constant, and so you have a direct relationship where when you increase the voltage, the current will increase. The mathematical representation for this relationship is known as Ohms Law.
Ohms Law
V=IR
You can also increase the resistance across a circiut by adding resistors. If you maintain a constant voltage across the circuit, as you increase the resistance the current will decrease. In this case the resistance and current have an indirect relationship.


News for today:
Yoda continues to do well in his training. He really doesn't like the pinch collar I got for him. When you put it on him he acts real sad. But when he has it on he behaves perfectly, so I know he knows exactly what he needs to do. Hopefully if we continue training him with the pinch we can get him to a point where he does everything perfectly without the pinch collar on. When we took him to the pet store over the weekend we realized that he needed a pinch collar because he got way to excited and wasn't able to focus on his training. Maybe next weekend he will be better. Although I think I will take him PetSmart this time, because I didn't like most of the bones they had at Pet Supplies Plus.
A week from Friday is my last day at work before I go back to school. It will be nice to be back in classes, plus I will have more time off. I will still be just as busy because of studying, but at least I will have some time throughout the day available to get things done in, so I don't have to do everything at night. Most importantly, I will be getting home earlier than 7:30PM each night, which will make training Yoda before dark much easier, especially as it gets closer to winter

Tuesday, September 20, 2005

Altolamprologous Compressiceps

Altolamprologous Compressiceps is a Cichlid from the African lake, Lake Tanganyika. It is a thin cichlid with a compressed appearance, making it more difficult for other fish to spot as it swims around cracks in the rocky areas of Lake Tanganyika. It is a predator that feeds on small fish and crustaceans. When hunting food, it will slowly swim towards it prey until it gets within striking range. When it strikes it will lunge forward quickly and grab its prey. Adult specimen are typically around 5 inches in length, but they mature very slowly and can take several years to reach adult size.


One of my prized Altolamprologous Compressiceps has died. He had an injury to his mouth the other night, and when I woke up in the morning he was dead. Now I am down to 3. He was probably worth about $50 when he died, luckily I had him since he was a juvenille, and they are much cheaper when they are young. The most expensive part of getting him and his other companions was the gas it took to drive across the state to the breeder that had them.
I took more pictures of Yoda last night, but I was tired and didn't get around to editing them and posting them. Hopefully tonight I will get them edited and put them up. I have to reinstall Windows on a computer tonight though, so I might not get around to working on the pictures. If I do, they will be up tonight. If not, then look for them tomorrow night.


AOL and Windows are two things I don't understand why consumers put up with. Windows is horrible, it doesn't just get screwed up because of all the viruses and spyware that is targetted towards it. It is so bad that it is self destructive. It is true, turn on Windows and leave it running, a fresh install with no software added and not connected to the internet. Come back every day and see if it is still running. Eventually it will have crashed, and that is just wrong. Why do people allow companies to provide them with horrible products and not go elsewhere. There are options out there. Then you look at AOL. They are so horrible they have the nerve to charge people for a service, only to make further money off of them by flashing ads in front of them. If you pay for internet service you shouldn't have to see ads. All the other ISPs are able to survive without the extra ad revenue, why can't the largest of all the dial-ups do it.

Monday, September 19, 2005

Linux Commands: ls -l

In Linux, the command ls is used to list the contents of a directory or to obtain information about files. When you just run ls, it will output a list of all files in the target directory, or all files that match the filename you passed. When you pass the -l flag, it will list information about each file.
the first thing the ls command lists about a file is a string of 10 characters. The first character is the file type(eg. d for directory, - for regular file, l for symbolic link). The next ten characters are the permission bits for that file. They are in groups of three, owner permissions, group permissions, and everyone else's permissions. Each one consists of three characters. A - is displayed if the permission bit is not set. The permissions are read(r) write(w) and execute(x). It is also worth noting that certain special bits may also be displayed in place of the permission bits(eg. sticky bit). The next thing displayed is the link count for the file/directory. The link count is the number of inodes that point to the data blocks of that file.
After the link count, the user and the group that own the file are displayed. The next thing that is displayed is the size of the file in bytes. The second to last thing displayed for the file is the date it was last modified. And finally, the last thing displayed is the filename itself.


It is official... Windows is the worst operating system ever made(every single version is tied for the worst). I just reinstalled windows on one of my church's computers, and after installing all the drivers I immediately went to download the anti-virus definitions. But that wasn't soon enough. I hadn't been on the internet for 5 minutes by the time I had contracted one of those newer viruses. You know, the ones that make your computer restart. At that point there wasn't much I could do because the virus made the computer restart about a minute after you start it, and it was gonna take 2 minutes to download the virus definitions needed to clean it. So I reinstalled.
In better news, Yoda is still being a good dog. Although Ethel is being a royal pain in the butt. She keeps attacking him because she wants his bone. When she does, Yoda tries to play with her, but she just keeps attacking him. Although, last night, Yoda did growl at her, hopefully he won't get sick of her attacking him before she get's bored of it. If he does, I have a feeling she will be in a world of trouble. He only weighs about 3 times more than she does. Hopefully, she will get used to him and leave him alone before that happens though.

Sunday, September 18, 2005

Pictures of Yoda



















Here are two pictures of Yoda I took real quick. Next time I think I will wait until it is light outside and take the pictures outside without the flash so you can see what he looks like when he doesn't look possessed. As you can see from the pictures, he has mastered the command 'sit'. I'll probably get more pictures up Wednesday night.

Friday, September 16, 2005

Finite State Machines

Finite state machines are systems consisting of inputs, outputs and some means of maintaining a finite number of states. The current state of a machine determines how the machine acts. A very simple example would be a machine consisting of a power source, switch and light bulb. The light switch determines the binary state of the machine, and the lightbulb is the output. In electronics the state typically takes the form of an encoded state number stored in flip flops, which are devices which hold a state of 1 or 0 (similar to RAM but only hold one binary digit, so several are used to increase the number of states possible). The machine changes state every time a certain condition is met. This condition is typically every time a clock signal has a low-high or high-low edge(the clock signal switches from a low signal to a high signal, or vice versa). The new state that the machine changes to is determined by the current inputs, the current state, or both.
There are two secific types of finite state machines, based on how the state machines outputs are determined. The mealy machine has outputs that are determined by its inputs and its current state. The moore machine has outputs that are only determined by its current state. This concludes my brief overview of finite state machines.


News for Today
Yoda continues to improve with his training. I'm even seeing an improvement with his jumping. He still jumps up on you when he gets excited, but now he calms down much faster. Before, when he got excited and started jumping, I would have to hold him on a sit forcefully until his breathing slowed down and he calmed down. Now when he gets excited and jumps off, I tell him off and he gets down and I then instruct him to sit, which he does and then he is much calmer. This is very good, because he needs to be able to calm down on command, otherwise he will be too high strung and it will make life at my hosue very difficult. Tomorrow I will probably take him to the pet store to pick out a new chew toy. I will also pick up a new beef knuckle for him. I won't give it to him for a while but he loves his current one, so I want to have a replacement ready for when I have to take it away from him when it is too small.
In other news, my car may be gone in a week, hopefully. It depends on what saturn is willing to give on it for a trade. If the trade will cover most of my loan, then I will let my parents take it as a trade for the new car they might be getting. Which they are going to let me drive until my mom's lease expires in late December. At which point, I would need to buy a new car for myself. I might go with a used car this time around, I kind of miss having a disposable income. Plus, I could get a nicer quality car than a mid level Saturn ION for less money if I go used.

Thursday, September 15, 2005

Ternary Operator

The lesson for today is on the Ternary operator. Examples are in PHP.
The ternary operator is a very useful tool for simplifying or cleaning up your code. The structure of the ternary operator is similar to an "if then else" statement, but it is an actual operator which enacts on a boolean data type, so it is typically faster. Unlike most operators it has three members and a result instead of two members and a result(ie. '+' has two members, the two things you are adding together, and the result). One common symbol for the ternary operator is '? :'. The first member is the conditional. This typically takes the form of a boolean expression such as ($result == 0). This is a boolean expression because it has two possible results, true or false. The second member is the response. The result of the operation will equal the response if the conditional is true. The third member is the alternate response. The result of the operation will equal the alternate response if the conditional is false. Using the ternary operator the following code:
if ($string == '') {
$integer = '0';
} else {
$integer = $string;
}
which can be used to replace a zero length string with the number 0 can be written as:
$integer = ($string == '')?0:$string;
This significantly shortens the length of our code. This example is mainly useful when trying to handle strings like they are integers without actually converting them to integers.


News for today.
Yoda's training continues to go well, although he does not want to go to the kennel at all. I have to force him in everytime I have to leave my house. He also did not want to listen to my mom yesterday when I got home. She let him out because I got home and he was asking to go out, but I was trying to eat so I couldn't let him out myself. If he continues to not listen to her, I might get her involved in his training to see if that helps. He also is completely obsessed with my guinea pig, perl, and not in a good way. He attacks her cage, and on numerous occasions he has almost knocked it off it's stand. Hopefully this is just a phase because she is something new, because it will be very hard to keep Yoda separate from Perl. Tonight I will continue his training, and if he continues to do so well, then this weekend I will be taking him to Pet Supplies Plus to practice being in public, but not as distracting as PetSmart. While there I will let him pick out a new chew toy.

Wednesday, September 14, 2005

New Blog

This is my first post on my newer Blog. From now on, I will use this as my public Blog. My other one ended up being a place for me to complain about everything that was bugging me, so I will keep that one secret.

Recent updates. I got a new dog on 9/8/2005 in case anyone hasn't heard yet. His name is Yoda and he is an American Staffordshire Terrier mix. The breed is closely related to the American Pitbull Terrier, but it has been bred as a companion dog and for the show ring for over a hundred years, so they are very obedient and friendly dogs. I've been training him after work, and he is improving at a very fast rate, faster than I expected. He had already been at a trainer for several months, but I'm not convinced she knows what she is doing because I have accomplished more this week than she did and I am a novice at dog training.
According to the trainer he understands sit, down(lay down), shake, and come. Shake is turning out to have been a horrible command to train him because now when he wants attention he uses his paw to try and get it. Unfortunately he uses a lot of strength when doing so, and he has cut several people with his paws. So I am working on unlearning that. So far, as long as I can keep him focused on me, he sits very well. I am finding he doesn't really understand the command down, but he knows to lay down when you drop your hand to the ground(he is expecting a treat to be in your hand). Come, which I use here, he has mastered, except as he is running to you he gets a little excited and has a tendency to run into you as he doesn't slow down.
Other commands I have been working on are heel, kennel and off. Off is by far the most important one, since he likes to jump up on people and furniture way too much. It is also the command he is making the least progress on. He is just playing, but he is a large dog, so his playing can hurt people when he is jumping on them. Heel, which is probably the second most important command, he seems to be making the most progress on.
He has also been getting better with my other dogs. He is much calmer around them then when we first got him, but he still tries to play with them occasionally. They aren't very happy when he does that because he is much bigger, and they are a little old for his kind of play. Yoda also ignores the cat, and she has been getting less scared of him. Now she doesn't leave the room when he comes in, and she even lets him get close enough to sniff her sometimes.