The complexity tag has no wiki summary.
-1
votes
0answers
69 views
Time complexity (in big-O notation) of the following recursive code? [closed]
public static int abc(int n) {
if (n <= 2) return n;
int sum = 0;
for (int j=1; j<n; j *= 2)
sum += j;
for (int k=n; k>1; k /= 2)
sum += k;
return abc(n ...
2
votes
10answers
1k views
Is it possible to reach absolute zero bug state for large scale software? [closed]
I am talking about 20-30+ millions lines of code, software at the scale and complexity of Autodesk Maya for example.
If you freeze the development as long as it needs to be, can you actually fix all ...
2
votes
3answers
419 views
Limit useless complexity in code [duplicate]
I have a question, to explain that, what better than an entirely fictional example?
Let's say you are a young developer just being employed in a firm.
All data is stored in a huge database (let's ...
-3
votes
0answers
51 views
Function that returns the first string of input
I'm writing a function that retrieves input until the first whitespace or newline character and returns a character array of that string. However, at the time that the function returns, it should only ...
-1
votes
0answers
66 views
Big-O textbook / course to study it myself [closed]
I studied IT in university but unfortunately I never had a decent course on big-O notation, computational complexity calculations and such.
What I'm asking here is a good book7resource which ...
-2
votes
1answer
91 views
Algorithm Correctness and Complexity Analysis [closed]
If given an algorithm to traverse a graph (say with a breadth first traversal algorithm). And say you code it in the same manner described in this video tutorial shows (starting at 04:30 for breadth ...
0
votes
1answer
146 views
What can Go chan do that a list cannot?
I want to know in which situation Go chan makes code much simpler than using list or queue or array that is usually available in all languages.
As it was stated by Rob Pike in one of his speeches ...
-5
votes
2answers
68 views
Client-side technology stack optimized for durability [closed]
So what's a developer to do when he wants to start a complex long-term project (say 30 years) which is mostly client-side GUI with some logic thrown in and doesn't want to rewrite it every year or ...
4
votes
2answers
377 views
Is currying too complex a tool to actually use?
Today I feel like I finally grokked currying (in Javascript), and of course, like any programmer who has learned a new trick, my mind immediately began racing over how to improve my current codebase ...
7
votes
1answer
483 views
Problems Calculating Big-O Complexity
I'm a complete beginner to Java, only in my second quarter of classes. I'm having trouble understanding our current chapter about calculating big-O for methods. So I thought I was right in saying that ...
3
votes
3answers
261 views
Is unconditional code considered a branch?
Having simple code like this:
int A=5;
object X=Console.ReadLine()
if(Condition)
DoSomething();
else
DoStuff();
DoSomethingElse();
Some sources say there are actually 4 branches: First ...
6
votes
4answers
308 views
Good idea to move logic out of SQL statements?
I'll preface this question by saying that I am very new to professional software dev.
I work on a team that takes data in from other groups in my company and turns this data into reports usable by ...
9
votes
2answers
292 views
Dealing with Feature Intersections
I have recently witnessed more and more problems similar to the ones explained in this article on feature intersections. Another term for it would be product lines, though I tend to attribute these to ...
11
votes
6answers
416 views
Guidance in naming awkward domain-specific objects?
I'm modeling a chemical system, and I'm having problems with naming my elements / items within an enum.
I'm not sure if I should use:
the atomic formula
the chemical name
an abbreviated chemical ...
3
votes
2answers
271 views
Too complex/too many objects?
I know that this will be a difficult question to answer without context, but hopefully there are at least some good guidelines to share on this. The questions are at the bottom if you want to skip the ...