quinta-feira, outubro 15, 2009

Electronics and software development are too similar

Electronics and programming, both are my hobbies. I see many similarities between them. Especially in the way we do things.

A project using just discrete components (resistors, capacitors, transistors, etc.) means that your circuit will be too big, you will have a lot of work to project it in the right way and it will cost a lot of money too. Sometimes it's not viable to design using only discrete components.

The circuit is very susceptible to mistakes and it is hard to fix it.

This is the equivalent of assembly programming. It is not practical to develop a large program entirely in assembly. Can you imagine a CRM software such as SAP, entirely written in assembly? What about Oracle? And Linux?

Projects that use discrete and low-scale integration IC components (e.g. operational amplifiers and 74xx or 4XXX family of logic gates) are easier to make, since we have a library with basic functions (the 741 operational amplifier, for example contains 20 transistors and 11 resistors and occupies only 0.400 x 0.290 inches).

In my opinion, this kind of assembly is similar to program in C. We have a tiny wrapper around assembly language. This turns our development efforts into an easier task and at the same time it doesn't put us far way of its guts.

When we build using specialized ICs, like audio amplifiers, horizontal and vertical synchronism ICs, among others, the PCB size reduces as well as complexity and development time. I make an analogy with software development using java.

The more specialized the ICs we use the more similar to frameworks and high-level languages (Ruby on Rails, for instance) we get.

This analogy is not perfect but makes me thing: I enjoy more programming in C and in Assembly languages than to program in high level languages. At the same way, I enjoy more assembling electronic circuits using discrete components and basic ICs (like operational amplifiers and logic gates) than using very specialized ICs.

I'm not an extremist. I use high-level languages on software development and specialized ICs (micro controllers, for instance) on electronics circuits when it is needed.

From a pure performance standpoint, such as execution speed, code written in assembly language means efficiency, in Electronics it is not true.

The initial investment needed to professionally work is lower on software development than in Electronics.

Another point where software development and Electronics differ is in the reuse of created stuff. A library must be done just once on software. Then you can reuse it as much as you need it for free! In Electronics, on the other hand, each circuit built comes at least with the cost factor for acquiring components (and many times this cost factor is no so small).

I summarized everything into a table.


ElectronicsSoftware
low level
discrete components
assembly language
mid-level
discrete and low-scale integration IC components C language
high-level
specialized ICs, like audio amplifiers, horizontal and vertical synchronism.Java / C#
very high-level
very specialized ICs Ruby on Rails
initial investment needed to work
high
no so high
lowering costs by reusing librariesno so highhigh

Have you ever though about it? Is it just me?

I'll stop divagating for a while. When I find out new similarities I will write again.

Nenhum comentário: