Archives for: October 2005

10/31/05

Permalink 10:43:00 pm, Categories: Science, 139 words   English (US)

Risks of antibiotics

Here is an excellent article on the risks of antibiotics. Some quotes:

The most disturbing is Salyers's discovery that antibiotics like tetracycline actually stimulate Bacteroides to begin swapping its resistance genes. "If you think of the conjugative transfer of resistance genes as bacterial sex, you have to think of tetracycline as the aphrodisiac," she says.

Also amazing is how much bacteria can actually affect fat storage:

Fredrik Backhed ... has caught B. theta sending biochemical messages to host cells in the abdomen, directing them to store fat. When he gave germ-free mice an infusion of gut bacteria from a conventionally raised mouse, they immediately put on an average of 50 percent more fat although they were consuming 30 percent less food than when they were germ-free. "It's as if B. theta is telling its host, 'save this--we may need it later' ...

Permalink 09:21:36 pm, Categories: Python, 245 words   English (US)

IMAP Gmail ennui

So this past week or so I've been pretty bored. With school out it is rather lame. I decided to torture myself further and try hacking again at making an IMAP interface to Gmail.

I didn't really get much further along, but I did manage to get it working with Thunderbird:

I don't really recommend using this at all. It's more of a proof of concept and something to keep me busy. The code is absolutely horrible. It fetches ALL mail from your Gmail inbox at startup no matter what. I found that the hardest thing for me to do and what took the most time (and probably is buggy as hell) was trying to parse a string such as:

a0004 FETCH 1:1 (UID FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE IN-REPLY-TO REPLY-TO LINES X-LABEL)])

The parentheses and brackets can be nested, so above might also have '.. FLAGS (\Seen) ..' etc. That's what makes this difficult. I'd appreciate any algorithms :). I also got to see how the various IMAP clients work. I found that mutt is the cleanest IMAP client. I could not get it working with Apple Mail and may try again later. I probably spent more time looking at tcpdumps when sane people would look at the IMAP RFC :). Go here if you are feeling brave. Don't blame me if you lose all your mail. I don't see how that can happen, but you've been warned.

Permalink 08:30:29 pm, Categories: Python, 259 words   English (US)

Apache logs and mass vhosting

Apache has an interesting option for mass virtual hosting. The problem is in the way that logfiles are dealt with. You can't have separate logfiles for each virtual host, and they recommend using a log processing script to separate them. What is also rather lame is you cannot split up error logs no matter what. It's rather silly that this module is for 'mass' hosting and yet they expect users to want all of the error logs in one file that cannot be linked to a virtual host.

Anyhow, cronolog doesn't support virtual host info in the access log, so I figured I would try to write my own script that would do what I need. I didn't know how much it would involve, but surprisingly very little, and there begat pythonolog :). I got most of cronolog's functionality in a very few lines of code. It's definitely not as efficient though. It would be used basically like this:

LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/path/to/pythonolog.py /my/logs/%Y/%m-%d-%VHOST-access_log" combined

It accepts all the standard strftime formats, as well as %VHOST which would be the virtual host (first field on line). I made it so that a configurable maximum number of logfiles stay open. When that limit is reached, old logs that haven't been written to in awhile are closed. This keeps the file descriptor count reasonable.

Go grab it here if interested. I honestly haven't even tested it yet so good luck heh.

Permalink 08:25:04 am, Categories: Home, 20 words   English (US)

Power Outage Info

Some interesting pages provided by FPL:

The outage maps are especially interesting.

10/30/05

Permalink 01:14:39 pm, Categories: Home, Medicine, 401 words   English (US)

Aftermath and med ads

Well things are somewhat improving here, but it's dangerous to drive. Many major intersections have no traffic lights. Going through these intersections is not fun. With so many trees blown down it looks like a wasteland outside. Power is still out to many areas, and the lines to gas stations are huge. I am only driving minimally, and have about a half tank of gas left. Cabin fever is setting in. I saw 'The Shining' last night, but I am not at the Jack Torrance stage yet. What an amazing movie btw, it's such a masterpiece of filmmaking. It played on A&E and what kinda sucked is it ran from 8 to 11:30pm with commercials!

Speaking of commercials, I am really appalled at the number of prescription medicine commercials on television. It is really getting out of hand. I think I saw at least one for every commercial break on A&E between 8 and 11:30pm. I also see a new tactic in these ads. In the past there were always disclaimers saying you may vomit, get an erection for 8 hours, die, etc. Now they are almost gone, and instead they show some text in the commercial such as 'See our ad in Health magazine.' I am not sure, but it seems to me they are exploiting a loophole to not mention any side effects during the commercial.

Here is an interesting critique by a doctor on the med business. Sorry I think you need a subscription to Discover to read this. A quote:

These ads drive a wedge between doctor and patient. For a while, I was both a family practitioner and a researcher, and I knew as much about the real data behind Vioxx and Celebrex as anybody. I knew they were neither safer nor more effective than the much less expensive alternatives and would tell my patients so. Nonetheless, many still demanded these drugs, which shows the tremendous power of marketing.

If you don't believe your doctor, I feel sorry for you. It's a shame that someone can think themselves more knowledgeable on medicine after watching a 30-second commercial. Is 30 seconds going to outweigh 8+ years of education that a doctor goes through to become a doctor? What's also very sad from that article:

Drug companies are also sponsoring about 70 percent of the continuing education that doctors are required to participate in to keep their licenses to practice.

10/28/05

Permalink 09:06:41 pm, Categories: Science, 266 words   English (US)

Viral Dreams

I had a strange dream last night about viruses. Not the computer kind, but biological. First a little background.

Viruses are essentially proteins. The ones that the body can fight have antigens, which are identifiers that the body recognizes as non-self. The body generates antibodies that 'fit' and bind to these identifiers and render the virus, and protein, inactive. Vaccines are created by introducing a version of the virus that may be biologically inactive or not powerful enough to cause major damage, or even something that may resemble the real virus. The body can then make the antibodies that will later take care of a real threat. Of course this does not work for the viruses that mutate and therfore make the existing antibodies useless.

I had a wierd dream about a virus that depended on antibodies for survival. That is, it required the body to attack it in order for it to succeed. It was like a virus encased in a shell of proteins that the body does recognize as non-self, and therefore attacks. But attacking it actually opened the shell and let the real virus out, which was not recognizable by the host and did not have antigens. It was sort of like flack deployed by the virus in order to trick the immune system, but it actually depended on the immune system to spread.

I'm not sure if there is such a virus. In my dream the word 'diablo' kept coming up for some reason, heh. No idea why. I just thought I would blog this in case it came in useful later.

10/27/05

Permalink 11:07:10 pm, Categories: Science, Religion, 706 words   English (US)

Survival of the fittest... molecule

When we think of the phrase 'survival of the fittest' and natural selection, we usually think of it in terms of animals or live organisms in general. But it goes deeper than that. Here's a great excerpt from Lehninger's Biochemistry book (written in 1975 no less):

Why should living organisms have selected the specific types of organic molecules they now possess? Why should 20 alpha-amino acids be the building blocks of all proteins in all organisms? Why not only 10? Why not 40? Why are they all alpha-amino acids? Couldn't we equally well construct large "protein" molecules from amino acids having their amino groups in the beta positions? Why are the purines adenine and guanine and the pyrimidines cytosine and thymine, out of the dozens of purine and pyrimidine derivatives known, the essential building blocks of DNA in all species? Much evidence supports the concept that the biomolecules we know today were selected from a much larger number of available organic compounds. Actually, several hundred different organic compounds have been isolated from simulated primitive-earth experiments on the abiotic origin of organic molecules like those described above. Since only a small number of different organic compounds may have been required to form the earliest biostructures capable of survival, it appears very likely that a process of selection took place.

Think about the formation of the first 'cell', the beginnings of life. The right molecules had to come together in the right way to create the cell membrane that separates a self from a non-self. Think of how many trials and errors were made throughout evolutionary history before that first cell evolved, how many molecules tested and deemed unfit to do the job.

Evolution is a theory that not only applies to the ape-to-human transformation which seems to be its most visible controversy, but also applies to the abiotic to biotic transformation as well, of inanimate to animate from an atomic and molecular standpoint. The theory of evolution ultimately says that you have come from that which is not living.

It's amazing to think about this. Was it just luck that the right combination of molecules came together after millions of years, maybe with that spark of lightning, and there began life as we know it? The idea of God always comes into this debate. There is a guy named Richard Dawkins that basically lashes out at scientists that believe in God. He simply says they are idiots and not true scientists. The recent Discover magazine has readers writing in defending him, as well as denouncing him.

In some ways I agree with the evolutionary perspective. I believe there is too much evidence to deny that we evolved from lower animals. I think that a person who denies this, denies science, medicine, and all things that such fields depend on. Just from a genetic standpoint it is hard to prove that we are not related in some way to apes.

But does that mean I must not believe in God? No. It means that I don't believe there is a God that has created us in his own image. I don't believe there is a way for science to prove the existence of God, and neither is there a way to disprove existence. There is no way to even disprove God's nonexistence. If you say evolution created us, fine. So who created evolution? What created that first cell, and why? Or go back even further, why was our universe created? These questions just cannot be answered by science.

I wouldn't even say that I am agnostic. Because there are certain things that happen in life that I believe are through some sort of divine hand. There is a feeling, and a faith in something, but I just do not know what, and I may never know. Just think of all the great things faith has achieved (even in science). I think we would not have excelled so far without that faith in a higher being. Science is definitely not my God. But neither is the human form divine. I believe there is a creator of the universe, and it is something that I most likely cannot even begin to comprehend. But I believe it is there nonetheless, waiting for me to believe.

Permalink 11:56:13 am, Categories: Home, 603 words   English (US)

Riders of the storm

Allright, maybe some of you are wondering how things are going with the storm. I've been out of power for the past few days and didn't have any internet access. Pretty much all of my area was out of power, so no internet cafes either. It's rather dangerous on the roads too, because all traffic lights are either gone, broken, or powerless. To top that, it's very difficult to find gas due to most gas stations not having generators and not able to function without power.

I'm pretty grateful we got power back so soon, as I've been hearing on the radio that it could take up to 4 weeks. I believe there are many areas still out.

So let's see, where to begin. I stay in a townhouse that really didn't get any damage. Outside is a mess though. Huge trees have been toppled over, and when they do you can see the roots spread out like a pancake. It shows that those trees have little foundation in the ground, and the roots grow horizontal rather than vertical. But most of the palm trees stayed up, and I believe those roots grow deep. The ones that did go down mostly broke in half. Maybe I did learn something from my Biodiversity class and all that plant bullshit :).

The trees are all mangled with the power lines. The next few days with no power is when the cabin fever sets in. Everyone comes outside. I saw a mom and her two children riding bikes with helmets. There was a downed power line and they just strolled right over it. I thought that was very funny to make your child wear a helmet for safety and then casually ride over a powerline. If there is any good that came out of this it's getting people out of their house. I think that we rely too much on television for entertainment, and while I walked outside it was nice to see kids actually playing in the lawn among the down trees. Nights were completely pitch black, and starlight the only source of light. The brightest thing in my room was my breathing Powerbook light which was trying to get those last few gasps of breath before suffocation.

It was nice to hear the sound of nature outside. Wait, those aren't insects, that's the strange harmonics of 4 or 5 generators running! So much for nature..

My fridge needs to be emptied. I'd venture to say that there must be alot of Americans that gain weight after a hurricane or power outage, a 'hurricane weight gain'. That's when you have to eat all the food before it spoils, and it's mostly junk food. I tried to exercise daily though just to keep in shape. Cold showers were not fun either. I found that the best way to take a cold shower is to exercise right before, so you get warmed up. I heard a lady on the radio come up with an interesting method of taking a hot shower. She unrolled her garden hose filled with water on the lawn during the day for a few hours. The water in the hose became very warm, and she used it to shower.

One thing that really bothered me was the appalling cell phone service. In my case it was Cingular, but I heard many others sucked as well. My home phone was dead too.

But things are sort of coming back to normal now. It was a fun ride, and I know people had it much worse. I'm grateful I had a place to stay, food to eat, water, etc.

10/23/05

Permalink 10:56:34 pm, Categories: Python, 66 words   English (US)

Python on Rails

Here is probably the closest equivalent to Rails for Python. What's very interesting is the 20-min demo on their site that shows how to create a wiki from scratch with TurboGears. It's definitely not as elegant as Rails, but it's still cool if you want to stay with Python. That programmer in the demo is pretty impressive, though he's probably had lots of experience with TurboGears.

Permalink 07:07:36 pm, Categories: Movies, 445 words   English (US)

Stay

I was thinking of seeing North Country or Capote this weekend, but as usual ended up seeing something else. I don't know, I think I wanted to see a movie that required little 'thought', so that narrowed down to Doom or Stay. I decided on Stay because it sounded like it had some cool cinematography and Doom got horrible reviews.

So how was Stay? The only way I can review it is by spoiling it, so here there be spoilers...

Let's see, how can I describe this movie... think The Sixth Sense crossed with The Usual Suspects, only not as good, and no 'The' in the title. It's OK, and interesting at times. Basically, it is one director's vision of what the last few moments of death must be like. Scientifically, I would agree that this is probably a very good hypothesis of what the brain does at the time of death. The mind seeks to resolve all that it could not resolve in life, so that it may rest forever. Ultimately the person wants to be forgiven, and that was the running theme of this movie.

I had seen Ryan Gosling in The Believer, which was an absolutely amazing true story about a Jew who hates himself so much that he joins the KKK. In this movie again he is fighting internal demons. Guilt and conscience is a bitch.

I'll save you 1 hour and 48 minutes: the whole movie is a dream, a fabrication based on people the main character sees around him during his last few minutes of life. I found it really interesting because you can tell that the mind works in this way sometimes. You create your own drama, and stories that are far from reality. In such a panic situation, it is conceivable that your mind would take this to the extreme.

Probably the coolest thing about this movie (and the main reason I went to see it), was the cinematography. It's conveyed just like a dream, with transitions between scenes happening as they occur in dreams. There are strange ticks and nonsensical things, like people swapping places in a scene as they walk behind a pillar. They are subtle, but you notice them. Another scene had triplets of everything throughout the scene, but I could not figure out why. The director did a very good job conveying the near-death experience. But it's rather pretentious, and too moralistic. I'm just glad that the main character did in fact die, and it did not end with some Hollywood crap.

Go see it if you're interested in this stuff and effects, other than that might want to wait until it comes on cable.

Permalink 10:07:15 am, Categories: Rails, 340 words   English (US)

Steel rails through my skull

So I'm reading through a really good Rails programming book. I'll be installing it for a client so I figure the more I know about the language the better.

The book says to create a new scaffold for its first sample application with the command:

ruby script/generate scaffold Product Admin

And as usual I am lucky enough to have problems at this stage. That's supposed to give me a web page I can use to view a MySQL shopping cart. But whenever I went to the URL I would get a 'Recognition failed' error. Not knowing anything about Ruby or Rails, I had no clue what this meant, so I'm searching logfiles, wondering whether there is a problem with my database setup, etc.

Searching on google led to an errata page for the Agile programming book, which seemed to indicate this issue. Of course the site has to be down and the google cache useless so I get nothing out of this.

After doing some reading, I found out that the above command is supposed to create an Admin controller of type Product. But it wasn't doing that, and instead creating a 'products' controller and ignoring the Admin argument altogether. So the recognition failed message means it couldn't find the controller. After about 30 min of searching the web, it turns out I came across a bug that was fixed 10 hours ago.

I was using rails version 0.14.1, which has this problem, and it's suggested to go down to 0.13 or the development code. After going to 0.13.1 (via 'gem install rails --version 0.13.1'), and removing the new version, things worked ok. Ahh the joys of version hell. Don't get me wrong, Rails looks very cool, but these type of issues remind me of all the problems associated with Java versions. I understand Rails is under heavy development, and I should probably stick to older versions. But with things such as 'gem install rails' installing something broken, how could I know?

Oh well, I got this working and will continue my Rails adventure later.

10/22/05

Permalink 11:43:17 pm, Categories: Science, 185 words   English (US)

Cleanliness is next to deadliness

I thought it was interesting to find out that polio affected the rich people more than the poor. It has to do with how the disease is transmitted and immunity.

As kids grew up in poor conditions, they came in contact with feces that spread polio. However, at a young age, the body can develop an immunity to the disease. In contrast, the rich kids were 'cleaner' and were never exposed to the virus. This cleanliness led them to be more susceptible to the disease, and the poor unknowingly vaccinated themselves.

So there is something to be said of living in dirty or rough conditions. Your body may be tougher to certain pathogens.

I heard recently in the news the story about anti-bacterial soap being bad for you. Normal soap works by binding to bacteria and it being physically scrubbed off. Anti-bacterial soap works differently, by interfering with bacterial growth itself and killing the bacteria. So what's the problem? Bacteria are great and coming up with resistance. So there is fear that we are actually making the bacteria on us stronger by using such soaps.

Permalink 11:21:48 pm, Categories: Medicine, 19 words   English (US)

Medblog

Here's a great blog written by a doctor doing his residency. He's always got some interesting stories on there.

Permalink 11:08:46 pm, Categories: Medicine, 181 words   English (US)

Lifelong Learning

My college has a 'Lifelong Learning' school which is mainly for elderly wanting to learn new things and exercise their brain. The brain really falls into the category of 'use it or lose it', so I think it's great to see people wanting to learn. It can only be beneficial to your health and mind. I've always felt that if I'm not learning anything new, my life seems sort of at a standstill, like I'm not going anywhere. I think academia is really where I should be, and who knows, maybe I will end up in a research or teaching hospital.

I came across The Teaching Company, which gets good professors to teach courses in an overview/introductory format on DVD. You're not going to get a medical degree watching these, but it's great to spark your interest and provides good general knowledge. I'm watching the Anatomy lecture series, which consists of 32 45-minute lectures. They have courses in many different topics, so go check them out. Some are rather expensive, but sometimes they have sales in which there are reasonable prices.

10/21/05

Permalink 01:36:40 pm, Categories: Science, 186 words   English (US)

Attack of the clones

When fertilization occurs in humans, the cell growth of the zygote is called indeterminate radial cleavage. The interesting part of this is 'indeterminate'. What this means is if you take a piece of that growing ball of cells off, and implant it into the uterus, it will grow into another human. That's how identical twins are formed, and is nature's cloning technique. It's called indeterminate cleavage because the cells are not specialized and are not 'determined' to be certain tissues until later in development.

What I wonder is, let's say you take a piece of the growing cells, to start another growth of cells (a twin). Then you take a part of the twin cell, and then a part of the part you take off, etc recursively. Since the cells do not have time to specialize, can you essentially create an unlimited number of humans (i.e. clones) from that one fertized egg? It's almost like you are creating more life without fertilization: parthenogenesis. We are already moving towards creating artificial uteruses, so can you imagine the impact of being able to 'grow' humans like this?

10/19/05

Permalink 06:32:20 am, Categories: Fun, 255 words   English (US)

Toys and world religions

7th Day Adventist - He who plays with his toys on Saturday, loses.

Agnosticism - It is not possible to know whether toys make a bit of difference.

Amish - Toys with batteries are surely a sin.

Anglican - They were our toys first.

Atheism - There is no toy maker.

B'Hai - All toys are just fine with us.

Baptist - Once played, always played.

Branch Davidians - He who dies playing with the biggest toys, wins.

Capitalism - He who dies with the most toys, wins.

Catholicism - He who denies himself the most toys, wins.

Church of Christ - He whose toys make music, loses.

Church of Christ, Scientist - We are the toys.

Communism - Everyone gets the same number of toys, and you go straight to hell if we catch you selling yours.

Confucianism - Once a toy is dipped in the water, it is no longer dry.

Evolutionism - The toys made themselves.

Existentialism - Toys are a figment of your imagination.

Greek Orthodox - No, they were OURS first.

Hari Krishna - He who plays with the most toys, wins.

Hedonism - To heck with the rule book!? Let's play!

Hinduism - He who plays with bags of plastic farm animals, loses.

Jehovah's Witnesses - He who sells the most toys door-to-door, wins.

Mormonism - Every boy can have as many toys as he wants.

Non-denomination - just play with them.

Pentecostalism - He whose toys can talk, wins.

Polytheism - There are many toy makers.

Taoism - The doll is as important as the dumptruck.

Voodoo - Let me borrow that doll for a second.

----------------------

He Who Dies With The Most Toys - still dies..

10/18/05

Permalink 06:21:34 am, Categories: Website, 10 words   English (US)

Trackback spam

Well now I'm getting trackback spam, so I'm disabling trackbacks...

10/17/05

Permalink 09:55:23 am, Categories: Medicine, 87 words   English (US)

Anatomy is funny

It's interesting how my Anatomy & Physiology book inserts some sly humor every once in awhile:

We have special names for bursitis at other locations, indicating the occupations most often associated with them. In "housemaid's knee," which accompanies prolonged kneeling, the affected bursa (fluid-filled pocket in connective tissue) lies between the patella and the skin. The condition of "student's elbow" is a form of bursitis that can result from propping your head up with your arm on a desk while you read your anatomy and physiology textbook.

10/16/05

Permalink 10:59:34 pm, Categories: Linux, 370 words   English (US)

Going deeper into cfengine

It's wierd, I always have a tendency to find problems in programs. And problems that to me should have been found a long time ago. I should have been a QA person.

I was playing with the latest release of cfengine (2.1.16) and came across a problem dealing with ordering of the configuration. Basically, you can have one operation, say installing a new /etc/ssh/sshd_config file, then trigger another, like restarting sshd, via a 'define' statement. These define classes in existence so that another place in the configuration can check for it. So let's say I have a copy command:

copy:
        $(dist_dir)/sshd_config dest=/etc/ssh/sshd_config
                mode=644
                owner=root
                group=root
                server=$(policyhost)
                type=checksum
                define=sshd_reload

Notice the define of sshd_reload. Then I have a shellcommands clause:

shellcommands:
        sshd_reload::
                "/sbin/service sshd reload"

If I were to put this clause clause above the 'copy:', it would not be executed, because it would be 'too late'. Making things more complex is I have to designate the proper order in an 'actionsequence' option. Ordering becomes important and tricky when the configuration gets complex. There is an 'AddInstallable' option which is pretty much like function prototyping in C, where it would give cfengine a hint that sshd_reload may be defined by something and sections may need multiple passes in order to catch that. That's great in theory, but it just doesn't work in 2.1.16.

So off goes my message to the mailing list and the developer tells me to use the latest subversion tree. Yippee, alpha code of software I don't even understand on production servers :). It fixed this problem, but brought out some others. First, the 'tidy' operation, which is used to delete files, seems to function differently in how it handles wildcards. The new code also seemed to have some debug statements which was making it noisy and emailing me crap. I had to go in and edit the code to remove them.

I don't know, whenever I run such development code, it's rather scary as I don't know what's broken. Oh well who gives a shit. What was rather neat is I was able to use cfengine to update cfengine itself :).

10/14/05

Permalink 03:45:33 pm, Categories: Linux, 590 words   English (US)

The little cfengine that could

I've been spending some time setting up cfengine and attempting its methodology. Essentially the idea is to keep centralized configuration for all servers and describing the 'state' each machine should be in. Cfengine works by making each system gradually approach the desired state, which may not be immediate.

One thing interesting about cfengine is it prefers not to notify you of system changes, but rather just perform the change and be quiet. For example, say /usr/java/bin should be mode 755. When cfengine notices that it isn't the right mode, it will fix it, but won't notify you unless you specifically request it. That may sound strange, but think about having a large amount of systems. The idea of looking through logcheck emails for each server is not a very good use of your time. In fact I hate getting emails from servers. They should be quiet already, always complaining.

cfengine setup is not for the weak hearted. You will have to read lots of documentation before even attempting to set it up. I still don't understand alot of it, and setting up the authentication between servers is really more work than it should be. But once it's setup it is rather cool. You have alot of freedom as to how to use the system. For example, say I have a custom /etc/ssh/sshd_config I want distributed to my servers. You could put the file on the cfengine server, and all the clients checksum it to see if any differences. If there are, it's copied over, and then sshd is restarted. Or you can instead set it up to edit the sshd_config file directly via stepwise text-editing commands. This sort of logic is all done with cfengine. I prefer the former to the latter, because I've already run into a situation where my text-editing logic was wrong and the file was being changed every time cfengine would run :P.

cfengine runs periodically on the clients to 'check' everything to see if it is in the right state utilizing a 'pull' strategy. If there are lots of things to check, it is very IO intensive. You can also use 'cfrun' to forcefully run the check on remote systems, utilizing a 'push' strategy.

One thing I don't really understand how to properly do is package management. cfengine has hooks for RPM, to check whether a version of a package is installed, and if not to do something about it (call up2date, your own script, etc). However it's rather convoluted and difficult to get done properly. You still need to setup your own RPM repository and such, and for basic updates it works ok.

Ideally your final cfengine configuration should be able to be applied to a fresh system, in order to bring it up to the proper state of the other servers. That's cool and all, but is hard to test unless you have free servers laying around. I'm doing this on production systems, but the client I am doing this for will be getting more servers. That will be a good test for cfengine. When designing the configuration, you have to keep this in mind: the idea of bringing ALL systems, including new and old, to the current state. You cannot think of patching one system, but have to look at the network as a whole. It's a different way of admin, and sometimes very difficult to do properly, but I think it may be worth the effort. It can lead to a pretty much hands-off network.

10/10/05

Permalink 10:31:11 pm, Categories: Science, 320 words   English (US)

DNA computing

After reading this excerpt in a Biochemistry book, I could not help thinking about data storage:

A second remarkable characteristic of the self-replicating property of living organisms is the extraordinary stability of the genetic information stored in DNA. Very few early historical records prepared by man have survived for long, even though they have been etched in copper or stone and preserved against the elements. The Dead Sea scrolls and the Rosetta stone, for example, are only a few thousand years old. But there is good reason to believe that modern bacteria have nearly the same size, shape, and internal structure and contain the same kinds of building-block molecules and the same kinds of enzymes as those which lived hundreds of millions of years ago, despite the fact that bacteria, like all organisms, have been undergoing constant evolutionary change. Genetic information is preserved, not on a copper scroll or engraved in stone, but in the form of DNA, an organic molecule so fragile that when isolated in solution, it will break into many pieces if the solution is merely stirred or pipetted.

I came across this article on DNA computing. An interesting quote:

The data density of DNA is impressive. Just like a string of binary data is encoded with ones and zeros, a strand of DNA is encoded with four bases, represented by the letters A, T, C, and G. The bases (also known as nucleotides) are spaced every 0.35 nanometers along the DNA molecule, giving DNA an remarkable data density of nearly 18 Mbits per inch. In two dimensions, if you assume one base per square nanometer, the data density is over one million Gbits per square inch. Compare this to the data density of a typical high performance hard drive, which is about 7 Gbits per square inch -- a factor of over 100,000 smaller.

They go through an algorithm of solving the traveling salesman problem using DNA computation. Very cool stuff.

Permalink 07:58:05 pm, Categories: Movies, 124 words   English (US)

Wallace and Gromit: The Curse of the Were-Rabbit

I had planned on seeing Waiting... this weekend, but the bad reviews turned me off to it. In fact I was going to see it, but then at the last minute I decided I would see Wallace and Gromit since it got good reviews.

Now I never even saw this show before. I just remember Chicken Run which I liked, and heard this was similar. Supposedly Wallace and Gromit is some famous show in England :).

Anyhow, at first the choppy clay animation was kinda annoying on the big screen, but I started liking the story. It's definitely very wierd and different from US cartoon flicks. What I learned is that this Wallace character is psychotic and Gromit is a masochist. I liked it alot.

10/09/05

Permalink 10:16:29 pm, Categories: Medicine, 572 words   English (US)

Grades and my brain

This week and last are exam weeks for me. I got a 104% on my Anatomy & Physiology exam. I was 1 out of 2 people who got that highest score. What I found really surprising is that 70 out of 180 people failed! Most of this first exam was basic chemistry stuff so I already knew alot of it. However I guessed as to what type of molecule a 'heteroring' was heh, I guessed correctly. Our teacher gave a good sermon after finding out the grades. He made an interesting comment, "Would you want a D or F student prescribing medicine to your daughter?". And "You are better off going surfing and having a good time rather than come to class, waste money, and fail."

I got a 96% on a Biodiversity exam. I'm actually kinda peeved at that, because I changed an answer at the last moment to the wrong one. Still, I'm happy. What sucks at FAU is they require 94+ for an A. I've heard that at other schools like University of Florida, 90+ is an A. Not sure why FAU is trying to be tough.

I employed a memorizing strategy for these exams that associates wierd stories with my notes. It truly works if you put the right effort and time into it. I think I have figured out how it works. Say there is some piece of data you want to remember. You've read about it so you have some vague idea of it, i.e. you have a certain pathway in your brain to get to the data, but it's difficult to recall. Now let's say you create a story linking that data. What you've done is essentially created another pathway to that data, so now you have two ways of getting to the information you need. It works as a reinforcer of the idea, as if there are now multiple paths your mind can take in parallel. The more of these pathways you can make, by other associations like vision and other senses, the stronger the data is and the faster you can get to it.

What's wierd is I realized that even after forgetting the details of the story, I still remembered the target data. Not all of it, but certain key items. It's as if by creating those multiple pathways the data is now imprinted, and even if the original pathways don't exist, some new one is created that lets me get the information quickly. I find it pretty interesting. The hardest part in all of this is knowing WHAT to memorize. In class you take a shitload of notes and read countless chapters, but you don't know what you will be tested on. So part of this is understanding the teacher and his/her exams, how they discuss things in class, tone of voice, etc. I think it's easy to get drowned in information. You need to prune out key things that seem important. That was much more difficult when I was younger, but now it seems easier. This is probably why many of the younger people might be doing bad in class.

Tomorrow I have a chemistry exam, but chem has always been kinda easy for me. Not sure why, I don't even like chemistry that much. But the concepts just seem very natural and almost common sensical. I just cannot see myself as a chemist though. Class average for the last exam was 45%, and I got a 94.

Permalink 02:20:07 pm, Categories: Website, 82 words   English (US)

Damn blog spam

Well this weekend I was bombarded with blog spam. It all came from dozens of IPs with random text in the comment like "interesting blog" and what not. What's interesting is the URLs they put in their spam point to other blogs, so I don't know what they are doing.

Anyhow, I'm pretty fed up with it and now I'm not allowing any URLs at all in comments, sorry. You'll have to clear the Url field on any comment posts as well.

10/08/05

Permalink 09:19:36 pm, Categories: Science, Religion, 349 words   English (US)

Paranormal Experience

So this afternoon I decided to take a nap at around 2pm or so, and I experienced something I've never really felt before that was just wierd. I'm lying in bed, and my laptop is next to me and I'm listening to some music. I start to become paralyzed and cannot move at all. I start feeling something tugging on my left index finger, as if someone is pulling it. Then things just started getting even wierder. I sensed a real impending doom, as if something evil were in the room. Now it was sunny and my window shades were open, but it felt like some dark shadow came in.

I still could not move, and then felt a tugging on my right leg, as if someone were trying to drag me! I was jolted and pulled to the lower part of my bed. It felt like I was dead and someone was dragging my body. Whatever it was, it was trying to pull me off of the bed. I had a sense that some ghost was trying to mess with me.

Now, I'm not much of a believer in ghosts or what not. I'm not even scared of the dark, but this was probably the scariest feeling I ever had. I never felt anything like it. I literally thought I was dead, and even felt like I was possessed or something. Then all of a sudden I could move. My laptop wasn't there and I wasn't listening to music.

What happened was when I laid down, I fell asleep without even realizing it. The transition of wakeful to sleeping was so smooth that I didn't even notice and I thought my dream was real. I guess some may refer to this as a lucid dream. It all happened within 1 hour. It got me thinking. Some patients seem to remember their surgery when under anesthesia, and maybe the pulling of my leg had something to do with my ankle surgery. Maybe subconsciously I was going back to that operating table and remembering certain things.

Anyhow, it was very scary.

10/07/05

Permalink 09:40:18 am, Categories: Linux, 141 words   English (US)

/tmp and noexec

I recently was playing with Checkinstall on a Redhat Enterprise Linux 3 system setup by Rackspace. Checkinstall is a pretty nice system to create your own packages/RPMs from source very easily. However I had a wierd problem that I had no clue how to fix. Whenever I ran checkinstall, I would get:

========================= Installation results ===========================
/usr/local/bin/installwatch:
/var/tmp/TGhbCPUHIWGChdBddpOX/installscript.sh: /bin/sh: bad
interpreter: Permission denied

**** Installation failed. Aborting package creation.

Bad interpreter, permission denied? After a note to the mailing list, I was pointed to this thread about installing some game Enemy Territory and a similar problem. It turns out in /etc/fstab tmp was mounted with the noexec flag, which means nothing can be executed, hence rendering checkinstall nonfunctional.

Just goes to show sometimes the problem is right in front of you and you miss it.

10/03/05

Permalink 10:06:42 pm, Categories: Linux, 401 words   English (US)

Expert Systems

Computer Immunology is a strange term, but it's very interesting. I like the idea of systems being able to correct themselves. Approaching sysadmin from a research standpoint has always been interesting to me, but it's hard to link the theoretical to the practical. There are many things that need improvement in our sysadmin methodologies, and I for one welcome new techniques. As far as automation, I did write a pretty useful tool back in the day. That was when I was a Perl fanatic, and if you look at the code of that script I tried to use every Perl bell and whistle. I'm quite proud of it :). Nowadays I would only do such a script in Python.

I've heard many things about cfengine, which is basically a non-standard approach to sysadmin. The idea is to keep a centralized 'configuration' for a system, with 'configuration' taking the broadest definition imaginable. It might include certain processes running (or not running), a version of Apache installed, permissions of files, etc. Essentially you update a configuration for a host, and cfengine takes care of applying that configuration to get the host up to the right state.

I read the tutorial for cfengine and I must say that's some ancient scripture. They are talking about rsh and rhosts for God's sake. Isn't this whole expert system methodology supposed to be cutting edge? If so why are we talking about /etc/hosts.equiv? Can we please come back to the cenozoic era?

I could not grasp any real-world practical examples from the docs, but there are definitely some articles and everyone seems to have a boner for this tool. From what I can understand, when cfengine runs, it analyzes the system state. This is very IO bound process, and it seems to me the more 'configuration' you have, the longer the analysis takes.

I wondered whether there are such systems written in Python, and came across a few rants about this. Long story short: no.

But Ruby, on the other hand, seems to give better results. I came across Puppet, which is purported to be a next generation cfengine. It seems to be in early development with lots of missing features that cfengine has, but it looks promising.

I'm not sure whether I'm willing to invest the time and effort to setup cfengine. Maybe I will, just to get a feel for this different sysadmin approach.

Viraj's Weblog

Donate to keep this site going!

Amount USD $

October 2005
Mon Tue Wed Thu Fri Sat Sun
<<  <   >  >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31  

Search

Categories


Misc

Syndicate this blog XML

What is RSS?

powered by
b2evolution