header image
Start-ups
September 13th, 2009 under Computers, Corporate, rengolin. [ Comments: 3 ]

To start a new idea and make it profitable is much more of an art than logic. There is no recipe, no fail-proof tactic. The most successful entrepreneurs are either lucky or have a good gut-feeling. Hard work, intelligence and the right idea are seldom useful if they don’t come with luck or a crystal ball. After you have started-up, however, they’re the only things that matter.

I may not know how to start a business and succeed, but I do know how to make them fail miserably. I have done it myself and seen many (many) friends fail for different (but similar) reasons. Yet, I still see other friends trying or the same friends still thinking they could’ve done better next time, so this is my message to all of them.

Do you have a crystal ball?

I really meant it, those that really work they way they’re supposed to. If the answer is no, think twice. Seriously, I’m not joking. The only people that partially succeeded were the ones that had nothing to loose, as they had enough money to get them going for years, but (unfortunately) they’re not filthy rich today. The rest are employees somewhere in the world…

Hard work

One thing they all had in common is the idea that they could do it with hard work and a good idea. How wrong they were… Let’s put it simple: if hard work took you anywhere, the world would be dominated by dockers. If good ideas had any impact, the world would be dominated by scientists. But the world is dominated by bankers… Q.E.D.

Working hard won’t help, you have to work just right. That usually means very little in the beginning, a bit more afterwards and later on and finally hire some hard-workers to do the work for you. Simple, stupid.

Picture this: a salesman comes to your door to sell you a pair of scissors. You have many at home, but he assures you it’s the best pair of scissors in the world, that it has twenty patents and the guys behind the design like to work very hard on their ideas. Would you buy it? No! On the other hand, lots and lots of people go to the supermarket and buy scissors just because they’re cheap (and they assume they lost their own).

Don’t expect people to understand your hard work, they couldn’t care less for how much you do work, they just care for what benefits you can give them. The supermarket scissors give them the benefit of being cheap and “be there”, the salesman is already annoying by definition. No matter how good yours is, they simply won’t buy it.

Ingenious crafts

Now, at this point the friends I mentioned are certainly thinking: “but my product was much better. It was new, there wasn’t any one like that in the market”. The truth is, who cares?!

Novelty doesn’t sell, quality doesn’t sell (at least not yours, anyway). If Apple start selling toothbrushes, people will buy by the millions, if you sell a crystal ball that actually works, they’ll ignore completely. Who are you, anyway? Unless they have some kind of value, and their friends (and other posh people) are doing too, they won’t even bother.

If your product is really good, you have to put a high price for it. Poor people won’t buy it, rich people will buy from the fancy brand. You sell it cheap, poor people won’t buy it (because it’s not fancy nor necessary) and rich people won’t even see you. Poor people only buy superfluous stuff from fancy brands (or fakes) and rich people only buy from the real (sometimes fake too!) brand.

If your item is not an every-day necessity, like food, you are in deep trouble. Being the best is not enough, ordinary products sell more than state-of-the-art ingenious crafts.

Do the right way ™

Some of my failed friends (no hard feelings, ok?), that are now really pissed off, are thinking: “But I didn’t put all that effort, and my product was clearly better than any other, and it was for free! How could it go wrong?”. Capitalism 101: No demand, no production.

Don’t yell just yet, when I say demand, I mean demand by desire. There was always a demand for the internet, but people never desired it before a few decades. There was always a demand for a decent search engine, but no one desired that much after all the failed attempts from Yahoo, AltaVista etc. When there was a desire for instant communication, email was not enough, that ICQ had its chance.

Doing it right is not enough, you need to do it at the right time. The right time is not when there is no other option like yours, this fact is irrelevant. The right time is when many others are failing. This, my friends, is the crucial point. You can have a million of ideas, if none of them coincide with the utter failure of one or more other ideas, it’s worthless.

Don’t trust your brain

The recipe for disaster is simple: trust your brain. Trust that your intelligence will lead you to success. Trust that your ideas are better than others’ and that will lead you to success. Trust that hard work wil lead you to success. People that trust their empire is unbreakable, are already breaking. To trust, is to fail.

The most simple rule for success, as I picture it, is to use other people’s failures for your success. If someone is doing it wrong and people are complaining, there is a high demand by desire for that particular thing. If you can identify it and do what they want, it’s likely that you will succeed.

Again, don’t do more than what they need nor better than you have to. Keep it simple, keep it stupid. Hard work won’t lead you anywhere, remember? You have to be fast, noisy and some times ridiculed. It’s part of the game. Good buzz and bad buzz are both buzz, and buzz is good anyhow.

In a nutshell

  • Minimum work, maximum opportunity: Do as little as possible before the window opens, make connections, prepare demos and mockups of several different projects, multiply your chances.
  • Wait for a major failure: Investigate where others are failing and take action immediately, put anything on the market, no matter how ugly or failing, Beta is always Beta (thanks Google!).
  • Don’t let the window close: After you got your opportunity, work hard as hell, buzz, spam, be ridiculous.
  • Don’t use your brains too much: Good ideas are no better than bad ones, your idea is no better than any other. Failing ideas are important, non-existent ideas are irrelevant.

So, my failed friends, it is very simple: You will fail, unless you step on top of other people’s failures and don’t let them do the same to you. Now you understand why I won’t ever try again… This is absolutely not my style at all! I rather have friends than be rich.

A bit of history

Nothing better than a good bit of history to show us how important is people’s failures in other people’s success…

Microsoft’s success

IBM was dealing with Digital Research to put CP/M on it’s new architecture, the PC. Digital was sloppy, negotiations failed, Microsoft (so far completely irrelevant) got a CP/M clone and called it MS-DOS and gave to IBM. You know the rest…

Microsoft had previously worked on a Unix version for micro-computers, called Xenix which was then sold to SCO who ported to PC, which failed. Unix is, as we all know, the best ever operating system in the world. There was no Unix for micro-computers, it was a perfect market, right?

Wrong. The first move (on top of a failure), and not the second (with a bright idea), is what made Microsoft the number one software company in the world today. For bad or worse, they won big time.

Yahoo vs. Google

In the beginning, the internet was a bunch of Gopher sites. When it turned to HTTP and people started using HTML and the commercial boom came in, it was impossible to find anything decent.

Several people started doing directories of cool websites, but it was Yahoo who consolidated it into one big site. They bought several other companies, most notably for their directory contents and search engines. No matter how hard they tried it was still too bad. In 2000 they were to close a search deal with Google. For a short time, Google actually provided search results for Yahoo, but the pride was bigger and they bought Inktomy (who?) and dropped Google’s techology, which obviously brought no value at all to their users.

The search was still no better than Google’s, which saw Yahoo’s pride as their biggest mistake. Google started low, using basically the word of mouth as buzz and making really cool (but stupid, simple and easy to implement) features. Even their search engine was not novelty, as others had done similar in the past and they spent their college time doing it.

Yahoo’s mistake was Google’s take. They now have more than half of the internet passing through them, left Yahoo with second (or third) class, outdated products. The company is now finally destroyed.

To make things even more interesting, Microsoft tried to compete with them, but failed miserably. Their products were even worse than Yahoo’s and, to cement once and for all Yahoo’s mistake, they’re now using Microsoft’s technology as their search platform.

There are obviously many more stories of failures and successes, but I let this as an exercise to the reader. My final and most important point is: commercial success has nothing to do with quality, only with timing and a good deal of bad behaviour.


40 years and full of steam
August 23rd, 2009 under Computers, OSS, rengolin, Software, Unix/Linux. [ Comments: 3 ]

Unix is turning 40 and BBC folks wrote a small article about it. What a joy to remember when I started using Unix (AIX on an IBM machine) around 1994 and was overwhelmed by it.

By that time, the only Unix that ran well on a PC was SCO and that was a fortune, but there were some others, not as mature, that would have the same concepts. FreeBSD and Linux were the two that came into my sight, but I have chosen Linux for it was a bit more popular (therefore could get more help).

The first versions I’ve installed didn’t even had a X server and I have to say that I was happier than using Windows. Partially because of all the open-source-free-software-good-for-mankind thing, but mostly because Unix has a power that is utterly ignored by other operating systems. It’s so, that Microsoft used good bits from FreeBSD (that allows it via their license) and Apple re-wrote its graphical environment to FreeBSD and made the OS X. The GNU folks certainly helped my mood, as I could find all power tools on Linux that I had on AIX, most of the time even more powerful.

The graphical interface was lame, I have to say. But in a way it was good, it reminded me of the same interface I used on the Irix (SGI’s Unix) and that was ok. With time, it got better and better and in 1999 I was working with and using it at home full time.

The funny thing is that now, I can’t use other operating systems for too long, as I start missing some functionalities and will eventually get locked, or at least, extremely limited. The Mac OS is said to be nice and tidy, and with a full FreeBSD inside, but I still lacked agility on it, mainly due to search and installation of packages and configuration of the system.

I suppose each OS is for a different type of person… Unix is for the ones that like to fine-tune their machines or those that need the power of it (servers as well) and Mac OS is for those that need something simple, with the biggest change as the background colour. As for the rest, I fail to see a point, really.


Wireless pains
July 7th, 2009 under Computers, Gadgtes, Hardware, Life, rvincoletto. [ Comments: none ]

One of the good characteristics of human beings is to be able to understand other people’s pains. To impersonate them, feel what they feel and know how bad/good to them was something you did. But this post has nothing to do with it, it’s just about the pains I had, and why I abandoned having a wireless connection on my desktop.

Freedom

The first benefit of having wireless is freedom to move around. Not a particular strong one with desktops, though, but still appealing if you like to move furniture (as we do). To the desktop, the best benefit is not laying cables around the house, which for a family with kids is a big deal.

Nevertheless, you still have other cables, like USB, video, sound and especially electric cables all around, probably the same length as a network cable would be. And the benefits stop right there…

Configuration

Wireless configuration is not as easy as it should be. Most boards require driver installation on Linux and Windows (although Linux has been particular strong in wireless drivers, just not to my board). That alone makes your installation of the OS a pain, as you have to install it locally, install the drivers and then update it.

Another problem is that you have to set up passwords and keys, which nowadays is more a user configuration. You can’t just start up all stuff (like sshd or web servers) before you actually log in. It means, before you say it’s a geek thing, that you can’t turn on your computer and log in remotely without logging in locally, if you don’t fiddle with the wireless/network configuration of your “easy-to-use” desktop.

Not to mention that, if you have a home server and want to mount the filesystem over the network, you can’t. Once you fiddle with the configuration and manage to allow it, it still disconnects on log-off and blocks your mount points to unmount themselves cleanly. All in all, the wireless network was designed specifically to laptops on-the-go and not to any other kind of device.

It is true that this issues are being resolved in Linux (drivers, global configuration) but it’s still a good source of problems for the day to day use.

Reliability

Wired networks have a very stable communication channel. If no one is cutting your cables or laying it around NMRs you’re very likely safe from interferences. Once the connection is established, the likelihood of it falling down is very, very low and if something do happen, it’s probably server related (i.e. it crashed) than any cable/card issue.

On the other hand, wireless connections are completely unreliable, prone to errors in transmissions, channel overuse (especially problematic on overcrowded areas like most cities) and walls. Most programs are not ready to accept huge delays on transmission.

I’ve put my router on top of the printer and bought an antenna booster, changed to a channel far away from all others in the area. The speed has increased a bit, but the reliability is still bad. It often lags, slow down and the latency is just not the same with cables.

Conclusion

Obvious as it is, wireless desktops are not rare. Many of my tech savvy friends (and me), have opted for wireless connection on their desktops in favour of a safer bet, mostly because of cabling issues. I’ve been using wireless for all my needs (desktops, laptops, mobile phones) for over three years now and I can say that I’m more dissatisfied than happy about it. This is why I’ve decided to have a long white cable around my sofas and TV set. Luckily, my power cable is also white, and as I can’t get rid of it (yet), it blends nicely.

Even my boot efficiency (boot and login) increased a lot (about 2/3 of the time), I have no more mount issues, using the server’s shared drives is easy and fast, gaming issues are over and browsing has lost a source of problems.

It’s not all roses, though. When I had the drive mounted via USB, things were a bit faster (my router is 100mbps, unfortunately), but still way better than wireless. Besides, I now have a printer and scanner server!


Who needs Microsoft’s FAT?
February 26th, 2009 under Computers, Digital Rights, OSS, Politics, rengolin, Unix/Linux. [ Comments: 2 ]

Hydrogenated, unsaturated fat and cholesterol are long enemies of the public, but recently a new type of fat has been added: FAT.

Microsoft has filed a patent suit against TomTom about its FAT implementation on their Linux satnavs. This is a bit of a long story and Microsoft is not tired yet. Probably because of the recent losses with patents, they’re trying to get some profit for themselves.

Luckily, there is hope. The guys at End Software Patents can see some light at the end of the tunnel. Looks like the Bilski case can give precedence for rejecting the lawsuit of that (and many other stupid patents they’re claiming) based on the tangibility of mathematical algorithms (software) when they’re not particularly tied to any concrete implementation (hardware).

This was how it was done before in the US until the first case passed through that wasn’t attached to any particular hardware and then with the final revision in 1998 that they could patent even cake recipes.

Why not ditch it for good?

So, FAT is rubbish, 30 years old and close to zero evolution since then, why keep it? It’s true that there are many other filesystems around, much faster, safer, optimized and well designed, but FAT still has its market: on embedded devices. Because it’s simple and stupid, it’s quite easy to support it on very small machines with reduced RAM and CPU power. It’s also light-weight and fits well for small flash cards and USB storage. But the biggest reason to keep it is another: Microsoft supports it since its birth.

Would you buy an SD card that needs to install a driver to make it work? What’d be the point?

Yet again, because of the market domination (and not technical merits), Microsoft forced rubbish down everyone’s throats live for longer that it was expected. And now, they’re trying to get the profits by suing everyone that followed them for decades. What a nice way to say thank you!

Speaking of which, not only they’re happy by suing companies by using Linux (TomTom in this case and many others during the FAT fight), they’re also asking for the open-source community’s help to make Visual Studio 2010 a better product, isn’t that nice? How lovely is the American way of life, I guess the world will never be able to thank them enough.


Gates the Hutt
February 14th, 2009 under Computers, InfoSec, rengolin. [ Comments: 1 ]

Jabba the Hutt

Jabba the Hutt

Bill Gates might not be heading Microsoft anymore but his legacy (through his stupid padawan, Ballmer) still remains.

Not only they’re careless when writing bogus software, not fixing security holes and creating useless solutions to help you protect you, now they’re using the money you pay (if you do buy Windows, anyway) to set bounties to capture the creator of the new worm.

It might just work, of course. Worm writers are normally bounty hunters themselves. Like Greedo, they might end up capturing Han Solo. But, what the heck? Wasn’t there a better use for that money? Like fixing the bugs in the first place?


Vista is no more
January 10th, 2009 under Computers, Digital Rights, OSS, rengolin, Software, Unix/Linux. [ Comments: 2 ]

It still hasn’t gone to meet it’s maker, but it was also not as bad as it could’ve been.

After Windows Vista was launched with more PR and DRM than any other, Microsoft hoped to continue its domination of the market. Maybe afraid of the steep Linux increase in desktops (Ubuntu has a great role in that) and other market pressures, they’ve rushed out Vista with so many bugs and security flaws, so slow and with such a big memory and CPU footprint that not many companies really wanted to change their whole infrastructure to see it drawn a little later.

China government ditched it for XP because it was not stable enough to run the Olympics, only to find out that the alternative didn’t help at all.

All that crap helped a lot Linux (especially Ubuntu) jump on the desktop world. Big companies shipping Linux on lots of desktops and laptops, all netbooks with Linux as primary option, lay people now using Linux as they would use any other desktop OS. So, is it just because Vista is so bad? No. Not at all. Linux got really user friendly over the last five to ten years and it’s now as easy as any other.

Vista is so bad that Microsoft had to keep supporting Windows XP, they’re rushing again with Windows 7 and probably (hopefully) they’ll make the same mistakes again. It’s got so bad that the Free Software Foundation’s BadVista campaign is officially is closing down for good. For good as in: Victory!

Yes, victory because in one year they could show the world how bad Vista really is and how good the other opportunities are. Of course, they were talking about Linux and all the free software around, including the new gNewSense platform they’re building, but the victory is greater than that. The biggest message is that Windows is not the only solution to desktops, and most of the time, it’s the worst.

In conjunction with the DefectiveByDesign guys, they also showed how Vista (together with Sony, Apple, Warner et al) can completely destroy your freedom, privacy and entertainment. They were so successful in their quest that they’re closing doors to spend time (and donors’ money) in more important (and pressing) issues.

Now, they’re closing down but that doesn’t mean that the problem is over. The idea is to stabilise the market. Converting all Windows and Mac users to Linux wouldn’t be right, after all, each person is different. But the big challenge is to have users that need (or want) a Mac, to use a Mac. Who needs Windows and can afford to pay all extra software to protect your computer (but not your privacy), can use it. For developers the real environment is Unix, they should be able to get a good desktop and good development tools as well. It’s, at least, fair.

But for the majority of users, what they really want is a computer to browse the web, print some documents, send emails and for that, any of the three is good enough. All three are easy to install (or come pre-installed), all three have all the software you need and most operations and configurations are easy or automatic. It’s becoming more a choice of style and design than anything else.

Now that Apple got rid of all DRM crap, Spore was a fiasco so EA is selling games without DRM, the word is getting out. It’s a matter of time it’ll be a minor problem, too. Would DefectiveByDesign retire too? I truly hope so.

As an exercise to the reader, go to Google home page and search for the terms: “windows vista“. You’ll see the BadVista website in the first page. If you search for “DRM” you’ll also see the DefectiveByDesign web page as well. This is big, it means that lots and lots of websites are pointing to those websites when they’re talking about those subjects!

If you care enough and you have a Google user and is using the personalised Google search, you could search for those terms and press the up arrow symbol on those sites to make them go even higher in the rank. Can we make both be the first? I did my part already.


Cloud fuss and computing life
October 1st, 2008 under Computers, OSS, rengolin, Web. [ Comments: 2 ]

Lot is being said about cloud computing recently that culminated on the heated rant from Richard Stallman. As always, I agree in parts, but sometimes RMS can be a bit too reactionary.

I do completely agree that giving away your personal data to companies like Google, Yahoo!, Amazon and Microsoft is not desirable. That this puts too much power on their hands, that they own your data, your history. Problematic ownership grants such as in Second Life proved to be even worse. So, what’s the catch?

Cloud computing

In essence, cloud computing is doing to the internet what IBM did to big companies in the 60′s. They had a big server and hundreds of dumb terminals from where you could access the system, your data and history. Today’s dumb terminals are a bit smarter, though, but the cost of keeping consistent data and history on your own home desktop, work desktop, laptop, mobile phone, pda and whatever else you have that access or deals with your data is still unbearable.

Not only that, but it’s virtually impossible to build a collection of systems that works with any kind of data on any type of device running any operating system and window manager etc etc. Lots of big companies (such as Microsoft and Apple) are trying hard at it for decades and they are failing miserably, over and over.

Agreeing over standards (HTTP, XML, RDF) is one way to go but the intrinsic details of every single application and this Intellectual Property paranoia the world is facing nowadays makes it impossible for two different companies to agree with standards. That, of course, when they don’t start their own standards just for the sake of having one of their own.

On the other hand, on-line software companies like Yahoo! (at its time) and Google (today) grew bigger than those two giants doing on the internet exactly what they couldn’t do on the desktop. Cloud computing is just a beautiful name for “we keep your data safe and sound and pay us with the right to do whatever we want with it“.

Desktop era

Where I don’t agree with RMS, though, is that we should keep our desktops. No matter where you store your data, on Amazon’s S3 or on your desktop, if you don’t protect your data, it’s not yours anymore.

It’s not just easy to break into any machine or network with the required amount of work (NASA and NSA constantly owned is the ultimate proof of that), but if everyone stores data on their desktops it’ll also be worthwhile. Today, if you break into my desktop you’ll see a bunch of pictures of my family and my (already public and GPL) programs.

What’s the point? No point, my desktop today is just a cache of the internet, a fast access to data that is already public on the internet. My personal banking information is on my bank’s website (which I don’t trust, by the way) but that’s life. My emails are on my mail servers, my personal history and chats on my blog, my friends list on social websites, etc. If I was to store all that information on my desktop, that’d be a huge security breach.

Not only is easier to safeguard a bunch of servers than millions of desktops, but it’s spread out. If you break into GMail to get someone’s emails you won’t (hopefully) get his banking details. If you click on scam and loose your financial data, you won’t loose your family pictures, emails from your dead granny, and so on.

Safe cloud computing

What we need to assure is that companies like Google and Amazon not only promise to “not use your data for their own profit”, we need to make sure they will never be able to, even when they change the EULA. How? Simple, use encryption!

We need to make sure that the email service uses GPG (or any encryption/authentication scheme) not only for sending and receiving, but also for storing your emails. Google says it spoils their fantastic advertising engine and you’ll get random ads instead of targeted ads for your email. Thing is, I’m not looking for answers or searching the internet, I’m just talking to my mum! I don’t need to buy “mums on eBay at unbeatable prices“!

On-line storage is easier to work around, just be sure to encrypt the files before you send it back and forth. A simple program could do that using the API they provide to access your data.

Social networks is far more complicated, though. But the way I see is simple: it’s public data, live with it. My blog and web-pages have lots of information about me. If you google my name you’ll see lots of other sites with lots of informations about me, and I can’t do absolutely anything about it. What would be good, though, is to be able to own this data, but it’s not storing on my desktop that will help anyway.

Would be cool, though, if one could download their own information in RDF format and import it to a local tool on their desktops or to another social network. Different websites could do it automatically (some do) to exchange information about you, but again we fall into the value of data ownership, and when money is at stake, people (and companies) can get very naughty.

Conclusion

As I see, cloud computing is inevitable, either because it’s really cool or because those companies will make you believe it’s really cool. It’s not a matter of liking or not, it’s a matter of accepting it, but enforcing your rules to your own data.

I will never, ever, buy anything that has DRM, Root-kits, feedback-systems, usability limitation or anything that takes away my own freedom to own what I’ve paid for, or created myself. A song, a picture of my son, my friends list, this post or my ideas, are all owned by me, no matter where I store them.

Storing copies of my data on another server should not bestow them ownership, but they do reserve the rights to do something with it (like targeted ads). They own a copy of your data. But if you regain control of it, by encrypting everything, you take this last right away from them.

So, if you’re really concerned that Google will take profit of your start-up idea described on your email, don’t use GMail for those things, or at least encrypt what’s sensitive. If you’re concerned that Yahoo! will use your personal photos for advertising, don’t store there sensitive images.

But please, don’t go crazy, blaming a new technology, just because it’ll take away the ownership of your own data. The internet already did that, a looong time ago.

If you’re still paranoid… keep your computer safe, unplug it from the mains. Don’t take pictures, don’t blog, store all that information on your brain. Don’t talk to other people, they might use your ideas for their own benefit, or for the greater good. It’s a choice you have to make, and be consistent with it… Good luck!


False security
August 5th, 2008 under Computers, Digital Rights, InfoSec, OSS, rengolin. [ Comments: 2 ]

False security is worse than no security. It’s that simple.

Bruce Schneier won’t stop saying how CCTV cameras are not only plain ineffective, but they bring the false sense of security even on police forces that won’t patrol the streets as good as they would without cameras. People won’t worry as much as they would without cameras and become easy baits for common robbers.

The same apply to computer security, of course. Building up a firewall in your computer, running an updated version of the latest anti-virus / anti-rootkit / anti-malware / anti-whatever won’t protect you from the most simple of the attacks: social engineering. One email or phone call done right to the right person is enough to render the whole network inoperative for hours or to pass sensible information to black hats do whatever they want or need in order to hack a system. Yours or any other.

As if it was not enough, as Bruce always point out, placing cameras will make robbers attack on places without cameras. In the same line, placing personal firewalls will make viruses mutate and attack on more subtle ways. Placing proxies and snooping hardware on your network will only make the real offenders care more when they’re accessing prohibited websites or protocols, for they will anyway.

The fact is simple: You can’t assure 100% of security.

Money is hardly the issue here. Think on the amount of money the US spend on securing their own classified data. Probably more than what they spend on wars around the world. But it wasn’t enough, Gary McKinnon could get into all of that to search for UFO information (yes, I do believe him). Apple spends a whole bunch on securing their devices and Brazilian hackers unlocked it only 3 days after the new iPhone 3G was released.

DRM is the other myth I can’t understand how people with a bit (not much) of clarity and intelligence can ever think it’s worth the shot. All major locks imposed to consumers were broken immediately after they were released. Hackers (good and bad ones) can easily break into any security scheme but the normal public will have to use the digital handcuffs. It’s not only unfair, it utterly stupid and pointless.

There is no sensible choice other than agree with Richard Stallman’s philosophy: ideas should be open and free. Competitive advantage must be on what you are doing rather than on what you’ve done. It’s impossible to secure the past, let it go, walk forward, invent!

What’s the value (worth of stealing) of your previous achievements if your future ones are much better? What could a hacker possibly want with old things? If they’re hacking, it means you’re not fast enough! Keep up!!


Why not the primary key?
April 23rd, 2008 under Computers, Devel, rengolin. [ 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:

  1. 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.
  2. 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…


gzip madness
April 9th, 2008 under Computers, Devel, rengolin, Unix/Linux. [ 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…


« Previous entries Next entries »