Are there any code DRYer tools out there? [closed] - coding-style

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a large code base and there is lots of repeated, or nearly repeated code all over the place, it's about as unDRY as code can get, but tracking the "duplicates" is hard, so I was wondering if there are any tools for finding potential DRYable code, something like a diff tool or a Hamming distance analizer, don't need language specific knowledge or anything like that.
So any clues as too a tool like this?

Clone Detective for Visual Studio

If you're working in ruby, then you can try this.

Duplo (open source) works in C, C++, Java, C# and
VB.Net. I tried it once, and it found enough duplicated code to keep me employed for a long time.
I've heard of Simian (commercial) but have not tried it.

I use Simian in VS. It's pretty good, not great.

Clone Dr from Semantic Designs is a commercial product that finds duplicate code in a large number of different programming languages. http://www.semdesigns.com/Products/Clone/index.html
Large companies can afford this product. Individuals ... not so much. I wish there were some open source projects out there like this. Might be a fun project to work on. If we only knew of a community of programmers with some time on their hands ...

Semantic Designs' CloneDR find exact and near-miss duplicate clones based on the langauge structure, so it isn't fooled by whitespace changes or line breaks, inserted/changed comments, or even modified variable names.
It leverages production parser front ends to work with C, C++, C#, Java, COBOL, PHP, Python, Fortran, Ada, ...
There are a number of example Clone analysis reports at the web site for various languages.

Related

books / ways to learn data structures and algorithms? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm a self taught Ruby on Rails engineer, and I'm looking to improve my CS understanding. However, most books about data structures and algorithms are written in Java/C/C++/etc, which I don't know. Is there text on these topics using Ruby? Or do you feel Java is similar enough to Ruby that I could survive through a book?
Is there any recommended text for someone coming from my background?
P.S. Recently I've been looking at Objective C, so I'm not completely blind to statically typed languages.
There's a bunch of books on algorithms that are not tied to specific language. Check
http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/0073523402
http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844
I also recommend fundamental, still non-finished classics
http://www.amazon.com/Computer-Programming-Volumes-1-4A-Boxed/dp/0321751043
If you are jumping into Obj-C it might actually be very worth your time to learn C first. Objective C is very closely related to C minus the odd syntax of Obj-C. In that case you may want to consider K and R which is considered the bible of C to learn that first which will get you started with it to teach you the basics of C and data structures you can later expand on. Also, in case you are learning Objective C to program iOS you may want to be on the cutting edge and learn Swift since Apple is moving to Swift for the future. It is much easier actually and closer to Ruby!
Good luck.

in the middle of finishing rubymonk, what next? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm posting this somewhat in frustration after going through Rubymonk. I've finished Codeacademy and am mid-way through Rubymonk. I feel like I am getting bits and pieces about Ruby but do not feel like I'm getting anywhere near feeling comfortable in building a Ruby program from scratch.
My question is, are there places on the web where I can read source codes for small projects as they progress from easy to hard? or exercises to use some of my knowledge in a progressively more difficult manner? I certainly feel like I should begin by building smaller programs, but still want somewhat of a guidance. Should I just try to build whatever I want to build?
Thank you,
There are lots of great resources for doing this. It sounds like you have some basic programming skills down, but it might not hurt to start with:
the online edition of Chris Pine's "Learn to Program."
Learn Ruby The Hard Way also gets good reviews, and is probably the closest to the spirit of what you're asking.
Code Quizzes has a Ruby track.
Ruby Quiz has a great back log of more complicated puzzle questions.
Project Euler is also a good puzzle problem resource, although it's not specifically for programming. The problems are very solvable with code, though, so it's a great source of inspiration.
Some code schools also have their curriculum online. Epicodus and Portland Code School are the ones I'm familiar with.
Hope that helps!

Open source libraries to design directed graphs [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm going to need to write a program that takes a list of persons and connects them together in a directed-graph-like manner. The GUI aspect of the whole project is very important. The graph must allow a lot of interaction. Such as selecting several people and hiding the others, moving them around.
Additionally, the software will need to be able to provide other kind of GUI-features such as several tabs, text boxes etc.
The application must be quite efficient. As in, it must be able to handle hundreds if not thousands of widgets.
Hence, I would like to know which open source libraries (at this point the programming language they are written in does not matter - I just want an overview of everything good that is out there) would allow me to develop such piece of software? What would you recommend?
Edit: Could you please also link to tutorials explaining how I could program a GUI that can interact with the generated graph? For example mouse events.
How about JGraphT in combination with JGraph.
Check here for a simple demo with basic interaction
Take a look at Graphviz, especially its lefty component. It should satisfy your needs.
http://en.wikipedia.org/wiki/Graphviz
Depending on your actual goal and needs, you might consider taking a look at processing.org. The site has many demos and like many other libraries, it is free. Using Processing does not require you to learn much. It is similar to Java and written in Java, but allows you to ignore much of the Java structure and code and just do what you want.
Since you mentioned that you would want to use x or y to code in, it sounds like you have not made a language decision, so this might be worth your time. Spend 15 minutes there and look at the demos to see if it provides what you are looking for. If speed to a single solution is one of your criteria, this might do it.
You might want to have a look to Dynagraph.
EDIT: An article presenting Graphviz and Dynagraph is available here.
My first thought was ILOG Views (for Java, .Net, C++), now owned by IBM, but their pricing is rather steep. My second thought would be yFiles (for Java or .NET), perhaps in conjunction with yEd (Java only).
If that still doesn't cut it, have a look at the alternatives on this list (rather unsorted, some tools are not open source, others won't suit you for other reasons).

making graphs with xCode [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Hi I need to graph some arrays to analyse signals, I have a cocoa project going. Can anyone tell me where I can find tools to simplify this task?
Basically i want to display my arrays like on a graphing calculator.
Even though it's a young library, I'd suggest looking at the open source Core Plot framework. It works on Mac and iPhone and can currently plot line and bar charts. As I said, it's young and a lot of the core functionality is still being written, but it might work right now for your case.
Take a look at this post to the Apple mailing lists. http://lists.apple.com/archives/scitech/2007/Jun/msg00022.html
It mentions 3 potential graphing packages that you can try. I have not had personal experience with them, so buyer beware, but it will at least give you a start on where to look.
XCode allows you to create data formatters to present object data in the debugger, but it doesn't provide any way to graphically represent the data using charts or graphs. (At least, not that I know of!) I think that's beyond the scope of XCode. You might consider dumping the data from your array to a file using a bit of code or the console, and then loading it into Excel or MATLAB. Then you can create a graph of your signal with no problem.
Just out of curiosity, are you familiar with another IDE that provides graphs of array data? I know tools like MATLAB and Mathematica do it pretty nicely, but I've never seen it in an IDE.

What is a good Graph Editor for MacOS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need some sort of node-graph editor, that hopefully works on both Mac and other platforms, to generate user created node collections with properties. The graph data will then be used in a data-driven application I'm working on, so kudos if the application can save the graphs in some easy to process format. So far I was using XML with a tree editor, but since the graphs can be cyclic according to the requirements, the tree editor no longer cuts it.
Plugins for other applications would also be ok!
GraphViz' graph drawing software is pretty much the best there is, cross-platform, with a very simple file format and lots of output formats. It is especially good in automatically calculating a layout for graphs. A GUI for OS X is available.
Have a look at Yed (http://www.yworks.com/en/products_yed_about.html), free to use but places a logo on all output.
It comes with Mac OS binaries .. and you might be able to include ($$ required) the graphing engine it is based on into your project.
I've used it (with limited success) to document enterprise data-flows..
You might want to do something with JHotdraw (at sourceforge). It is one of the design patterns demo projects converted from Smalltalk. It is (or was before it was put on sf) very well documented and easy to extend. A similar (but less well-documented) framework is GEF in Eclipse.
You can take a look at OmniGraffle: http://www.omnigroup.com/omnigraffle

Resources