Rabu, 03 Februari 2010

Managing a Software Development Team: Some Experiences

Managing a software development team is never an easy task. It consists of 2 sides: technical and non-technical. This task is often assigned to the project manager. To be succeed, one has to consider those 2 sides. Below are some of my experiences in managing a software development team. This list is not meant to be complete. You may need more but at least you will be in the safety line level one if you do care with these issues.

Decide the tools which will be used by the team

Well, this is a bad news if you don't have enough technical capabilities. Once you don't decide the tools, your team will be confuse as they have more than one preferences. It's not funny to have your team uses PHP with different versions, some use WAMP while the others use XAMPP or maybe PHP which comes from some Linux distros. It's not funny to have your team uses Notepad, Textpad, Vim, Netbeans, Eclipse, for their IDE/Text Editor. This will waste much time and bandwidth. Consider this, if they use different tools, then when someone says: "uh oh, my Vim always give me a tab and not some spaces, how do I turn the tab into spaces?" and then nobody can answer this and probably think "that is your responsibility, I don't care because I never use Vim". Now consider if everybody uses Netbeans (note: I don't have any relation whatsoever with Netbeans nor a Netbeans evangelist), when someone yell "How do I create a new PHP module in Netbeans?", chances are some of the guys in your team know about this.

Use a specific software development methodology, probably with some minor adaption

A software development methodology consists of process and modelling. It guides the team through the process and enable the team to model the software which is built by the team to solve client problems. It is important to use the specific methodology so that everyone in the team knows what and how to do the development. If you don't decide any methodology, then your team won't have any guides. Remember, you have to use a specific methodology but don't be too rigid. Your team may consists of people from many backgounds with many level of capabilities. For example, you may use a Unified Process methodology but because your team is limited and don't have time to learn how to use UML, then don't push them to use rigid UP methodology. The most important thing here is process. Do use that process but don't be too rigid.

Make some conventions regarding technical issues

Again, this is important to keep the team away from the state of flux and let the guys in the team communicate with the same language. You surely don't want your team to have more than one variable / property naming system, right? What if some programmers use "this_is_a_variable", while the others use "thisIsAVariable"? quite confusing, I guess. You may need to define some coding conventions and probably uses software tool to force this conventions, for example if you use Java, you may use Checkstyle.

Know the client(s) and their problems which are tried to be solved

You must understand this good enough so that you can define the scope of the problems and deal with the problems.

Decide the scope of the problems and insists on this.

Clients basically don't understand the requirements, so your duty as a project manager is to define the scope of the problems which are tried to be solved by the software. You must cooperate nicely with the client and have the information understood by all team members. From programmers' point of view, the uncertainty caused by scope uncertainty will lead to frustration. Well, I do understand that agile methodologies encourage changes, but who want to deal with changes everytime? What I am trying to say is you as a project manager should understand that changes are possible but this should be done within the scope. Don't play with programmers' heart ;)

Have a good interpersonal relationship and don't be a jerk

I know that this software development task is not easy. Clients always ask the progress and the team is in a stress condition. It really helps to just stay with the team and always willing to help them whatever you can than just act like a jerk who walks here and there and yelling. Trust me, the team will respect you more if you are always willing to help them.

Never let the team in a state of flux

Uncertainty comes everytime. Whenever the team has anything uncertain, your decision is needed to keep them stay away from confusion. You do understand that you have to have a good grasp in technical side and problem domain to make a good decision, don't you?

Let the team concentrate on technical matters

Ok, pay attention more to non technical matters so that the team can concentrate on technical side. Don't let them do any clerical things since programmers (usually) hate to do administrative things. It's good to have a dedicated person to deal with all administrative things.

Let the team member knows each other about progress and difficulties

Opennes is important. By let them know each other's progress, you keep them in a fair situation. Low salary probably can be understood, but unfair treatment can not be tolerated.

Inform the team about your progress too

So you think you can hide your progress? The team will surely want to know that you do your jobs too. If you hide your progress, they will lose respect and trust in you.

Communicate. Communicate. Communicate

I can not stress more. This is really important for the team to have them communicate each other. Your tasks will be to communicate with them and act as a liaison between the team and the client. Oh and don't forget, have a good sense of humour.

Always keep backup of everything

You don't need to backup everything if you are sure that you always live in an ideal situation. You should keep backup in more than one place. Compress them and have them uploaded anywhere on the Internet (4shared.com, rapidshare.com, /etc) as long as you have full control of your files.

Use Version Control System

Version control system is a software which can be used to track the software source code versioning. You may use git, mercurial, subversion, /etc for this purpose.

Use web based bug tracking system, project management software, and/or wiki

This will keep any information handy and on track. All any other members can also see the project's progress. It will keep each team members informed and any unfair situation can be detected.

Selasa, 05 Januari 2010

MVC Without Framework: JSP and Servlets Integration

Introduction

This post is used to showcase a MVC pattern for web development without framework. Its functionality is display a random number which is set by a bean and populated by a servlet. I use the source code from book “Core Servlets and Java Server Pages” – chapter 15, which is available online at http://pdf.coreservlets.com/. Credits should goes to Marty Hall and Larry Brown, I only make some minor replacement (for Tomcat 6.0.20) and more details instruction for the shake of my student’s clearlyness.

Directory Structures and Files

[bpdp@bpdp-arch webapps]$ tree mvc/
mvc/
`-- WEB-INF
 |-- classes
 |   |-- beans
 |   |   |-- NumberBean.class
 |   |   `-- NumberBean.java
 |   `-- servlets
 |       |-- RandomNumberServlet.class
 |       `-- RandomNumberServlet.java
 |-- views
 |   `-- RandomNum.jsp
 `-- web.xml
5 directories, 6 files
[bpdp@bpdp-arch webapps]$
Files

NumberBean.java



package beans;

public class NumberBean {

 private double num = 0;

 public NumberBean(double number) {
   setNumber(number);
 }

 public double getNumber() {
   return(num);
 }

 public void setNumber(double number) {
   num = number;
 }

}
RandomNumberServlet.java

package servlets;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import beans.NumberBean;

/** Servlet that generates a random number, stores it in a bean,
 * and forwards to JSP page to display it.
 */

public class RandomNumberServlet extends HttpServlet {
  public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {

    NumberBean bean = new NumberBean(Math.random());
    request.setAttribute("randomNum", bean);
    String address = "/WEB-INF/views/RandomNum.jsp";
    RequestDispatcher dispatcher = request.getRequestDispatcher(address);
    dispatcher.forward(request, response);
  }
}
RandomNum.jsp



 
web.xml




From these source code, you should know that I have prepare directory for views (only for JSP), servlets (all servlets), beans (all beans). That way, we can separate our application into 3 functionalities: Model (beans) – View (JSP) – and Controller (servlets). This will keep your mind stay organized.

Run Application

Execute the application by typing its URL: http://server:8080/mvc/randomize. Here’s the screenshot:









Notes:

If you want to copy, the source code, have a look here: http://bambangpdp.wordpress.com/2010/01/06/mvc-without-framework-jsp-and-servlets-integration/

Quick Hack for the Impatients: JSP Custom Tag

Introduction

Source code from this posting was taken from http://java.sun.com/developer/technicalArticles/xml/WebAppDev3/ with some minor replacement needed for Apache Tomcat 6.0.20 (latest as of this date) and more details on how to run the application.

Purpose of Application

This application is used as a showcase for jsp custom tag. Its functionality is create custom tag for jsp to display string in lowercase.

Directory Structure and Files

[bpdp@bpdp-arch webapps]$ tree customtags/
customtags/
|-- WEB-INF
|   |-- classes
|   |   `-- tags
|   |       |-- ToLowerCaseTag.class
|   |       `-- ToLowerCaseTag.java
|   |-- mytaglib.tld
|   `-- web.xml
`-- coba.jsp

3 directories, 5 files
[bpdp@bpdp-arch webapps]$
We created customtags directory under webapps (which is needed for an application to be executed by Tomcat).  Pay attention to file mytaglib.tld, this file is used as tag lib descriptor to describe descriptor for taglib.


Files

ToLowerCaseTag.java

package tags;

import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class ToLowerCaseTag extends BodyTagSupport {

   public int doAfterBody() throws JspException {
      try {
         BodyContent bc = getBodyContent();
         // get the bodycontent as string
         String body = bc.getString();
         // getJspWriter to output content
         JspWriter out = bc.getEnclosingWriter();
         if(body != null) {
            out.print(body.toLowerCase());
         }
      } catch(IOException ioe) {
         throw new JspException("Error: "+ioe.getMessage());  
      }
      return SKIP_BODY;
   }
}
web.xml






mytaglib.tld




coba.jsp





Notes: 

From  all of the files above, you should know the relationship between taglib uri="mytags" prefix="first"  (in coba.jsp) with mytags (in web.xml).

I used screenshot and not embedded code because this post interpret tags as HTML and keep yelling about error, so if you want to copy the source code, have a look here: http://bambangpdp.wordpress.com/2010/01/06/217/

Run Application

To run this application, type the URL: http://server:8080/customtags/coba.jsp
Here's the screenshot:



Minggu, 03 Januari 2010

Configuring mutt for IMAPS



Here’s a trivial guide for desperately busy people to start using mutt, yes the mail client that suck less. If you like simplicity and more on functionalities than eye candy, this should be your mail client (and who the hell are you to ask me to do that? — you said :p).

Ok, to begin, you should know your user name, IMAP server, and SMTP server details. This should not be difficult since you should have this first place when you got your mail hosted somewhere else (for example, you may login to cpanel and than get this information from your e-mail account.
Firstly, the configuration file. Mutt uses $HOME/.muttrc as the default configuration file. There are some configuration. Here’s mine (this is not complete .muttrc, I put this only the parts which is useful for this guide):
# put your email address here
set from="bpdp@contextualmind.net"
set use_from=yes
set envelope_from="yes"

set editor=vim

set folder="imaps://username@imapserver"
set spoolfile="imaps://username@imapserver/INBOX"

set imap_pass="putpasswordhere"

set smtp_url="smtp://username@server/"
set smtp_pass="putpasswordhere"

bind index 'G' imap-fetch-mail
set mbox="!"
Run mutt from shell and use G key to refresh (just as you have already defined in bind index).

Happy mutt-ing, people :)

Minggu, 27 Desember 2009

Memahami LAP (Language-Action Perspective) dalam Konteks Pragmatic Web: Pengenalan

Language-Action Perspective pertama kali dicetuskan oleh Flores dan Ludlow (Flores, et.al - 1980). Pada saat itu, masih terdapat anggapan konvensional bahwa bahasa hanya merupakan alat untuk pertukaran komunikasi yang semata-mata hanya merupakan transmisi dari informasi dan simbol. Penelitian Flores dan Ludlow membuka kemungkinan bahwa bahasa tidak hanya digunakan sebagai alat pertukaran informasi tetapi juga untuk melakukan aksi (itu sebabnya, hal ini disebut sebagai Language-Action Perspective) seperti halnya dalam janji, perintah, permintaan, deklarasi, dan lain-lain. Aksi-aksi tersebut merupakan bangunan dasar dari komunitas dan organisasi dan harus dipahami dengan baik terutama dalam konteks pengembangan sistem informasi serta organisasi yang efektif.

Pragmatic Web mempunyai akar dari LAP. Pada dasarnya, Pragmatic Web merupakan salah satu dari 3 komponen utama aplikasi web yang lengkap dan kompleks berikut ini:
  1. Syntactic Web, merupakan komponen dari aplikasi web yang lebih berkaitan dengan sintaks dari halaman web. Tentu saja pada bagian ini akan lebih ditekankan unsur view dari aplikasi web. HTML, CSS, JavaScript, AJAX, dan sejenisnya sebenarnya merupakan unsur utama dari Syntactic Web.
  2. Semantic Web, merupakan komponen dari aplikasi web yang berkaitan dengan isi dari web. Semantic Web lebih menekankan pada teknologi untuk mendefinisikan data secara terstruktur (XML - RDF). Komponen utama dari teknologi ini adalah ontologi. Ontologi mendefinisikan jejaring semantik dari konsep, keterkaitan, dan aturan untuk mendefinisikan arti dari suatu resource.
  3. Pragmatic Web, merupakan komponen yang berkaitan dengan konteks (context) dari suatu resource web. Konteks merupakan hal yang sangat penting dan menentukan terjadinya suatu kesepahaman bersama antara pihak-pihak yang terlibat. Tidak akan ada suatu kesepakatan tanpa adanya kesepahaman konteks. Suatu kalimat yang diuraikan bisa saja mempunyai hasil yang berlainan jika ditempatkan pada konteks yang lain. Pada dasarnya konteks terbagi menjadi konteks umum dan konteks individual.
Dari hal ini, sebenarnya bisa dilihat mengapa Pragmatic Web mempunyai akar dari LAP. LAP berkonsentrasi pada konteks dari bahasa / simbol yang digunakan. Jika diterapkan pada aplikasi web yang telah tersedia semantik-nya, maka riset dibidang LAP ini bisa digunakan untuk mendefinisikan konteks dari aplikasi web.

Masih banyak yang bisa dipelajari dan ditulis berkaitan dengan LAP dan Pragmatic Web. Let's see.

Referensi

Flores, F., and Ludlow, J. "Doing and Speaking in the Office," in: Decision Support Systems:Issues and Challenges, G. Fick and R.H. Sprague (eds.), Pergamon Press, New York, 1980, pp. 95-118.


Aldo de Moor, Patterns for the Pragmatic Web, http://growingpains.blogs.com/home/2005/08/patterns_for_th.html.