Reputation
Next privilege 125 Rep.
Vote down
Badges
6
Newest
 Teacher
Impact
0 people reached

Jun
17
comment Best practice boolean assignment
+1 for infantile code. I've been looking at such code for years, I just lacked the right word to identify it.
May
31
comment Is the use of one-letter variables encouraged?
@BlueRaja-DannyPflughoeft Not in all programs no, but I don't see anything wrong with Jorg's suggestions. As Killian put it: "Anything longer cannot possibly make the semantics any more obvious, but takes much longer to read." But this is probably largely a matter of personal preference and style.
May
29
comment Is the use of one-letter variables encouraged?
@BlueRaja-DannyPflughoeft I prefer to think of it as efficient programming. Jorg could probably expand on when single letters are appropriate, not just where, but to be honest I imagine most programmers draw the line differently. As for the loop indices, I could argue that any code where the indices don't need names with semantic value is simple enough to justify multi-level nesting over unnecessary extraction. They could also be used in separate loops to avoid possible scoping issues that Nelson brings up‌​.
May
20
awarded  Teacher
May
12
revised What do you call an iterator that returns the current, previous and next siblings of each node of a list?
clarified title: OP wants to know what to name the iterator, not how to call one in code
May
12
suggested approved edit on What do you call an iterator that returns the current, previous and next siblings of each node of a list?
Apr
13
comment Why do many exception messages not contain useful details?
@Telastyn SAP's proprietary ABAP has an exception class construct can contain a message, which is basically an object specifically meant to report program state (success, failure, warning) to the user along with a dynamic (multi-lingual) message. I'll admit I don't know how widespread this kind of thing is, or if it's even encouraged in the languages were it's possible but there's at least one where it's (regrettably) common practice.
Apr
13
comment Why do many exception messages not contain useful details?
I'm aware this has been tagged as C but I should add that your last paragraph does not apply to all languages as some can (rightly or wrongly) rely heavily on exception-based error handling and reporting.
Apr
7
comment Client wants source code, but it contains a lot of shared code I reuse with other projects
All the answers below seem to belong on The Workplace rather than Programmers. OP is asking about how to deal with proprietary shared/utility code when handing over client-specific source code, specifically how to hand over the custom code without exposing the source of the shared code. Whether he should hand any source code over or how that should be legally/financially handled is worth considering but doesn't answer the question.
Mar
20
awarded  Editor
Mar
20
awarded  Organizer
Mar
20
revised When is it a good idea to force garbage collection?
copyediting, added language tag
Mar
20
suggested approved edit on When is it a good idea to force garbage collection?
Mar
1
awarded  Commentator
Mar
1
comment Bad sign if nobody can comprehend one's code?
+1 for the comment block. If you need to write esoteric code for whatever reason go for it, but don't bring hideous-looking code into the codebase without explanation.
Feb
24
comment How do you respond to: “Ever since the update…” questions from clients?
This is a great answer to "What should I look at to prevent a release from breaking the UX?" but I'm not sure why @PeterTurner accepted since this doesn't answer the actual question.
Feb
22
comment How to respond to a rude bug report?
I feel like I've already used this phrase on stackexchange to the point of triteness but it is once again relevant and good advice: "Would you rather be right, or happy?"
Feb
16
comment How to automatically connect letters into words?
Your actual question is "what can I use to restore mangled text" which as @Ixrec mentions is off-topic. Even with the right tool you'd be stuck manually checking every parsed sentence for validity. Your actual problem is an issue with pdftotext which is also off-topic. It probably belongs on StackOverflow.
Feb
9
comment How much detail to put into first iteration of project?
Note to potential answerers: the OP is specifically asking how to balance code quality against development speed in the (presumably) early iteration cycles of a project. The question is not if the final product should be high-quality (robus error handling etc.) but when the prototype should start including or converting to high-quality code.
Jan
30
comment How does one keep argument counts low and still keep third party dependencies separate?
@JamesAnderson I just reproduced the full quote because I found it interesting but it wasn't clear to me from the snippet whether it referred to functions in general or constructors specifically. I didn't mean to endorse the claim and, as jpmc26 said, my next comment should give you some indication that I wasn't doing so. I'm not sure why you feel the need to attack academics but using polysyllables doesn't make someone an academic elitist perched on his ivory tower above the clouds.