Home arrow Blog arrow FreakZ arrow Some Thoughts and Reflections On This Project
Some Thoughts and Reflections On This Project | Print |
Written by Akiba   
Tuesday, 30 September 2008

Wow. That had to be one of the most difficult experiences of my life. It  felt like I was passing  a kidney stone. Painful, anxious, but afterwards gratification and relief. After arguing with myself last month, I'm glad that I finally got up the balls to do a release. That was the first time I've done a full release by myself and I have to say that release managers have it pretty tough. At least for the crunch time before a release goes out.

Well, its probably best to reflect a bit on the stack development. First of all, I grossly underestimated the amount of work that a full Zigbee stack would take. When I first started, I had thought that I would be able to finish it after about six months. Unfortunately, that's not the case. I'm going on my seventh month working on it, and there are still a lot of things that need to be implemented.

One of the things I didn't take into account was that the learning curve for Zigbee was much steeper than I had thought. Although I had some minor experience with the spec, a full blown stack development requires intimate knowledge of every detail. I found out that it takes a long time to be intimate with a 600 page spec.

I have to admit that a good portion of my time was also taken up re-writing and re-organizing my code and architecture. As I learned more about each layer, I found that my initial architectural assumptions were incorrect. That forced me to re-write a lot of code and revise the architecture many times, especially on the NWK and application layers.

I think that the code right now is on the right track in terms of architecture. Now that I've been through each layer and experimented with different architectures, I'm pretty sure that the one I have right now is probably close to the one that I'm going to stick with.

I should mention that there are still a lot of areas in the code that need improving as well. The code is larger than I expected and will need to be optimized later on. After its built out, I'm gonna have to take out the machete and liberally slash off the fat.

Also, one of the most glaring inefficiencies of the stack is that there are a lot of statically allocated table/queue/list elements. Its a horrible waste of RAM and it offends me to even think about it.  When I started, I didn't fully appreciate the amount of tables/queues/lists that Zigbee would use. It uses a shitload. One of my main priorities is to implement a non-fragmenting dynamic memory allocation scheme. I have checked out many so far and will probably start implementing one of them pretty soon.

Looking back, I should have implemented Doxygen from the beginning. That tool is one that should be forced on every developer at every company. Unfortunately, I only see it mostly used on open source software. All of the companies I've been at before don't use it and I feel pretty sad about it. That tool is more productive than some of the $20k tools that I've had to use in the past.

While I'm cursing myself about that, I should also say that I should have used lint from the beginning too. That one is a real life-saver.

After the release, I was thinking about where I spent the past seven months. I think I spent a large chunk of that time on two tasks:
1) Coming up with the right architecture/framework for the stack

2) Implementing peripheral things such as the simulator, test fixtures, and tests. I wrote a lot of throw away code too to check my routing
algorithms, tree calculations, and other parts of the stack where I didn't have confidence to introduce it directly into the main line of source.

Well, enough of verbally abusing myself. I pulled off the release!!! Hurray for me! It was hellish. My eyes hurt, I aggravated my wrist problems, and I'm actually coming down with a cold from the stress of this release. Its like I'm back in college all over again. Ha ha ha. But its all worth it. I needed this kind of closure so I can move on to the next phase.

So what is the next phase? Well, here are my thoughts on the rough priorities:
1) Dynamic memory allocation needs to be implemented. For sure!
2) Next step is to go into hardware. I want to prove the code in a real system, and I want some gratification instead of staring at simulator print statements.
3) Security needs to be implemented.
4) Zigbee Cluster Library and profiles need to be implemented.
5) Need to finish off the missing functionality.
6) If I make it here, I'm heading for compliance.

I'm hoping to finish up to (3) by the end of the year. (4) and (5) are probably going to be around next year, and I want to go for compliance next year as well.

After the stack is compliant, I have a bunch of other things planned too,  but I don't want to overexcite myself. Gotta focus on the next step. One thing I learned from this project is that it's not about finishing. It's enough just to be able to start every morning.

Hope you enjoy the stack. It's not ready for prime time, but at least you can see that I'm serious about doing this, and also keeping it open.

Good night...

...and the bottle of wine opens...

Hits: 898
Trackback(0)
Comments (0)Add Comment

Write comment

busy
  No Comments.

Discuss...
< Prev   Next >