Monday, December 13, 2010

Rules:

    Never believe a friend who says the microphone that he left at your house last year won’t work without special software.
   A fair warning, I intend to bombard you with videos and italics today. So to start it out, I’ll engage in some narcissism. On a side note, is the act of having a blog and talking to a non-existent audience as narcissistic as it gets?

Probably.                                                                         [get to the code, bro]


   Anyhow, here's me playing with the new microphone:


(note: this will sound shitty on laptop speaks)

   SUCHH a better sound quality. This is good, because I’ve been looking for a way to showcase some of my favorite drum rudiments (wink).


   Speaking of narcissism, is it just me or is the current political atmosphere kind of like a Broadway musical? As Americans, we are led to believe that we inherently have a right to behave like momma grislys, defending our children from the evils of obamocracy, etc, etc… And though the previous two sentences have little technical substance, I will proceed with my case and point:


   Consider these two videos for a moment, which in my mind sum up our farcical world: who is making sense here? On one hand, we have “The Punk Patriot,” solving the economy for us. Now, is this man actually a cobbler? We will never know… Personally, I will continue to believe that he spends his days sweating in a boot factory, thinking about the global (or geo-, if you will) political atmosphere. Perhaps, while making a repair to the sole of an unsatisfactory moccasin he will look up to address his cobbler colleagues: “guy’s,” he will say “men,” correcting himself, “don’t you understand that our labor is what makes this company? We’re paid precisely peanuts and we are the working class! We must demand higher wages, benefits for the poor and so on…” To which no one responds, silently working, hammering on their own soles, thinking “no, The Punk Patriot, your but a man with his head in the clouds.”
   But in a moment of sincerity, and despite his supposed profession, his desperate need for aesthetic categorization, could ThePunkPatriot be on to something? Would Diogenes

Friday, December 10, 2010

Random Notes

Problem 5, from Project Euler:

{ 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?  }

   So this one gave me a hard time... At first I thought about using hashes, but then I figured that good 'ol arrays would do me just as well.. with less memory used? I'm still not 100 percent sure on this issue, being a young and ignorant programmer. Probably, for programs that preform these simple tasks the amount of allocated ram is insignificant, but I got one eye out for that home boy. 

   Anyways, at first I thought recursion would do me well. But with a little more thought I realized that there's a more simple solution. Here's what I came up with:

@primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]
@lcm_primes = []

def lcm_of?(n) #n must be array
    prime_is = false
    product = 1
    temp = n
   
    @lcm_primes.clear
    while temp != []
        @primes.each do |prime|
            n.each_with_index do |e, i|
                if e % prime == 0
                    temp[i] = e / prime
                    prime_is = true if !prime_is
                end
            end
            @lcm_primes.push(prime) if prime_is
            prime_is = false
            temp.delete(1)
        end
    end
   
    @lcm_primes.each{|e| product = product * e}
    return product, @lcm_primes.sort         
end   

   I realize there are a few limitations here.

Thursday, December 9, 2010

The Waltz

A new blog with the same name by the same kid four years later. It's hard to say what I'm looking to accomplish with it. But let me tell you, it will be... probably interesting? I hope you guys like post modernism, because believe me, I am going to push all of that motherfuckers buttons...

Is he serious?

Yeah.