Is there a code analyzing tool for finding large methods? [closed] - refactoring

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm refactoring old code and I want to find all functions that bigger than N lines to refactor it. It would be cool if there was the same tool for finding big classes.
The project has a lot of files so it is not so easy to find large methods manually.
I couldn't find this tool on the Internet, so, maybe you guys know a tool that can help me?
Thanks in advance!

You can find IDE plugins and external tools which will compute cyclomatic complexities of each of your methods to achieve your needs. You can find some tools in this subject

In the PVS-Studio analyzer there is the V553 diagnostic that reports that the size of the function or class exceeds 2000 lines. However, it's not the best idea to rely on the function size. It is because in addition to the length one should also take the function complexity into account. In this case, search for functions with large Cyclomatic complexity may help. For this, there is another V2008 diagnostic in PVS-Studio (note that it's disabled by default).

The tool NDepend can help finding large and complex classes and methods. There are several default rules for that:
Avoid types too big
Avoid methods too big, too complex
Avoid making large methods even larger
Avoid making complex methods even more complex

Related

How do I get better at finding algorithms for problems? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
In programming, a lot of problems require you to find an efficient algorithm. So, if I want to be able to craft good algorithms that satisfy such criteria, what could I do? Is there any resources that help in training your algorithm development skills?
Help appreciated thanks!
Edit: I know that this question received hate, probably because it is not very agreeable to StackOverflow policies. Nevertheless, thanks Dylan Wright for taking the time to answer!
So most people are probably going to rip you apart for asking this question. No worries, just ignore. Algorithm go hand in hand with data structures in large amounts of data and/or some repetitive task. The key to the algorithm has a lot of different possibilities so there is no real straight forward answers. It mostly goes with what is the solution to what you are trying to improve. An algorithm is something as simple as parsing through an array of street addresses for your address application. To understand algorithms is really knowing what are common algorithms and how they work. Then you can educate yourself and maybe create one of your own. You should do some research on this.
To start look on blog sites like Medium.com
https://medium.com/#_marcos_otero/the-real-10-algorithms-that-dominate-our-world-e95fa9f16c04
Or just Google
http://www.geeksforgeeks.org/top-algorithms-and-data-structures-for-competitive-programming/

Algorithm for grouping similar words (or short phrases) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for an algorithm which would help me classify/group similar words (e.g., "Amazon.com" is similar to "Amazon" or "Amz" or "Amzon"). Levenshtein is a commonly suggested algorithm to use, but there are others like Jaro Winkler and such (for example, this is the Python library with a few word similarity metrics)
I'm wondering if those, who have done similar word aggregation/grouping, might have more effective suggestions. Thank you!
I have done something like this. I used Levenshtein with a lot of heuristics.
You should really look at the data and try to figure out what works best for you. Jaro Winkler works well for names. If you try to use it for md5 ids you're going to have a bad time.
If your strings are naturally very close to each other both approaches might not have insufficient granularity to help you, or you might need some more information from external sources.
In conclusion, try to setup some sandbox environment and try running different algorithms through the data and see which one works better. You can also look at the mistakes each algorithm makes and see if a) you can live with it or b) you can fix it easily.

What are the current problems yet to be solved in Genetic Algorithms?" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 9 months ago.
Improve this question
Currently I was studying the genetic algorithm and I got it very interesting area to work in but as per my new field I am not getting any idea about the topic. So I want to know that "What are the current problems yet to be solved in Genetic Algorithms?".
Thanks!
PS: I read the concepts and still working to improve knowledge in it still ideas and problems are most welcomed.
If I understand your question correctly, I personally think you should rephrase your question to "What are the current problems yet to be solved in Genetic Algorithms?".
In regards to your answer, I'm also studying Genetic Algorithms (GA) and I can't say I'm an an expert, however there some of the things that plagues GAs:
finding the absolute optimal when searching through an in-complete search space. If you need to guarantee absolute best, it is best to user other methods.
Then there is the encoding problem, there are many problems where you can't really encode your problem into a GA.
Defining a sound evaluation function, how you define the best.
Converging in a dynamic environment, GA assumes the environment or search landscape is static
Perform poorly with Boolean evaluation functions (Yes/No, On/Off functions)
For more information of what problems are hard for GAs is this paper, "What Makes a Problem Hard for a Genetic Algorithm? Some Anomalous Results and Their Explanation"
As for applications of GA, the list is huge, see here
1.study The problem
2.analysis the problem
3.make possible steps to draw flow chart
4.draw flowchart
5.end

Building and animating fractals [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can anyone recommend any software/books required to learn and build fractal patterns? I want to also be able to animate the fractal patterns too. Like something off of winamp.
For book on animated fractal Fractals: An Animated Discussion with Edward Lorenz and Benoît Mandelbrot could be what you want.
You might like: The Computational Beauty of Nature
http://mitpress.mit.edu/books/flaoh/cbnhtml/
I am working on a project in java for creating fractals (flame fractals).
The user provides a script file in javascript, that takes care of the interpolation between fractals. Also, as input, one can provide a file that affects an animation in some way,
so this is the way to make an animation change to some music,
see for example
http://www.youtube.com/watch?v=imDPqR9cDL8
I can send you the source code if you provide me with an address.
There's lots of fractal programs out there.
I know that Ultrafractal is pretty popular, but not free.
As far as free ones go, there are programs such a ChaosPro and others. A quick google search will find them for you.

Relationships between complexity theory and software engineering? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm interested to know if there is any literature out there on the relationship of complexity theory (emergence, complex systems, evolution) and software development processes. I read somewhere that SCRUM philosophy came out of the theory of punctuated equilibrium in evolution theory. Are there any additional studies/researches on this subject?
Thanks!
There's a slightly tongue-in-cheek book called Systemantics. Because a software program is a type of system, its observations are applicable to software: for example,
The bigger the system, the narrower and more specialized the interface with individuals.
A complex system cannot be "made" to work. It either works or it doesn't.
A simple system, designed from scratch, sometimes works.
Some complex systems actually work.
A complex system that works is invariably found to have evolved from a simple system that works.
A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over, beginning with a working simple system.
There interesting blog posts by Jurgen Appelo of NOOP.NL fame, which are related to application of complexity theory to software engineering and project management:
Your Project Will Suffer From Power Laws
What (Else) Can Agile Learn from Complexity?
These can be helpful in researching this topic.

Resources