This is a documentary about Daniel Tammet, a guy that is a savant, but without the loss of social skills. He can make incredible complex calculations in his mind, has a fantastic memory, learned Icelandic in seven days then conversed in it on live TV.
The most incredible stuff is when he does math, though. He "sees" numbers as colored shapes and the operations he does in his brain are plastic, rather than numeric. He just sees some shapes that then reveal digits. As a guy in the film said "he does math without even knowing".
As a film it is not terribly elaborated, but you don't need it to be. It just shows the facts and lets you be amazed. I am getting annoyed with IMdb for not having a lot of the documentary films I am watching these days, so I had to blog about them. Bottom line, this doesn't really help anyone do anything, but it does display a normal looking person seeing the world in a completely different way than most of us and being capable of "superhuman" feats. These guys are the real superheroes, even if in comic books they would have probably been the bad guys. You know, no muscles, not really handsome, lots of brain.
The best part of it is that you can watch it all, right here, on my blog, thanks to google videoYouTube. Isn't the Internet fab?
I usually comment on films on the IMdb site, but there was no mention of this program episode there. Watching it was much like reading "I am a Mathematician", immersed in a fascinating, yet inaccessible world, the one of professional mathematicians.
I often wonder where do they get the money to sit years on end at their desk to prove a theorem, without telling anyone they intend to. Anyway, the story is about this guy, Andrew Wiles, who had the dream of solving Fermat's last unsolved puzzle and one that Fermat himself wrote he had a beautiful solution to. You see, Fermat wrote some conjectures, some ideas he had, and did not write the solutions, thus failing to turn them into theorems.
A lot of mathematicians struggled to prove them and they succeeded, all but one, a problem so simple to define and yet very difficult to solve: show that there are no natural non zero values that satisfy the following equation for any N larger than 2 : x^N+y^N=z^N.
It is amazing the math that this guy has to explore to solve it. Of course, I understand nothing of it, and the show doesn't try to make anyone understand the math, but the feeling and effort are truly remarkable. A must see for anyone needing motivation to better himself.
Space Mowgli is a short novel that describes, much like Solaris, the first contact with an alien race. There is a twist, though, as the alien is a human kid, modified to survive on a planet by unknown beings with unimaginable power.
You can immediately separate Russian scifi from American scifi. The Russian space exploration expeditions are mostly civilian, led by the smartest and more rational scientist around, acting as the brain of the expedition; the characters are unique and react unpredictably, led by their own feelings or beliefs; their biggest problems are bureaucratic or social and mostly internal in the group. In contrast, American scifi usually deals with military expeditions led by a charismatic or at least authoritative figure, acting as the heart of the expedition; the characters usually act within a strict set of rules which, if they chose to bend, they do as a group rather than as individuals, their greatest issues being external or technical. I personally prefer the Russian version.
This particular book explores the way humans understand their own humanity, rather than a true interaction with an alien race. The aliens are there, but they choose not to be characters in the story. Each human character has their own view of things and of how things should go on. Reading the book, one is forced to evaluate humanity together with the crew of the expedition and the ending becomes irrelevant. The inner exploration of the reader himself becomes the story.
Bottom line: nice and introverted. Easy to read and rather short. Lacking a conclusion because their is no need for one. The Strugatski brothers considered this story the closest to their hearts.
People know me as the guy who won't put AdSense on his blog. I didn't do this before, because I don't believe in getting money for something that I would have done for free and I dislike the idea of people annoyed by ads.
However, it crossed my mind the other day that I could get some money and give it to charity. More than that, I could even use it in the charitable that I choose! Like teaching kids to use computer (or at least their brain).
So, I am asking you, dear readers, would you accept ads on my blog if you knew the money from your clicks go to a good cause? Please feel free to add a comment or use the chat to discuss it. Thank you!
BBC News released an article today, regarding the referendum in Romania about the decision to oust or not to oust the president, Traian Basescu. The picture in the article was very representative and it is the same in this post. That's why I feel robbed! I go vote and I see that this kind of people stole the vote from under me.
But I went to vote anyway. It is my first time (political deflowering?), and I knew it was for nothing just as well as I knew it the times I didn't go to vote, the idea being that even if I will be (again) in the minority that no one cares about, Basescu will look at the numbers and see me there! He will see that some of the people don't really like what he does and how he does it. Maybe this will stop him from going all Elvis on us.
Anyway, to people who are not employed in the budgetary system, this ousting of the president thing was like a good opportunity to watch something interesting on TV for a change. Nothing changed when he got suspended by the Parliament and nothing really changes today. Maybe that will make people see soon enough that we don't need a hero, just a good system.
However, I still fell pissed off because I always get ignored in the votes because of the "people" in the picture. Geez! Use head, don't bang!
For those of you who didn't hear about it until now, Pandora is a free online music service that tries to detect characteristics of songs and allows you to make your own "radio stations" that play the songs or artists you like and/or songs that are similar to those you like. You have a nice and simple voting system that allows you to say if you like the currently playing song or not.
But lately, some new legislation in the US, making licencing for the Internet a few times more expensive and adding more restrictions for access outside US made them restrict the site. Now you can't listen to music on Pandora unless you are American.
However, there is no way they can be restricted from showing the relations between songs, so you can search the songs for yourself. Here is a excerpt of an email I received from Pandora about allowing access to their song clustering system:
I have been reading this very nice blog (in Romanian) called BookBlog, where people talk about and review books. They had a nice initiative of getting people together to swap books. I've decided to go and see how it is.
The result? Man, I'm old! And if so much opinionated and energetic youth, as were the people that came to the meeting, did somehow manage to infest me with their vitality, someone inevitably bumped a chair into me then excused themselves using the polite form of addressing your elders.
The meeting took place at Carturesti, a nice book shop/tea shop in Bucharest, one that has a very nice atmosphere, but lousy service. You see, the whole thing was organised with the approval of the people at Carturesti, but when we got there, no one knew we were coming and were very apprehensive about us moving tables around. Then they've decided to bring a big mug of fruit infusion (improperly called tea) to all of us, as it was too much the trouble of making individual tea pots for each request. I was bent on drinking mate tea and I hate boiled fruits, so it did upset me a lot.
But back to the meeting. The layout (a big makeshift table) did not encourage group discussion, but rather a group of small discussions. I've talked a little with the nice girl next to me, until a lot of her friends came and make it awkward. They all seemed to know each other, more or less, making me feel like an outsider. And I was outside everything you can imagine: size, age group, book interests.
Yes, the books everyone brought were mainly taken from the second hand book shops, not that mine was different, but I could find no single book that caught my eye. Eventually I bought a Strugatski book and left them my beloved "Fisherman's Hope". I do hope someone that knows how to appreciate it fished it home. Or I could have gotten A Mind of Its Own: A Cultural History of the Penis, by David M. Friedman, which was a huge success, although I doubt anyone took it home.
Eventually I got bored, talked a little to the organizer, a very nice guy from BookBlog. He has what it takes to make it in life... that particular energy that is found in both successful businessmen and sales people. Then I left.
At least I had the opportunity to read some more on the way back and at the Pizza Hut place, for now I return to my designated purpose for today, viewing as many movies as possible before the wife comes back. Muhahahahhaa!
I was looking for an answer to the problem of a grid inside an update panel. You see, since the rows and cells of a DataGrid or a GridView are special controls that can't be put inside panels, only in specific parent controls like tables and rows, there is no way to update only a row or a cell of a grid. If the grid is big, it takes a long time to render it entirely, it takes the CPU to 100%, it even blocks the animation of gifs. That results in ugly Ajax.
So, my first thought was: is there a way to update only what has changed? As I was saying in a previous post, a Page is rendered as its HTML string the first time it is loaded and then each Ajax postback makes it render like a list of tokens. The token format is this:
length|type|id|content|
For example 100|updatePanel|UpdatePanel1|<inner HTML of panel of 100 bytes>|
What if I would to insert my own tokens, then? Could I, let's say, change the innerHTML of a control outside of the UpdatePanel? And the answer is YES!
There are 20 token types:
updatePanel
hiddenField
arrayDeclaration
scriptBlock
expando
onSubmit
asyncPostBackControlIDs
postBackControlIDs
updatePanelIDs
asyncPostBackTimeout
childUpdatePanelIDs
panelsToRefreshIDs
formAction
dataItem
dataItemJson
scriptDispose
pageRedirect
error
pageTitle
focus
Most are not interesting, but 4 of them are!
type:updatePanel If you add a token to the rendered page string that has the typeupdatePanel and the id is the UniqueID or ClientID of a control, the content will replace the innerHTML of that control, even if the control is not in an UpdatePanel.
type:hiddenField If you add a token to the rendered page string that has the typehiddenField and the id is the UniqueID or ClientID of a control, the content will replace the value html property of that control. You can use it on hidden fields, but also on any type of input or html element that has a value. If the control does not exist, a hidden input will be created with that id and then the value will be set. You could read that value after a normal PostBack, let's say.
type:expando If you add a token to the rendered page string that has the typeexpando a script will be executed in Javascript that looks like this:
id=content
Example: 5|expando|document.getElementById('TextBox1').style.backgroundColor|'red'| This will result in the change of the background color of the control with id TextBox1 to red.
type:focus If you add a token to the rendered page string that has the typefocus and the content is a ClientID, then the focus will be set to that control provided that the focus.js script has been loaded. This script is loaded when you use Page.SetFocus. So, in order to set the focus to a control using this method, you must use SetFocus in PageLoad on any control you would like.
Why not use SetFocus, then, and be done with it? Well, because this, as all the methods above work on ANY control in the page, not just the ones in the update panel.
Of course, that doesn't solve my initial problem, of speeding up the Ajax rendering of large grids. That's because, even if I would solve the ViewState issues and the quirks that are bound to appear, I still can't change the innerHTML property of tables or table rows, as it is a readonly property.
So where am I to use this? It's easy: first of all, put a button (and only a button) inside an UpdatePanel. Any click on that button will trigger an Ajax postback, but will send a minimal amount of data. Then, put outside the UpdatePanel a Panel. Now you can override the Render of the page and on every Ajax postback, add whatever HTML you want to that panel. If you want to do it from javascript, put the button in a div with style="display:none" and then trigger the button click whenever you want to cause the postback. I am certain that for large readonly grids, that is a way faster method than the putting the grid inside the updatepanel.
To do this the traditional Atlas way you would have had to declare a web service, and then to set a javascript onclick event on the button, that would have executed a WebService method that returned a string, and manually change the innerHTML of the panel.
My preferred method of watching SciFi is to download it from the Internet. I have these shows that I watch religiously, even if they are not all very good. But given the low quality and scarceness of scifi these days, that's all I've got. One of these shows is Stargate, a series that spun from a Kurt Russel movie and that managed to reach 13 seasons together with its offshoot, Atlantis.
Anyway, my method is to watch for the show air dates, then look for it on the Internet the next day. However, once I happened to find the entire Atlantis series for a few weeks way before the release date. Now it happened again. Stargate and Atlantis episodes till July are on the net. I am now watching them all. The quality is way down, the self-irony of the writers has gone way up, but they are there. What's going on?
Update: Oh, damn! Having just seen Stargate episode 20 of season 10, I've learned that there is not going to be a season 11 anymore. That being the reason why the show has been released online, probably. SciFi Channel cancelled the show. MGM, the owners of the Stargate francise, promised two Stargate movies, as you can see in this article.
Devastating as this is, considering the total lack of climax or seriousness of both season 3 of Atlantis and season 10 of SG1, ending Stargate to turn it into something better might not be a bad idea. I just lack the confidence that profit driven corporations have the right stuff to create something that should be art and brain driven.
Ah, that's that. Another decent scifi show bites the dust. I'll be watching Battlestar Galactica till it gets completely Lost (pun intended) in new "spiritual" developments.
For the melancholics, watch these videos released on YouTube as 200th Stargate special and this little video, which is a fun one, and I believe fits perfectly with the topic of this article:[another youtube deleted video, guh!]
I had this English teacher in high school. She was very nice, and I also enjoyed her classes, mainly because I already knew English and because she did the unthinkable, she said she would pass anyone who didn't want to learn English, provided they didn't come to disturb the class. She was a good teacher.
Anyway, one day she started talking about the place where she is alone with her thoughts and she can feel calm. I, being even less tactful than I am today, replied "Oh, the toilet!". She felt offended, because she was talking about church. But the scene stuck with me. And sometimes, on the toilet, alone with my thoughts (and my cat - so not quite alone) I recall her reaction and my own. You see, I understood why she felt offended, it was because I compared a place she considered clean with a place she considered dirty, but I also thought about why a woman that believes in a deity that made us all considers dirty something like we do by design and clean something we do inside a building with trainers and specific rituals that are not by design.
And that got me thinking (hmm, is my blog the best thing since toilets?) about the general situation where we put so much value on an external thing, while the value itself is internal. And I am not talking here only about religion (which by now you know I consider stupid) but also about everything else. Fashion, for example. It's the human equivalent of monkey see monkey do. It's putting value on a thing, person or trend simply because you feel like it. So it's something that has internal value, you gave it importance, but you attached it to something external.
Take another example: the things we get attached to, apparently by brain design. A child is being told that his favourite toy has been cloned into a perfect copy. And he is given "the clone", which is actually the same object. And the kid wants his toy back, not the copy. And the examples are infinite.
I think it's because in our brains, things are not things, but intersections of meanings. A red pill is the intersection between "pill" and "red", themselves intersections of other concepts. The church is nothing but a silly building, but it has meaning, for it gives peace and solitude for a while. So does a bathroom. So does this blog. But there comes a time when we realise that the intersections don't add up. It's called thinking, and it's the equivalent of Bonzai trimming of one's thoughts. We start cutting away the lines that don't make sense or that hurt us, while we strenghten the ones that give us sense and pleasure. We start with a thin scaffolding of chaotic wires and we bring it to a sturdy iron bar cage where our thoughts are stable and protected. That is the real place where we are alone with our thoughts, and we are alone because we don't allow anybody or anything in.
So trim carefully, some thin wires are good while some iron bars are bad.
However, a problem arises. What happens if you have a library written in VB and having indexed properties and you try to use it in a C# project? Well, it works, and the generated code is something like:
public override bool get_PropertyName(string index) { } public override bool set_PropertyName(string index) { }
Somehow, this compiles :) Anyway, the problem now is that you can't use the VB code that used to use the VB library if you convert it to C# like this. I haven't found any way to do this: VBLib(with indexed properties)+VBApplication(inheriting or overriding indexed properties) -> C#Lib(translated)+VBApplication(unchanged).
I was too tired to work this morning, so I got on Digg to read what people were reading.
And I've seen some interesting articles, like for instance one about Starbucks. They started this campaign in which people write stuff and the company writes it on coffee cups. One man dared to question praying in God, based on the assumption that people are rational beings with a strong will. Obviously that assumption was wrong, as some chick got 'offended' and started bitching about the text. It got me thinking, you know, of why nobody cares if I am offended by all the God crap I hear everywhere. Some guy said on TV a few days ago that in Romania 99.8% of the population are believers. Yeah, right! Like, they are not full time declarative atheists. How easy it is to spin things.
Anyway, back to interesting topics. There was one about how lawyers are behind the times. They write these 'cease and desist' letters, with a threatening language that no one can ever sympathize with, but nowadays these documents get on the Internet, for everyone to read. And hate. So they cause public relation troubles for the companies they were trying to protect. I don't really see a problem, though, as there are a lot more lawyers ready to sue these lawyers so there you go.
But even religious and legal idiocy fades compared to the total mind numbing dumbness of these two Vegan parents. Apparently, they've decided to make their 6 week old infant a Vegan from birth. They fed it soy milk and apple juice. The baby died.
How gullible are we?! How can we believe in all these stupid things and advertise them as indie revolt against 'the system' or 'healthy' lifestyle against the food corporations and so on? Is it so hard to mind your own business and let other people think and decide for themselves?
Apparently, the summer has brought all kind of nasty insects. A fly has gotten loose on my blog! It's a bfly! Until it finds something useful to do (like allowing people to search stuff or going to the interesting bits or acting as a friendly button) and until it will find friends to join it, it will just annoy us. Alas! It is an unswatabble fly.
I wanted to create this Javascript fly that would... well... fly on the screen. So the first thing I did is create an empty html, put a script tag in it, add some init function to the body and then write the code. First problem: how to get maximum height and width of the page in both IE and Mozilla. I found a way, then I added a more complex html code, like a DOCTYPE. Well, amazingly (duh!) it didn't work. Finally, after trying several options, I found this code to be working in both browsers and in both doctypes (or lack of). Please report any issues with it, so I can fix it. Thank you.
function maxHeight() { var h=0; if (window.document.innerHeight>h) h=window.document.innerHeight; if (window.document.documentElement.clientHeight>h) h=window.document.documentElement.clientHeight; if (window.document.body.clientHeight>h) h=window.document.body.clientHeight; return h; } function maxWidth() { var w=0; if (window.document.innerWidth>w) w=window.document.innerWidth; if (window.document.documentElement.clientWidth>w) w=window.document.documentElement.clientWidth; if (window.document.body.clientWidth>w) w=window.document.body.clientWidth; return w; }
You want to create a report with Crystal Reports and you create that weird ADO.Net DataSet, then you add a Crystal Report, you select the tables you want from the created DataSet, then you drag the Id references to create the table links, you go through all that weird Report Expert, you add a Crystal ReportViewer to a Windows Form and you press F5! And you get "Query Engine Error".
Well, two main reasons for this are explained in this nice article: "Query Engine Error" With Crystal Reports .NET, but you just created the report, there is no way you changed the XSD or the name of the tables.
I tried a lot of things until I found out what was going on. You see, I had this tables that had an "Id" column and a many-to-many table that had "UserId" and "MenuId" columns. In order to link them, I did what I also did in the XSD, I dragged the Id (primary key of each table) to the UserId and MenuId columns. That was the problem! You have to do it the other way around, drag the Foreign Key columns to the Primary Key columns.
Hopefully, you would have read this article before wasting hours to find out what the hell is that error and where it comes from... It happened to me with Crystal Reports 9.0 and Visual Studio 2003.
Oh! And don't bother to link the tables in the DataSet XSD, since Crystal Reports seems oblivious to that.