Most Popular

1500 questions
59
votes
6 answers

Why aren't there code overviews for open-source projects?

There are very complex open source projects out there, and to some of them I think I could make some contributions, and I wish I could, but the barrier to entry is too high for a single reason: for changing one line of code at a big project you have…
59
votes
14 answers

When is type testing OK?

Assuming a language with some inherent type safety (e.g., not JavaScript): Given a method that accepts a SuperType, we know that in most cases wherein we might be tempted to perform type testing to pick an action: public void DoSomethingTo(SuperType…
svidgen
  • 13,414
  • 2
  • 34
  • 60
59
votes
3 answers

Why does C# allow properties in interfaces?

In C#, the following code is valid interface I{ int property{get;set;} } Which doesn't make any sense to me. This seems to break one of the most important principles of interfaces: lack of state (in other words, no fields). Doesn't the…
59
votes
22 answers

What happens if you're unable to solve a problem?

I'm a year away from graduating from university, and I'm really looking forward to solving practical problems. Especially non-trivial ones which require a bit of research and a lot of thinking. But at the same time, that is also my greatest fear -…
gablin
  • 17,377
  • 22
  • 89
  • 138
59
votes
5 answers

How can you estimate time for tasks which primarily consist of figuring out a problem?

While it is relatively possible for an experienced developer to estimate how long it will take to implement code when the pattern and problem the code is solving is well understood, how can you make a good estimate when, while the end goal is well…
AJ Henderson
  • 701
  • 5
  • 10
59
votes
5 answers

Using public final rather than private getters

I see most immutable POJOs written like this: public class MyObject { private final String foo; private final int bar; public MyObject(String foo, int bar) { this.foo = foo; this.bar = bar; } public String…
Cory Kendall
  • 692
  • 1
  • 5
  • 10
59
votes
9 answers

Should the methods of a class call its own getters and setters?

Where I work I see lots of classes that do things like this: public class ClassThatCallsItsOwnGettersAndSetters { private String field; public String getField() { return field; } public void setField(String field) { …
Daniel Kaplan
  • 6,776
  • 5
  • 32
  • 46
59
votes
6 answers

Is there a purpose for using pull requests on my own repo if I am the only developer?

So I got started with a real project of mine on GitHub and things are going pretty well and ideas are flowing a lot faster than I initially thought. In order to keep things organized, I setup some branches so I can develop different features…
marco-fiset
  • 8,721
  • 9
  • 35
  • 46
59
votes
8 answers

How do I prove or disprove "God objects" are wrong?

Problem Summary: Long story short, I inherited a code base and a development team I am not allowed to replace and the use of God Objects is a big issue. Going forward, I want to have us re-factor things but I am getting push-back from the teams who…
honestduane
  • 715
  • 1
  • 6
  • 5
59
votes
4 answers

Does having a higher paid technical job mean you do not get to code any more?

I work at a large company where technical people fall roughly in one of these categories: A developer on a scrum team who develops for a single product and maybe works with other teams that are closely related to the product. An architect who is…
c_maker
  • 8,250
  • 4
  • 35
  • 53
59
votes
7 answers

How important is it for a programmer to know how to implement a QuickSort/MergeSort algorithm from memory?

I was reviewing my notes and stumbled across the implementation of different sorting algorithms. As I attempted to make sense of the implementation of QuickSort and MergeSort, it occurred to me that although I do programming for a living and…
John Smith
  • 989
  • 1
  • 8
  • 12
59
votes
17 answers

Single statement if block - braces or no?

Which is better/more generally accepted? This: if(condition) { statement; } Or: if(condition) statement; I tend to prefer the first one, because I think it makes it easier to tell what actually belongs in the if block, it saves others from…
Zann Anderson
  • 433
  • 2
  • 8
  • 13
59
votes
8 answers

Story points for bug fixing tasks: Is it suitable for Scrum?

I'm just wondering if we should assign story points to bug fixing tasks or not. JIRA, our issues-tracking software, does not have story point field for Bug type issues (it's only for Storys and Epics). Should we add the Bug issue type to the…
palacsint
  • 952
  • 2
  • 10
  • 16
59
votes
16 answers

why do some job posts say "high pressure environment"?

Why would there be any pressure if everyone knows what they are doing and the projects are accurately estimated? If there's pressure, or even high pressure, then it implies what they are currently doing is not working, why would any good programmer…
Andy
  • 599
  • 1
  • 6
  • 15
59
votes
11 answers

What characteristics or features make code maintainable?

I used to think I knew what this was, until I really started thinking about it... "maintainable"... what exactly makes code maintainable? To me, if code must be maintainable that means we can expect to revisit the code to make some sort of change to…
void.pointer
  • 4,983
  • 8
  • 30
  • 40