Support

Forums

Contact Me

Posts Tagged 'development'

Development

Development may refer to: [http://en.wikipedia.org/wiki/Development]

Eclipse Indigo/New and Noteworthy

eclipse_indigo_aka_3_7

Eclipse Indigo is the annual release of Eclipse projects on June 22 2011; this year 62 project teams are part of the release.

New and Noteworthy

JBossTools

 
Articles tagged

Install PHPUnit and PHPDocumentor in XAMPP

phpunit-logoselenium-logoxampp.logo

Open XAMPP Shell (start c:\xampp\xampp-control.exe and click on the button XAMPP-Shell), and run:

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install --alldeps phpunit/PHPUnit
pear install phpunit/DbUnit phpunit/PHPUnit_Selenium
pear install phpunit/PHPUnit_SkeletonGenerator
pear install phpunit/PHPUnit_Story phpunit/PHP_CodeCoverage
pear install PhpDocumentor

Read more: Install PHPUnit and PHPDocumentor in XAMPP

How To Write Unmaintainable Code

Everything on this page should NOT be applied

"In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code!
You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise t stands the risk of being rewritten or refactored."

Bridge

Decouple an abstraction from its implementation so that the two can vary independently.

from the gang of the four





Source Code

/**
 * Defines Abstraction interface. Stores reference to implementation.
 * 
 * @role __Abstraction
 */
public abstract class Abstraction {
	/** Reference to actual implementation */
	private Implementor impl;

	/**
	 * @return implementation-in-action.
	 */
	protected Implementor getImplementor() {
		return impl;
	}

	/**
	 * This sample operation delegates call to particular implementation
	 */
	public void someOperation() {
		getImplementor().someOperationImpl();
	}
}

/**
 * Concrete implementation
 */

public class ConcreteImplementorA extends Implementor {
	/** @see patterns.gof.bridge.Implementor#someOperationImpl() */
	public void someOperationImpl() {
		// provide implementation here
	}
}

/**
 * Concrete implementation
 */

public class ConcreteImplementorB extends Implementor {
	/** @see patterns.gof.bridge.Implementor#someOperationImpl() */
	public void someOperationImpl() {
		// provide implementation here
	}
}

/**
 * Defines interface for implementation classes. Is not oblidged to provide
 * one-to-one correspondence to interface of Abstraction.
 * 
 * @role __Implementor
 */

public abstract class Implementor {
	/** Implement this method to provide implementation-specific behavior */
	public abstract void someOperationImpl();
}

Why it is not possible to develop any software ...

Bug Tracking Tool
Work in progress

or Why it is not possible to manage any software development without a bug tracking tool

A bug tracking system is basically a database linked to  a frontend:
  • The frontend can be a FAT client, understand a windows or application running on your pc and that need to be install by each developer/client, or may be
  • Adhering to a light client server model: HTML frontend which submit queries to a server.

Provide

Tracability

When was the bug open, and closed, what is its status now. Who has reported it (login is required and all system support profile (user, tester, manager, developer, administrator) and/or isolation of project). Did It already existed in a previous version (regression in code), etc...

Responsability

 Easily dispatch responsability or find quickly who was reponsible for solving it, how  much time was needed to close this bug, some system may send email automatically to developer to inform them... etc...

Effort

How difficult will it be to solve this issues, (can be a bugnote add by other developer). Most of the time, technical leader decide of the value of this field together with developers.

Priorities

How many bugs are still open at a date "t", how do I determine the order in which I will solve them...etc

Standardisation of records

By forcing tester/customer to enter some mandatory fields in a graphical forms. It may avoid You to hear some ridiculous statement like: "the application is not printing, working". It force the user talking a language You have decide together, having agreed on a "bug category" list is a very good and common example.

Customization

All modern bug tracking tool let You define and customize some part of the system according to your need.

Addition of information

A screenshot is better than thousand word, a file create by the application, a memory dump, anything that will help developer to reproduce the bug.

Statistics/Reporting

A lot of very powerful queries can be executed. It is always interesting to know, how many improvement were done in the next/past releases, or if a team has use more power to develop new functionnalities (also changes request which interest the customer the most) or loose time tracking some low level bug priority.
In case of reporting, Bugzilla support the following:
  • Tabular reports - tables of bug counts in 1, 2 or 3 dimensions, as HTML or CSV.
  • Graphical reports - line graphs, bar and pie charts.

Al of the above will have a positive result on:
  • communication among the team of developers and customers,
  • It will improve the product quality by several magnitude,
  • Developer will be more productive as the will know what to concentrate on or what is worth to do.
AND Your customers will be happier!!

Golden rules

  1. A bug that can be reproduce can be analysed/corrected.
  2. Correcting a bug is not always trivial, a correction may introduce new bugs.
  3. The intrinseque quality of a software is always improved with a tracking tool over time

Some open source software:


Bugzilla (http://www.bugzilla.org/) is the more famous, use in a lot of open source application (Mozilla, Apache, and even eclipse) version 2.19.2 (MySQL+PHP, Solaris, Linux, Win32, MacOS X, BSD) 370 companies are currently using it. (Nasa, IBM, Mozilla and others)- Wikipedia has a very brief article on it, Features are listed here

Mantis. (http://mantisbt.sourceforge.net/) A very simple bug tracking tool with limited search functionnality compared to bugzilla, a strong community but not so much stable release as expected.

Buggit (http://www.matpie.drw.net/PBSystems/products/buggit/Buggit.html) no new release since 2000 and bounded to MS access, aka running only unde windows. Listed Here because I use to play with it in 2001.




 

Read more: Why it is not possible to develop any software ...

Dynamic polymorphic abstract factory

This package contains a dynamic polymorphic factory...

  •  New class can be add dynamically to the factory... even during runtime (dynamic)
  • Factory methods are in a separate class as virtual functions. (polymorphism)
  • Different types of factories can be subclassed from the basic factory.. (abstract)
  • Useful iin case of licence problem, since Concrete classes are created at runtime, and only need to reside in classpath (If they are not present the code still compile). Below, the example show multiple authorization and autorisation scheme, that can be switche on/off very fast.
  • Factory can be driven with an external condition (properties, registry ....)
 
Notice also that the specific concrete classes are dynamically loaded on demand...(class.forname())


Source Code

/**
 * Creation date: (7/19/2002 2:50:45 PM)
 * 
 * @author: Cedric Walter
 */
public interface AuthentificationIF {

        public boolean Authentificate(HttpServletRequest req,                        HttpServletResponse resp);        public boolean hasAutorisation(HttpServletRequest req,                        HttpServletResponse resp);}

public abstract class AuthentificationA implements AuthentificationIF {
/**
  * AuthentificationA constructor comment.
  */
        public AuthentificationA() {
                super();        }

        
/**
  * Authentificate method comment.
  */
        
public abstract boolean Authentificate(                        
javax.servlet.http.HttpServletRequest req,                        
javax.servlet.http.HttpServletResponse resp);
}

abstract class AuthentificationFactoryA {

        private static java.util.Map factories = new java.util.HashMap();        
/**
  * ComputeFactory constructor comment.
  */
        public AuthentificationFactoryA() {
                super();        }

        public static void addFactory(String id, AuthentificationFactoryA f) {
                factories.put(id, f);        }

        public static final AuthentificationIF createAuthentification(String id)                        
throws FactoryCreationException { if (!factories.containsKey(id)) { try { // Load dynamically Class.forName(id);
}
catch (ClassNotFoundException e) { throw new FactoryCreationException(id);
} // verify that it has been stored if (!factories.containsKey(id))
throw new FactoryCreationException(id);
} return ((AuthentificationFactoryA) factories.get(id)).getAuthentification();
} protected abstract AuthentificationIF getAuthentification();} /** * concrete class of the abstract factory */ public class MyAuthentificationFactory extends AuthentificationFactoryA { public MyAuthentificationFactory() { super(); } /** * not use since it is subclass */ protected AuthentificationIF getAuthentification() { return null; } } /** * @author: Cedric Walter */ public class NimiusAuthentification extends AuthentificationA implements AuthentificationIF { private static class Factory extends AuthentificationFactoryA { protected AuthentificationIF getAuthentification() { return new NimiusAuthentification(); } } static { AuthentificationFactoryA.addFactory("com.waltercedric.gof.pattern.factory.NimiusAuthentification", new NimiusAuthentification.Factory()); }
/**
  * Local constructor comment.
  */
        public NimiusAuthentification() {
                super();        }

        
/**
  * Authenficate method comment.
  */
        public boolean Authentificate(javax.servlet.http.HttpServletRequest req, 
javax.servlet.http.HttpServletResponse resp)
{ //do some stuff return true; } public boolean hasAutorisation(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
{ //do some stuff return true; } } /** * @author: Cedric Walter */ public class NoAuthentification extends AuthentificationA implements AuthentificationIF { private static class Factory extends AuthentificationFactoryA { protected AuthentificationIF getAuthentification() { return new NoAuthentification(); } } static { AuthentificationFactoryA.addFactory( "com.waltercedric.gof.pattern.factory.NoAuthentification", new NoAuthentification.Factory()); } /** * Local constructor comment. */ public NoAuthentification() { super(); } /** * Authenficate method comment. */ public boolean Authentificate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) { return true; } /** * hasAutorisation method comment. */ public boolean hasAutorisation(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) { return true; } } /** * @author: Cedric Walter */ public class ObtreeAuthentification extends AuthentificationA implements AuthentificationIF { private static class Factory extends AuthentificationFactoryA { protected AuthentificationIF getAuthentification() { return new ObtreeAuthentification(); } } static { AuthentificationFactoryA.addFactory( "com.waltercedric.gof.pattern.factory.ObtreeAuthentification", new ObtreeAuthentification.Factory()); } /** * Local constructor comment. */ public ObtreeAuthentification() { super(); } /** * Authenficate method comment. */ public boolean Authentificate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) { return true; } /** * hasAutorisation method comment. */ public boolean hasAutorisation(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) { return true; } }

Linux Kernel development figures

linux

How Fast it is Going, Who is Doing It, What They are Doing, and Who is Sponsoring It: An August 2009 Update

The kernel which forms the core of the Linux system is the result of one of the largest cooperative software projects ever attempted. Regular 2-3 month releases deliver stable updates to Linux users, each with significant new features, added device support, and improved performance. The rate of change in the kernel is high and increasing, with over 10,000 patches going into each recent kernel release. These releases each contain the work of over 1000 developers representing around 200 corporations. Since 2005, over 5000 individual developers from nearly 500 different companies have contributed to the kernel. The Linux kernel, thus, has become a common resource developed on a massive scale by companies which are fierce competitors in other areas. A number of changes have been noted since this paper was first published in 2008:

  • We have seen a roughly 10% increase in the number of developers contributing to each kernel release cycle.
  • The rate of change has increased significantly; the number of lines of code added to the kernel each day has nearly tripled.
  • The kernel code base has grown by over 2.7 million lines The overall picture shows a robust development community which continues to grow both in size and in productivity. source http://www.linuxfoundation.org/publications/whowriteslinux.pdf

Joomlacomment 4.0 jQuery optimization

joomla_cms

jocomment I did install yesterday evening the latest version of !JoomlaComment

!JoomlaComment is one of the first extensions for Joomla,that let you comment under articles.

The !JoomlaComment system can be installed on any joomla website within seconds! Make
your website more interactive!

Main Features:

  • ajax-based
  • captcha protection
  • akismet support
  • ubb code support
  • threathed/nested comments
  • multilanguage support
  • mail, website input
  • See more features here

Joomla support templates, depending on which templates you use

  • MTdefault-emotop, these templates MTxxxx use mootols 1.11
  • JQdefaut-emotop, these templates JQxxxx use Jquery
  • ..

You may behind the scene include another additional AJAX library in Joomla!® frontend, this lead to performance issues:

If !JoomlaComment use JQuery 1.1.4 and not the AJAX library of Joomla!, aka Mootools 1.11. Another huge JavaScript files that make my server busier!

Since any static files can be offloaded to another server to gain more speed. For example, any static images, JavaScript or CSS files can be moved to a different server for more speed.

In order to be able to offload this JavaScript library to Google code, you’ll have to do the following:

In the template you are using, for example in components/com_comment/joscomment/templates/JQdefault-emotop/index.html

Search for

{library}
<script type="text/javascript" src="components/com_comment/joscomment/jscripts/jquery-1.1.4.pack.js"></script>
<script>jQuery.noConflict();</script>
{/library}

and replace with

{library}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
<script>jQuery.noConflict();</script>
{/library}

Note that I use here the latest JQuery version (1.3.2) and not the default version of !joomlaComment (1.1.4), here is why

J2EE Patterns, Patterns Use them!

A collections of links, this time. A lot of persons have already done a stunning job:

  • Sun Java Center - J2EE Patterns: The J2EE Patterns presented here, a collection of J2EE-based solutions to common problems, reflect the collective expertise and experience of Java technology architects in the Sun Java Center over the past three years.
  • Wiki pattern catalog with some famous contributors like Kent Beck and co.
  • The server side: get the latest informations on Patterns.
  • Javaworld a list of articles

Read more: J2EE Patterns, Patterns Use them!

Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project

The major news I was waiting for:


Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project
The Eclipse Foundation, an open source community committed to the implementation of a universal software development platform, Zend Technologies and IBM, today announced that the Eclipse PHP IDE project has been approved by the Eclipse Foundation. The technology project was proposed by Zend and IBM on October 21, 2005. It will deliver a PHP Integrated Development Environment framework for the Eclipse Platform and will encompass the development components necessary to develop PHP-based web applications and will leverage the existing Eclipse Web Tools Project.

Read the proposal here, If youre are in the area of Santa Clara, Zend is showing  demo at EclipseCon. Do someone know what wwill happen wwith PHPeclipse.de ???

Donations

Thank You for supporting my work