Freddie Chopin wrote:
> > But here's a hint: There is zero difference between good
> > programming on a PC and on a microcontroller.
> 
> Just like there's no difference between Lego and scyscrapers - it's
> just the bricks are a bit smaller (;

When building some small stuff it doesn't matter how you put the lego
bricks together and it doesn't matter how you make the deck on your
summer house. It's difficult to fail.

When building something a little bit larger then the principles for
skycrapers apply equally to a Lego construction. I guess you too
learned that the hard way while trying to build amazing Lego things!


> A quite big project for an MCU I have here has 28k lines, and that 
> includes lwIP, FreeRTOS and FatFS. So less than 10k lines are mine. 
> Compare that to OpenOCD that has 135k lines of code + external modules + 
> external libraries + using OS libraries (sockets, networking, ...).

Yes, it's only one order of magnitude of LOC difference, but more to
the point you have exactly the same concepts of APIs and OS libraries
in the embedded project as in OpenOCD - you name them yourself.

Of course the APIs differ, but the *concepts* are exactly the same,
and APIs are like languages - having learnt one makes it (much!)
easier to learn the next.


> Another notable difference - MCU projects are rarely done by a team, so 
> I really know EVERYTHING there is about the project (excluding external 
> libraries).

Why *don't* you know the external libraries? I think that's key - if
you had known also those external libraries then you were probably
using a pattern which would help also for OpenOCD and every other
programming project.


> On the other hand, PC projects are rarely done by a single person
> and there are not many comments in OpenOCD to explain the flow of
> data...

That doesn't mean that every single person can not learn what the
code does.

I hope the point of my last email is clear - it is our responsibility
to help educate each other, and we do this by writing commit messages
to teach reviewers about the small piece of code that we have just
learned about ourselves.

Initially there are of course only islands of understanding, but as
those islands grow in size and numbers, suddenly there is critical
mass and every single person knows EVERYTHING there is about the
project.

I very much welcome all ideas for even more efficient approaches!


//Peter

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to