Click here to Skip to main content
15,890,438 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: PSOTWIFLI Pin
Marc Clifton13-Oct-17 5:13
mvaMarc Clifton13-Oct-17 5:13 
GeneralRe: PSOTWIFLI Pin
Tim Carmichael13-Oct-17 6:07
Tim Carmichael13-Oct-17 6:07 
AnswerRe: PSOTWIFLI Pin
Mladen Janković13-Oct-17 6:04
Mladen Janković13-Oct-17 6:04 
AnswerRe: PSOTWIFLI Pin
Jeremy Falcon13-Oct-17 6:24
professionalJeremy Falcon13-Oct-17 6:24 
GeneralRe: PSOTWIFLI Pin
dandy7213-Oct-17 8:17
dandy7213-Oct-17 8:17 
AnswerRe: PSOTWIFLI Pin
dandy7213-Oct-17 8:11
dandy7213-Oct-17 8:11 
AnswerRe: PSOTWIFLI Pin
Eddy Vluggen13-Oct-17 9:51
professionalEddy Vluggen13-Oct-17 9:51 
AnswerRe: PSOTWIFLI Pin
H.Brydon13-Oct-17 11:11
professionalH.Brydon13-Oct-17 11:11 
I prefer the second. Because:
- When reviewing code (someone else, or you 6 months later), the idea of what is happening can be seen better from a distance. It is clear what is happening on that one line versus having to parse 8 lines to understand what is happening (we're talking human parsing here). The "verb" is on the left, the "nouns" on the right (well okay, there are 2 things going on here. You are building a thing then using it). [I try to do only one thing per line ... not two or more actions per line and not two or more lines per action... see below.]
- There is less code, which is simpler (duh), statistically more reliable and easier to maintain. I like to write (and read) code two dimensionally so that it fills more across the page and is more natural to read by humans. Compare:

(1) This is easy to read.
(2) This
is
harder
to
read

Bugs in code tend to occur at a relatively fixed number per thousand lines of code... one of the reasons I always try to use the highest level language possible, and don't violate this previous point.

How I would do it
auto pea = new ProcessEventArgs(fromMembrane, fromReceptor, membrane, target, obj);
Processing.Fire(this, pea);
Yeah, you're creating another variable, but the compiler knows what to do with it, and the code offers something that the debugger can help you with. This code is more debuggable.
I'm retired. There's a nap for that...
- Harvey

GeneralRe: PSOTWIFLI Pin
PIEBALDconsult13-Oct-17 18:12
mvePIEBALDconsult13-Oct-17 18:12 
AnswerRe: PSOTWIFLI Pin
BillWoodruff14-Oct-17 20:13
professionalBillWoodruff14-Oct-17 20:13 
AnswerRe: PSOTWIFLI Pin
Tom Chantler15-Oct-17 22:27
professionalTom Chantler15-Oct-17 22:27 
AnswerRe: PSOTWIFLI Pin
Gary Wheeler16-Oct-17 2:03
Gary Wheeler16-Oct-17 2:03 
AnswerRe: PSOTWIFLI Pin
Kirk 1038982116-Oct-17 2:56
Kirk 1038982116-Oct-17 2:56 
AnswerRe: PSOTWIFLI Pin
SeattleC++16-Oct-17 5:36
SeattleC++16-Oct-17 5:36 
AnswerRe: PSOTWIFLI Pin
patbob16-Oct-17 6:16
patbob16-Oct-17 6:16 
AnswerRe: PSOTWIFLI Pin
Arkitec17-Oct-17 11:16
professionalArkitec17-Oct-17 11:16 
GeneralAdvert of the day Pin
OriginalGriff13-Oct-17 2:30
mveOriginalGriff13-Oct-17 2:30 
GeneralRe: Advert of the day Pin
lopatir13-Oct-17 2:40
lopatir13-Oct-17 2:40 
GeneralRe: Advert of the day Pin
den2k8813-Oct-17 2:43
professionalden2k8813-Oct-17 2:43 
GeneralRe: Advert of the day Pin
RickZeeland13-Oct-17 3:00
mveRickZeeland13-Oct-17 3:00 
GeneralRe: Advert of the day Pin
F-ES Sitecore13-Oct-17 3:02
professionalF-ES Sitecore13-Oct-17 3:02 
GeneralRe: Advert of the day Pin
Johnny J.13-Oct-17 4:17
professionalJohnny J.13-Oct-17 4:17 
GeneralRe: Advert of the day Pin
Tim Carmichael13-Oct-17 4:40
Tim Carmichael13-Oct-17 4:40 
GeneralRe: Advert of the day Pin
W Balboos, GHB13-Oct-17 3:02
W Balboos, GHB13-Oct-17 3:02 
GeneralRe: Advert of the day Pin
lopatir13-Oct-17 3:16
lopatir13-Oct-17 3:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.