Looking for a web based diff component [closed] - diff

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 8 years ago.
Improve this question
In a content management system, moderators have to approve changes to existing articles. Currently the system shows the old and the revised version of the text in plain text. It is a pain to find the actual differences.
In GoogleDocs, there is a 'Compare revisions' feature which highlights the differences between two documents.
If there a free component out there that does the same thing?
If not, would you write such a component in JavaScript or on the server side?
All the usual diff tools are desktop applications.

John Resig wrote one in JavaScript that looks interesting.
Here it is.

Try Pretty Diff tool. It is based upon jsdifflib, but is enhanced to highlight per character differences and rebuilt for speed. It also compares minified code to unminified code. It is entirely written in JavaScript and supports JavaScript, CSS, and XML/XHTML input.
http://prettydiff.com/

jsdifflib looks like an interesting javascript-based client side library. I would lean strongly toward a client-side implementation if it provided the features that you needed. Why tax your servers on presentation logic when you're already handing the client the data anyway?

The Diff, Match and Patch Library is available with an identical API in JavaScript, Java, C#, Python, and other languages. (It seems to have been and may still be the one used in Google Docs.)
There is an online demo of the HTML output of the diff'ing options.
Given the identical API available on both client- and server-side languages, it should be easier to make a switch between them should you decide you want to...

If you're working with PHP, you may find SimpleDIFF to be helpful.

Check out the JavaScript diff library wikEd diff. It is used on Wikipedia in the gadget wikEdDiff for exactly the asked purpose to compare revisions of articles. The free (public domain) library can detect and highlight block moves, works on the word/character level, and spits out a nicely formatted text with insertions, deletions, moved blocks, and their original positions marked up. See the online demo to play with settings.

Related

Interactive Graphviz viewer with basic node/edge filtering [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 3 years ago.
Improve this question
I looked thru Graphviz resources page , and questions 1 and 2 and still couldn't find specific answer. My usecase is browsing dependencies among software components (e.g. installable packages), and one particular trait with it is that some common nodes are targets for many edges. For example, almost every executable package depends on libc.
Based on that trait, I'd like to have viewer/library with following capabilities:
Use Graphviz "dot" layout algorithm (force layout algos which are plenty in different libs don't provide good layout quality for the discussed usecase).
Interactively disable/re-enable some node in a graph (libc example above).
Interactively disable/re-enable all edged from a particular node (for example, libpng depends on libz, but that's obvious, and can be disabled to not clutter view).
Re-root graph at some node (show subgraph with only nodes reachable from that node), and "zoom back" to complete graph.
Ideally, this would be a Javascript library, which would allow more complicated manipulation capabilities easily implemented. What's important that basic viewing behaviors as described above were available out of the box - again, I couldn't find something like that, with many solutions being either static viewers, or "freeform editors" allowing to drag nodes around, but not something with sufficiently high-level and useful behaviors.
Finally, if such solution doesn't exist, suggestions for the best framework to implement those features are welcome.
Gephi, https://gephi.org/, it supports many graph formats, of course, including Graphviz dot. It can filter nodes or edges and has some kind of analysis functions.
I found José Fonseca's xdot.py to be extremely cool Python and Cairo based application for viewing Graphviz files. It so well written and has so nice UI that one may wonder why it is a bit adhoc in its interaction support, not allowing for more extensibility out of the box. I'm currently hacking on it at https://github.com/pfalcon/xdot.py
Update: I committed proof of concept implementation of the features above as filtered-viewer.py . Likely to be renamed later.

How do you collaboratively write specs? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am working with a small team (2 others) of developers that are geographically dispersed, and I'm looking for good ways for us to collaborate on specs... We're thinking we might use Google Docs to write the spec in so we can all have access to modify it in a central location.
What have you done? What good ideas do you have?
If you have an intranet or VPN, I would actually consider installing and using a small Wiki for these specs.
Compared to Google docs you get:
Much better versioning and change tracking (IMHO)
Much easier to start new documents for subsections
An actual markup rather than WYSIWYG (a matter of taste, I prefer LaTeX to Word).
Possible to attach variety of other file types
Very easy to backup
Very easy to create an offline version
You don't have to worry about storing sensitive materials elsewhere.
The disadvantage is that it is not WYSIWYG, which may or may not be an issue to you.
Of course, you can pick a Wiki implementation that supports a better editor, and possibly even a synchronous collaboration one.
Google Wave - exactly what it's meant for - collaboration
IMHO, a word processor is the wrong tool for a programmer. A spec should be written in a plain text editor, and utilize lightweight markup such as reStructuredText, AsciiDoc etc.
The benefits of such an approach are:
There are excellent tools to manage plain text, that are already in the hands of programmers (VCS, automated build systems, diff, patch, programming editors, grep, etc.)
A markup language allow for expressing intent rather then formatting.
That in mind, a Wiki seem to be the obvious choice.
Personally my tool chain of choice is:
reStructuredText as the markup language.
Trac as a Wiki
Firefox + the it's all text extension
Emacs + rst-mode
The choice of technology is one issue and Google docs is a good choice IMHO. But the real challenge is how to manage the process e.g. divide the tasks.
My suggestion is to first make sure that the platform and all related technologies are decided-upon as best as feasible. Then, compose a a thorough table of contents. A well-designed TOC will allow you to divide tasks properly and not "step" on each others' work. From then on you each "flesh" out your assigned sections as well as review each others' work.
In effect, each TOC subsection becomes an atomic unit of work that can be assigned and maintained by an individual who is also accountable for said section(s).
Good luck!
I think it depends on
How heavily into writing the specs you all are
If you're likely writing at the same time
Whether you intend to publish the specs.
Google Docs is nice and easy to get started with. It's also great that you can now export folders all at once. Still, for something that's going to be published to the web, a wiki or general cms is a better presentation vehicle. A wiki will also integrate with your existing site.
If you've got small specs, primarily written by one person then use whatever tool is available where you're hosting the project code or website. If you're not likely to be editing at the same time then a wiki is good.
I've done the wiki thing, the passed document thing and the Google Docs thing.
The wiki thing has a low starting effort and lasts a pretty long time. At a certain size it does get to be a pain.
The passed document thing (writes, email, edit, email, etc) only works while one person is starting everything up. As soon as there are even minor edits then it sucks.
The Google Docs thing is fine until you have several docs and several editors or want to publish it online.
hth
This isn't programming related, but I've personally used Google Docs to write shared documents and found it easy to use.
I would suggest enabling Google Gears however, in the event that the Google servers go down momentarily or an internet connection isn't available.
For writing specs collaboratively, you could try Gingko.
It's a card-tree editor, which means it's a mix between index cards and an outliner, with real-time collaboration and full Markdown support (as well as basic LaTeX).
We are still missing several features (version history, comments, etc), but for some the benefits of having everything in a tree structure outweigh these drawbacks.
Writing specs with it is great, because you can create a card for each user story, and drill into it as much as you like (and organize them into categories if you'd like).
http://gingkoapp.com

How to keep code and specs in sync? - are there good tools [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 my team we've got a great source control system and we have great specs. The problem I'd like to solve is how to keep the specs up-to-date with the code. Over time the specs tend to age and become out of date
The folks making the specs tend to dislike source control and the programmers tend to dislike sharepoint.
I'd love to hear what solutions others use? is there a happy middle somewhere?
Nope. There's no happy middle. They have different audiences and different purposes.
Here's what I've learned as an architect and spec writer: Specifications have little long-term value. Get over it.
The specs, while nice to get programming started, lose their value over time no matter what you do. The audience for the specification is a programmer who doesn't have much insight. Those programmers morph into deeply knowledgeable programmers who no longer need the specs.
Parts of the specification -- overviews in particular -- may have some long-term value.
If the rest of the spec had value, the programmers would keep them up to date.
What works well is to use comments embedded in the code and a tool to extract those comments and produce the current live documentation. Java does this with javadoc. Python does this with epydoc or Sphinx. C (and C++) use Doxygen. There are a lot of choices: http://en.wikipedia.org/wiki/Comparison_of_documentation_generators
The overviews should be taken out of the original specs and placed into the code.
A final document should be extracted. This document can replace the specifications by using the spec overviews and the code details.
When major overhauls are required, there will be new specifications. There may be a need to revisions to existing specifications. The jumping-off point is the auto-generated specification documents. The spec. authors can start with those and add/change/delete to their heart's content.
I think a non-Sharepoint wiki is good for keeping documentation up to date. Most non-technical people can understand how to use a wiki, and most programmers will be more than happy to use a good wiki. The wiki and documentation control systems in Sharepoint are clunky and frustrating to use, in my opinion.
Mediawiki is a good choice.
I really like wikis because they are by far the lowest pain to adopt and keep up. They give you automatic version control, and are usually very intuitive for everyone to use. A lot of companies will want to use Word, Excel, or other types of docs for this, but getting everything online and accessible from a common interface is key.
As much as possible the spec should be executable, via rspec, or doctest and similar frameworks. The spec of the code should be documented with unit tests and code that has well named methods and variables.
Then the spec documentation (preferably in a wiki) should give you the higher level overview of things - and that won't change much or get out of sync quickly.
Such an approach will certainly keep the spec and the code in sync and the tests will fail when they get out of sync.
That being said, on many projects the above is kind of pie-in-the-sky. In that case, S. Lott is right, get over it. They don't stay in sync. Look to the spec as the roadmap the developers were given, not a document of what they did.
If having a current spec is very important, then there should be specific time on the project allocated to write (or re-write) the spec after the code is written. Then it will be accurate (Until the code changes).
An alternative to all of this is to keep the spec and the code under source control and have check-ins reviewed to ensure that the spec changed along with the code. It will slow down the development process, but if it is really that important ...
One technique used to keep the documentation in sync with the code is literate programming. This keeps the code and the documentation in the same file and uses a preprocessor to generate the compilable code from the documentation. As far as I know this is one of the techniques Donald Knuth uses - and he's happy to pay people money if they find bugs in his code.
I don't know of any particularly good solution for precisely what you're describing; generally, the only solutions that I've seen that really keep this sort of stuff in sync are tools that generate documentation from the source code (doxygen, Javadoc).

Aspose.Word alternatives [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 7 years ago.
Improve this question
Does anyone know of a good Aspose.Word alternative (or similar) product?
Can you mention any pro/con for using either?
I am currently evaluating Aspose.Word, and although it works like a charm, it's missing some of the functionalities that I require.
UPDATE: We ended up writing our own DOCX generator. We are still using Aspose.Word to convert to DOC/HTML when needed.
Our team is using Docentric Toolkit Professional Edition. One of the most important reasons for our decision was also it's relatively affordable price for teams of up to 5 developers.
The toolkit works nice with MS Office 2007/2010/2013. In our scenario, reports are produced centrally on the server, using our custom developed reporting engine, which uses Docentric api calls. Because Docentric uses OpenXML, no Word installation is needed on the server.
We have several hundreds different templates, which are ordinary Word documents, enhanced with placeholders which Docentric recognizes and fills with data at runtime during report creation.
Other features which we are using extensively are tables (included nested ones), images, graphs, conditional content and Header/Footer dynamic content.
I don't know if it's suited for your purpose but you might want to have a look at the b2xtranslator project on SourceForge:
http://b2xtranslator.sourceforge.net/
TX Text Control has an express version, but it doesn't have all the features the full version has. The express is free, and I've used it, and if your sole purpose is to create a word processor, it will not provide all of the features. Like Aspose.Words, buying the full version is REALLY expensive ($2,398.00!), and in my opinion, a ripoff.
The pros and cons are evaluating the free version
Cons:
No spell check in the free version
Cannot read .docx or .doc in the free version
No headers, footers, or dragable textboxes (like there are in Word) in the free version
Pros:
Free
Page breaks
Basic Document editing features
Our company used it for a bit, but got sick of the lack of features, and ended up just ditching it.
If Java is an option (or a preference), you could try docx4j

Designing a Yahoo Pipes inspired interface [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 really like the interface for Yahoo Pipes (http://pipes.yahoo.com/pipes/) and would like to create a similar interface for a different problem. Are there any libraries that would allow me to create an interface with the same basic look and feel?
I especially like how the pipes behave and how they are not just straight lines.
Edit: The application would be web-based. I'm open to using Flash or Javascript.
WireIt is an open-source javascript library to create web wirable interfaces like Yahoo! Pipes for dataflow applications, visual programming languages or graphical modeling. Wireit uses the YUI library (2.6.0) for DOM and events manipulation, and excanvas for IE support of the canvas tag. It currently supports Firefox 1.5+, Safari 2.0+, IE 7.0, Opera 9+ and Chrome 0.2.x.
Try JSplumb.
The main structure is HTML/CSS, the connections can be SVG/Canvas/VML*
Great documentation very clean API and live demos
*Configurable or is automatically set by detecting browser's capabilities
From what I can see, Yahoo! is eating their own dogfood by building Pipes in YUI with the addition of the ultra-cool CANVAS tag and IE script file (which I didn't know existed until I did a little digging today) that drive the Visio-like wiring. If you haven't used YUI before you're going to need to do a good deal of learning before you can build something as robust as Pipes, but maybe someone has released examples on the YUI boards that will get you close to where you need to be.
All my information was found at the following sites:
YUIBlog
WebResourcesDepot
Developer.Mozilla.org
You didn't mention the platform you're developing for, but if it's to be placed on an interactive website, you'd probably save time by doing it in Flash. Check out how to make draggable objects first (Google helps you here), then it's easy to connect them with lines or curves any way you like.
Here's what I found on YUI's boards:
http://tech.groups.yahoo.com/group/ydn-javascript/message/30836
Doesn't seem like there's currently any open "wiring widget" libraries, but YUI does seem like a good start.