|
The dark side of freedom |
| May 15th, 2008 under Digital Rights, OSS, rengolin, Media. [ Comments: none ]
|
|
Recently I posted about Stallman and Copyright, and how his beautiful ideas about how artists could make a living. Not every one think the same way, though…
Terry McBride, a somewhat famous music manager is also spreading the world about the end of copyright, as reported by El Reg, but with a bit of a twisted view on how actually bands could get some money out when labels won’t exist anymore.
The idea is quite old and obvious, football teams and websites do it for years, and is simply ad-driven free content. It’s not exactly free as in freedom as Stallman would love, I’m sure, but it’s a closer reality and I’m afraid we’ll have to go through that to reach real freedom.
Google is probably already developing AdSense for young female singers to display “Ads by Google” on their forehead while playing in a concert, and Microsoft is already filling the patent on how to force Vista buyers click on their “Ads by Yahoo! (I mean, Microsoft)” links on bands’ websites with “free” download that can only be played on leap years.
All in all, GNU is doing well and Stallman should be proud of it. The French revolution was an intermediate stage to “free the people” which was kinda necessary, pity they never reached true freedom. We might need this intermediate state again now, I just hope we don’t do the same mistakes this time (whatever they were)…
Popularity: 1% [?] Share This
|
|
Numerical methods package in C++ |
| May 9th, 2008 under Devel, Algorithms, rengolin, Software. [ Comments: none ]
|
|
I still code in my spare time and for a while I’ve been gathering some numerical methods I did at university in an easy-to-understand generic C++ package. Despite being easy to understand, I also tried to implement the best method I knew for each problem.
The root finding algorithm is based on Brent’s method which is, in turn, based on the secant method. If everything fails, it throws an exception and you can use the safe bisection method.
The integration is using the Romberg’s method, which is a further extrapolations of Simpson’s method which is already much better than the trapezoid basic method.
For Interpolation I’m using the Natural Cubic Spline but would like to implement other types of splines (like complete, periodical, clamped etc). The interpolation is working, but I couldn’t managed to get the coefficients right yet.
Other codes I have are Monte Carlo, Runge-Kutta and Markov Chain (this one using boost graph library for C++) and will be integrated soon. I’ll let you know when it’s done.
Popularity: 1% [?] Share This
|
|
Book: Flat and Curved Space Times |
| May 8th, 2008 under rengolin, Books, Physics. [ Comments: none ]
|
|
The first time I read this book was during my special relativity course at university. I couldn’t understand a thing the teacher was saying (probably because his explanations were always: “you won’t be able to understand that”) and I needed to replace a 35% grade I got in the first exam to complete the course.
Well, hopeless as I was, headed to the library in search of a magical book (other classmates were helpless as well) and found this one. The magic in it is that, instead of trying to force the Lorentz transformations down the throat first and then explain the basic principles of relativity, it does it by simply showing the topology of the space and assuming that the speed of light is constant (pretty much the same path Einstein took in the first place).
So, the first chapter has no equations whatsoever, only graphics with light waves going back and forth and he derives the light-cones automagically from it, what happens to the “world” at high speeds and how does it affect our senses of reality. It goes on for all kinematic principles only using Newton equations and gamma. Lorentz transformations only appear in the fourth chapter.
After that, not only I could understand relativity as a whole, but I also got 90% grade on the final exam! It’s an old (88) book but time has no meaning for a very good book, especially for a subject that hasn’t changed that much in the last decades.
I recommend it to physics-wannabe as well as lay people with little background in math, and if your teacher is as hopeless as mine was, ignore him and read this book.

Click here for the US version.
Popularity: 1% [?] Share This
|
|
Stallman and Copyright |
| May 1st, 2008 under Digital Rights, OSS, rengolin, Politics. [ Comments: none ]
|
|
Yesterday I went to Stallman’s talk at Cambridge University where he proposed a new copyright scheme. Here is the transcript of the same talk elsewhere, not the same text but the same ideas.
Below is a mix of what he said and my thoughts on the subject based on his thoughts (complex, I know) so don’t take this as his strict opinion, go to gnu.org to know his real opinions.
Copyright
Copyright was invented to protect evolution of ideas and development of new technologies, to protect those that invested so much to create a good product not being scavenged by the lazy competition, but the way it’s been implemented today it not only taking aways our most basic freedom of use and friendship (by means of lending to friends) via DRM, but it’s also mining development of new technologies (see the BluRay case) and the evolution of ideas (see software patents).
To address how to create a copyright law that would get us back on protecting evolution and development, he divided creation in three groups and proposed a scheme based on them:
- functional: Things you use at work or to perform work. Good examples are software, cooking recipes, tools, etc.
- testimony: For the lack of a better term, testimony is the category which works of report, history, opinions, achievements (like scientific papers) are part.
- art: Entertainment or artistic purposes only. Movies, music, paintings etc.
Reach everywhere
His copyright proposal says that every piece of work, no matter in which category it lies, should be allowed to be freely distributed (as in backing up your CDs as well as lending the backup to your friends indefinitely). This allows anyone to copy whatever they like, whenever they want, as many times as they think it’s good.
Some questions raised, and easily addressed:
- How to control who is only copying and who is actually buying your work? Easy, you don’t. You don’t have this control today, and it’s a dream to think you will ever be able to do such thing.
- So, how to authors make money? Lots of authors already make money out of donations, like a Canadian singer (I’m guessing this one) already makes a living out of donations and she’s not even locally famous. According to him, her wages were above what average bands get from “normal” recording companies.
- But I’m a new band, no one is going to see my website. For that, he said, governments could have a tax (like one pound per month or so) and the money would be distributed directly to the authors and not their recording companies or publishers, based on popularity. The whole polling/popularity/tax thing was in the early stages of evolution in his mind but nevertheless, it was already practical for other famous bands like Radiohead.
- Why should I have a website to make money? You don’t, and that’s a stupid question. This was one of the ways of getting money, you can ask for money on your shows too, be creative!
Some modifications allowed
The difference comes to modification. According to him, every commercial use of anything should be strictly bound to the copyright laws, which should block any unauthorized use of the material for around 10 years (some say 5 is better). After that, everything is on public domain.
Before that, though, for some types of work you cannot modify it without the author’s (or the bunch of lawyers from the recording company) consent. This is the price we pay for being in a capitalist society.
Indeed, this is a fair price to pay for art and testimony works, as we don’t need to modify Mona Lisa to be creative, we can create something new and, when the copyright expired, than we can modify it and be creative on top of it.
But not everything can wait. If a hammer is too long for your work you can saw it in half and be much more productive. You are allowed to say your friends to buy the hammer and saw it in half, to blog about it, write books and talk it on TV.
The same idea should be always true to software. If the program doesn’t work the way you want you should be able to modify it, post the patch, publish a book about it if you want. But the source code is hidden.
Hidden source code not only takes you the freedom of change to be more productive, but also takes aways the freedom of knowing what you’ve got in the first place. It’s very common to see big companies installing root kits, DRM kits, monitoring kits on your computer and you can’t detect it because the source is not available. Those kits takes away other freedoms as well. You can’t use the media as you like, share with friends and so on.
So this freedom is critical and for that, Stallman’s proposal is to make it compulsory to any functional work to be open to public scrutiny, allowing modifications and redistributions as many times as needed.
Some of the questions were:
- How do you discern between art and functional work? It’s not up to you to define that. When you go to a court, the judge and jury defines if you’re guilty, if it was homicide or just manslaughter, and what your penalty should be. For some things it’s so obvious that you don’t even go to the court, the policeman can arrest you straight away (of course you still have the right to a lawyer and a call) but for others you always have the public opinion a sa last resource.
- Hot to make money out of software, then? This is a very old question and Stallman himself answered it many many times, check the gnu.org link provided above.
Big deal
It seems impossible, though, to achieve such a radical change in every country’s laws all over the world. It’s a task that many would consider crazy, not to say useless. Others will say that there are many other quests that are much more important than that, so why bother?
Stallman’s answers (not literal, compiled and re-written by me with my own words) was quite clear, sober and simple (and this is why I admire him so much):
- I’m only a man, I can’t fix all problems in the world. No one can in a life time, so we need to focus on one problem and go as far as we can. This is my focus.
- It’s not only about software, it’s about freedom. Today’s society is heavily based on software so freedom of software is freedom of society. When you listen to a song in your iPod you’re listening to a stream of bits played by a software. Your freedom to listen to music, watch movies and work productively is at stake, we can’t afford to let it go.
- Finally, I’m not saying you should do it, you do whatever you want, but who wants to join me in that quest is more than welcome.
So, freedom of software is, in fact, freedom of society. Each step towards digital restrictions is a step against freedom of society as a whole and every one can help with this quest by changing their ways just a bit here and there. It’s so easy, it costs so few and the result is so important that there is no excuse to avoid it.
Use open formats (for documents, videos, music), open source software (Ubuntu is easier to use than Windows IMHO), avoid buying DRM-ready media or giving money to companies that promote any kind of unlawful restrictions.
On the other hand, if you’re eager to help, join the DefectiveByDesign campaign of the Free-Software Foundation, or even FSF itself and make the world know that you DO care about your freedom.
PS: Stallman, let me know if you think you were misrepresented by this post in any way. Unfortunately this is not a wiki where you could change it yourself but I’d be glad to make any change.
Popularity: 3% [?] Share This
|
|
Silly projects of the week |
| April 29th, 2008 under Devel, Algorithms, rengolin, Software. [ Comments: 2 ]
|
|
Last week I did two silly but still quite funny projects: word search on protein sequences and chat bot using markov chains.
Word search
Searching for similar sequences among the known proteins to understand evolutionary paths and function similarities is a powerful algorithm called BLAST. Following the same lines I spent a few minutes to develop a similar (but not quite the same) algorithm to search for all dictionary words on all UniProt sequences.
The algorithm will look into a dictionary (say /usr/share/dict/words) and for every sequence it’ll find the words in it, allowing a few (no more than 2) amino-acids to be between the letters. Than it gives a weight to the match based on the size of the word and the “added length” due to additional amino-acids in between. You can also restrict the number of letters on the word list to avoid too short or long words.
The results for 7 to 9 characters words in English searched only on Swiss-Prot entries are:
STRANGE 1.4
CHARADE 1.75
SLEDGED 1.75
MEALIER 1.75
DEMEANS 2.33333
DETAINS 2.33333
Markov bot
I knew a markov chain could have true wisdom but I never tried to make it actually talk to anyone until a friend told me about MegaHAL (much better than my markov model, of course). I decided to give it a try and got the XMPP bot from the Python examples and plugged in my markov program on all phrases spoken to it.
In the beginning it was awful, of course, it knew nothing. But with time (and hard work from some friends to actually teach him about leisure, programming, physics etc) it could babble a few coherent words once in a while.
The results are complete rubbish, below is a sample of the complete non-sense conversation I had with it now:
rengolin: how are you doing? have you managed to find the answer to Life, The Universe and Everything?
oraculoids: with an amazing company makes the basic points of some operator
rengolin: operator or not, you must come to reality and sense the danger there is in talking like that after such a complex and meaningful question
oraculoids: dead as an interface to follow an animal
rengolin: whatever animal you prefer, I would say but it seems that you are now driving the conversation
oraculoids:
rengolin: aha! I know you didn't have answers to everything!
oraculoids: how is in between and pray
rengolin: I don't pray too much, really, I'm not that kind of a person anyway...
oraculoids: but at the conversation it't fall into them!
rengolin: I would never say that, especially not with you my friend
oraculoids: A design pattern is a practical laywer
rengolin: lawyers have no purpose other than screwing up the poor
oraculoids: hi bot
rengolin: I am not a bot
oraculoids: field of some of life, love them!
Quite stupid, I might say, but still I had a lot of fun doing it and that’s what matters… In spite of that, though, megaHAL is quite an impressive program and BLAST is a very powerful search mechanism.
Popularity: 2% [?] Share This
|
|
Data Recovery - Your data is in Danger |
| April 28th, 2008 under InfoSec, rvincoletto. [ Comments: none ]
|
|
Data Recovery
Every computer has storage files devices. These devices can be: Hard drives, notebook’s hard drive, CDs, DVDs, diskettes, Zip drive, memory card, pen drives, etc.
In these devices you can find the operational system e all information used and archived in your computer.
But, the truth is, these devices are subjects to failures and accident that can cause the lost of your valuable files: mechanical failures, electric failures, virus action, bad system functioning, information deletion, format, problems with water, fire, smoke, and others.
Data Recovery is the effort to rescue info lost in those or similar situations.
Insecure Data
Our data is not always secure and sometimes is too late to do something to protect them. That’s why Data Recovery business is growing so fast around the world with some many companies offering solutions.
The truth is we never imagine it can happen with us. “I ended up with nothing” – One day, while starting her computer, a friend heard a strange sound. With a burning smell, her computer turned off. She couldn’t turn her computer on again, a Pentium III with 2 years.
Even after installing new mother board, sound card and power supply, her computer didn’t turn on. Hard drive was removed and installed in another commuter, but, as you can imagine, she couldn’t access her data.
In that hard drive, she was keeping her PhD papers, and all her classes. No hard copies, no backups. Since now she can’t access her data, she is now looking for a company that can help her, to at least try to salve some of those files.
But the question is: are these files more valuable than the price for an eventual data recovery? And if yes, which values and services she should look in a data recovery company?
Information on Risk
I’m pretty sure that my friend’s history is totally familiar to you. The good thing is nowadays internet can provide valuable resources to help you with your data recovery. An example is this data recovery blog from DTIData, a great site with a lot of resources, where you can find information about how to recover your hard drive, your exchange server, your NTFS, your iPod, or even raid data recovery.
But how it happens? Why suddenly your hard drive doesn’t work anymore? How can we prevent this situation? Is it possible recovering any data? Is my data impossible to be recovered?
A future article will explain.
Popularity: 2% [?] Share This
|
|
Why not the primary key? |
| April 23rd, 2008 under Devel, rengolin, Computers. [ Comments: 3 ]
|
|
Recently I came to an amusing situation with Oracle (again) where the primary key was not used when explicitly requested…
The query was:
select name from table where table_id = 1;
Of course, table_id was the primary key. Astonishingly Oracle performed a FULL_TABLE_SCAN.
WTF?
When things like that happen you think there’s something quite wrong with the database, so I decided to ask the DBAs what was going on. The answer was something like:
“It may happen if Oracle decides to. Even though you have created an index, there is no guaranteed they will be used for all queries and the optimizer will decide which one is the best path”.
Seriously, if Oracle decides NOT to use the primary key for that query, there is something really wrong with the whole thing. I couldn’t think of a situation where that might be even close to valid! A friend who knows Oracle much better than me pictured two extreme cases why it could happen:
- There are just very few records in that table -> table data = 1 data block, reading the index root block (1 data block) and then accessing the one table data block is certainly more expensive than just read that one table data block.
- The index is in a Tablespace with different block size which resides on very slow disks. The buffer cache for the non-default block size is hugely under-sized. So the cost to read the index and the table data might be higher than just reading the table data. It’s a bit unrealistic, but I’ve witnessed stupid things like this.
Let’s face it, the first scenario is just too extreme to be true. If you have only one data block on your table you better use email rather than databases. And the second scenario, why would anyone put indexes on a much slower disk? Also, if the index is too big the data will be proportionally big too, so there is no gain in doing a full table scan anyway.
Later on he found out what the problem was by hacking into the configuration parameters:
- The production database (working fine) had:
optimizer_index_caching = 95
optimizer_index_cost_adj = 10
- The development database (Oracle default values) had:
optimizer_index_caching = 0
optimizer_index_cost_adj = 100
I don’t quite understand what they really mean to Oracle but index_caching = 0 seems a bit too radical for me to make it default.
At the end (and after more iterations than I’d like) it was fixed but what really pissed me off was to get the pre-formatted answer that “Oracle knows better which path to take” without even look on how stupid was that decision in the first place. This extreme confidence in Oracle drives me nuts…
Popularity: 3% [?] Share This
|
|
gzip madness |
| April 9th, 2008 under Devel, Unix/Linux, rengolin, Computers. [ Comments: 3 ]
|
|
Another normal day here at EBI when I change a variable called GZIP from local to global (via export on Bash) and I got a very nice surprise: all my gzipped files have gzip itself as a header!!!
Let me explain… I have a makefile that, among other things, gzip some files. So, I’ve created a variable called GZIP that is the same as “gzip –best –stdout” and on my rules I do:
%.foo : %.bar
$(GZIP) < $< > $@
So far so good, always worked. But I had a few makefiles redefining the same command, so I though: why not make an external include file with all shared variables? I could use the @include for makefiles but I also needed some of those variables for shell scripts as well, so I decided to use “export VARIABLE” for all make variables (otherwise they aren’t caught) and called it a day. That’s when everything started failing…
gzip environment
After a while digging the problem (I was blaming the poor LSF on that) I found that when I hadn’t the GZIP variable defined all went well, but by the moment I defined GZIP=”/bin/gzip –best –stdout” even a plain call to gzip was corrupted (ie. had the binary gzip as a header).
A quick look on gzip’s manual gave me the answer… GZIP is the environment variable that gzip stores all default options. So, if you say that GZIP=”–best –stdout”, every time you call gzip it’ll use those parameters by default.
So, by putting “gzip” on the parameter list, I was always running the following command:
$ /bin/gzip /bin/gzip --best --stdout < a.foo > a.bar
and putting a compressed copy of gzip binary together with a.foo into a.bar.
What a mess can a simple environment variable do…
Popularity: 4% [?] Share This
|
|
Serial thinking |
| March 11th, 2008 under Fun, Devel, Algorithms, rengolin, Computers, Physics. [ Comments: 2 ]
|
|
I wonder why the human race is so tied up with serial thinking… We are so limited that even when we think in parallel, each parallel line is serial!
What?
Take the universe. Every single particle in the universe know all the rules (not many) that they need to follow. On themselves, the rules are dumb: you have weight, charge and can move freely round the empty space. But join several particles together and they form a complex atom with much more rules (combined from the first ones) that, if combined again form molecules that form macro-molecules that form cells that form organs that form organisms that form societies etc. Each level makes an exponential leap on the number of rules from the previous one.
Than, the stupid humanoid looks at reality and says: “That’s too complex, I’ll do one thing at a time”. That’s complete rubbish! His zillions of cells are doing zillions of different things each, his brain is interconnecting everything at the same time and that’s the only reason he can breathe wee and whistle at the same time.
Now take machines. The industrialization revolutionized the world by putting one thing after the other, Alan Turing revolutionized the world again by putting one cell after the other in the Turing tape. Today’s processors can only think of one thing after the other because of that.
Today you have multi-core processors doing different things but still each one is doing things in serial (Intel’s HyperThreading is inefficiently working in serial). Vector processors like graphic cards and big machines like the old Crays were doing exactly the same thing over a list of different values and Quantum computers will do the same operation over an entangled bunch of qbits (which is quite impressive) but still, all of it is serial thinking!
Optimization of code is to reduce the number of serial steps, parallelization of code is to put smaller sets of serial instructions to work at the same time, even message passing is serial on each node, the same with functional programming, asynchronous communications, everything is serial at some point.
Trying to map today’s programming languages or machines to work at the holographic level (such as the universe) is not only difficult, it’s impossible. The Turing machine is serial by concept, so everything built on top of it will be serial at one point. There must be a new concept of holographic (or fractal) machine, where each part knows all rules but only with volume you can create meaningful results, where code is not done by organizing the high-level rules but by creating a dynamic for the simple rules that will lead to the expected result.
How then?
Such holographic machine would have a few very simple “machine instruction” like “weight of photon is 0×000″ or “charge of electron is 1.60217646 × 10^-19″ and time will define the dynamics. Functions would be a pre-defined arrangement of basic rules that must be stable, otherwise it’d blow up (like too many protons in the nucleus), but it wouldn’t blow up the universe (as in throw exceptions), it would blow up the group itself and it would become lots of smaller groups, up to the indivisible particle.
The operating system of such machine should take care of the smaller groups and try to keep the groups as big as possible by rearranging them in a stable manner, pretty much as a God would do to it’s universe when it goes crazy. Programs running on this operating system would be able to use God’s power (GodOS libraries) to manipulate the groups at their own discretion, creating higher beings, able to interact, think and create new things… maybe another machine… maybe another machine able to answer the ultimate question of Life, the Universe and Everything.
I know letting the machine live would be the proper way of doing it but that could take a few billion years or I’ll be quite tired of engineering the machine and it’s OS and I’ll just want to the the job done quickly after that…
Why?
There is a big fuzz about Non-Polynomial time problems (NP-complete), those that can’t be solved in a reasonable (polynomial) time. The classic example is the travelling salesman problem where a salesman has to go to each one of a number of cities. Which is the best path to follow to visit all of them in the smallest distance possible? With 3 or 4 it’s quite simple but when you have lots like 300 it becomes impossible for normal (serial) computers to solve.
Another problem quite fancy is the Steiner tree problem, where you have some points and you want to connect them using the least amount of strings. This is as complex as the problem above, can take forever (longer than the age of the universe) for relatively small sets of points, but if you use water and soap the problem is solved almost instantly.
Of course, soap films cannot calculate the last digit of PI but because every part of it know a small list of basic rules (surface tension increased by the soap molecules derived from opposite charges between atoms) every particle of the machine works together at the same time and the result is only achieved because the dynamic of the system has it’s least energy (least amount of strings) in that state.
It’s true that today’s computers are very efficient on working on a wide range of problems (thanks to Turing proving the classes of problems his tape could solve) but there are some that it can’t, given that we only have a few billion years yet of universe to spare. Such problems could be solved if there was a holographic machine.
UPDATE:
More or less what I said was practically applied here. Thanks André for the link, this video is great!
Popularity: 8% [?] Share This
|
|
A Pause for Advertising |
| February 28th, 2008 under InfoSec, Technology, Review, rvincoletto, Hardware. [ Comments: none ]
|
|
Our long time sponsor 123 CCTV Security Camera Surveillance, that you can see under Links at our right bar, has a new website.
With a range of clients that can go from The Pentagon to the home user, they have everything for security surveillance, since External and Internal security cameras, CCTV cameras to PC security systems.
We wish luck with their new website!
Popularity: 7% [?] Share This
|
| « Previous entries |
|
|