Embedded Systems Conference
Breaking News
Newest First | Oldest First | Threaded View
Page 1 / 2   >   >>
User Rank
Patches in memory
prabhakar_deosthali   5/6/2014 9:04:19 AM
In early eighties , we used manual code by using coding sheets to modify  our programs in binary code using piono key switches on the front panel of the computer. This was because the recompilation was done only once in a while .Any changes of the programs had to be done as patches as the recompilation of the code was not possible every now and then . So we used to keep a record of the patches until the enxt compilation. One of or smart programmers kep all the record of the patches in his brain, never recording it on the paper. This led to many a situations where we used to spend hours in debugging a code until this smart programmer pulling out a patch from his memory and fixing the problem.

User Rank
Bert22306   5/5/2014 3:57:10 PM
Reading the article and the some of the comments, my reaction was, I'm sure glad I don't work in that environment. Took me some time to figure out how to get this across.

Sure, code should be clear in preference to JUST efficient. That's not my problem. My problem is, engineers who feel they are "subordinate" to management, or management that feels it has "ownership" of the work. Both concepts are foreign to me and to where I work.

Where I work, the management of the actual engineering work is done by engineers, typically lead engineers. And "ownership" is definitely with the engineers that did the work. Everyone knows who they are. I wouldn't have it any other way. Surprising that others haven't reacted similarly.

User Rank
Re: Management
jonnydoin   5/3/2014 1:26:21 AM
@Jimmy99Neutron: I agree that expectations should be clear. Actually, the programmer mentioned is a very good Engineer. The case described took place during his integration into the project, and into our Aspect Oriented methodology. It took a little time and effort to convince him that I wanted his brilliant mind on the logic and design, not really on cryptic descriptions. He ended up contributing with many good designs, and also learning a lot with his peers also. Instead of adhering to rigid rules, the person must adopt the style due to the perception of gain. Peer review and code clarity are much more than management concerns. When people realize that they can easily tackle projects with 300k lines of code by practicing a clear style, they embrace it. In a well integrated team, we can write code at ten hands and the code seems to have been written by the same person. That's what peer review does for you: you get all the best contributions to rapidly disseminate through all the programmers. - Jonny

User Rank
Re: cin >> isReaderCoder;
GSKrasle   5/2/2014 7:22:38 PM

It also matters what you get used to. I can type this useful formula in my sleep:


It's probably Bad Style, but I like to think that's because this language never heard of comments or formatting. You can see what it does though?

Seriously, I use stuff like this all the time, but I try not to inflict it on others; I Copy-PasteValues before the data gets to them. 

User Rank
Jimmy99Neutron   5/2/2014 12:33:33 PM
Firstly, as this person was a subordinate, expectations for his work should be clear, a process is to be followed as it benefits the team, the project and its management and the product ( reduced maintenance, robustness, correctness, etc.).  

Knowing this persons history, the guidelines or standards should have been emphasized.  Tolerating deviations incurs risk, re-work, time/schedule implications, quality and money.  As the Leader of the project you "own" the results.  In no way does this condone the Coders preferences and choices.

User Rank
Re: Eschew obfuscation
ghova   5/2/2014 11:17:11 AM
Re "clarity is the prime virtue."  Amen - writing turgid code that's "efficient" costs more than it saves.  From a cost-benefit standpoint the optimal program is no faster than adequately fast (C and assembly programmers reading this are probably reaching for the smelling salts).  If future additions makes it unacceptably slow, then and only then do you make an analysis of hot spots and work on those that produce the greatest bang for the buck until the program is again adequate.

Re the manager who wanted three clever lines replaced with one that would be familiar to other readers: they promoted the right guy to manager.

However, the managers referenced, who insist on rewrites to improve clarity, are thin on the ground, at least in my experience (1959 - present).  The ones I've encountered would not take kindly to the programmers taking the time to (in their view) "beautify" code.  And it wouldn't win them any friends among THEIR managers.

User Rank
He followed a Magazine Article on Management
BrainiacVI   5/1/2014 6:01:42 PM
I had a (terrible) manager once who insisted one of the programmers on my team recode the three move statements he used to make a string and use sprintf instead.

So we went from three small, fast MOV statements (when compiled) to a slow, interpreted function call that would have added K's of code if it wasn't already used elsewhere.

All for the edict of "One line of code is easier to maintain than three."

User Rank
Eschew obfuscation
perl_geek   5/1/2014 5:32:24 PM
There's a place for code like that; the "Obfuscated C" competition, where programmers can get the perversity out of their systems before producing real work.

People acquire all sorts of ideas about what constitutes good code, from all sorts of haphazard sources, but managers should make it clear upfront what constitutes merit. (It took me a while to figure it out, and I ask forgiveness of my victims.)

A program is not just a set of instructions to the compiler, it's an open letter to the next unfortunate who has to maintain it. As long as it does the job in a reasonable time, clarity is the prime virtue. It should be obvious what it's doing, and why.  This can take a surprising amount of work, distilling the essence of the problem's structure and using the most powerful tools available.

One of the unfortunate consequences of CS education is that people feel compelled to recreate compilers and usurp the functions provided by the operating system, presumably to justify the pain of studying them. KISS, dammit!



User Rank
Re: C? No!
betajet   5/1/2014 1:43:25 PM
anon wrote: This man is an APL programmer at heart.

I'd say more likely a LISP programmer at heart.  The LISP conditional expression is COND, which is a superset of C's conditional expression.

If this were APL, there'd be a bunch of outer products and none of us would be able to understand it :-)

User Rank
Re: C? No!
Sheepdoll   5/1/2014 1:42:14 PM
% For a moment I thought perhaps this programmer was a postscript programmer.  We use lots of % as these are comments.

% Normally I code my lashups in postscript. This last week I have been coding in C.  Must remember to put the ifs and elses at the top of the bracketed {} blocks not the bottoms.  << and >> are used to denote dictionary structures.

% Perhaps this is why I prefer AVR ASM for embedded.  It feels really strange to use C on an 8 bit micro with only 2K of SRAM.  printf and fprintf are not the best solution in such a limited environment.

Page 1 / 2   >   >>

Top Comments of the Week
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Max Maxfield

March 28 is Arduino Day -- Break Out the Party Hats!
Max Maxfield
Well, here's a bit of a conundrum. I just received an email from my chum David Ashton who hails from the "Unfinished Continent" Down Under. David's message was short and sweet; all he said ...

Bernard Cole

A Book For All Reasons
Bernard Cole
1 Comment
Robert Oshana's recent book "Software Engineering for Embedded Systems (Newnes/Elsevier)," written and edited with Mark Kraeling, is a 'book for all reasons.' At almost 1,200 pages, it ...

Martin Rowe

Leonard Nimoy, We'll Miss you
Martin Rowe
Like many of you, I was saddened to hear the news of Leonard Nimoy's death. His Star Trek character Mr. Spock was an inspiration to many of us who entered technical fields.

Rich Quinnell

Making the Grade in Industrial Design
Rich Quinnell
As every developer knows, there are the paper specifications for a product design, and then there are the real requirements. The paper specs are dry, bland, and rigidly numeric, making ...

Special Video Section
After a four-year absence, Infineon returns to Mobile World ...
A laptop’s 65-watt adapter can be made 6 times smaller and ...
An industry network should have device and data security at ...
The LTC2975 is a four-channel PMBus Power System Manager ...
In this video, a new high speed CMOS output comparator ...
The LT8640 is a 42V, 5A synchronous step-down regulator ...
The LTC2000 high-speed DAC has low noise and excellent ...
How do you protect the load and ensure output continues to ...
General-purpose DACs have applications in instrumentation, ...
Linear Technology demonstrates its latest measurement ...
Demos from Maxim Integrated at Electronica 2014 show ...
Bosch CEO Stefan Finkbeiner shows off latest combo and ...
STMicroelectronics demoed this simple gesture control ...
Keysight shows you what signals lurk in real-time at 510MHz ...
TE Connectivity's clear-plastic, full-size model car shows ...
Why culture makes Linear Tech a winner.
Recently formed Architects of Modern Power consortium ...
Specially modified Corvette C7 Stingray responds to ex Indy ...
Avago’s ACPL-K30T is the first solid-state driver qualified ...
NXP launches its line of multi-gate, multifunction, ...
EE Times Senior Technical Editor Martin Rowe will interview EMC engineer Kenneth Wyatt.
Flash Poll