Tuesday, April 7, 2009
please
I see more and more people embedding phrases such as "Please consider the environment before printing this email." near the end of their e-mails. I can only agree: please consider the environment before printing anything. For instance: energy/cut trees/oil/whatever needed for printing the document versus energy spent by you turning on your laptop to read the document while traveling (by train, of course). Stuff spent for printing and reading by daylight (or by incandescent light (inefficient) or econo-bulb (mercury-containing)) versus reading on LCD (or CRT) monitor, in darkness or in lit room. Think before you (don't) print. If I could be bothered to dig up the data, I'm sure I could find at least 8 cases in which it would be more "environmentally responsible" to actually print the fucking paper. I saw a documentary about loggers recently. Their company administers a huge area of forests, cutting down old trees and planting new ones instead, continuously. They claimed that younger trees absorb more CO_2 than old trees, therefore they're actually helping the environment. So there, when you're feeling lonely and depressed and nobody likes you because you're an environazi drone, go print a nice flower or something.
Wednesday, April 1, 2009
foolcoffee doubleclock
I had a Digital Computers course where we had these logic design and implementation lab classes. We had to implement various modules in Verilog and run them in a low-end FPGA. But during the first lab we weren't yet familiar with Verilog, so we were supposed to enter a digital schematic graphically. The schematic was designed the hardcore, old-school way, by building a state machine on paper, assigning bits to states, writing equations, translating them to flip-flops and gates et cetera. The state machine was for a (famous with past and current students at our faculty) "coke vending machine". It never worked as supposed and I suspect (being too lazy to prove though) that the equations suggested in the lab documentation were wrong. Years have gone by and, while having a break in the faculty hallway, I found that maybe one of our graduates, now employed at a vending machine company, has finally got it working:
Sunday, March 29, 2009
vi
vi in an ancient text editor present on Unix-like operating systems, known for its two modes: a normal mode where letters and numbers mean commands such as move one word to the left, delete 3 lines et cetera, and an insert mode where chars are inserted into the text. Normal chars can also be deleted with backspace, but somehow \n (newline) can't. If you accidentally press q in the middle of the line, you can press Backspace and undo that. If you accidentally press Enter in the middle of the line, or for some reason you want to join two lines, you hit Esc to exit insert mode, then Shift-j to Join the lines, then i to enter insert mode again. That's wonderful ain't it? Now, on large computers people can use whatever editor they want if they hate vi. But on small embedded systems such as home routers and set-top boxes, vi seems to be preferred (due to its inclusion in the BusyBox userland, which is probably due to it being part of the UNIX standard), and even though there are ways to install other software, it takes time which I may not want to waste. Therefore - fuck vi, vi sucks.
copyright
Came up with this while drinking with other computer engineers. Steps to become a rich lardass:
1. Write computer malware (virus, internet worm, whatever, can be mostly harmless)
2. Let it spread
3. Go public
4. Spend zero to 6 months in jail or do community service or pay a small fine or something
5. Sue antivirus companies for copyright infringement because of your virus signature that they include in their product which they distribute without your written permission
6. Collect $5 per antivirus copy/update distributed
Then, foreach virus_writer joe in earth.people {the above}
And suddenly you can't have antiviruses anymore. Dude, sick, what the fuck.
1. Write computer malware (virus, internet worm, whatever, can be mostly harmless)
2. Let it spread
3. Go public
4. Spend zero to 6 months in jail or do community service or pay a small fine or something
5. Sue antivirus companies for copyright infringement because of your virus signature that they include in their product which they distribute without your written permission
6. Collect $5 per antivirus copy/update distributed
Then, foreach virus_writer joe in earth.people {the above}
And suddenly you can't have antiviruses anymore. Dude, sick, what the fuck.
urth our
This evening was Earth Hour again. Earth Hour is a rotating, evening-following event lasting approx. one local hour and 24 global hours. People are supposed to turn off their lights as a message towards wasting less energy. Instead, they gather and light candles, which as some including myself point out, is actually very energy-inefficient. Early news reports show people gathering under slogans such as "screw current events" (ro: nu fi la curent), obviously referring to electrical current, and lighting tons of candles. This is incredibly stupid. Electricity is one of the cleanest means to transport energy, and is readily obtained from solar radiation, wind et cetera. Candles release toxic gases into the atmosphere and some are actually made from fossil fuels (paraffin wax). Their luminous efficiency is shit, compared to even the most inefficient incandescent light bulbs and electrical power plants. Way to go dudes, way to go. Now it's actually cool and eco to burn oil derivatives, at least as long as it's diesel which doesn't need electric sparks, because, you know, electricity is satanic and stuff mwahahah \m/.
As a response to critics, the World Wildlife Fund (who came up with Earth Hour) said it's purpose is not to save energy or money, but symbolic. LOL!
Therefore I say: the purpose of hunting is not to kill animals and endanger more species, but symbolic. It's also fun. Not that I endorse it, but I can certainly see how some people find hunting challenging, rewarding, fun. Coincidentally, about 1 hour ago I saw a documentary claiming that the guy whose killing started World War One was a prolific hunter who used to travel the Austrohungarian Empire by train shooting every animal in sight. He supposedly killed about 300 k before being shot to death himself.
Sometimes I just get tired of ranting. Sometimes I just accept the fact that I live in a defective world full of defective people, including myself. For instance, if astronauts can phrase their speeches in such defective ways as to suggest that space smells, what the fuck can I expect from normal people? Please spare me the "it's metaphoric, dude!" explanation -- many people actually don't know that void can't carry sound or smell and many people couldn't care less, sadly. Wordings like "space smells of ozone" and "a whiff of vacuum" do nothing to help that.
After all, why the hell do I expect stuff from astronauts. Astronauts are more like soldiers than like scientists. They get too much hype anyway: Dood, let's off the lights and light them candles and watch the space shuttel land and celebrate urth our!!
Whatever makes you happy, people.
As a response to critics, the World Wildlife Fund (who came up with Earth Hour) said it's purpose is not to save energy or money, but symbolic. LOL!
Therefore I say: the purpose of hunting is not to kill animals and endanger more species, but symbolic. It's also fun. Not that I endorse it, but I can certainly see how some people find hunting challenging, rewarding, fun. Coincidentally, about 1 hour ago I saw a documentary claiming that the guy whose killing started World War One was a prolific hunter who used to travel the Austrohungarian Empire by train shooting every animal in sight. He supposedly killed about 300 k before being shot to death himself.
Sometimes I just get tired of ranting. Sometimes I just accept the fact that I live in a defective world full of defective people, including myself. For instance, if astronauts can phrase their speeches in such defective ways as to suggest that space smells, what the fuck can I expect from normal people? Please spare me the "it's metaphoric, dude!" explanation -- many people actually don't know that void can't carry sound or smell and many people couldn't care less, sadly. Wordings like "space smells of ozone" and "a whiff of vacuum" do nothing to help that.
After all, why the hell do I expect stuff from astronauts. Astronauts are more like soldiers than like scientists. They get too much hype anyway: Dood, let's off the lights and light them candles and watch the space shuttel land and celebrate urth our!!
Whatever makes you happy, people.
Tuesday, March 24, 2009
work
Today I extended my "to do" note window 64 pixels downwards in order to prevent scrolling the "to do" list. It can grow 448 more pixels before reaching screen height. Depending on whether the speed at which the tasks are executed is influenced by the length of the "to do" list, or by the entries' age, the screen is predicted to fill up somewhere around September or October. I guess there is little or no influence, so I better plan on buying a higher resolution display. Put that on the "to do" list.
Wednesday, February 4, 2009
lemons
Embedded Systems exam at the Bucharest Polytechnic.
"A lemon battery can supply an average of 0.1mA at 1V for about an hour.
1. How many lemon batteries are needed to run a 100W light bulb?
2. How many instructions can an ATmega128L execute while running from a lemon battery? Assume that an ATmega128L uses an average of 4nJ to execute an instruction."
At the students' request, further (obvious) assumptions were specified:
a) To simplify, assume that the lemon has an ideal U-I characteristic (it can deliver anything up to 0.1mA at 1V).
b) It also has an ideal U-t characteristic (at 0.1mA, it holds 1V for one hour then suddenly drops to zero).
c) Assume there is an ideal DC-DC converter between the lemon and the ATmega128L, providing it with the required voltage.
After thinking about it, and after remembering the jokes about ideal spherical lemons in vacuum, I decided that additionally, the ATmega128L's clock frequency should be set such that it draws exactly 0.1mA from the 1V lemon supply, or that it should enter very low power sleep modes as needed.
Answers:
1. 100W/(1V*0.1mA) == one fucking million (whoa)
2. 1V*0.1mA*3600s/4nJ == 90 fucking million (yeah).
Required frequency for ATmega128L to complete 90Minstr in 3600s:
f = 90M/3600s = 25kHz.
Current drawn by ATmega128L at 2.7V (minimum operating voltage) in order to assure 0.1mA from lemon, given ideal converter: 0.1mA*1V/2.7V = 37uA.
Typical current drawn by real ATmega128L at 2.7V at 25kHz, extrapolated from datasheet graph: 50uA (pretty close actually).
So there you go: light a bulb long enough to take a shit, or execute 10 trillion 8-bit computer instructions. Meanwhile, a high-end "PC" processor would do maybe 4 trillion 64-bit instructions, making it better than the microcontrollers, but not that much better. Moral of story: do something useful -- turn off lights, run computers (*).
"A lemon battery can supply an average of 0.1mA at 1V for about an hour.
1. How many lemon batteries are needed to run a 100W light bulb?
2. How many instructions can an ATmega128L execute while running from a lemon battery? Assume that an ATmega128L uses an average of 4nJ to execute an instruction."
At the students' request, further (obvious) assumptions were specified:
a) To simplify, assume that the lemon has an ideal U-I characteristic (it can deliver anything up to 0.1mA at 1V).
b) It also has an ideal U-t characteristic (at 0.1mA, it holds 1V for one hour then suddenly drops to zero).
c) Assume there is an ideal DC-DC converter between the lemon and the ATmega128L, providing it with the required voltage.
After thinking about it, and after remembering the jokes about ideal spherical lemons in vacuum, I decided that additionally, the ATmega128L's clock frequency should be set such that it draws exactly 0.1mA from the 1V lemon supply, or that it should enter very low power sleep modes as needed.
Answers:
1. 100W/(1V*0.1mA) == one fucking million (whoa)
2. 1V*0.1mA*3600s/4nJ == 90 fucking million (yeah).
Required frequency for ATmega128L to complete 90Minstr in 3600s:
f = 90M/3600s = 25kHz.
Current drawn by ATmega128L at 2.7V (minimum operating voltage) in order to assure 0.1mA from lemon, given ideal converter: 0.1mA*1V/2.7V = 37uA.
Typical current drawn by real ATmega128L at 2.7V at 25kHz, extrapolated from datasheet graph: 50uA (pretty close actually).
So there you go: light a bulb long enough to take a shit, or execute 10 trillion 8-bit computer instructions. Meanwhile, a high-end "PC" processor would do maybe 4 trillion 64-bit instructions, making it better than the microcontrollers, but not that much better. Moral of story: do something useful -- turn off lights, run computers (*).
Subscribe to:
Posts (Atom)

