Search Results
| Search type | Search syntax |
|---|---|
| Tags | [tag] |
| Exact | "words here" |
| Author | user:1234 user:me (yours) |
| Score | score:3 (3+) score:0 (none) |
| Answers | answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
| Views | views:250 |
| Code | code:"if (foo != bar)" |
| Sections | title:apples body:"apples oranges" |
| URL | url:"*.example.com" |
| Saves | in:saves |
| Status | closed:yes duplicate:no migrated:no wiki:no |
| Types | is:question is:answer |
| Exclude | -[tag] -apples |
| For more details on advanced search visit our help page | |
Results tagged with programming-practices
Search options not deleted user 41811
Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.
1 vote
Does context (like as an argument in a function) allow for numbers in code that aren't magic...
The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA …
4 votes
Accepted
In the spirit of consistency, is it acceptable to comment everything equally?
At my first real job I was hired by a couple of OCDers who wanted me to always write code like this: /* comment describing what the next few lines do */ a line of code a line of code a line of code …
10 votes
How to make code writing more accurate?
Fixing syntax errors represents only a tiny fraction of the total amount of time that we programmers spend while doing our job. I mean, it is so tiny that it gets lost in the noise. The compiler point …
52 votes
Is throwing new RuntimeExceptions in unreachable code a bad style?
This rethrow(e); function violates the principle which says that under normal circumstances, a function will return, while under exceptional circumstances, a function will throw an exception. This fu …
23 votes
Are there any easy-to-follow/reliable methods for simplifying code?
My one surefire way is: Not being afraid to refactor the plan at the first hint that the code is turning complex. (Which, of course, does not negate at all what you have already mentioned abo …
7 votes
Accepted
Data padding for different hardware support?
Some hardware cannot read non-aligned data. True. For example Bitmap images are aligned to 4-bytes from the header and with each scan line in order to maintain device independence. I h …
5 votes
Accepted
Throwing an exception when a method does not complete or implement a work around?
The modern line of thinking, which is considered as best practice by most publications and in most workplaces out there, is to never return result codes, and instead to always throw an exception if yo …
5 votes
Accepted
How to implement a facade correctly
Regarding singletons None of the classes pictured here should be a singleton. The only class which should be a singleton is the main application class, which instantiates the two major classes that …
2 votes
Extensible way to create bash program
Put each "extension" in a separate bash script. Come up with a special naming convention for them, like "x.*". When your main script starts, have it first of all scan the directory for "x.*" and b …
1 vote
Automatic sorting of class/module members and its possible impact on productivity and code q...
I do not think it would have a positive impact. We tend to group class members according to their purpose and function, and this is something that cannot be communicated by means of any simple criteri …
2 votes
Clarification on Acquire/Release Semantics in multithreaded programming
They are trying to establish a correspondence between the terminology related to interlocked operations and the terminology related to acquiring/releasing a guarded resource, which is not an unreasona …
5 votes
Accepted
In C#, is it good practice to use implicit numeric conversions from int to float?
In the examples you provided there is most probably no difference, since all the necessary conversions will most probably be performed at compile time. The following will incur a slight performance p …
81 votes
Why are the sizes of programs so large?
One reason is that the data packaged within applications are larger because they are of higher resolution and quality. An icon back in the days of Netscape was at most 32x32 pixels, with at most 8 bit …
2 votes
How to handle exceptions that get absorbed by a 3rd party library?
I am very fond of hard error & fail fast, I believe they are the one true and right way to go, but I try not to be dogmatic about them. There are cases where the best thing to do with an unexpected e …
1 vote
What is an initial skeleton of the website called? A Framework?
What Ixrec said. I would like to add that I would call it a site map, because that's what a sitemap basically is. The site map may have a public part, which you might want to include in an actual …