Wednesday, December 07, 2011

'Scuse me while I kiss the sky

When I decided that I too must pass through the experience of a parachute jump, life rose to a higher level, to a sort of exhilarated calmness. The thought of crawling out onto the struts and wires hundreds of feet above the earth, and then giving up even that tenuous hold of safety and of substance, left me a feeling of anticipation mixed with dread, of confidence restrained by caution, of courage salted through with fear. How tightly should one hold onto life? How loosely give it rein? What gain was there for such a risk? I would have to pay in money for hurling my body into space. There would be no crowd to watch and applaud my landing. Nor was there any scientific objective to be gained. No, there was deeper reason for wanting to jump, a desire I could not explain.

Charles Lindbergh was on to something there; when I signed up for my First Jump Course in pursuit of a new hobby, I could fathom nary an iota of the love affair with the sky that would develop from those first steps.

The process was not without typical human doubt and apprehension:

"Why am I doing this? What am I trying to prove?"

Stepping out onto the strut, pushed towards oblivion by a prop wash stronger than any wind I had yet felt, fear gave way to focus. Those long hours of training and drills had finally marched to the point of application; no room for error, no time for hesitation.

As I let go of the strut, of the final tether which comforted me with its illusion of connectedness with the Earth, I fell into an answer to the last question.

"Why am I doing this?"

I found an answer that escapes my capacity for elucidation, but an answer that has me returning to the breast of oblivion again and again for as long as I am able.

Sunday, August 28, 2011

What is Cold Fusion?

Imagine you have two balls. These balls really don't want to touch each other but if you put a lot of energy into forcing them to, they explode releasing tons of energy.

This is called nuclear fusion. The balls are certain atoms and the energy is usually extremely high temperatures(millions of degrees). Instead of making the two atoms touch you are combining them into one larger atom. This process is what the sun is doing to create all of its energy.

Cold fusion is the term for a Nuclear Fusion reaction that can be done at a relatively cooler temperature and other conditions that we can create on earth. Although currently there is no cold fusion technique that produces more energy than what is required to sustain the reaction, Emc2 is currently working on a Polywell fusor that seems to produce more energy than it consumes. It is currently being funded by the Navy.

I'm pretty sure, though, that they wouldn't want to be associated with the term cold fusion, owing to its pseudoscientific stigma.

Wednesday, August 17, 2011

What happens at the atomic level when you cut something in two?

Let's say you cut a piece of stainless steel in half with a magic knife that maintains the structure of all the atoms but just separates them. That would be an ideal cut; just breaking the chemical bonds that hold the material together. Now, what if you tried to put it back together a few minutes later? Somewhat surprisingly, the pieces wouldn't stick together. The reason is that the surfaces of many materials are different from the bulk material on the inside. In the case of stainless steel, the surface gets oxidized by the atmosphere to make a layer of iron oxide a few atoms thick. This prevents the surfaces from making a perfect match again.

So why does this happen? There are two reasons, really. The first is that oxygen will react with pretty much anything it can get its hands on. It makes especially strong bonds with iron. The second is that when you break a bond, you're actually adding energy to the atoms, and this energy can be used to facilitate a chemical reaction with something else that they come in contact with.

Now you decide to get clever and do this same experiment in space, or a good vacuum chamber. If you still use your magic knife so that there is no grain (crystal lattice, really) mismatch when you put your pieces back together, they should stick.

This phenomenon of separate two pieces of metal stick together does happen in our atmosphere, especially with stainless steel. It's usually not a good idea to use stainless steel screws to hold together something made of stainless steel. If you screw it in really tight, you can scratch off the protective layer of iron oxide on the surfaces, exposing the pure metal underneath, which can then, over time, form new metal-metal bonds. This process is called galling.

Tuesday, August 16, 2011

Feynman point

3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999 and so on.

Sunday, August 14, 2011

Gödel's universe

Kurt Gödel found a solution to Einstein's equations for General Relativity where time is meaningless, because every point in spacetime can access every other point in spacetime through Closed Timelike Curves.

In other words, he found a solution to Einstein's equation where you can trivially time travel to any point in history from any point in space, a clear violation of Einstein (and most every other physicist's) views on the nature of time.

It can be defined as follows:




where ω is a nonzero real constant, which turns out to be the angular velocity, as measured by a nonspinning observer riding any one of the arbitrary points.

Gödel never explained how he found his solution, but there are many possible derivations. Let's see one here:


Start with a simple frame in a cylindrical type chart, featuring two undetermined functions of the radial coordinate:


 

Think of the timelike unit vector field e0 as a tangent to the lines of arbitrary points.

Following Gödel, we can interpret the arbitrary points as galaxies, so that the Gödel interpretation becomes a cosmological model of a rotating universe. Because this model exhibits no Hubble expansion, it is not a realistic model of the universe in which we live, but can be taken as illustrating an alternative universe which would in principle be allowed by general relativity (if one admits the legitimacy of a nonzero cosmological constant).

Wednesday, August 10, 2011

The gauntlet

I've pumped enough Quetiapine into myself to kill you three times over, but you're still here. Still mocking me with your lingering and your deadbelly comminations.

Rest assured, your days are numbered. I will kill you, one way or the other.

Wednesday, August 03, 2011

Germans

Dassler Brothers Shoe Factory was created by Adolf and Rudolf, two brothers. They specialized in track/athletic spikes. They became estranged during the rise of Hitler, during and after the war, and, as a result of this, Rudolf left the company and Adi renamed the company after his own nickname: Adi-das. His brother went across town and started a new shoe company known to us as Puma.

In 2009, both companies decided to bury the hatchet by playing a friendly game of soccer football to end the 60-year rift. The match took place between workers from both companies within the framework of the “Peace One Day” initiative, an annual day of global ceasefire and non-violence.

The ensuing riot killed 3 and injured 18.

Tuesday, July 26, 2011

Note to self

Change fucking everything.

Look at your life; it's not a buildup, it's a countdown. You're in a doped up antipsychotic haze which you're trying to pass off as a life. Are you suicidal? No, but you are busy killing yourself through crimes of omission. But take heart: only through disaster can we be truly resurrected.

An exploding universe contains nothing but the remnants of what could have been, but is not. Everything else is wasted potential and wasted matter. Nothing is quite as sublime as an unrealised ideal.

Are you socially isolating yourself? No? Is what you have any better? Look at the people with whom you surround yourself. Are they people worth emulating? No? Then why are they still there? To be fully couched in the comfort of a friend is a mode of existence with severe implications. To please you perfectly, she must understand you perfectly. Thus you cannot defy her expectations or escape her reach. Her benevolence has circumscribed you, and your life's achievements will not reach beyond the map she has drawn.

Are you in a job you can't stand but are too afraid to leave? At the end of every day, is the overarching question, "Was this day a complete waste?" Nothing is ever solved when the day is over, but nothing matters.

Take a long, hard look at your life, your routines, your peers, your job, your family. Are they yours, or are you theirs? You need an emotional response of some type. Something to remind the world - and yourself - that you are still, despite everything, a human being. It's easy to cry when you realise that everyone you love will reject you or die. This is therapy. Tears are salvation. Pain is resurrection. A little suffering is good for the soul.

Drive off a cliff, fuck someone, go on a shooting spree, do anything, but don't just sit there with a stupid, self-satisfied smirk on your face waiting for the clock to run out. What are you? Nothing. You just are. The cancer you don't have is everywhere now.

Change fucking everything.

Sunday, July 17, 2011

This Sentence Has Five Words

This sentence has five words. Here are five more words. Five-word sentences are fine. But several together become monotonous. Listen to what is happening. The writing is getting boring. The sound of it drones. It’s like a stuck record. The ear demands some variety. Now listen. I vary the sentence length, and I create music. Music. The writing sings. It has a pleasant rhythm, a lilt, a harmony. I use short sentences. And I use sentences of medium length. And sometimes, when I am certain the reader is rested, I will engage him with a sentence of considerable length, a sentence that burns with energy and builds with all the impetus of a crescendo, the roll of the drums, the crash of the cymbals–sounds that say listen to this, it is important.

Tuesday, July 12, 2011

Scribicide

Somewhere, parently, in the ginnandgo gap in between antediluvious and annadominant; the axenwise cleft in the dontmind; the gap in between you and me; is there found a puir spring of scribicide.

one by one we're all becoming shadows, and i will die and you will die and we will all die and even the stars will fade out in time. tis as human a story as paper could carry well, but the cluekey to the worldroom is the honeying of the lune: love. the waxing of the moon above. uncertain comets chancedrifting into one another, exploding like spiders across the stars. together. transient as the pure cold light in the sky: from round to crescent from crescent to round they range.

Parked so dark by her kindlelight, I'm frisqued by her frasques and her prytty phyrrique. This mischievmiss burns an incandescending indigonation; a feroxysm in the uncorked cor.

Monday, July 04, 2011

A state of mind

For those of you who actually read my blog (bless your hearts), you've no doubt come to accept me as an eccentric individual at the best of times. Unfortunately recent events have ascribed a disturbing aesculapian dimension to it.

I've had what most would not be loathe to describe as a nightmare month: I've lost my father; the very next day I was involved in a car accident; a week later a childhood friend died under violent circumstances; and a little over a week before the writing of this post one of my best friends took her own life. All of these calamities coupled with the typical difficulties associated with a high-stress line of work have most recently led me down a dark path.

I have experienced symptoms associated with psychtotic mental disorders: visual and auditory hallucinations, delusions, extreme paranoia, etc. The nature of these symptoms has varied from benign (voices commenting dully on my actions) to malignant (refusal to eat due to a delusional fear of being poisoned). I was passed from doctor to doctor and eventually made my way to a psychiatrist who, upon reviewing my medical and psychological history, diagnosed me with schizophrenia.

According to the physician in question, the condition has most likely been with me for a long time - possibly years - but due to its mildness has remained largely asymptomatic (or, at least, with symptoms mild enough that they cause little distress and are easily managed without ever triggering the urge to seek professional help).

Seeing as the condition has been wildly exacerbated by my recent prolonged period of intense stress, the headshrinker has opted temporarily to put me on a course of strong tranquilizers (benzodiazepine) in order to determine whether a relief in stress may bring about a relief in the psychotic symptoms. Unfortunately symptoms have persisted since entering into this course of treatment, so I will almost certainly end up on a chronic course of antipsychotics and intensive psychotherapy.

The status quo has obviously compelled me to do some reading which has alleviated some of the myths surrounding the illness, which - in turn - has made me a great deal less fearful and anxious about the entire situation.

The Inner Voice - Mark II

Attaining a higher state of consciousness is a bête noire for the unready; regressing to a former state of being surpassing our occupied reality. We give it labels because we're haughty, but the awakening of the formerly abandoned recesses of the mind expedites some species of emendation in us. Fear is a natural reaction to being well adjusted in a profoundly sick society.

Sunday, July 03, 2011

The inner voice

 Don't be afraid. You're regressing to a primative but desirable state of being, akin to the amorphous mass of consciousness which predates the ostensibly objective reality which you choose to occupy.

Monday, April 11, 2011

A Vignette

Like most people of the time, I find myself falling into love to the soundtrack of famine and war. The object of my adulation is bequeathed a recondite beauty. A transcendant presence. Oddly, she never looks directly at me. Skittish. Uncertain. Scared. Occasionally I catch glimpses of her bare soul through a reflection of a reflection, but her reckless aloofness drowns me in the realisation that my fault, my failure, is not in my passions, but in my lack of control of them.

If only she could let go. Dive into absolution from the weight which fastens her gaze to the safety of her feet. If only she would look up, I imagine she'd see the scattered evening sky reflected in my dark pupils.

Has this happened yet? No. Will it? I don't know.

Are you worried? Because I'm not.

Friday, March 18, 2011

Tethering mobile devices for free

In today's glorious world of mobile computing and smartphones, the line which separates "mobile devices" from actual computers is becoming increasingly blurred and will soon disappear entirely.

Many individuals have taken to using their smartphones as broadband connections for other devices such as laptops and netbooks in a process commonly known as "tethering". As far as convenience goes, the benefits are pretty clear: a single, portable Internet access point for use with whichever device is most readily available at the time.

Unfortunately many providers in various countries have taken steps to either reduce or profit from this activity by either making tethering a violation of their terms of service, or offering a separate "tethering package" - which essentially amounts to making you pay an additional service overhead whenever you want to use your phone as a modem for another device.

Legality and ethics aside, this article isn't meant to focus on the why, but rather on the how. Specifically, how can they tell you're tethering, and what can be done to circumvent it? We'll approach these one at a time.



How can they tell?

All IP packets have a field known as the TTL. This stands for the Time To Live. Every "hop" a datagram takes from one router to the next on the way to its destination reduces the TTL by one. Once the TTL reaches zero, the packet is dropped.

This functionality was implemented so that packets affected by some routing error and which find themselves going in a circle will eventually simply disappear as soon as their TTL reaches 0, instead of snowballing into a packet storm. All routing devices do this, and generally it's a Good Thing.

All operating systems have a standard TTL set on outgoing datagrams up to a maximum possible value of 255. Let's assume that both your Windows laptop and your iPhone have a TTL of 128. When you connect to the Internet directly from your phone, the data packets leave the device and hit your network provider's router (the first hop) with a TTL of 128. The router will decrement the value by one to 127 as the packet leaves their network on its way to the Internet.

On the other hand if you're connecting from a laptop using your iPhone, the phone itself is acting as a router and any packets originating on the laptop will have a TTL of 127 as soon as they hit your provider's router. In this way they can see that there was an additional network hop before the packet reached them, and from this they logically deduce that the iPhone is tethered to a laptop/notebook/whatever.

Okay, so how can we get around that?

The most obvious solution is to modify the TTL of the datagrams at their source. If, as in the example above, the TTL on your iPhone is set to 128, changing the default TTL on your laptop to 129 will mean that after the value is decremented by your phone, the provider will receive a packet with the expected TTL of 128. To them it will appear as though you're browsing directly from your phone.

Unfortunately there is one caveat: If the TTL on your mobile device is set to 255, I'm afraid you're shit-outta-luck. Seeing as the TTL is an 8-bit field in IPv4 packets, it can only accomodate 256 possible values: 0 - 255. You cannot possibly set it to 256 on any device ever. Fortunately in most circumstances this is not the case.

According to Deutsche Telekom Laboratories (PDF), "The default IP TTLs of popular MHDs (mobile hand-held devices) differ from those of the most commonly used home OSs. The default TTL of iPhones/iPods and Macs is 64, Symbian uses 69, while Windows uses 128. This enables us to separate MHD usage from regular PC."

To modify the default TTL in Windows, do the following:
  1. Click on Start and Run (or Search) and type "regedit" to open the Windows registry editor.
  2. Navigate to the following registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
  3. In the right-hand pane, right-click and select "New - DWORD (32-bit value)" and set its name to "DefaultTTL" and its value to anything between 0 and 255.
On Unix-like operating systems, the TTL is usually set to 64. In BSD or OS X you can easily change it using sysctl to modify net.inet.ip.ttl. For Linux, simply modify the net.ipv4.ip_default_ttl sysctl variable. To make the changes persist across reboots, add the changes to /etc/sysctl.conf. If you're unfamiliar with using sysctl, be sure to read the man page before proceeding.

A few last thoughts.

Already a few possible questions pop up in my head.

"Why not just spoof my User Agent when browsing?" I have always been and remain against spoofing of User Agents. Not only does it damage the efficacy of legitimate browser statistics, but it simply does not work. It's like a burglar who begins to meow after being caught red-handed in the hope that you'll assume he's a kitten and leave him alone. Any device, application or extension that promises to protect you by spoofing your UA is snake oil.

"Isn't there some other way that they can tell?" Frankly yes, but you don't need to worry about it. This would require deep packet inspection, and for any ISP who would benefit from disallowing or charging for tethering, DPI would be prohibitively expensive.

"Can I get in trouble doing this?" No. Changing the default TTL on your laptop/netbook/PC is absolutely not prohibited by any law. Just don't e-mail your mobile provider boasting about how you "cleverly" circumvented their tethering policy. You'll find your contract voided painfully fast.

"Can I damage my computer or my network doing this?" As long as you don't set the TTL inordinately low nor go out of your way to do stupid things with firewalls, you'll be fine. Imagine a TTL set to 5 and after a 4-hop loop the packet arrives back at your router. The loop will continue indefinitely until you reboot the router.

In summary, TTLs are serious business!

Good luck and have fun!

Monday, March 14, 2011

Guilt, denial and groupthink


As is normal for a group of people who work together, every once in a while at our office an email gets sent out - usually by the boss - hilighting and chastising some egregious behaviour; be it anything from unprofessional conduct with a client to a lack of hygene in the bathroom.

A personal observation is that, usually without variance, every member of our staff (bear in mind, we are a small company of only 8 employees, all sharing a single office) replies with some form of indignation at the behaviour described. Seeing as at least one member of staff must be guilty of said behaviour, the fact that there is a universal display of scorn introduces an ostensible paradox.

From a purely cognitive point of view, this phenomenon never ceases to fascinate me, and I believe it treads into the realm of a branch of mathematics known as game theory.

When the original email enters the wilderness of the office network, the initial reaction of everyone involved is to speculate as to whom the guilty party might be; a zero-sum game is created. By responding with (sincere or pseudo) indignation, the individual believes himself to be removed from the pool of possible suspects. However, the consequences of this behaviour are purely mathematical and fully predictable.

As the pool of possible suspects shrinks, so does the likelihood increase that more individuals will react with this form of veiled denial in order to remove themselves from the pool and eliminate any chance of suspicion. Of course, the guilty party (or parties) must play this game too, in order to avert suspicion. This eventually leads to the absurd conclusion that everyone appears to be in equal disgust at behaviour in which at least one of the parties involved must surely have participated. Thus, everyone involved ends up looking even more foolish.

This is a variation of the so-called prisoner's dilemma that is occasionally found in game theory. As the dilemma itself illustrates, the best possible outcome for all parties involved is to accept, each and equally, some measure of the guilt and for no single individual to deny any burden of the guilt. In this way, the shared guilt amounts to less of a loss than the shared foolishness of the absurdity of a universal denial in the face of evidence to the contrary.

The dilemma, of course, is that none of the parties involved cooperates, even though it's in everyone's best interest to do so.

In this example we see mathematical principles being highlighted in our daily interactions, and not simply being relegated to the notebooks of mathematicians.

Saturday, February 26, 2011

The legend of Jenga-henge

So a friend and I were bored the other day and played some Jenga. After what seemed like literally minutes, we got bored and gave up, at which point I completed construction on a monument that would make the Druids themselves weep: Jenga-henge.

Glorious Jenga-henge

May it stand for a thousand years!

 But as the legend foretells, the completion of this decadent monument angered the old gods! They sent in their most vicious monsters as retribution for this vulgar display of ego!

"What's this, then?"

Destruction!

Oh, the humanity!

A challenger appears...

Tag-team destruction.

Surveying the carnage.

Jenga-henge is no more.

"What?"

May the legend of Jenga-henge live forever, and serve as a lesson to those consumed by hubris.

Saturday, January 15, 2011

Your photography sucks

Have you noticed how everyone and their mother claims photography as a hobby nowadays? Do you know why? I'll cut right through the bullshit: because it's easy.

Okay, that's a bit of an explosive statement; good photography is everything but easy, in much the same way that good abstract expressionism is - I would imagine - extremely fucking difficult to pull off, but that doesn't stop anyone capable of projectile defecating paint from calling themselves an "artist".

Jackson Pollock was a genius. Whoever came up with this abomination, well...




Which brings me neatly to the next point in this disjointed rant: photography is the oil-on-canvas of the twenty first century. Anyone within snatching distance of a camera is equipped to take a picture and plaster it on their Flickr profile, but that doesn't make them a photographer any more than taking a laxative would make me a proctologist.

Annie Leibovitz, Robert Mapplethorpe... These people are photographers. You? You're an asshole with a camera, too much time, and not enough negative reinforcement.

Addendum: Yes, I do recall that I, too, have a Flickr profile. However, I've never claimed to be a photographer nor denied being a hypocrite.

Friday, January 14, 2011

Selective load balancing with Squid and iproute2

Recently I was asked by a client to develop a load balancing solution over two of their ADSL lines, but only for http traffic, and only for specific users. Sounds like a pain in the ass, right? Well, it was.

Essentially they've got four ADSL links:

  • eth0: 111.111.111.111 (main uncapped line)
  • eth1: 100.100.100.11
  • eth2: 100.100.100.22
  • eth3: 100.100.100.33

eth0 is the default route where all traffic goes through, and eth3 is used for something else.

They're using Squid as their proxy server, and want all traffic for a specific Squid ACL (let's call it "employees") to be load balanced between eth1 and eth2.

My biggest worry was in how to set this up without having to alter the default route on the system, but - as is always the case with Linux - there is a way if you look hard enough.

My first thought was to use iptables to mark packets, then set up an iproute2 rule to pick up on those packets and forward them to the relevant routing table. Unfortunately, the best one could do with this method is manipulate all http traffic, however, as mentioned, only the traffic for specific users must be load balanced.

Obviously, this method won't work.

The key to the solution is Squid's TCP_OUTGOING_TOS configuration directive. This directive allows one to set the TOS value in outgoing IP packets on a per-ACL basis. What this means is that if you have an ACL called "employees", you can have all traffic generated by the users in that ACL have the TOS set to an arbitrary value. You can then use an iproute2 rule to pick up on all packets with that value set and do whatever you want with them. Bingo!

Firstly, we need to create three routing tables: ADSL1, ADSL2 and BALANCE. This is usually done in /etc/iproute2/rt_tables.

Then we begin adding routing information:

# Assumes 100.100.100.10 is the address of the router on eth1
ip route add 100.100.100.9/29 dev eth1 src 100.100.100.11 table ADSL1
ip route add default via 100.100.100.10 table ADSL1

# Assumes 100.100.100.21 is the address of the router on eth2
ip route add 100.100.100.20/29 dev eth2 src 100.100.100.22 table ADSL2
ip route add default via 100.100.100.21 table ADSL2

Now we add some rules

# eth1 traffic goes to table ADSL1
ip rule add from 100.100.100.11 table ADSL1

# eth2 traffic goes to table ADSL2
ip rule add from 100.100.100.22 table ADSL2

# Squid sets desired traffic TOS. Marked traffic goes to table BALANCE
ip rule add tos 0x0c table BALANCE

And finally we create the multilink route in the table BALANCE.

ip route add default scope global table BALANCE nexthop via 100.100.100.10 dev eth1 weight 1 nexthop via 100.100.100.21 dev eth2 weight 1

Then finally, in your Squid configuration, simply add the configuration directive

tcp_outgoing_tos 0x0c employees

That's pretty much it. iptraf confirms that all http traffic for the desired ACL gets balanced over eth1 and eth2. Obviously the load balancing won't be perfect due to route caching, etc. But it probably is the most beautiful solution possible without splashing out on a pricey Cisco router or some such.

For more information, be sure to read the Linux Advanced Routing & Traffic Control HOWTO.