Re: How to write better code for your projects ?

From: mark hahn (mhahn_at_hvc.rr.com)
Date: 02/20/04


Date: 20 Feb 2004 03:33:30 -0800


"Rodo" <dsp1024@yahoo.com> wrote in message news:<4BgZb.32504$5W3.17023@nwrddc02.gnilink.net>...
> Hi all...
>
> I've written code for my stuff at home. You know, the stuff you experiment
> with. Not meant to be pretty or a full blown project. If it is something I
> will use in the future - like an LCD init function - I fully document it and
> place it in a special "custom" folder.
>
> I can write code and it is good. I have a EE and I've being working for 2
> years now. Little stuff like test boxes and the like are no problem. At
> work, I was told I'm going to get a whole project soon - the boss was
> impressed with a silly test box I made, now he thinks I can make a space
> shuttle. Are they all this clueless ?. I know each part of the design so I'm
> not panicking just yet :-). I'm thinking how to implement the different
> parts but I don't feel comfortable writing this project like I did my senior
> project. BTW my senior project worked with very few glitches.
>
> I just feel I need more info on writing code for embedded systems (that's a
> good magazine: Embedded Systems Programming ). Before I start cranking out
> code, I'd like to get more info on ways of writing code. Can you suggest a
> book or reference where to start ?
>
> Thanks
>
> BTW no need for a RTOS. The project is not that complex. It's going to use a
> microchip PIC18Fxxxx. I haven't decided which one yet.

I'd recommend reading a few books on software engineering, if you
haven't done that yet. Look for books that aren't about how to
program, but about how to manage programming.

"Code Complete" by Steve McConnell is as good a place to start as any.
You can read it a bit at a time, and it's a fast read. I've been doing
embedded programming for over 20 years and while I don't agree with
everything McConnell says, I would guess I learned about 70% of what
he's teaching (preaching) the hard way.

I'd recommend programming the PIC in C if you don't need blazing
speed. If you're in need of a decent compiler, take a look at CCS
(www.ccsinfo.com).

Have fun. Learning to design and manage a project longer than a few
hundred lines of code is something you need to learn through
experience.

Mark



Relevant Pages

  • Re: How to get into embedded development including Windows XP
    ... However, since I was an electrical engineering student, my program only included introduction to programming and data structures as programming courses. ... I would like to start something related to embedded systems as a SMALL business venture that I could explore. ... there's two books about that I've referred to occasionally - Cseri's beginners book and Liming's Advanced. ...
    (microsoft.public.windowsxp.embedded)
  • Re: How to get into embedded development including Windows XP
    ... There are a few books on Windows XP Embedded: ... programming and data structures as programming courses. ... start something related to embedded systems as a SMALL business venture ...
    (microsoft.public.windowsxp.embedded)
  • Re: How to write better code for your projects ?
    ... >good magazine: Embedded Systems Programming). ... I'd like to get more info on ways of writing code. ...
    (comp.arch.embedded)
  • Re: How to write better code for your projects ?
    ... > good magazine: Embedded Systems Programming). ... I'd like to get more info on ways of writing code. ... A few books that you should peruse: ... That should give you good coverage of both low-level coding (how to ...
    (comp.arch.embedded)
  • C++ Cookbook - OReillys Latest Release
    ... difficult languages to learn. ... accomplish common programming tasks in an effective and proven manner. ... 'reference' books. ... XML, using the standard containers, and so on. ...
    (comp.unix.sco.announce)