Tagged Questions
6
votes
3answers
131 views
Why would each widget need a reference to its parent in a simple widget system?
I'm working on a simple widget system (single window, fixed size). Each widget gets its parent (i.e. the widget containing it) passed into its constructor - except for the root widget, which I called ...
24
votes
9answers
2k views
Simple vs Complex (but performance efficient) solution - which one to choose and when?
I have been programming for a couple of years and have often found myself at a dilemma.
There are two solutions -
one is simple one i.e. simple approach, easier to understand and maintain. It ...
50
votes
12answers
3k views
Getting out of my head
I've spent the last year as a one-man team developing a rich-client application (35,000+ LoC, for what it's worth). It's currently stable and in production. However, I know that my skills were rusty ...
17
votes
5answers
987 views
Is it OK for a function to modify a parameter
We have a data layer that wraps Linq To SQL. In this datalayer we have this method (simplified)
int InsertReport(Report report)
{
db.Reports.InsertOnSubmit(report);
db.SubmitChanges();
...
4
votes
3answers
573 views
Is it a bad practice to use inline styling with generated code?
If I'm using a technology like Grails. It's really easy to wind up with inline styling.
Are there any downsides to auto-generating code with inline styling? Is this considered bad practice? Why?
10
votes
7answers
485 views
How do I go from being able to write code to being a good developer?
I'm frustrated by the lack of concrete explanations on how to go from being able to script (bash, awk) and write simple applications (c, php, python) to designing and developing larger, more ...
42
votes
12answers
3k views
Are there problems with using Reflection?
I don't know why, but I always feel like I am "cheating" when I use reflection - maybe it is because of the performance hit I know I am taking.
Part of me says, if it is part of the language you are ...
27
votes
12answers
1k views
Develop fast and buggy, then correct errors or be slow, careful for each line of code? [duplicate]
Possible Duplicates:
Frankly, do you prefer Cowboy coding?
Prototyping vs. Clean Code at the early stages
Good design: How much hackyness is acceptable?
Does craftsmanship pay off?
...
69
votes
10answers
4k views
Why should main() be short?
I've been programming for over 9 years, and according to the advice of my first programming teacher, I always keep my main() function extremely short.
At first I had no idea why. I just obeyed ...
6
votes
3answers
442 views
Why it is not recommended to have set-only property?
Today at work one of my colleague reviewed my code,
and suggested me to remove set-only property and use method insted.
As we both were busy with other stuffs, he told me to look at Property Design ...