Sunday, June 30, 2013

Instructions for installing PyDev

Here are instructions for installing PyDev into the Eclipse IDE.  This a link to a detailed set of instructions that include the installation of the Eclipse IDE, followed by the installation of the PyDev plug-in.  This is a 35 page document.  The Chrome web browser will open it, eventually.  Mozilla might have trouble opening it (my copy of Mozilla proclaimed the file was damaged, but it was not).  Microsoft Internet Explorer will eventually open the PDF file.  It takes time because the file is large.

PyDev was developed by a company called Aptana.  They have an IDE called Aptana Studio 3 that comes with Python loaded in it.  This is another version of the Eclipse IDE.  It will work just like Eclipse, if you are familiar with it.  You do not need to add the PyDev perspective in Aptana Studio 3. The Web perspective will run Python code just fine.  You do need to setup the Python interpreter.  Refer to the instructions for installing Pydev to see how that is done.  See the section, Configuring the IDE, pages 14 to 18.

IDE's are helpful for debugging code.  It is great that you can use Eclipse with Python.

Robert

Friday, June 28, 2013

Dia - Simple and Free UML Drawing Tool

I mentioned ArgoUML in an earlier post.  Now I'll mention Dia for UML diagrams.  ArgoUML can generate code from the UML models.  Tool Dia was inspired by Visio.  Dia cannot generate code, but it is very easy to use.  Its homepage is:
https://wiki.gnome.org/Dia

The Windows installer for Dia can be found here:
http://dia-installer.de/

Here is an example of a sequence diagram drawn with Dia, which calls them lifelines.


You can see the diagram is more sophisticated than what you would draw with PowerPoint.  There is a drop-box in Dia where you select UML diagrams.

It is important to document your designs.  You export your Dia diagram to a picture file in order to paste it into documents.  I found Gimp useful for cropping pictures exported from ArgoUML.  In Dia I draw a simple box, put my diagram inside the box, and the export to jpeg automatically crops the picture around the box I drew.  That makes it easier than ArgoUML for making jpegs to paste into documentation.

Robert

Posts elsewhere about using Dia for UML:
UML Sequence Diagram in Dia?
http://stackoverflow.com/questions/3535717/uml-sequence-diagram-in-dia

How to lengthen lifeline of sequence diagram in Dia?
http://stackoverflow.com/questions/9955587/how-to-lengthen-lifeline-of-sequence-diagram-in-dia

Post about ArgoUML:
http://canrightonsoftwareandprogramming.blogspot.com/2013/06/argouml-free-uml-drawing-tool.html


Saturday, June 22, 2013

ArgoUML - Free UML Drawing Tool

UML diagrams are vital for documenting code.  I have used and I recommend the free diagramming tool called ArgoUML.  I have used ArgoUML 0.34 for Windows.  You can download it from here:
http://argouml.tigris.org/

ArgoUML does more than create diagrams for documentation.  You have to export your diagram to a picture file to have pictures for documentation.  Then you might have to crop your image.  I use Gimp to crop pictures.. ArgoUML can generate code from your diagrams.  It supports code generation for these programming languages: C++, C#, Java, PHP4, PHP5.


For large projects, or for professional projects, I recommend buying Sparx Systems Enterprise Architect.  The last time I looked it was $135 for an individual license.  Sparx Systems Enterprise Architect will generate C++ code for you from the class diagrams, which pays you back for the effort of creating detailed documentation.  I have used this at a customer site and was very impressed.  I highly recommend this professional tool.

Here is their website:
http://www.sparxsystems.com.au/
They are an Australian company.

Robert

Cppcheck - Free Static Code Analysis for C and C++

Cppcheck is a free static code analysis tool for the C and C++ programming languages.  It is integrated with the Code Blocks IDE.  I like the Code Blocks IDE and this is one more reason for liking it.

You can download Cppcheck for free from SourceForge:
http://cppcheck.sourceforge.net/

Cppcheck can help you find potential null pointers.  You must be careful with memory creation and destruction in C/C++.  I highly recommend static code analysis to look for null pointers.  I have used Cppcheck.  I recommend it.

Robert

SourceMonitor - Freeware for Code Review

SourceMonitor is a free software tool for code complexity analysis.  It will give you a line count for your project and provides complexity analysis.  I have tried it and found it interesting.  It is free, but you have an opportunity to donate payment to the author.

Here is a link to its website:
http://www.campwoodsw.com/sourcemonitor.html

Its website says SourceMonitor measures metrics for source code written in C++, C, C#, VB.NET, Java, Delphi, Visual Basic (VB6) or HTML, including method and function level metrics.

Complexity analysis can pin-point sections of code that are overly complex.  Code that is overly complex might be more likely to contain logical errors.  Overly complex code is also harder to maintain.

Robert