What should every developer know about databases? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Why not use exceptions as regular flow of control?

To avoid all standard-answers I could have Googled on, I will provide an example you all can attack at will. C# and Java (and too many others) have with plenty of types some of ‘overflow’ behaviour I don’t like at all (e.g type.MaxValue + type.SmallestValue == type.MinValue for example : int.MaxValue + 1 == int.MinValue). … Read more

Are there any legitimate use-cases for “goto” in a language that supports loops and functions?

I’ve long been under the impression that goto should never be used if possible. However, while perusing libavcodec (which is written in C) the other day, I was surprised to notice multiple uses of it. Is it ever advantageous to use goto in a language that supports loops and functions? If so, why? Please provide … Read more

Can every recursion be converted into iteration?

A reddit thread brought up an apparently interesting question: Tail recursive functions can trivially be converted into iterative functions. Other ones, can be transformed by using an explicit stack. Can every recursion be transformed into iteration? The (counter?)example in the post is the pair: (define (num-ways x y) (case ((= x 0) 1) ((= y … Read more

Design Patterns: Factory vs Factory method vs Abstract Factory

I was reading design patterns from a website There I read about Factory, Factory method and Abstract factory but they are so confusing, am not clear on the definition. According to definitions Factory – Creates objects without exposing the instantiation logic to the client and Refers to the newly created object through a common interface. … Read more

How many parameters are too many? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Closed 6 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Routines can have parameters, that’s no news. You can define as many parameters as … Read more