Monday, December 29, 2008

energy, of the black kind

As noted before on this non-blog, many self-titled environmentalists have no idea what they're talking about. For instance, this blog came up with the idea that a "black Google" would save 750 MWh/year (that's about 86 kW) because black pixels supposedly take less power to display than white pixels. The guy apparently failed to note that only obsolete CRT monitors do that, initially stating a 3000 MWh/year figure (see it in the URL, he also admits it). Apparently, when he found out that LCDs actually use more energy to display black than white (this comment on his blog agrees) he changed the figure to 750, a commendable action. Even so, his calculation is highly approximative at best. So it's easy to campaign for stuff without having the slightest idea what's going on. As CRT displays are being slowly but surely replaced with LCDs, his black background idea is actually going to result in increased energy dissipation. It's true that OLED displays might eventually favor his idea, but the point is he did no serious studies before launching an idea that thousands of sheeple intercepted and praised, leading to sites such as this, which was brought to my attention today. Its about page (where I learned about the naive but honest guy's blog) is full of smug about how much it protects the environment, while its front page mentions how much energy it saved. I guess if we take the approx. 1MWh stated and multiply it by 0.6/15 (measured watts increase in LCD consumption versus stated CRT watts decrease) we get about 40 kWh of wasted energy. At least it's not very much.

Sunday, December 28, 2008

Thursday, December 25, 2008


I want to wish everybody who celebrates Christmas these days a Merry one.
Meanwhile, I am certainly going to feel the Christmas spirit (be it ţuică, răchie, pălincă, vişinată, vodka-based eggnog et cetera).


I once heard that the standby/clock display on a microwave oven uses more energy than the oven uses to cook food. I find that unlikely, so let's do a quick calculation. The microcontroller used to drive the clock or whatever's on display shouldn't draw more than a few mA, 10 at most, or else it's a piece of shit. Most LEDs (I'll assume it was an LED display, because segment LCDs consume next to nothing) are rated for 20 mA average current, though in many cases they're used with less. High-efficiency LEDs can glow sufficiently brightly with as little as 2 mA. Let's assume 20mA per LED (worst case scenario), and a display made up of 4 standard 7-segment digits and 2 dots. Now, not all LEDs are simultaneously lit, because the clock doesn't show 88:88. To find out how many LEDs are lit on average, I built the following table:

Digit Number of Segments
0 6
1 2
2 5
3 5
Partial Total 18
4 4
5 5
Partial Total 27
6 6
7 3
8 7
9 6
Total 49

Note, totally off-topic, that 4, 5 and 6 are the only digits whose 7-segment representation has the same number of segments as the digit value.
Given a 24-hour clock (the worst case scenario), the sum for all 24 hours is: 6*10 for the leading zero plus 49 for the following early hours, plus 2*10 for the leading one plus 49 for the following mid hours, plus 5*4 for the leading 2 plus 18 for the following late hours. That's 216, so diving by 24 we get 9 LEDs lit on average to display the hours.
The minutes are just as easy to calculate: There's an average of 27/6+49/10 (for the first, second digits), that is 9.4 LEDs on average. The two points average 1 if they blink, 2 if they don't (worst case, which is what we choose).
In total there are 20.4 LEDs lit, that's an average current of 410mA, holy shit that's fucking much. In reality the current is significantly lower, but this is a worst-case calculation. So the display uses at most 420mA, microcontroller included. Suppose it's supplied with 5V, that's 2.1 watts. Assuming a supply efficiency of around 50%, the standby-mode clock eats about 4W averaged over a whole day, neglecting the small intervals the oven is used for cooking.
Now for the cooking. My oven has settings for 800W, 640W and 320W or something like this. I don't know if that's the useful power or the total power drawn. For the worst-case we're discussing I'll assume it's the total power. I always use it on 800W for about 1-2 minutes. So let's say the oven is used for 10 minutes a day (an average family might use it for 20-30 minutes a day). The display eats up 4W*24(hours)*60min=5760 watt-minutes. The cooking eats up 800W*10min=8000 watt-minutes, which is more. There, the display does NOT consume more energy than the oven-proper. If I only used the oven for 5 minutes a day, and the display was a really lousy one like the one described above then yes, the display might have consumed about as much energy as the cooking. Note, my oven displays a singe 0 when not in use, so that uses more than 3 times less energy. It still eats up quite a lot of energy, which sucks, but still significantly less than the oven-proper, so there goes the propaganda down the drain.

Thursday, December 18, 2008


I was relaxing in the bar, calmly enjoying my beer. Outside, the traffic was horrible. The intersection was almost blocked and the drivers were angry. A car blew its horn. I thought I saw the lights in the bar blink. It was obviously just a brain glitch. Surely the lights can't dim when a car is honking outside, can they? A great thought came to my mind. What if they actually could? I mean, when a lightning bolt hits a powerline or transformer station, the lights most certainly blink. They dim a little. The same thing happens when someone in the building is welding - the welder draws a lot of current so the line voltage decreases significantly. The question is, when a tram or trolleybus or even a train goes past the building, does it create enough of a disturbance for the lights to noticeably blink? In most cases, I guess it doesn't. But do the lights blink unnoticeably? Possibly. It's not necessarily an electrical disturbance that can cause the lights to blink. Air currents for instance do modify the light output of all devices, be them incandescent lamps, fluorescents, LEDs, whatever, simply because light output is dependent on temperature, no matter how slightly. Me shouting at the lightbulb can potentially alter its output. By how much, that's another discussion. It's certainly not noticeable, but is it measurable? If it's not directly measurable, is it at least statistically measurable? How many photons a second does a lightbulb's output vary with when a car honks outside? I don't know. Fewer than air currents cause? Electrical disturbances from people turning their TV on or off in the next building? I don't know. It's an interesting thought. My guess is about 5.

Wednesday, December 17, 2008


It's said that people who live on the first and second floors die older, because they rarely take the elevator and thus have more healthy exercise. On two occasions today I shared the elevator with people who ascended just one floor. A few days ago the elevator was nonfunctional. It was stuck at the second floor. I can't be totally sure, but my guess is that someone walked into the building, took the elevator to the second floor, got out and instead of closing the door in a civilized fashion, they kicked the fuck out of it. The door bounced back just as someone else was calling the elevator and the interlock was closing. It didn't have enough time to close so the door got stuck open. Then again, the interlock might have just been defective, not allowing the external door to open, and the person getting out might have manually opened it, got out in a civilized fashion and left it locked (it can only be overriden from the inside). If the first scenario actually happened (I don't claim it did), I can only wonder how could someone be so lazy as to take the elevator to the second floor, and at the same time blast the shit out of the door. Maybe they were in a hurry.


I've found this slightly evolved interface. It lets you whistle in commands. Plus, it uses %.2f and $_ and _#_, which makes it even cooler. And it's not 2.0.
Which reminds me: Can you whistle 2400 baud? 9600? 14400?

Thursday, December 11, 2008


Laptops are now called notebooks, because they get too hot to hold in one's lap. From the article: "A study by State University of New York researchers found that heat generated from laptops can raise the temperature of the scrotum, potentially putting sperm count at risk." Small laptops are now called netbooks (Firefox 3 spellchecker underlines the word red) because well, I don't know why. Maybe it's because they have a network interface, as opposed to normal laptops which somehow don't. There is some truth to that: my laptop's internal wireless card failed a few months after purchase. Fuck warranty, I wouldn't have been able to use my computer for a month or so while they repaired it. I tapped the card firmly and it started working again, it worked for another week and then it finally kicked the bucket. Given the low price of PCMCIA or USB wireless cards, fuck it. Maybe I'll reflow the solder some time (fuck BGAs and fuck RoHS (I wonder what they use to replace the Pb in CRT glass - you know, the Pb that shields you from the X-rays generated in the CRT)).
Anyway, thank Microsoft for indirectly limiting netbook performance.

Sunday, November 30, 2008


I'm watching this show on the DARPA Urban Challenge. Some team's truck, which is supposed to drive itself through a city environment, is hitting some wall. The team decide the sensors are functioning perfectly, therefore it's clearly a software problem. The software guy calmly informs his team that he can quickly reprogram the car and fix the shit. Then we see the guy inserting a line of code in some if () block. There's only one problem. The code is clearly using OpenGL to draw some lines. Whaaaaat? Nice.
This reminded me of another show I saw some years ago, where they were talking about realistically rendering moving water using computers. They took the Navier-Stokes equations that describe liquid motion and "simplified" them by either making them a puzzle and shooting out pieces, or by deleting the right hand side. This "simplification" supposedly allowed the simulation/rendering program to run at reasonable speed.

Wednesday, November 26, 2008


Part of any self-respecting ev0lvεd interf☺ce is an XML-based back-end.
I overheard the word "XML" in a conversation. It triggered the following thought: if the famous software is pronounced "teh", then how do they usually pronounce "XML" in Germany, or, for that matter, in Greece? achh em ell? och më lë? hmel? Kindly share the information if you have it. I'm really curious. Yeah.

Friday, October 31, 2008


We had a course in the last year of faculty called "Evolved Interfaces".
It talked about cute stuff like how a menu should ideally hold no more than 7 items, a notion which I later heard, during another course, in the form of "humans have a 3-bit memory", to which I quickly crafted a reply I (very wisely) never uttered.
Besides the cute stuff, the main stuff was about Web thingies. Sitez, Blags, F0rumz, Chats and the likes. We actually had to make a team project which consisted of a website using modern xml-y and javascripty and CMSy stuff and an accompanying blog. The site had hit counters and points (which made up a percentage of the course's final grade) were awarded for hits and Google PageRank. This is why each year around this time, people start putting up weird Messenger statuses linking to their Evolved Interfaces projects. People click the links because they sound intriguing and students get hits. This pollutes Messenger contact lists.
Evolved Interfaces is the only course I've had which mentions "Web 2.0" as a valid concept. I find that revolting.
Semi-off-topic: stupid TV commercial for Orange: "...I'm Reeves, the first too point ooh poet and I'm inspired..." bla bla. No, you're just an idiot who "uploads downtown and downloads uptown" and thinks that's so fucking creative and poetic.
Back on topic, I'm not saying that webby stuff isn't evolved interfaces, but until I can tell my light bulb "dim please" or "turn off please", and my air conditioner "computer, 20 degrees please", I'm not buying it. I mean we're in the 21st fucking century and I still can't buy an affordable, widely-available product that takes voice commands and performs useful stuff such as opening my windows (the real ones not the broken ones), flushing my toilet or heating up my dinner. Or at least changing the TV channel. And intelligently replying to queries such as "computer, tell me how that vote in the Parliament on the teachers' salary raise went". That's what I'd call an evolved interface.

Wednesday, October 29, 2008


There are games (such as chess) where player skill matters, and there are games (such as roulette) where luck matters.
I hate games which pretend to require thinking but actually require luck:

Fuck Minesweeper.

Thursday, October 23, 2008


I saw a UFO a few days ago.
I first saw it at about 60 degrees above the western horizon.
It was a small sphere (about 1/6 to 1/4 of the moon's apparent diameter) that seemed to turn from black to shiny at regular intervals.
A friend noted it was flying "a few hundred meters up, a km at most".
It was moving slowly towards the west, apparently descending; in about 3 minutes it disappeared behind the building.
Probably some bi-color party balloon drifting in the wind.

Saturday, October 4, 2008


In 2008, this guy is still including dos.h.
Vista's command prompt still uses DOS commands.
In Romania, certain high-school programming contests are still happening in Borland C (on DOS), and many high-school students are still learning programming in Borland Pascal (on DOS).
A few weeks ago a 1990s program didn't work in dosemu with a USB-to-RS-232 converter. Was it failing because of the high clock speed, like the Pascal library? Was it written like the guy's code? Was it failing because the serial converter wasn't emulated accurately enough? I don't know.
Anyway, I thank Microsoft for removing the serial ports from desktop PCs and notebooks (they're not called laptops anymore, because some dissipate too much heat to allow comfortable use in one's lap).
Apart from the once ubiquitous but now outdated dial-up modems and serial mice, serial ports are actually useful for a huge lot of devices and tasks, such as:
  • dial-up modems. Over mobile GPRS or satellite.
  • serial mice. Why occupy a hi-speed USB port with a low-speed mouse? (if you happen to want 2 or 3 mice on your system)
  • serial barcode scanners
  • small serial printers (frequently used for printing receipts)
  • uninterruptible power supplies
  • networking (wireless modules for interfacing low-power sensor networks, for instance. The networks run IPv6, btw.)
  • GPS receivers
  • mobile phones and PDAs (some mobile phone "USB data cables" are actually USB-serial converters)
  • a huge variety of industrial and laboratory instruments (meters, process controllers etcetera)
  • infrared communication (with mobile phones, PDAs, instruments etc)
  • serial console for configuring and debugging routers and other embedded systems and screenless devices. Frequently used by network administrators.
  • microcontroller programming, homebrew hardware, firmware upgrade for various devices
  • small auxiliary text-mode LCD screens to display what song you're playing or what mail you've got or whatever
  • infrared remote control receivers (for controlling your computer from the comfort of your bed/armchair/whatever)
  • low cost, easy to build laser links between buildings (with enough speed - 92kb/s - to stream medium-quality audio, transfer documents or work in a remote shell)
  • etcetera.
There. Fuck you, PC 97.

Monday, September 29, 2008


I was watching some mediocre movie where the actors were playing detective on an open hard drive. Weird, negative chars filled the hexdump, with an occasional readable string.
"It's an image!" the guy exclaimed upon reaching a "²¡¤³§«©±°something.jpg⊧⊤⊧⊩⌬".
"Let's see it!" said the chick.
The image is slowly loading.
"It looks digital", the guy wisely concluded.
No shit Sherlock! Wow, they actually did not use a VHS recorder on those platters, those are actual BITS, wow.
Fortunately there's at least one professional photo* guy on the webs who maintains that digital sensors are not intrinsically different than film when it comes to capturing images.
* about 3/4 down the page: "there's nothing at all digital about that look".

Wednesday, September 24, 2008


It's now Google's turn to show me questionable advertising. True, this is not spam per-se, but it's close:
Penis enlargement 6 cm - Total satisfaction or your money back. 100% Guaranteed, test it for free!

I find this situation truly alarming, as I usually receive useful advertisements in the WebClips, and I certainly believe Google to be a reputable company that adheres to higher standards.


I've started getting spam in Russian:

pussy - Huge boobs video clip

I hate spammers.

Tuesday, August 26, 2008


Look at what people at some Indian atomic research center are producing.
Simply put, the guy comes up with a "clever" way to measure stuff using a lot of "general purpose" chips, instead of the obvious, straightforward solution that everyone uses: a programmable microcontroller. He gives a complicated schematic that underutilizes an expensive component and needlessly employs another expensive component. It's more of a novelty, an academic curiosity (though not a particularly interesting one), than a sane product.
Table 1 below lists approximate prices for the components in the guy's design:

Component Price Link
DLP-USB245M* $25
MAX187CCPA** $14.81
74LS164*** $0.49
74LS90 $0.49
74LS74 $0.29
74LS132**** $0.30
R,C etc. negligible
Total $41.38

Table 1: Guy's Bill of Materials
*not an actual "general purpose" component, at least not as general purpose as a 74LS chip, and certainly less general purpose than a microcontroller; to save money, it could be replaced with just the FTDI IC, crystal and USB socket, because you don't actually need to include a prototyping module in a production device (unless you can't solder SMD).
**the weakest performance variant
***74LS parts could probably be found for cheaper, for instance $0.37 for the '164 at, but for 1000 units.
****implied, part number not listed on schematic

So that's 42 bucks just for the parts. Given that there are a lot of parts, the PCB is going to be big, so that's also going to cost a bit. Also, using just 8 of the 12 bits the 15-dollar ADC gives out, now that's pure waste. Nobody gives a crap about a data acquisition system that gives 8 bits (256 levels), unless it's very very fast, which this isn't. The author states that the system can be modified to make use of the full 12 bits, which is reasonable, but no schematic is given, and I have a hunch it would require at least one more 74LS chip.

Now here's the proper way to do it. A lot of manufacturers offer microcontrollers with integrated USB circuitry, as well as on-chip ADCs. So there go the two most expensive components. Plus, a microcontroller, being programmable, that is, having code, and memory, can do a lot more interesting functions such as calibration, unit translation, alarms, outputting control signals, whatever. Plus, a lot of microcontrollers have many analog inputs, so they can measure more than one thing, unlike the guy's design. And they're cheap, very cheap.
My idea would be to use an AVR microcontroller, such as the ATmega8. Using the software-only USB implementation kindly provided by obdev, and the internal ADC of the ATmega8, I can measure 8 voltages with 10 bit resolution (4 times finer than the guy). Moreover, I can increase the resolution in software by using oversampling. Well he can do that too actually, but I can do it in firmware which is nicer. And my PCB will be much smaller and cheaper, because I only use ONE integrated circuit instead of 6. Table 2 below lists my costs:

Component Price Link
ATmega8-16AU $2.23
USB socket $0 - low-speed device mandates captive cable
(like in USB mice)
R,C,D etc. negligible
PCB less than the other guy's
Total $2.23

Table 2: Proper Bill of Materials

As you can see, it's much cheaper, and much simpler to manufacture (therefore even cheaper). It will be slower and it probably won't pass USB certification, but it works. Using a proper USB microcontroller would make those two problems vanish and still cost no more than about fifteen bucks.

Table 3 below summarizes the results of my analysis:

Designer Price (excl. PCB, enclosure etc.)
Atomic Guy $ 41.38
Me $ 2.23

Table 3: Comparative Wastage

There. More than 18 times cheaper, and much better specs. Waste.

Saturday, July 26, 2008


1. I stumbled upon some show on some channel where they were showing some stuff and then blurring some other stuff "for security reasons" or something like that. Good thing I don't remember. If the stuff they were blurring out was in fact real and not some "reconstruction", they'd have made a terrible mistake. Blurring doesn't "delete" any information, it just "scrambles" it. Furthermore, it's a poor scramble. Blurring does what's called a convolution, which is basically adding pixels to their neighbors. They can be easily subtracted - the frame can be deconvolved, revealing the original image. It's being used to enhance pictures that come out defocused or otherwise distorted (by analog convolution versus the digital blurring you do in the GIMP). So I hope those sequences were bogus.
2. News are getting dumber by the day. Besides the presenter obsesivelly calling some kids who pretended to sell stuff on some websites, without actually sending the items, hackers, which is insulting to all hackers on many levels, some other dude was reporting on the way cool "thousands of decibels" at some concert the actual TV station was organizing. Yeah, i'd have liked having a few thousand dB SPL there... any increase in news quality is welcome; though anything above a mere 200 dB isn't physically sound anymore, it's a blast shockwave, a concept similar to the one discussed near the end of the previous (relevant) post.
2000 dB SPL (the smallest that could count as "thousands") equals about 2*10^95 pascals (notably, almost one googol, or "ten duotrigintillion":), of them). Normal air pressure is about 10^5 Pa, or 2{90 zeros} times less.
Having failed to find what the pressure is inside a neutron star, the densest object known, let's calculate a very rough estimate. The average density of such an object is thought to be about 10^17 kg/m^3, although it varies from the surface to the center in a way I don't know, so this limits the accuracy of my calculation. Anyway, the pressure dp contributed by a layer of thickness dx at distance x from the center is dp(x) = rho(x)g(x)dx. The gravitational acceleration g(x) = Gm(x)/x^2, where m(x) is the mass contained in the sphere of radius x. Assuming a constant rho(x) for simplicity and lazyness to search for data, dp(x) = G*rho^2*(4/3)pi*x*dx. Integrating over x from 0 to R we get the pressure in the center of a homogenous sphere of density rho and radius R: p = 2/3 pi G rho^2 R^2. In terms of its mass, that would be p = 3/8pi G M^2/R^4 (the smaller, the more crushing). Doing the numbers, I get around 1.4*10^32 Pa, which is of course much, much, much less than 2*10^95; any other more accurate model would still give a result that's much, much, much less than 2*10^95. So on second thought, I wouldn't like having "thousands of decibels" anywhere, if that were possible.

Monday, June 30, 2008

Saturday, June 21, 2008


Mkay... some ex-convict, who also happens to be famous, is denied entry in the UK. The UK rules, I love the UK. I fully agree with the British Border Agency: "we continue to oppose the entry to the UK of individuals where we believe their presence in the UK is not conducive to the public good". (In one way or another.)
Mkay... stupid mascot causes floods, or maybe it's just that Chinese symbolism is dumb and outdated. Also, those mascots are hideous. While we're at it, why don't we just shift all those eights a little bit? (pausing for a few moments) Aha! so that's how one transmutes prosperity to death and darkness to light etcetera. Interesting, I've learned something today.
Mkay... A lot of time has passed and people are still discussing Pluto. It's still amazing to see how much time and energy people invest in such irrelevant matters. Gravity Probe B canceled on the home stretch? Anyone? Bah! Pluto! You know what? Fuck Pluto and fuck the Hubble telescope for not being able to snap a photo of Pluto that's more than six pixels wide. We have pictures of Neptune, both from deep-space probes and from that orbiting piece of scrap that's been launched in space without being properly tested first, but we have great difficulty in obtaining pictures of Pluto. We also know there are bodies larger than Pluto beyond it and we don't call them planets, but we're still giving a shit about that piece of crap that can't even hold it's own orbit. We've failed as a race.
Mkay... crazy fanatic preacher admits to inscribing "an X, not a cross" on students' arms. A-ha! So not all terrorists are Muslim! We've learned something today, haven't we? The interesting thing is that he used "a science tool known as a high-frequency generator" to do what he did. This warrants further comments:
1. On the one hand, what he did is obviously wrong on many levels, but why the hell did he have to use an RF generator? I said this before in a previous post, concerning laser pointers: a knife can be used to prepare food, to heal people through surgery, or to kill people. Are you ready to ban knifes just because they can be used to kill people? I don't want to live in a world where I'm not allowed to use an RF generator because it can be used to burn people or cause interference. I know the article isn't about this, but I feel the problem needs to be raised. There also remains the question: why the hell use an RF generator, which is intrinsically evil and satanic as per the Bible, when there are matches and cigars and stuff available?
2. On the other hand, the guy might actually earn some bonus points for his technique. I mean, that's being inventive. It has hack value. For instance, if I had an RF generator and wanted to draw stuff on my skin, I'd certainly consider using it for that purpose, but maybe I wouldn't be thinking about this, had it not been for this guy's misdeeds.
Mkay... I was simulating some low-power wireless network and it wasn't working. No packets would get from one node to another. After countless hours of digging through the sources (I was lucky I had the sources), I found out that the simulated noise what at a constant level of plus 127 dBm. Sadly I can't give a fancy link to Google Calculator because it doesn't seem to know dBm, but I can tell you that's huge. I mean just look: Wikipedia has tables that speculate on how a hundred yottameters look like, but its dBm-to-watts table stops at 80. To get 127 dBm of noise power, or 5 gigawatts, you'd have to be inside a fusion reactor, or better yet, a hydrogen bomb. Well, the radio simulator would detect a collision at anything above -70dBm (like the physical chip does), which, as the Wikipedia table states, is quite a reasonable value. Anyway, fuck that, and fuck the fact that the interface for specifying noise in the radio simulation changed from TinyOS 2.0.0 to 2.0.1, breaking compatibility and silently failing (at least in the code I was working on, which I admit is... particular). You know what? Fuck bad programming, and fuck such a lousy sense of physics. This however raises the question: If I wrote a simulator from scratch, would I give debug warnings when parameters go haywire? Of course not, if only because there is no clear threshold after which a value can be safely identified as being totally insane. Maybe I should submit a patch that simulates the RF chip instantly vaporising into a greenish puff of smoke, so hot that even all the magic's gone away. I mean, if they simulate noise and attenuation and collisions and bit errors, why not?

Monday, June 16, 2008


A few days ago I was out with my girlfriend to have a beer and watch the soccer game between Romania and Italy, which ended with a 1-1 draw. There were two places side by side where you could drink beer and watch the game. One had a huge wide-screen TV and was full when we got there, and the other had a small black&white TV that's probably older than me, with a small antenna. Of course we settled for the small TV and watched the game with the few people that were around. Every time something interesting happened, we would lay down the beer glasses and turn our heads towards the TV, occasionally cheering and applauding. About 2 to 3 seconds later, the crowd in the other bar would do the same. Of course, being a digital TV it probably had some amount of processing lag. I don't know how much, so I'll cautiously add the delay from the cable provider who also does some processing and might suffer from additional satellite delay, as opposed to the analog TV which was about... 4 miles from the TV station. So there goes the live. Having sorted out the intriguing relative delay between the small crowd and the large one, I am only left to wonder what the absolute delay was between Zürich and that old real-time analog black&white TV.

Friday, June 13, 2008


Sorry, but I just couldn't refrain:

1. Couple has sex in church confession box

"Oh my God! They killed Kenny!"
"He had sins that he didn't confess!"
"And he didn't take communion!"
"He's doooooomed."
"Better go and confess before WE die!"
"Come on, hurry up!"
"Oh no, it's locked!"
"Oh no! It can't be locked! Nooo!!!11 We have to confess before we die!"
"There's that window in the back that's usually open."
"Come on, hurry up!"
"Look, the confession box is over there!"
"I'm first, I'm first!"
"What the?!"
"Oh, son of a bitch!"
"You're a sinner! You're doing unnatural things in the House of God!"
"Oh, forgive me Father, for I have sinned!" etcetera etcetera.

2. Manholes

"Like WTF, there were only ten people killed! Sheesh, quit making such a fuss!"

Wednesday, May 28, 2008


This weekend is, er, was voting day. We're supposedly electing mayors, local councils and the other things that come with them. Therefore, last night I dreamt I was voting :D It was an interesting experience, akin to a trip into a future world and its voting ways.
So without further ado, I give you

Voting: 2084.

It was a cold April morning and the dew on the grass was frozen like tiny beads of glass.
I turn off the artificial landscape and open the window to smell the warm, polluted air.
Aaah, nitric dioxide, so sweet. Sulphur trioxide, yummy. Etcetera. (We still didn't find a cheap, pervasive way to command our windows to open and our lights to turn on in 2084, although computers students are still studying "Evolved Interfaces", but based on Web 4.0) First there was the Web, then pr0n, then the Social Web 2.0, then the Semantic Web 3.0 which failed to deliver, then there was Web 4.0, the EmoWeb, where people would use galvanic skin response, blood pressure, rectal probes and other sensors to upload their feelings online. Then of course marketoids were talking about Web 5.0, where you could blog by thought alone, but that wouldn't happen until 2337.
Alas, I reluctantly get up, take a shower, put some clothes on (dumb clothes, mind you, no electronics or anything) and walk out the door. I reach the voting room, sign on a sheet of paper, the supervisor hands me two booklets (where I am to stamp the desired candidates) and some advertising leaflets. There was absolutely no other person in that room. It was big, empty and quiet. Therefore I take my time and slowly walk towards the voting booth, which is a small, improvised box with dark blue drapes obscuring my secret choice. As usual, I might say.
I start analyzing the advertising materials and going through the list of candidates. Oddly enough, most are well-known TV stars. I finally decide on a sexy female TV presenter. After all, no mayor has done anything of note for the city in the last half-century, at least we'll have a sexy, charismatic mayor. But I'm not yet ready to cast my vote. I take a peek outside the small voting booth, and there are still no people around. Even the supervising authority has gone out for a smoke, leaving only a low-resolution security camera to keep watch. I calmly walk out of the booth, go into the next room, take out my 2-kg laptop, connect to the nearest wireless access point, and start searching for data on the few candidates I like most. After half an hour of searching, I think: Oh shit, I left the voting booth occupied! Think of the queue! Heck, what queue. There was no queue.
The End.

Wednesday, May 14, 2008


Some British chef wants to outlaw out-of-season vegetables. Besides this being extremmely funny, it's of course stupid. Let's compare this to some hypothetical situations, in order to better understand just why is this so stupid.
First, let's assume some "celebrity" fashion designer decides they want to outlaw out-of-season or out-of-fashion clothes. I guess nobody is going to pass such a law (in a serious country in this timeframe), but just the idea of lobbying for something like this is preposterous. Imagine stores being unable to sell ... t-shirts in winter. Imagine yourself not being allowed to... I don't know, wear a blue hat because it's unfashionable and thus illegal.
Let's imagine then, that some "celebrity" "deejay" decides to lobby for a law banning songs and records that are more than 3 years old. So then I go to the usual rock bars and I'm not able to listen to 80's rock because some idiot passed a law that some other idiot lobbied for.
Then, let's imagine that some "celebrity" porn star bans you from having sex in other ways than the missionary position (a real law in some USA state).
Finally, let's imagine that some celebrity electonic circuit designer bans electrolytic capacitors, which they should actually do, as electrolytic capacitors currently suck balls and are a main cause of appliance failure. That would be extremmely stupid, because electrolytic capacitors, though unreliable, are very small and cannot be replaced with some other type without ending up with for example a mobile phone the size of a bucket.

Wednesday, May 7, 2008


This is about the 5th time in the last two weeks when I look at the clock and it shows 13:37.

Friday, May 2, 2008


1. Yesterday police have turned decorative Christmas lights back on in major cities around the country under the slogan "drinking alters reality" or something like that, in an effort to reduce drunk driving.

2. Hypermiling (what?) can supposedly save gas and cash. Tune your car to use up less fuel, and drive less aggressively. Yeah, right. One problem is, in the U.S. at least, that a certain percentage of people feel that driving an efficient car is {lame, gay, laughable, whatever}. Who the hell cares about fuel. $3.61 per gallon? What the fuck is a gallon anyway? I drink water out of 2L bottles and don't know how much that is in gallons. I have no fucking feel for how much a gallon is, even though I know roughly how much a mile or an inch or a pound is. Anyway, Google knows, almost 3.8L. So what, $3.61 for that much petrol is expensive? Bullshit, here it's over one €vro per litre.

3. Fish eat, they digest, they crap, and other fish eat their crap and do the same. ("Dirty Jobs" on Discovery). Then the second group of fish are fished out after having fattened up, and sold as human food.

3. Hyperprogramming. Processors read programs and execute them over data, chomping it up according to the programs. They crap out new data and heat. Scientists are looking for new computing models and paradigms to help decrease energy consumption.

4. Pain. As years pass, pain settles down on the bottom of a lake, where it decays into mud. From that mud, beautiful water lilies grow and shine under a crescent moon.

Saturday, April 26, 2008


A very funny piece of news caught my attention today. Don't you just like the part with the North and the South? :D Apparently some Florida senator thinks truck nuts are offensive and must be banned. WTF? Not only that, but the guy owns a gun shop! :)) So basically, the way I see it, is: killing people is not obscene, but displaying a pair of fake animal testicles is. Way to go dude, way to go. See my previous post about some people having zero respect for life. Of course, people are hypocrites, and morality is just a word. ("Stop the world... ... Peace is just a word...") I guess to some people it is moral and ethical to own and sell guns, but it is unethical to well, jack off to porn, kiss in public, or stick some plastic balls on your truck.
Here in Romania most people are Christian Orthodox, meaning we start celebrating Easter this night. One of the bigger TV establishments here is running an entertainment show intended as a fund raiser to help some sick kids who need a ton of cash to well... live. You dial a number and donate $$$ if you like the stars' performance. The $$$ go to some kids who need surgery. One of the kids needs a treatment based on stem cells if they are to well, live. Of course, one can't treat people with stem cells in the 'civilized' western world anymore, because it's illegal. They have to do it in China. Why? Because some people think they have the moral authority to decide who lives and who doesn't. Because they don't necessarily value life, but they have to appease the vocal fanatic hypocrites who don't know shit about anything but feel they have the answer to life, the universe and everything else in some book or text or judgment or something. Whatever. Go on preaching damnation, salvation, environment, cloning, genetic engineering, global warming and nuckular \/\/ar while I go eat a sandwich or something.

Wednesday, April 23, 2008


Laser pointers have been banned in "some Australian state" after a number of idiots pointed them at aircraft cockpits. Now, the article isn't very clear on wether all laser pointers are banned, or just high-powered ones that can really blind pilots. For instance, the crappy ones that I can get here for around half a buck couldn't blind anything more than 10 meters away. So instead of just arresting and convicting the idiots who endanger passengers' lives, the state just bans laser pointers alltogether. What next, banning forks because one can stab people with them? Should we eat with Chinese sticks then instead of forks? What if someone finds a criminal use for chopsticks then? Eat with our bare hands of course. Then someone uses their hands to beats up somebody else to death and we all get to wear little remote-controlled collars that give you a paralysing shock whenever the state says so. Maybe that would be good. But until then, what if lasers get banned in my country as well? Maybe I want to build a long-range laser data transceiver. Will I be able to do so without a license in 5 years time? Will I be able to get a license then? Will a high-school hacker with reasonable technical knowledge but no engineering degree be able to get such a license? This sucks.
Then I learn that Hillary Clinton, who is ugly, said that the U.S. could wipe Iran off the face of the Earth. Well of course they could! The U.S. can wipe anything out, including the whole planet. So can Russia, and a couple other countries can do some serious damage. We all know that. Do they want to wipe everything out? No. There was no Cold War, there was no Cuban missile crisis, in my humble opinion. No one in their right mind would have launched their nuclear arsenal against another nuclear power. It was all just bluffing and political bullshit, regardless of what the press or Discovery says. But I'm probably wrong. I was walking through the Polytechnic's campus this morning and I was thinking... scientists don't understand life, and maybe it's good they don't. When humans understand something, they tend to devalue it. For instance, we (the civilized world) no longer attribute lightning to some gods being angry, and we no longer fear it and sacrifice animals to calm the gods down or something. Well. Kind of. So it's lost its value. Now it's just a meteorological phenomenon. Yeah, some may find it beautiful, sure, but it's not divine anymore. Its value has diminished. Solar and lunar eclipses, same shit. Sure, there are still a lot of uncivilized or semi-civilized people who hold a wide variety of beliefs regarding these, so these phenomena have a much greater emotional value to them than to us. Steam engines (think the ancient Greek spinning ball that was used for magic and stuff). Whatever. So when we understand life, when we begin engineering life in the lab for good, then we'd have lost all respect for it. Of course, big political leaders never had any respect for life. Think Hitler, Stalin, the Crusades, the World Wars, the Roman, Otoman, British, Spanish empires, whatever. We can wipe Iran off the face of the Earth, sure. Yeah I also hate oppresive regimes, I hate oppresive cultures, but you can't just kill everybody who's not as civilized as yourself from certain points of view. Maybe they're more civilized in ways you fail to see. And finally, maybe there are space aliens out there who are far more civilized than we are, and they don't go around killing us just because well, we suck. And until the U.S. and Russia and France and the others scrap all their nukes, they have no moral right whatsoever to accuse Iran of wanting to have their own. Fuck Iran, fuck the U.S., fuck Australia, fuck the human race, peace already.

Sunday, March 30, 2008

earth hour

This Saturday some idiots and newspeople asked me to turn off the lights for one hour, along with Sydney and some other big cities that were going to do the same thing. Images of people sitting at restaurant tables around a candle as the lights went off flashed around the TV screen all evening long. "Turn off the lights and use candles" seemed to be the message. Well, that's insultingly stupid. That's not an invitation to decrease pollution, but an invitation to return to the dark ages! Don't get me wrong, I hate pointless artificial lighting. I absolutely hate not being able to see the stars and other astronomical objects because of all the fucking lights. Who the hell needs lighting at 2 am in the night? That's a total waste of electricity and a fart in the face of all astronomers and stargazers everywhere. But candles? Let's take a look at the luminous efficiency of candles versus modern lighting. The humble incandescent light has a terrible efficiency of only 2.5%, because of all the thermal radiation it emits, only a small part is visible. The more advanced fluorescent gas-discharge lamp can reach 15%. LEDs are currently worse, contrary to popular belief. Low-pressure sodium vapor lamps can reach 27% efficiency, which is huge. They have an added advantage of being easily filtered out when doing astronomy, because their yellow color has a very narrow spectrum. Take a power station efficiency of let's say 10%, which is a very, very low estimate, stick an incandescent light bulb at its output and you get an overall efficiency of 0.25% from coal or whatever noxious fuel you're using to pure light. Now take a candle and burn it, releasing carbon dioxide, carbon monoxide, soot and useless heat into the atmosphere, get an efficiency of about 0.04% (so that's more than 5 times worse than the most inefficient coal-to-light technology in current use) and brag about how great an environmentalist you are. Then smell your farts and comment on their exquisite flavor. Then exchange farts with all your brain-dead environmentalist friends who don't know shit about physics, chemistry or biology and brag and lick each others' asses. And celebrate Earth Hour.

Wednesday, March 19, 2008

the drunken man problem

The Original Drunken Man Problem

A drunk man is standing next to a pole at moment t_0=0.
At each moment t_s,k = k * tau the man takes a step in a random direction.
Find the most probable distance between the man and his initial starting position at time t.
For simplicity assume a constant tau = 1 second and all steps equal to 1 metre.

Elaborating on the Problem

An inebriated individual stumbles out a bar at moment t_0=0.
At each t_s,k = k * tau the guy takes a step in a direction given by angle alpha.
Every p steps alpha changes to a random direction then remains constant.
p follows a Poisson distribution with lambda = 4.
The distance travelled during one step follows a normal distribution with mu = 0.5 m and sigma^2 = 0.5 m^2.
To complicate matters further, upon colliding with the bar wall a new alpha is selected.
Find the most probable distance travelled at time t.
Then assume a normal distribution for tau too.

Saturday, March 8, 2008

science fiction

"Captain, we've lost optical output in the converters in room 100!"
"My god! The molecular reactors cannot function without sustained input from room 100! The life support systems are in danger! Not to mention the crew being unable to perform their duty without proper environmental conditions in the waste dispoal facility!
"I agree, the situation is looking pretty grim. What should I do, Captain?"
"Quickly, energize the emission coils!"
"Coil temperature is reaching 3000 Kelvins, Sir."
"Good. Now decrease the converter frequency to get closer to resonance."
"Decreasing operating frequency 35%... The positive-coefficent thermistors are heating up. No-go, sir. The power controller has detected an overvoltage in the resonant circuit and is shutting down."
"Yellow alert! Everyone prepare for emergency biostasis in case of environmental failure. Officer, reset the controller, move the frequency back up and wait for the thermistors to cool down."
"Done. The emission coils are operational. Increasing field strength to 900 volts per meter."
"Are the atoms responding?"
"Yes, we've got arc ignition. The resonance point is dropping... Hold on, the plasma is getting unstable! It's oscillating chaotically on a subsonic frequency! I can't keep it going! It's out, we've got another overload!"
"Reconfigure the overload threshold to 120% and retry the ignition sequence with a 30% increase in the ionizing field."
"Yes sir. Heating up the emission coils... field is increasing... we've got ignition... no, the plasma column is not holding."
"Try again with 50% field increase for 5 seconds."
"Trying... the protection network cannot hold much longer with all that power coming from the resonant circuit! We've got to get that plasma to increase in density or we're dead!"
[Officer 2 enters command deck] "Captain, the life support systems have shut down! The bioreactor has run out of input material! We need the crew to start shitting NOW!"
[Officer 3] Yes, besides, I can't hold it in much longer! We need to get that damned toilet fixed!
"Red alert! Everyone to the stasis cells now! Prepare for immediate hibernation on my signal. Officer, increase average power to 175% and switch to discontinuous mode."
"The pulse capacitors won't tolerate 175% sir. That's way over their nominal rating! We risk losing the entire converter assembly!"
"I'm willing to take that risk, officer. Quickly, short-circuit the output divider! Decrease the feedback ratio in the boost converter! Adjust the inductive reactance! Lock on that phase! Enhance those FETs!"
"Disabling overload threshold... Increasing main voltage... Setting target frequencies... Yes, we've got constant output! Decreasing power to nominal... Plasma is holding Sir! We've got optical output!"
"Good job, officer! Cancel alert. Everyone report to room 100 in decreasing order of intestinal discomfort. Go get yourself a beer officer!"
"Thank you Captain!"
"Captain's log supplemental. With the optical converters in room 100 fixed, crew morale is better than ever and everything is back to normal. These happenings have delayed our mission to Sirius 5, so unfortunately we missed our chance to meet Ambassador Kuux. Ironically this might have come as a blessing to us, as we learned from a Karbazian subspace transmission that Atheist
terrorists suicide-bombed the Agnostic conference room where the meeting was taking place. They detonated 300 micrograms of superfluid qvadrilithium crystals using a modified antiselenium primer. Both are undetectable to Karbazian bosonic spectrometry scanners. We sent our deepest most sincere regrets to the people of Sirius 5, but we sure are glad our asses weren't fried in the blast. Thus life goes on aboard the Sputnik V, leaving one to wonder just how has humankind evolved over millenia from flesh-eating, spear-wielding top-of-the-foodchainers to space-travelling woosies who won't even take a goddamned shit if there's no light in the toilet."

Wednesday, March 5, 2008

You will not

(spam me)
an essay* to ruin your day :D
*based on a true story.

You will not advertise anything I might not be interested in when sending me e-mail. I hate spam.
You will not use big fonts and bright colors for it. I hate spam.
You will not send me mass instant messages. I hate spam. Each message incurs a 3-point penalty with a 2-day exponential decay constant. 10 points and you get banned. No questions asked.
You are allowed to do whatever you want in your personal space: the status text.
But only if it's not scrolling or otherwise updating every second, flooding me with useless packets. I hate bandwith-munching spam. You get banned. No questions asked.
You will not post pictures when your comment on my web pages. They (a) will probably ruin the color scheme and (b) will almost certainly ruin the layout, because Web 2.0 sucks and people writing Web 2.0 CMSes and layout templates don't care to think of stuff like: hey, what if some guy posts a 1000-pixel-wide image here? I hate web sissies. And spam.
You will not send me animated xmas e-cards lifted from the web, chainletters, pictures of dogs or bunnies or whatever, jokes (I hate bad jokes) or anything else. I hate everything, and spam. You get banned.
You will not send me docx files.
You will not talk to me.
You will not look at me.
You will not talk about me.
You will not think of me.
You will pretend I do not exist.
Or else.

Wednesday, February 20, 2008

factoring the time

$ watch -n 60 factor \`date +%H%M\`

Wednesday, February 13, 2008

lambda * delta = crap

I was wandering aimlessly through the murky waters of the interwebs having forgotten my surfboard at home. After hours and hours of swimming around in the dark I stumbled upon this dude. From what I understood by skimming through the website, the guy is doing artsy spirity things using electromagnetism instead of classical stuff. Kind of cool because very few people do art and electronics and programming. So his scrying boards are programmable in Scheme which is supposed to be (his words): novel, highly expressive, dynamic, introspective, elegant, extensible, a {lightweight, mobile, active} means of describing worlds and processes, thus perfect for such stuff as scry-programming. Wow. So if you followed the Wikipedia link you might have seen that ugly lambda starring at you. After a quick skim through the article, I most sincerely can't find the elegance, expressiveness, beauty, simplicity or whatever this language is supposed to have. Before going to Wikipedia I first looked here, where else but the famous MIT. There's that damned lambda again. Why do people have to hail lambda calculus and build virtual statues and monuments to lambda calculus and kiss it in the ass like it's somekind of hyper-meta-rational godly piece of abstract shit? So I go to the big famous MIT and what do I see? A crappy black and white logo that's the most noisy logo I've seen in the last 6 months. (shiver!) Why can't people antialias their pictures? Is it so hard? Or is 1-pixel wide monochrome the new fad? There are tons of image editing packages out there that can do a proper picture resize, and many of them are free. But people still put out bad graphics because a)they're lazy or b)they don't care for proper sampling and quantization. Well of course they don't, they care for lambdity (lambdaness? lambdacity?). I took a quick look over the Scheme doxumentation on the MIT site and damn, I really can't call it simple, expressive, elegant, let alone introspective. But of course I can't argue about it not being statically scoped and properly tail-recursive, as its homepage states. So let's take the first decent example of Scheme code (is it called "code"? maybe it has some esoteric, intellectually pretentious name? am I perpetrating a terrible insult by calling it code and not self-referencing internally-reflexive external character-stringy description or something?) - so let's take this piece of code that's found on both Wikipedia and the MIT doxumentation and just post it here:
;;; The FACT procedure computes the factorial
;;; of a non-negative integer.
(define fact
(lambda (n)
(if (= n 0)
1 ;Base case: return 1
(* n (fact (- n 1))))))

Man, now that's introspective!
The same code written in a proven, widely used, respectable, expressive language like C would sound a little bit like this:

/* If you do not know what a factorial is
you should search it on Wikipedia or Google. */
int fact (int n)
assert(n >= 0); //jackass!
return n > 1 ? n * fact(n-1) : 1;
Much cleaner eh? Compare that to 1-2-3-4-5-SIX parenthesis. And their code screws up bigtime for negative numbers assuming n is a signed integer (I don't know, I hate lambda-anything, I suck), while mine doesn't. (Who would want to be using unsigned numbers by default anyway??) Mine also warns the careless programmer who feeds negative numbers to the factorial function. So not only is their canonical "hello world plus a little bit more" example ugly, it's also an infinite loop if my perfectly reasonable assumption of n being allowed to be negative as well as positive holds. Well, it might not be infinite because the hardware might not let it, but that's fucking bad practice. And after 5 more minutes of searching it seems that my assumption indeed holds, because according to the MIT documentation (- 3 4) gives -1. After another 5 minutes I opened up a GIMP script console and entered the code, then called the function with -1. It froze.

This more complicated example does the same shit but without (rather idiotically) wasting stack space with recursive function calls:
(define (fact n)
(define (fact2 n m)
(if (= n 0)
(fact2 (- n 1) (* m n))))
(fact2 n 1))
Of course it has a pretentious name called proper tail-recursivity and Scheme is such a great, wonderful, revolutionary, INTROSPECTIVE =)) language for supporting it.
Here's the same shit in C, which also does not choke on negatives, unlike the code above.
int fact (int n)
int f;
for (f = 1; n > 1; f *= n--);
return f;
Fuck lambda calculus and fuck computational linguistics.

Saturday, January 26, 2008


God damn it, they've made black paint. Finally. But it's still not black enough.

Monday, January 14, 2008

computational linguistics

I have a course on something that I guess resembles computational linguistics, for which I have to take an exam in 2 hours.
So what is text mining and data mining useful for? Building "a more intelligent Google" of course.
And what about an example of a malformed sentence? "The green, colourless ideas are sleeping furiously."

My New Hobby:
Confusing text mining web bots with ambiguous sentences.

"Would fine times be forever flawlessly falling through the fallacies of faceless fires!"

"John, come here!" "What now?" "I think the text bot got high on semantic tree cycles again!"

Tuesday, January 1, 2008


I just realized upon opening the blog dashboard that the previous post had been the 100th.
Well, I was under the impression that this includes updates to previous posts to fix typos and shit, but no. It does however include one or two drafts whose content I'm not very sure about yet. So whatever, let's celebrate the new year with post number 101. Or number 100 if you think the new millenium came in 2000, which it did not.* By the way, there's a bank called "Millenium" here whose offices look more like beauty salons or something (which is not necessarily a bad thing, it's actually rather original). They kind of built "Europe's tallest Christmas tree" here in Bucharest. Well, it's not actually a tree, it's more like a regular steel structure that vaguely looks like a tree, and I find it very ugly, distasteful and ... well... not too tall actually. Nevertheless, when they lit it up for the first time on December 1st (which is also the National Day), 'bout 100 kilopeople rushed to see the kitsch. 'bout 50 kids got lost, people stepped on each other, it was mayhem, hell, chaos, whatever you like to call it. The square and its incident streets were flooded with people, traffic ground to a standstill, busses carrying people couldn't move anywhere, and of course people started ranting about busses being severely overcrowded and arriving way too late. So basically the whole city was fucked. "The tallest Xmas tree in Europe" they say. Some even doubt that assertion, but I couldn't care less actually: it's ugly, it's pointless and it's small. So big wow.
So happy new year, happy 100 posts and whatever.
If happiness were a piece of shit, would it smell like fresh forest soil?
*) You'd also number this post 100 if you were a reasonable computerist who liked their addresses to start with 0, but in this case you'd be celebrating the "binary millenium" in 2048.