Saturday, July 12, 2008

The Forward+Reverse Engineering Approach

In some certain cases it's not possible to finish an engineering task just by doing a forward engineering approach (doing a design, prototyping and so on until you get the product to market) or vice versa, i.e. the task cannot be finished just by doing a reverse engineering approach (a.k.a tear-down and document everything). In these very peculiar case a combined approach of forward and reverse engineering is required.

I've never been into such a complicated problems like this before but in these last few weeks, the combined approach is clearly the only way to solve the problem. I noticed from books that I read a few years ago that usually a reverse-engineering task involved a legacy software where you couldn't find the documentation anywhere anymore. I can say that this is the "hell's pit" for a software developer, but I finally got into the same case.

The story starts with an Software Development Kit (SDK) that suppose to work on our target hardware in the office. Nonetheless, after 2 months tinkering with it I finally figure out that none of the documentation is exactly inline with the code in the SDK. Therefore, I have to create patches and patches and patches every day to make everything works as intended. OK, I thought everything was finished by then, but reality hits me. The previous version of the SDK produced an almost entirely different format for the output binary and moreover the tools to create this binary is also coming only in executable form in the SDK. I'll say this is take one of the "hell's pit" for me. Because I have to reverse engineer the file format from an SDK that supposed to be backward compatible with the previous version. You might ask why don't I request the previous version of the SDK? Well, it's impossible because apparently it's not there in the hardware vendor's FTP server. I try to ask them politely but they don't know either. I suppose, the development of the SDK is outsourced to some third party guys somewhere in Taiwan and this guy cannot be contacted anymore a.k.a disappear after he shows a working demo of the SDK and he didn't even take into account backward compatibility into account. Yeah, this is still take one boys and girls.

Now, take two. So, we have this driver for the hardware coming only in binary form, yeah binary form! We bought 1K units and we still got the binary form of the driver? This is insane! But taking into account the population of China, 1K units is nothing for them. Lets say, this Taiwanese hardware vendor sold most of their units in China then they won't provide support or a complete source code for those who buys only 1K units. I heard form the one who purchase our units in the office that unless you're buying 10K units you won't even be in their radar, sic.

Now, take three. Finally I decided that these things must be regarded as legacy software and a forward+reverse engineering approach would be very important to finish my task as I described above. Welcome to the "hell's pit" ladies and gentlemen.

Overall, this is an entirely new ground for me. But, I'm quite happy and challenged to see how far I can get with it. I'll give them a lesson. A very hard lesson. But, I hope and I think this won't shake up the industry ;-).
Post a Comment

No comments: