Today was a nice day, so the spouse and I were driving around with the windows down. And, then these stupid kids with there over-loud music start doing there thing. Every red stoplight there'd be some asshole with his music blaring down at me. The music itself was terrible, but even good music at that level would be bad. I don't get it. And yesterday, when I was at the used bookstore, there was some high-age school kid with music blaring through his earphones. Why?
I sort of have a sound-track, myself, while doing my thing; music I remember in my head or though earphones at REASONABLE volumes.... I feel like it's my own personal "soundtrack." I don't really want other people to know what I'm listening to, no do I want to hear what some asshole I've never met has on his soundtrack.
Plus, I like at be aware of the environment I'm in. Sometimes, I like to listen to the sounds of cars while the window is down, or the wind or what-ever. It almost feels like people with their music turn up so loud are trying to tune-out reality... A sort of half-assed form of suicide...
Sunday, April 29, 2012
Sunday, April 8, 2012
Drinking
I really shouldn't drink anymore. The aspirin is already tying up my liver, and the day after I drink I have an extreme difficulty communicating. I like alcohol, but perhaps we need to part ways.
Friday, April 6, 2012
sumpin sumpin....
I got drunk tonight, wrote a Monte Carlo integration program in Java for shits, and now I'm watching The Marx Brothers "A Night at the Opera" which is pretty funny...
The error estimate is way off. ... I'm drunk, so fuck it.This is a crappy way to do integrals, but it is cheap and quick (relatively speaking). During the Manhattan Project (back when computers where people rather than machines... and women, too, even though in today's society women hate math and prefer barbie dolls thanks for shitty advertizements and gender roles based on capitalist shit), this was how you did numerical integration.
The error estimate is way off. ... I'm drunk, so fuck it.This is a crappy way to do integrals, but it is cheap and quick (relatively speaking). During the Manhattan Project (back when computers where people rather than machines... and women, too, even though in today's society women hate math and prefer barbie dolls thanks for shitty advertizements and gender roles based on capitalist shit), this was how you did numerical integration.
import java.util.Arrays;
import java.util.Random;
/**
*
* @author discordantmind
*/
public class MonteCarloIntegration {
public static void main(String[] args) {
/* Create program to calculate Monte Carlo Integration
* The integrand is a separate method called 'integrand'
*/
// create random points for integration, and sort from highest to lowest
int numberPoints = 20; // how many points along curve should be evaluated
int endPoint = 2;
double[] xposition = new double[numberPoints];
Random xGen = new Random();
for(int i=1 ; i < (numberPoints - 1); i++) {
xposition[i] = endPoint * xGen.nextDouble();
// System.out.println(xposition[i]);
}
xposition[0] = 0.;
xposition[numberPoints - 1] = 2.;
Arrays.sort(xposition);
// check to see if points are sort-of evenly spread out
for (double dd : xposition){
System.out.println(dd);
}
//Create new random number generators for x and y coordinates
Random xtestpoint = new Random();
Random ytestpoint = new Random();
// starting stuff for Monte Carlo shit
double testx;
double testy;
double interval;
int below;
double testintegral;
double area = 0; // initialize integral
int numberRandom = 100; // number of random points for MC
double error = 0; // initialize error counter thingy
double rho; // density of points below curve
/* BEGIN MONTE CARLO SHIT */
for(int i=0; i < (xposition.length - 1); i++) {
// Taking care of end points
interval = xposition[i+1] - xposition[i];
below = 0;
for(int j=0; j<numberRandom; j++) {
testx = xposition[i] + interval * xtestpoint.nextDouble();
testy = 2.0 * ytestpoint.nextDouble();
testintegral = integrand(testx);
if(testy <= testintegral) {
below++;
}
}
rho = below/ (double) (numberRandom);
area += interval * 2.0 * rho;
error += interval * 2.0 * Math.sqrt((rho - Math.pow(rho,2))/numberRandom);
}
System.out.println("Error estimate is " + error);
System.out.println("Integral from 0 to "+ endPoint + " is: " + area);
}
public static double integrand(double x) {
// plug in whatever function you want to integrate here as 'func'
double func = Math.sqrt(4. - Math.pow(x,2));
return func;
}
}
I can't really drink hard liquor anymore. I'm still taking aspirin therapy, which means I can't drink to heavily or I could hemorrhage into my brain. But, the doctor said I can stop taking Plavix, which is nice...
Friday, March 30, 2012
Mental Lists
I maintain a few lists of things in my head, for whatever reason. I add to them from time to time. Here are a few.
- List of actors/actresses/celebrities that I hate.
- List of politicians that I hate.
- List of people who will be among the first against the wall when the Revolution comes (includes some members from list #1 or #2).
- Movies that I like even though they are crap.
- Movies that I secretly enjoy, though I won't confess it to people
- Movies that I should appreciate even though I don't (also kept secret).
- List of lists to keep in my head.... (oddly enough, this doesn't fall into a recursion)
Wednesday, March 14, 2012
Pi Day
Today is Pi Day. March 14, is 3/14..... 3.14... Which is similar to pi. Actually, pi keeps going past 3.14, it doesn't repeat and doesn't stop. So, you could say that it isn't really a "Day" for Pi, since pi doesn't stop at 3.14. You could take it out to 3.14159, take the 159/100 as a fraction of a day and say that tomorrow has a "Pi hour" from 3 to 4 in the morning. Or a "Pi instant" at 3:49am... of course, pi keeps repeating, so there's no point is celebrating the infinitely short duration that would correspond to pi. Just celebrate the whole day like a bunch of cretins ;)
Tuesday, March 13, 2012
Killing Afghanis
I just heard on the news that The President of the United states said the killing of 16 Afghani civilians was "outrageous and unacceptable." Something easy to quote, and the media decided to do, as is their duty. I imagine the President's men spent a great deal of time agonize over which two words he should express in his press conference, and made sure to tell the White House press corps to make sure to highlight those two words. It couldn't be "abhorrent." No. That might signal something about how abhorrent our troops are, and our troops are all (naturally) heroes, n'shit. "Unacceptable" is good. Killing those people in there homes (unarmed civilians... including children)... that's really "unacceptable." This kid is going to get a "stern talking to." Maybe he'll get reduced to pay-grades, for that "unacceptable" behavior. I remember getting a B in math, once, and my mom told me something similar. "You love algebra! This behavior is outrageous and unacceptable!"
Yeah, that US soldier was there in support of US Special Forces who were training am paramilitary force to help reinforce US troops.... A sort of Vietnamization of the Afghan war. What a load of BS. I don't even know where to begin. It's like grading a C-student's physics homework. I'd like to help but ALL of your assumptions are wrong, to the point where I think you should just drop of out college altogether and become a firewatcher. Yes, someone who's sole ability is to watch fires. You don't report fires as the occur. You don't help fight the fires. You watch them, because that's all your fucking little brain can handle.
Killing kids is really terrible, though. All of it is terrible, but the kids really stick with you. How many of those kids could have grown up to be brilliant? How many of those kids could have become mathematical geniuses like Srinivasa Ramanujan. Or a brilliant painter or artist? And if you think those sorts of things are rare, all human life is rare, and to be honest everyone is brilliant to some degree... And if you think its rare in Afghanistan, maybe it's because they don't have schools and a proper infrastructure to support all the geniuses clipped at the bud... And if you think that a First World country can come to Afghanistan to bring them schools and a proper infrastructure by sending in soldiers armed to the teeth, then you should really quit what you are doing right now and pursue a career as a firewatcher.
Yeah, that US soldier was there in support of US Special Forces who were training am paramilitary force to help reinforce US troops.... A sort of Vietnamization of the Afghan war. What a load of BS. I don't even know where to begin. It's like grading a C-student's physics homework. I'd like to help but ALL of your assumptions are wrong, to the point where I think you should just drop of out college altogether and become a firewatcher. Yes, someone who's sole ability is to watch fires. You don't report fires as the occur. You don't help fight the fires. You watch them, because that's all your fucking little brain can handle.
Killing kids is really terrible, though. All of it is terrible, but the kids really stick with you. How many of those kids could have grown up to be brilliant? How many of those kids could have become mathematical geniuses like Srinivasa Ramanujan. Or a brilliant painter or artist? And if you think those sorts of things are rare, all human life is rare, and to be honest everyone is brilliant to some degree... And if you think its rare in Afghanistan, maybe it's because they don't have schools and a proper infrastructure to support all the geniuses clipped at the bud... And if you think that a First World country can come to Afghanistan to bring them schools and a proper infrastructure by sending in soldiers armed to the teeth, then you should really quit what you are doing right now and pursue a career as a firewatcher.
Thursday, March 8, 2012
How to feed geese.
You bring a bag of bread crumbs to the pond, and throw some crumbs near a couple of geese. The geese come closer, eating the crumbs. You throw them a few more. The geese eat them and come closer. You drop a few more bread crumbs near your feet, since the geese are already there. They eat them before they hit the ground. You are out of bread crumbs. The geese attack your pant legs. You try to walk away. The geese are birds and can fly faster then you can walk. You run. They fly. You get home. The geese shit on your car.
Subscribe to:
Posts (Atom)