Lambda and web programming.

Lambda, as in the halflife meaning of the word, you know, radioactive decay, plutonium, nuclear waste, little things that make big booms and websdesign? I have GOT to lay of the Mt Dew!

I created a nice little poll for my website yesterday. I published it, responded a few times and sent it on it’s merry little way. I come back this morning, 44 responses. GREAT! I can take mine out now. I go and look at the responses, and the same IP address voted 14 times in a matter of a few minutes. Ballot stuffers – wonderful.

How do you address this little problem?

What do you do with people who have NO dignity and have the compulsion to skew the results of a informal web poll?

The best I can figure is to let them. They obviously need to vent some frustrations. And if letting them stab at a “vote” button a few times keeps them from coming in and stabbing me, all the better.

So I let them vote early and often. I empower them to impact a meaningless little poll on my website the way that they want to. I give them the satisfaction of skewing the results – they can see that every time they click, the little percentage bar moves in the direction that they want it to. When they moved it what they feel is far enough, they stop. They may check back in bit, they may check back in an hour. In today’s day of TV attentions spans, I wouldn’t expect them to check back any further out then that. If they come back in an hour, and see that their bar isn’t where they want it, they vote a few more times, and it’s right back to where their obsesive-compulsive little hearts desire it to be. They feel empowered, they feel good, I have another happy website user.

They never met a geek like me – even if I am only running on 1 Mt Dew for the day.

I devised a duplicate vote decay system that slowly removes the duplicate votes. First I roll all duplicate votes into 10 minute blocks. This means that at most, a person can have 6 votes an answer for any given hour. A fairly lenient allowance that acknowleges the possibility of multiple people sitting behind a single IP address.

Then I calculate the 1 hour lagged decayed count based off of a 1 hour halflife. Mom, a 1 hour half life means that after an hour, half of the total has “decayed away” – I only have half the original duplicate answers, after a second hour, half of the remaining duplicate votes has decayed away, so only 1/4 of the original, after the 3rd hour another half of the remaining duplicate answers goes away, so I have 1/8 of the original left. By lagging this process by an hour, I have a full hour to display the full duplicate answer count before this process starts to whittle that number down.

I sum up the results of this lagged-decayed count of votes. I then use this to calculate percentage of responses and display a fancy little bargraph using CSS instead of images.

I caught myself another case of the clevers and decay my office IP down to 0 while decaying everybody else down to 1. I can now comfortably “pre-vote” a poll up on it’s initial release so it doesn’t LOOK like its empty, and after a couple of hours, when other people have voted, my initial padding has decayed away.

The best part of this system is that if somebody really wanted to skew the results, they can do it on the short term, and when they come back an hour later, they don’t need to submit near as many responses to keep the results skewed. This reinforces the impression that they are drastically impacting the results. As they keep coming back every 20 minutes, an hour, or whenever, they have to keep voting to keep the results skewed. After a couple of hours, their initial manipulations are decaying away at a rapid rate, so they have to keep hammering on that vote button to keep the results skewed. They start to deduce that I get a LOT of votes (I never give a vote count, so they never know for sure) and give up in hoplessness to ever heavily swaying the results of the poll. A day later all their hard work has decayed away.

If a person is REALLY stubbern, I will see a LOT of duplicate activity in my raw results, and I will then make a change, and decay their duplicate votes down to 0. They are now unknowlingly dealing with an excersize in futility. Revenge is sweet!

Feel free to check out the poll page. You can also check out the results of the first public poll. Go ahead, vote for what you truly feel. Express yourself. Do it several times. Did you see the results percentage bars move in the direction that you want it to? Gratifying, isn’t it. Submit a few more responses. I don’t care, in a few hours its all going to count as a single response anyhow.

Build an idiot proof computer system, and they will build a better idiot.

Happy Coding!

You know you live in South Florida when EVERYTHING is a potential Hurricane Supply

I wanted to get a 12v air compressor for the trunk of my car. The front tires on the car are low, and I NEVER think to air them up when I am at the service station.

Anyway, I stopped over at walmart today to pick one up.

I must say, I think I found a nice one. A Battery Powered Air Compressor is something I would have laughed at 2 years ago, but now….

Let there be LightThe biggest selling point to this unit was a built-in flashlight. When you don’t have electricity for 2 weeks, a flashlight is a mighty handy thing to have. This one has a BIG battery with it.

The 2nd selling point on it is the 12 volt power plug. This may not seem like a big deal untill you don’t have power for 2 weeks and you need to charge up that cell phone (They are pretty good about getting the cell phone towers back up and running, much sooner then the regular phones, electricity, or sometimes even the water it seems). After Wilma, I loaned out my little power inverter so cell phones could be charged up – I guess it had made the rounds too. All of this automotive stuff is rather handy to have around when the outlet in the wall doesn’t work. The only problem with it is you tend to need gas to run it with, don’t let me get started on THAT can of worms.

Auto cutoff feature for the air compressorA third neat thing about my new gadget-of-the-day is the air compressor (and you thought that this would be the first thing). It has an auto-cutoff switch when the air pressure hits a pre-determined air pressure. You spin the face of the air pressure guage to set the desired air pressure. I haven’t TRIED this yet, but it seems to be a pretty good idea to me. I could air up my car tires in the dark if I so desired. I don’t desire to do this. But the possibility is there.

I am curious to see how accurate the built in gauge and the auto-cutoff feature are. One good thing will be I won’t have my tires aired up to different air pressures like they do in NASCAR – the Ford Escort just isn’t that high-performance. *grin*

The storage compartmentEverything gets all bundled up in the “boot”. It came with the usual suspects for getting lost – those little plastic things that you use for filling up beach balls and whatnot. These have a spot to get clipped to the door so they won’t get lost. I imagine about 30 seconds in the trunk of the car, and they will fall off and get lost, but hey, it is the thought that counts.
It came with a small wall block to charge it up with. There is also a double ended 12volt cord so I can plug the thing into the car and the 12volt socket on the compressor.

All in all, the unit seems to be pretty well laid out. Whomever designed this must use his often to have had to make it this fancy and functional. Posted by Picasa

Getting your nails done…

First off, it is WAY to bloody warm out for the middle of February. 77 degrees? I am MELTING into my boots.

Anywho, I got today off. I went over to my friend Keara’s for a while so I wasn’t staring at my walls all day long. She needed to get her nails done. Fine, I will ride along. There was a Cost Cutters next door, so I got my hair cut while I was waiting for her to get her nails done. My haircut was much quicker, so I ended up watching.

Let me tell you… That was the NEATEST thing I saw all day!

Guys, get your ladies a gift card to get their nails done sometime. The fancy acrylic white tips on pink, french manacure or whatever they call it. Go watch. You will learn a lot. You had better, becuase it ISN’T CHEAP!

It is quite a process. They used powdered Acryclic and solvent to do it. They dip a paintbrush in the solvent, and then dip that into a small jar of acrylic powder. The solvent quickly dissolves the powder into the consitancy of… of… thick enamal paint maybe? They then can paint the acrylic on the nail at almost a sixteenth of an inch thick. A second dip of the brush into the solvent, and they shape the nail.

Why is this so interesting? Just think of all the things you can do! This stuff would be awesome for modeling, filling holes in stuff, whatever. You can basically paint plastic at a sixteenth of an inch at a time. The solvent evaporates very quickly, so you only get a short working time, but that also means you only need to wait seconds instead of minutes or hours for other filler material to set.

If I am right, the solvent will work on ABS, Acrylic and polystyrene. So you should be able to get a good bond to most types of plastics that are used in making stuff at home if you work the material right.

Now, I know that doing nails and customizing that model car kit are 2 totaly different animals. I also know that the guys I watched are probably REALLY good at what they do, and it is NOT the trivial task that they made it seem at the nail salon.

So, get the girls their nails done, go along for the ride. She will think your being a sweetheart, and you will learn a cool plastic working technique.

Freezing up….

Ok, so it is cold out. If you ask the locals, they will tell you it is “damn cold” out.

Well, I have that new-fangled cooler, right? The one that cools the inside down 44 degrees cooler then the outside. Well, when the outside is cold, the inside is colder. My cooler has become a freezer. As the photograph suggests, I now need to defrost my cooler – it was making a aweful squealing sound as the fan was rubbing against the ice. Now, according to every other set of instructions but the set that came with my cooler, you can just switch the wireing around, setting it to warm, and in 15 minutes, you have de-frosted your cooler. Not me, no, why can’t I ever have something nice?

That little switch to make this thing work the way I want it to is looking more and more important. I guess owning junk has it’s benifits, I get to play with my junk like other people can’t play with their “nice” stuff. Posted by Picasa

Thermo-Electric Coolers

OK, so I am living in a “Mother in law” sweet, which consists of a bedroom, a bathroom, a closet, and an outside door. A very nice place, right on the water, massive hedges grown into arches over the driveway. Very nice people, so natually I don’t want to bother them too much.

So I decide that I am going to get one of these fancy Thermo-Electric Coolers, basically an iceless cooler that you can plug into your car/the wall. They seem a bit handier then a small fridge (especially considering that I have one or two of those laying around in WI). It would seem to be useful after I get a different place to live – camping, hurricanes, etc.

I do my homework, and decide to get one. A little bit of online research shows me that all have this nifty feature that most people would consider “useless”, they are not only coolers, but they are warmers as well. Now, most people would go, why would I want my cooler to warm? Seems a contridiction. Well, I belong to a cooking club, and we get together once a month and see how cunningly we can poison each other. Actually, most everyone seems to be quite the accomplished cook, but I digress. Anywho, we seem to either overwhelm the fridge, or fight for the oven. I am thinking, “gosh, a place where we can keep things warm while people are getting settled, PERFECT, this little gadget is getting all the more usefull.”

So, superbowl sunday, I make a trip to the local Super Walmart at 5 oclock. I figured the entire male population is going to be sitting in front of the TV, and most of the women will be babysitting their boys. WRONG. Lesson 1, superbowl sunday, there is a run on coolers. Don’t expect to buy a cooler on superbowl sunday. They are all sold out. Lesson 2. I am apparently not the only freak who doesn’t watch the superbowl because the $15 worth of stuff I picked up required a 15 minute wait at the checkout.

Ok, so a few days later, I decide to start calling around. 4 phone calls locates 2 coolers like what I am looking for, or at least that is what my poor spanish and the dude on the other side of the phone poor english skills determine. So into the car I go. I get to Walmart, and look, and look, and look. No cooler, no blue Walmart vests. I finally find a cooler, EUREKA, it’s even the one I am looking for. The box is open, but a quick rummage reveals that everything is still there, so it must have been a superbowl “rentee”. Off to the checkout counter, 30 minutes later, I lug the thing into my car and drive home.

I get home, and dump it out of the box, I fiddle around and go to plug it in, but something is wrong. The online information said that to swtich between warm and cool, you flip the plug around on the cord as it plugs into the cooler. On MY unit, the cord goes straight into the cooler. Just my luck.

So, I decide to “fix” it. An hour on the internet reveals no significant information as to whether I can run the pelteir junction backwards without any damage, but one can deduce, that every OTHER cooler you can, as they allow you to do it. This warrents further investigation, so I dismantle my brand new cooler.

The picture shows the business end of a Thermo-Electric cooler. The small end on the right is what is inside the cooler, and the large end on the left is outside. You can see a thermal disconnect strapped to the outside heatsink. There is no thermal monitoring on the inside. This means that I could really have some fun, melting my new cooler.

Short term plan, get a double pole, double throw switch, and install it so that I can switch the peltier unit to heat/cool. This I think is a great improvement on how the other cooler/warmers work in that the fans will always run in the more effecient direction. I just need to remember not to leave the unit on heat overnight or I may do some serious meltage damage to my brand new cooler.

Long term plan, install my own thermal regulater on the inside of the cooler. Now I COULD go out and get one like what is already installed for about $3.00. That just isn’t any fun. Being a out-of-practice electronics hobbiest, I am going to install an embedded microcontroller to control my fancy cooler. The one I have at hand happens to be eithernet enabled. So I think I am going to have the only Internet Cooler in existance.

I am thinking that I am going to install a total of 4 temperture probes (simple thermisters) to monitor ambient outside temperature, outer heatsink temperature, inner temperature, and inner heatsink temperature. I will log these temps at 15 minute intervals, and create graphs. A batter backup for the controller means that I can continue to log temperature even when the cooler is unplugged/without power, whatever. I will then be able to log into my cooler, and get the current stats on whether my milk has gone bad or not because the temp is too high.

I think I am also going to install a digital temp readout on the outside of the cooler so that I know what temp it is without having to go online (handy during a hurricane when the internet is down).

The switch will be repurposed into telling the microcontroller whether it should heat or cool. I think this is a wise move, as some of my “friends” may try to hack my cooler and switch it from cool to heat and spoil my milk. The hardware switch saves me the expense of mailing said spoiled milk to my “friend” and having him deal with the stench he created.

What do you think? Posted by Picasa

WordPress Appliance - Powered by TurnKey Linux