TheJach.com

Jach's personal blog

(Largely containing a mind-dump to myselves: past, present, and future)
Current favorite quote: "Supposedly smart people are weirdly ignorant of Bayes' Rule." William B Vogt, 2010

mod_security can kiss my ass

So there's been a problem with this blog, both on the comment side and this admin side where I make my posts. Namely, mod_security, an apache module, seems to be installed on my server and I can't disable it.

What does mod_security do? It scans all data sent to the server, and rejects any that fit a regex indicating it could be a potential SQL Injection.

Now, this sounds like an okay feature, except the regex it uses is completely retarded. And because of this, I'm leaving my server hosting when it's time to pay again. HostGator here I come.

See Full Post and Comments

Mathematical Induction

I haven't done a math post in a while, so let's talk about mathematical induction. This isn't related to inductive reasoning; it's more akin to deductive reasoning with recursion.

Suppose I came to a programmer and asked him to write a function that returns the sum of numbers cubed up to a given number. That is,

[math]sum\_cubes(n) = 1 + 2^3 + 3^3 + ... + n^3[/math]

See Full Post and Comments

Obama's Cowardice

What happened to the Obama of the campaign? People have said he's broken their hearts, since he's not living up to expectations. He promised health care, and what we have now has some accomplishments but still needs work, he promised educational reform, that's nowhere in sight (I love how the Senate Republicans got the pathetic gesture of the Pell Grant increase out of the health care bill to stall it), he promised he'd attempt to improve the economy, but while people call him socialist he just gives money to the very banks that contributed significantly to the problem of the economy. Socialist indeed.

He's done some good things, for sure, and he's a better President ethically than Bush. A couple nice things: the FCC is probably going to end up enforcing net neutrality, so Comcast can suck balls, we can do stem cell research again, and (even though he's starting to flounder) his stance on Guantanamo and torture in general is good. But is he unable to multitask at all? Why can't he attack all the problems at once? He's had a full year in office, he's only got until November of 2012 to do more stuff. (I can't really see him getting reelected unless the Repubs throw up someone like Palin or the Democrats in their infinite party-wisdom dictate no one can run against him with the backing of the party.)

He hasn't broken my heart, I've come to expect these sorts of antics. But what's the reason for his actions? Was he like this all along, just another liar and coward in the sea of liars and cowards, using whatever rhetoric and propaganda he could to get votes in the election? Maybe, but I don't really think so. He convinced a lot of intelligent people of his sincerity, and it's really hard to do that without being sincere. If he was that skilled of a manipulator, the Republicans wouldn't have been such a match for him with this latest bill.

See Full Post and Comments

Tao Te Ching Reflections, 14 through 25


14

Look, and it can't be seen.
Listen, and it can't be heard.
Reach, and it can't be grasped.

Above, it isn't bright.
Below, it isn't dark.
Seamless, unnamable,
it returns to the realm of nothing.
Form that includes all forms,
image without an image,
subtle, beyond all conception.

See Full Post and Comments

Tao Te Ching Reflections, 1 through 13

Before I was atheist, I was an agnostic Taoist. I still retain some Taoist principles, but lately I've noticed myself forgetting them when I need them most. I've read the Tao Te Ching several times, and I am going to read it again now. I will be reflecting on each of the chapters as I go along. This will encompass a series of posts, and I will put the chapter numbers in the title.

I will be posting the translations of the chapters one by one in quotes, along with my thoughts or interpretations or disagreements. (Skip over them if you don't want to hear what I think; my thoughts are underneath the chapters and not in quotes.) If I say nothing, it can be assumed that I consider the message clear and agree with it.

So, let's begin. The copy of the Tao Te Ching I have is apparently translated by Stephen Mitchell.

See Full Post and Comments

Brief Intro to Memory Mapping Into Structs

Learning how to memory map was a frustrating topic to hunt down, despite how easy it really is. First I'll share my main source, then get to what I was doing. For a great intro to memory mapping, follow that link. It will explain the code below while I'm just going to show it and tell what it does on a high level.


#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>

struct GamColor
{
unsigned char d_red;
unsigned char d_green;
unsigned char d_blue;
unsigned char x_pad;
};

See Full Post and Comments

Get rid of copyright

"Imitation is the highest form of flattery."
~Proverb?


"Bad artists copy. Good artists steal."
~Picasso


Invention is made by standing upon the shoulders of giants. The last couple hundred of years has seen immense benefit toward humanity: why? Science. Science has allowed everyone willing to understand the universe, and to manipulate it all the better. Science has for the longest time resisted the traditional forms of control, for what is true is true, and what is false is false, regardless of what politicians say. And when you know enough true statements, you can use that knowledge to create something amazing.

See Full Post and Comments