??? 07/17/09 17:01 Read: times |
#167512 - Lots of people can't program... Responding to: ???'s previous message |
Richard said:
I have said that one who can't program in ASM can't program. A very interesting thing is the huge amount of products all around us we can buy for ridiculously low prices, that are working very well despite being programmed by persons who don't know how to program. In your view, that is. I'm thinking about small routers and firewalls. Or network-connected copiers or coffe machines. Weather stations. Burglar alarms. The situation here is that in many real-world cases, C may add 10-30% larger and/or slower code and in many situations match your best. But you have never tried, so you don't really know. But if you somewhere see a large figure, that figure matches your expectations, so you quickly decides to remember it. A huge percentage of all embedded work is now done in C or C++. Not because people are lazy, but because a huge number of companies have found out that it is economical to use C or C++. The chip manufacturers don't release larger chips because we need it to fit our ugly C code. They do it because our faster development time means that we want to add new features. Paying $10 for a tiny box with a big processor and huge amounts of features instead of 10 years ago paying $100 for a large box with a small processor and a few number of features is called progress. Progress is that the large chip with very large memory costs less than the ten year old small chip. Progress is that the developers had to switch from assembler to C, to be able to implement five times as much features in their ten times as large processor within the same time frame as they originally developed for the ten year old small chip. In the end, you get five times as much features for the same development cost and a tenth of the hardware cost. And the customers loves the product. Staying with assembler would have allowed you to continue with the old and small chip. But the small chip would not have droped as much in cost since there is a reciprocal gain from it. There is no price press on old processor trailing the market. The price press is highest on the chips fighting for all new designs. And how much can you sell your product for, if it only has one fifth of the features of the competitors new products? In the end, you can only charge premium prices for a product if you have a premium product. And you can only afford to develop a premium product if you make sure that all steps of the development are using optimized methods. And everyone knows that premium products gets old. So you need to be able to regularly regenerate your premium product, by releasing something new and better (and often cheaper). That means that you must be able to reuse large parts of your source code. Why? Because of the market pressure, you will for every new product have to start from scratch when you select your components. We are not talking about $0.30 extra for switching to the next larger flash. We are talking about cutting -$.30 for selecting a completely different family of processors (while at the same time gaining +50% memory and +50% CPU capacity at 60% of the power consumption). So being able to take your code with you and jump means that you will not only save money on the new processor (even if it is way bigger in capacity). You will also save money in the reduced power consumption allowing you to use a smaller battery. The smaller battery and potentially smaller processor outline (together with higher integration of peripherials) may allow you to shrink the PCB, allowing more PCB to fit on a panel. A higher integration will allow you to cut costs when factory-testing your new product - even if it has more features. All this time, a guy named Richard decides that the use of C is something caused by lazy programmers not bothering to take the time learning proper assembler. I'm lucky this world has so many programmers who can't program, since I wouldn't have been able to afford buying all these well-working products at a fraction of the cost they had 10 years ago. Anyone remember when the simplest two-button (non-optical, cable-connected) mouse was > $200? Or when the PC keyboard (admittedly very, very solid with a thick metal plate at the base) was > $200? We live in a world where the electronic components are improving at a very high speed - the bottle neck is the developers who have to write the software. We need to adapt to the situation, and change our tools to be able to take advantage of the electronic revolution before someone else takes advantage of it for us. |