Monday, December 15, 2008

New in Linux? Coming from Windows? Please read this.

Greetings. You are coming into a new territory. But contrary to the space you used to inhabit, that didn't belong to you, this new territory has a piece of free land with your name on it.

It sounds a little too good to be true, but it is true. There are some things we must make clear, though. This piece of land, your piece of land, is inside a really big terrain of millions of free pieces of land, each one with it's owner.

That's why now that you are moving into our neighborhood, ours, of every one of us, yourselves included, I want to tell you to pay a little attention to the way we tend to act, because if you adapt you'll have a really good time here. And we will be adapting too, you are not the only ones supposed to do so. We will also learn from your habits, and if we find some we like, we'll make it our own.

This is a weird neighborhood, in it we share our tools, and build together. It's something we do freely, without obligation, and that has a lot of benefits. We also like to teach how to use the tools, though you might want to forgive us because we sometimes use a technical language, it's what suits us more. The manuals that come with the tools are sometimes written too technically, but don't worry, there are some neighbors that are able to translate things to more human languages, you'll only have to find them.

This is a really special neighborhood, where the better builders are listened to, a sort of meritocracy. As we have one mouth and two ears, we believe it's common sense to hear twice as much as we speak, because that benefits us. We just have to remember that sometimes they don't want to talk, and that they talk for people that understand them. Once more, please don't complain. Instead, search for the neighbors that are capable of lowering that information to a more human language. That's the best for us all, this way everyone has it's own.

Please, don't demand. Nobody here owes something to you. Just ask nicely for help and you'll receive. We tend to consider important that you tried yourself to build the bed, even when now it seems no mattress will fit it's weird triangular shape. This is important, because by showing you tried and made an effort, you just climbed a few steps in this meritocracy ladder, and you helped establish some common ground to start talking, and talking leads to helping. And helping leads to a good bed to dream on.

Please, help us help you. Let's make this territory a place where every one of us can live in peace and liking it.

Sunday, December 14, 2008

Python: Programming made easy

A pair of years ago I tested this programming language called Python, in honor of Monty Python. It's an easy to learn language, in fact the easiness is part of the design, but in this case easy doesn't mean lack of power. Some months ago I developed a little program for a friend, and decided to give Python another go. It didn't let me down.

It's not a compilable language, it's interpreted, but now days, with the amount of power we have under the hood in our computers, this distinction looses sense, at least in most cases. The advantage of a compiled language is it's compact size and it's speed, but in most cases, for programs made for ourselves, that distinction loses it's effect.

Interpreted languages advantages are mostly concentrated in one point: development speed. There are other advantages, but this one is usually the selling point. Of course, it doesn't hurt that they are usually easier to port to other operating systems.

To modify a compiled program, we need to modify the source code, recompile it (complete or partial recompile) and then execute it. If we need to test it step by step, we'll need to recompile it to add the necessary debugger links, which generates a heavier program, and then run the debugger. Once the problem is found, we need to correct the source code and recompile. Even if we notice the problem was in the dataset used for testing, we need to recompile it to get an unbloated executable.

In an interpreted program, the source code is the program, and the interpreting is handled at runtime. If there's some error, we modify the source code and execute again. Debugging is usually done with the same interpreter and the same program, executing the source code step by step. This results in really smaller times between modification and modification, speeding development times a lot.

To this general advantages of interpreted languages Python adds an interactive command interpreter, where we can test commands and see the results instantly, which is really helpful to learn the language. Python can be used to make procedural, functional or object oriented code.A nice perk is that everything in the language is an object, so we get a lot of predefined function like methods with every variable we create.

Python syntax is really clear, and the fact that we have to indent the code for it to use loops and conditions adds even more legibility. Contrary to popular belief, indenting in Python is not burdensome, it comes naturally after as little as half an hour into the learning process.

Lastly, the language itself is open source, meaning that those with the knowledge can modify it, and that you don't need to pay any license to use it. Even more, the programs we develop with it can have any license we want.

With the new Python 3.0 out there, it's a good time to jump on and learn, as a lot of people are doing it right now to see if it suits them so there'll be a lot of people you can ask for guidance.

Saturday, December 13, 2008

A pair of news and laughter attack

Yesterday at the office one coworker showed me a news, and suddenly I started laughing. It wasn't a simple laughter. It was a laugh attack, the kind that leaves us breathless, like the ones that puts tears on our eyes.

To explain why this happened I need to fill you with some background information. Without it, this isn't funny at all. Some time ago Nvidia purchased the Ageia Physx technology that allows to develop hardware specialized in calculating physics model data. It used that technology to bulti it in their video cards.

While this technology was developed to assist in the processing of game data, soon it became clear that there was another area where it could help a lot. So Nvidia developed a new series of drivers called CUDA, allowing people to use that technology and the massive paralel processing power of modern video cards to process scientific information. This added a lot of power to the distributed computing systems.

The news my coworker showed me yesterday commented that they were developing a technology to use the extra processors of multiple core chips to process graphics.

Think about it. Let it sink in. Why would a processor need to process the graphical data? Because the video card is executing the processor processes. When I thought that, I just couldn't stop myself from laughing.

Of course, that's not the real reason why this technology is being developed. Some talk with my friends and some later thinking showed me at least two other reasons why this could be useful.

One: lower power video cards, as the ones found in office computers and some laptops. In this case, an alternative to this card using one of the cores of multiple core processors some of this machines are equiped with might prove interesting.

Two: even more interesting. Windows XP doesn't have DX10, but if one can emulate DX10 in one of the cores and let the video card use that DX10, it might be that the speed advantage of Windows XP over Vista could help to run DX10 games at a decent speed in a XP box.

Of course, a part of me is still laughing while I write this, and another part insists in making me say that this type of trickery wouldn't be necessary if DX10 were open source technology. In this case one would be able to simply port the packages from one Operating System to another.

Sunday, December 7, 2008

A new type of brute force attack

Till now, it was easy to spot brute force attacks. A brute force attack is one where attackers are using dictionaries to try and guess correct combinations of username and password.

As those dictionaries are really long, this type of attack used to be easily detectable, because the attacker had to put a big part of his machine to the task and so he tended to do a lot of attempts per second, so this was easily spotted by most firewalls.

But since the the technology to herd large zombie computer farms was developed, this is changing in a subtle way. For better understanding, a zombie computer is a dormant infected computer, and has inside a virus, worm, rootkit or back door that allows the attacker enter and use commands from that machine as if it were his own.

A zombie computer farm is a group of dormant computers infected by the same person, so he can make this group of computers send massive quantities of spam, a little each one. He also can use them to host webpages with ilegal content, whithout risking being traced. The last use was a joint attack to some server, trying to get a Denial of Service provocked by the sheer ammount of virtual attackers.


However, once more this evil minded people have shown they have brains up there and know how to use them. Using zombie computer farms, they aren't using them to do mindless ping attacks. They are now using them in a step by step kind of attack, where each zombie uses a small part of a far bigger dictionary to do spaced attempts.

So, instead of getting a lot of quick attacks from a single IP, now we get tens, hundreds or thousands computers, each one slowly and patiently testing a combination of username and password.


This is almost impossible to detect by automatic means, you need to do a manual revision of firewall logs to check the attempts to access the system over a long time to detect the pattern. Luckily, there's some hope. Most zombies seem to come from a pretty limited range of IPs, so the people over at Begin Linux posted a method to block most zombie machines with iptables, using a list of offending IPs gathered by spamhaus.

Saturday, December 6, 2008

Changes in Python 3.0

A new version of Python, 3.0, has been recently released. It has a a lot of changes, and for a lot of people, it has more changes than desirable, so don't rush to instal it, keep on reading and learn before deciding.

Most changes in Pyhton until now have been retrocompatibles. This implied that, unless we had used an obscure quirk of a command that got corrected in later versions, we didn't had much problem while changing versions. Most problems usually had to do with the use of third party libraries that were only compatible with a specific version of Python.

However, while releasing version 2.6 we were informed that it was a transition release, and that they were going to start working on the new version 3.0. We were also told that this new version wasn't retrocompatible, it was going to be a rewriting and general reordering. They even offered in 2.6 some glimpses of things to come in 3.0, that's why they called it a transition release.

Looking through the list of changes in this new release 3.0, you can see that it's really a long list, including changes in command syntax, in command behavior, in data types, in library names and even in command names. This means that before using our old programs in 3.0 we'll have to upgrade them. Luckily, there's an automated toll called 2to3 that does most changes for us, so we'll have to do little else to make most programs work.

An interesting data is that now efforts in development of the language are split between a future 3.1 release for the ones that went through 3.0 and a future 2.7 release for the ones that didn't. 2.7 is supposed to update the language without breaking most of retrocompatiblity.

¿what to do then? That depends in what we have already developed. If it relies heavily in a library that's still not available for 3.0 then don't change, wait for it to release. If it's a big project and even with 2to3 the conversion gets tricky, don't change. If you don't have any of this problems, go to 3.0, it's the road towards a better, cleaner Python.

And as always in this kind of problems, mounting a virtual machine to test changes can save us a lot of headaches.

Sign of the times: Windows Devolution

A few days ago, something extremely important happened. An Israeli citizen became the first person in the whole world to achieve two things at the same time.

1) Devolution of the money paid for a Windows license included inside the price of a computer, after taking Windows off his computer in favor of Linux.

2) He was not forced to sign a NDA (non disclosure agreement), so he's free to talk about it.

There are several people that already took Windows of their computers, so this development will surely make the request the refund of the license money. This is the main reason why, until now, Microsoft requested those NDAs while refunding money.

It's curious that this can be linked to another news, in which we are informed that Windows has fallen below the 90% figure in the PC market. I want to state something very clearly. A little below 90% is still a good figure, but it isn't quite as good when you had 99% of the market before. Microsoft is loosing share, and that little change in the Ten's figure it's a really significant break point.

We aren't the only ones that think like this. In several sites across the web I've seen us Linux Users being accused of magnifying this kind of news. In truth, we see this news and simply write about them adding our insight into it, we write about what we see with the only point of view we have, ourselves. But we aren't alone.

Until now, in every Wall Street misstep or fall, Microsoft was one of the big companies that fell a lot less that the rest. This meant that investors (people who trust a company and it's way of doing business to the point of translating that trust into invested money) didn't sell because the still trusted in Redmond's capacity of continuing to produce record earnings, even inside a crisis.

But this last fall, Microsoft fell as much as the average of the market, showing to the world that Linux Users aren't alone in thinking that we see something working a little wrong in the giant corporation.

In this comment about reality, from this page of Too Much Information, I want to express the wish that Microsoft doesn't disappear, that they start producing real quality software, and can maintain a reasonable market share. It's just that I'm not opposed to Microsoft making business. I'm opposed to Microsoft making business with me.

Wednesday, December 3, 2008

Beating Predictions the hard way.

Back in 2006 I heard a lot of talk about 'the blog fever', stating that it was a momentary thing, and that because of the difficulty of maintaining an active blog, it was predicted that by 2008 there would be no more blogs left.

Before continuing, let me stop laughing...Thanks for waiting.

The argument sounded strange at first, but then I started thinking and found a certain logic behind those words. But that logic rests upon one single idea: that bloggers have an obligation of writing in a periodic way, and forever. It was thought that this would cause a rapid reaction of boredom, burnout, or simply cause blogers to stop seeing this as something they enjoy or a need to communicate and begin to see it as a self imposed hard work.

The idea has some merit, but all we need to tear it down is to take a little step to the side, and do as I did. I stopped writing when I didn't feel like it, or when I didn't have things internally processed enough to pour them here. I started writing again when I found things I wanted to talk about, when I felt I needed to write again.

Is so simple as remembering that the blog is, after all, absolute property of the blogger, and even when readers can feel it as their own thing, it isn't. That's why promises of writing with a certain rhythm shouldn't be made, because eventually we'll find it will be impossible for us to keep the rhythm. It's far better to clarify things beforehand and write only when you should. This way we can guarantee something far more important: a higher quality content.

Because as everybody knows, quality almost always beats quantity.

Consequences of open software and hardware

Maybe some of you believe I'm some kind of blind fanatic , and that's not true. I recognize when a closed program has details that I like (my friends have seen me praising some little details I like about Vista). Nontheless, I can't stop seeing along the things I like those other things I dislike and I can't change because it's closed software. That lack of freedom is the main reason why I keep on writing about open stuff, things that give us the freedom to change them the way we want. There I see the future.

Let's start this article after the necessary introduction. A little time ago, I wrote about Open Hardware. You'll recall there was a special mention to the Arduinos, because there were a lot of them and I didn't want you thinking there were the only things in that page.

Today something surprised me in a pleasant way, and it was related to those Arduinos. I found a webpage called diydrones (Do It Yourself Drones) which basically deals with unmanned vehicles we can build ourselves, in a reduced scale.

There you'll find a lot of different projects with different types of hardware, but there are two that receive special care in the site: ArduPilot and BlimpDuino. I think you'll understand why those names rise some special emotions in me.

BlimDuino is in development stage, soon it will be released, with kits for sale, and release of the arduino hardware modifications back to the comunnity. ArduPilot is already on production, with kits on sale and open hardware released.

What are this two projects for? ArduPilot is a authomatic pilot for miniature planes which handles navigation by GPS, control of the ruder (direction) and throttle (altitude by speed control). There's more coming through, a new version is being developed, called ArduPilot Pro, and this one will also control ailerons.

BlimpDuino is just fabulous. It's a control for blimps (small dirigibles, or small airships, as you prefer). There's a demo video of a blimp being indirectly controled with infrared markers in the room. In the video you can see the way the motors tilt to gain or loose altitude, how it makes them turn in one direction to gain speed and in other to loose it, how it uses them to turn. It's wonderful to think how little it takes for this blimp to take it's own decisions based on the situations we put it through.

I don't know if this is havving any effects on you, but after seeing this I've gained a lot of respect for the Arduino platform and it's possibilities. Besides, I can't stop noticing what can be achieved with open hardware and software and inventiveness. Don't you see a small scale glimpse of the future in this developments?

Monday, December 1, 2008

Law Problems: lack of understanding

Today I was reading an excellent article in Groklaw where I learned about the case of a teenager that killed herself (apparently because of peer pressure over the Internet)

What raised my attention was that they are convicting someone accused of actions against the Computer Fraud & Abuse Act. This law was written in the United States with the purpose of punishing those that gain illegal access to internet sites or do abusive things with their computers, clearly meaning hackers, crackers, spammers, virus distributors, etc. Not peer presure.

This is a worrisome issue, because the person charged didn't do any of those things. She simply lied while creating her MySpace profile. This is against MySpace's TOS (Terms of agreement ). What they are trying to do is raise this break of agreement (written and interpreted by MySpace) to the status of federal felony.

I'm going to try to make you understand what this means. Suppose that I said somewhere in this blog that I don't want any kind of Spam in it. Now someone spams in one article's commentaries. According to this interpretation of the law, I'd have the right to criminally acusse him just because of an arbitrary policy created and interpreted by myself. Quite disproportionate, isn't it?

Anyway, I'm not from the United States, and this article isn't only for United States people. It also isn't a detailed description of the case, for that check people that know about law, like Groklaw. This article is here simply to make yourselves aware.

If we let each of our contrie's legislators make the laws they want, if we let advocates and judges use them badly, it will be us, the ones that have computer knowledge, the ones left with a great share of guilt. That would be because we didn't show our disagreement, we didn't document the problem with technical knowledge non technical people can understand. We just kept on sitting in our comfy chairs while people without the knowledge or understanding of the real issue did what it was within their reach.

Think about it. We are living in a time where legislations are being made about what we do in Internet and what we generate with our computers. Can we afford the luxury of let them do whaterver they want, or simply whatever they can do with their limited knowledge?