Skip navigation.
Home
The QNX Community Portal

View topic - Embedded world...

Embedded world...

All topics.

Postby ianc » Thu Apr 01, 2010 10:56 pm

you mean less microslob crud????
ianc
Active Member
 
Posts: 80
Joined: Wed Jan 22, 2003 6:04 am
Location: Bendigo, Australia

Postby Tim » Fri Apr 02, 2010 1:36 pm

Not just Microslob but they are clearly the biggest offender.

Java is another big offender.

I mean it seems amazing to me that it takes 1-2 megs to do what used to routinely be done in a few K. Most of that bloat is due to all the higher level languages (C#, Java, virtually all the scripting language etc) doing more and more stuff behind the scenes.

But don't discount newer software methodologies like Design Patterns (which I heavily use but also realize = massive code bloat if you use them to build for the future but that future never is needed/arrives).

This point became more salient recently when I did a project on a PIC micro at work. The processor only has 64K of code space and I was able to do a complete pressure monitoring device that included several I2C sensors, a 2 line LCD character display, serial port based calibration etc with about 10K space left over.

QNX is one of the great O/S's because the micro kernal technology lets you use as little as you need.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby ianc » Fri Apr 02, 2010 11:55 pm

Hear, hear Tim.

I too am amazed at code bloat, a simple "Hello, World" seems to take megabytes nowadays. I'm old enough to have cut my teeth on FORTRAN and punched cards, so perhaps I yearn for the good old days, however.

A little story.
Our facility produces Intrusion/Access Control panels. Up until very recently there were two lines of management software developed to control and manage systems of these panels. The original was (and still is) written in C running on QNX. We started with QNX 2 and are currently using QNX4.25. The product started as text-based and then used QNX Windows and is currently uses photon as a gui. Allows customers to use phindows. Management are reluctant to go to Neutrino(different story). The other management software was developed on Microsoft Windows in whatever language and using whatever methodology was the "latest". This team were constantly changing tools. The Windows line was developed because the sales guys always complained they couldn't sell a system that wasn't Windows based.

There were two independent teams writing these products. A two man team on QNX and an eight man team for the Windows side.

Guess which team always delivered on time?

Guess which team hardly ever delivered on time and nearly always had buggy product? Guess which team had bugs because they claimed their tools were bad. This was the same team that insisted they have the latest and greatest. O/S, tools, methodology, etc. One of these guys refused to use C because he "knew it backwards" and it was no longer intellectually challenging! This same guy may have known his preferred language but there was no way he knew how to put a system together.

Guess which team is still employed?

Management used to love these windows guys because the buzzwords sounded so great. Unfortunately buzz-words don't produce good product. Management also love consultants. I've lost count of the number of consultants who have come in and said "What!. You're using "C", OMG! That's awful, you must stop that and become productive with our new development products." No thanks, we are productive the way we are. The bonus is the old tools don't cost us a red cent.

Moral of story. A small team using simple tools and rock solid o/s beats large team with "leading edge" desires and egos to match.
ianc
Active Member
 
Posts: 80
Joined: Wed Jan 22, 2003 6:04 am
Location: Bendigo, Australia

Postby mario » Sun Apr 04, 2010 4:43 pm

Enjoying C++ programming for the last few years I find that the tools in most cases is not to blame, but the depth of the knowledge and experience of the person using it. Some tools are easy to master other takes years. I find that "modern" tool are trying to make complex problem simple but in the process are hiding the details to the extent that you loose that sense of control and/or understanding of what is going on. How many people know the effect of using std::cout versus printf.

I'm currently working on a daily basis with a guy that is switching from Java to C++. He often find himself very frustrated at the level of knowledge that is required to writte good C++ programs compare to Java, he's finding it real hard to not have garbage collection, even if I showed him that you can get something close to GC under C++. I have to admin I agree with him, however he is also getting use to this sense of control that you get with C and C++.

Someone could argue with Ianc that assembly is better then C, that C is bloated, that a hello world in assembly under DOS will use 100 bytes compare to
3K in C. He would be right ;-)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby maschoen » Sun Apr 04, 2010 5:17 pm

I think you've touched on the heart of the problem Mario. We all want to be better programmers. We think that if something is easier this will make us better. It's easier if we don't have to know what is going on below the surface. When we don't know what is going on below the surface, we become poorer programmers.

Analogously, yes garbage collection is good because we don't have to worry about always freeing up memory, a problem that will create a memory leak. So we are not as careful in constructing our code. And then when we have code that is not constructed as carefully, it is buggier.

One could argue that you do have to be careful with a garbage collector to de-reference any unused data. So how is that different from being careful to use free()?

Now if you accept my argument, most of you probably don't, then the best environment would be the one where it is easiest to know exactly what you are doing because at its heart it is simple. I think that 'C' has an advantage here over C++, Java and Assembler.

BTW: I like and use all 4, I'm not a Zealot.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Postby ianc » Sun Apr 04, 2010 11:56 pm

I hope I'm not coming across as a zealot. I've used many operating systems and languages commercially in my time.
My point is simply that using the latest and greatest does not guarantee results. As Mario and Mitchell correctly point out, modern tools unfortunately lead to a loss of knowledge of what is going on under the covers.

At the risk of offending some, we find that engineers (especially electrical or electronic) make better programmers for our needs than IT graduates. That should stir up a hornet's nest!!

Has this discussion wandered off topic ?

cheers, guys.
Ian
ianc
Active Member
 
Posts: 80
Joined: Wed Jan 22, 2003 6:04 am
Location: Bendigo, Australia

Postby maschoen » Mon Apr 05, 2010 1:24 am

At the risk of offending some, we find that engineers (especially electrical or electronic) make better programmers for our needs than IT graduates. That should stir up a hornet's nest!!


Wow, I'm flabbergasted. I'm not offended, just amazed. On one hand I believe you. On the other hand, my experience with ee engineers is that they 1) generally think they know how to program, and 2) they don't. This can only mean that today's crop of IT grads are really hurting. I don't want to think about how many rescue projects I've been brought in on where I was told that the code has just a few bugs, and in the end it had to be almost completely reconstituted. It's one think to understand how to poke hardware a little to get it going, and another to understand overall structure and how important it is.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Postby Tim » Mon Apr 05, 2010 2:10 pm

maschoen wrote:
At the risk of offending some, we find that engineers (especially electrical or electronic) make better programmers for our needs than IT graduates. That should stir up a hornet's nest!!


Wow, I'm flabbergasted. I'm not offended, just amazed. On one hand I believe you. On the other hand, my experience with ee engineers is that they 1) generally think they know how to program, and 2) they don't. This can only mean that today's crop of IT grads are really hurting. I don't want to think about how many rescue projects I've been brought in on where I was told that the code has just a few bugs, and in the end it had to be almost completely reconstituted. It's one think to understand how to poke hardware a little to get it going, and another to understand overall structure and how important it is.


I suspect the reason that EE's seem like better programmers than IT grads is because most of us who are on this site are dealing directly with hardware in our products. And EE's are used to dealing with hardware in their undergrad programs while IT grads are not.

We were interviewing recently for a junior position and myself and another guy were looking through the stacks of resume's. He commented that none of them had any hardware experience listed at all and that the couple we had talked to on the phone seemed to have no idea how to deal with hardware. He seemed amazed by that fact. I then joked that he had lost the ability to deal with memory because he'd been programing in C# for the last few years (after spending his first 15 years programming in C/C++ with hardware).

That's when we both realized that we are indeed forgetting our past thanks to modern software languages/tools. Things like linked lists and memory management aren't taught anymore because languages like C#/Java have standard libraries and garbage collection. This is a big contributor to the massive code bloat. So we end up with processors that are 5 or 10x as fast but they don't do *that* much more because of all the code bloat and/or other programs that are always running (like anti-virus)

Now as far as great system design goes, that comes from experience. You absolutely can't expect junior programmers, experienced programmers new to a language (ie Java to C++) or experienced programmers new to an environment (le new O/S) to produce a great system design. They just don't have enough in depth knowledge to make properly informed decisions. So I am not surprised in IanC's example that the Windows guys who were trying to use new tools/languages to be intellectually challenged failed badly at system design.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby juanplacco » Sat Apr 10, 2010 4:52 am

Wow... we get so far... but I'm very enthusiastic reading this comments.. I have almost nothing to add, many important things were said, and I agree. I can tell you that in my experience hiring people (I think I've interviewed about more than 20 people per year in the last 4 years ago) I learn one thing. You need to look for "experience" (=more expensive). I don't know if ee programs better than IT people... I work with both where some are good the others are bad (and experience becames absolutely necessary for both).

AH. One more thing for experienced programmers. There is one mortal enemy of a great design:

PARADIGMS - PRECONCEPTIONS

So... Juniors don't know but they are like sponge. Seniors (think!) they know but (we) are like rocks!!

For this is that I arrive at my house at 8:30 pm every day...

Regards,
JM
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

Re: Embedded world...

Postby zeeshan » Fri Dec 14, 2012 11:55 am

Treffpunkt der internationalen Embedded-Community von 26. - 28.02.2013 in Nürnberg. Herzlich willkommen im Messezentrum!
zeeshan
New Member
 
Posts: 1
Joined: Mon Nov 19, 2012 6:07 am

Previous

Return to Cafe

Who is online

Users browsing this forum: No registered users and 3 guests