Tuesday, June 13, 2023

Extracting Number from String in Alteryx

 I was looking at challenge 120 on Alteryx, where you have to parse a string to extract a number. I struggled with the RegEx tool and ultimately peeked at the solution. This got me thinking that there has to be an easier way which works for all strings and does not involve me pulling my hair out to get the right regex pattern.

The answer was using a Formula tool instead of RegEx, and within formula editor use the REGEX_Replace function:


REGEX_Replace([StringColumn], "[^\d]+", "")


Here's a breakdown of the formula:

  • [StringColumn] is the name of the column or field containing the string you want to extract the number from. Replace it with the actual column name in your workflow.
  • "[^\d]+" is the regular expression pattern that matches any non-digit character ([^\d]) one or more times (+).

The REGEX_Replace function will replace all non-digit characters in the string with an empty string, effectively extracting the number.

To use this formula:

  1. Add a Formula tool to your Alteryx workflow canvas.
  2. Connect the input data to the Formula tool.
  3. Double-click on the Formula tool to open its configuration window.
  4. In the configuration window, select the column or field where the string is located.
  5. In the formula editor, enter the formula REGEX_Replace([StringColumn], "[^\d]+", ""), replacing [StringColumn] with the actual column name.
  6. Configure other options in the Formula tool as per your requirements.
  7. Run the workflow to extract the number using the specified formula.

By using the REGEX_Replace function with the provided formula, you should be able to extract the number from the string in Alteryx without using a separate tool.

Thursday, September 3, 2015

Before you spend on data analytics and big data

Big data is the answer, but can you please repeat the question?

The last decade has seen an explosion in the amount of digital data being created over the Internet. Companies find themselves with huge data sets on their hands. And of course this huge mine of data has kick-started the big data and data analytics consulting, which remains a fast growing service. 

However, business users need to critically consider the following 3 key points before approving the spend on big data/ extensive data analytics projects:

Process maturity: For big data or data analytics to be useful, underlying data sets have to first be accurate. This means the processes that lead to data generation need to be mature and functioning properly for some time before a data analyst can help. Where multiple data sources are involved, thinking about how they will link together/ identify duplicate data/ linked data/ supplementary data would save a lot of pain later.

Statistics: Crunching big data is not always the answer. Thinking about breaking the data into representative sets and applying statistical analysis can serve the same purpose in many instances. If anything, bulldozing through tonnes of data without understanding data distribution will most probably give you the wrong results.

Cost-benefit: Sure there can be benefit in milking the data. But at what cost? With spending for a full-fledged big data project likely to reach 8 figures, has anybody considered the cost-benefit analysis? Can we achieve the insights without necessarily taking the big data route (e.g. by breaking data into representative sets, statistical analysis)? Are the processes mature enough to yield accurate data? Do we have a data map, so that we at least understand where the data is generated and where it is stored? What is our in-house technical expertise to deal with the demands of such a project? 


Very few data sets would truly qualify as big data if they were first split or linked sensibly. And for data analytics to work, it is important that a company first has ample confidence in the accuracy of their data. Simple lessons which if remembered would do a lot of good.

Thursday, May 28, 2015

QlikView vs Tableau

Spent a few days playing around with QlikView. Here are my initial thoughts on how it stacks against Tableau.

Cool factor: Tableau charts feel more slick and modern compared to QlikView. The options provided are more focussed, and Tableau even suggests optimal visualisations based on data selection. The ability to share an interactive dashboard with users is common between the two. 
Overall winner: Tableau

Usability: Tableau seems to have done a better homework on Usability and visualisation. QlikView can do as much, but it is not as business user friendly: the sheer number of options in QlikView feel over-whelming to start with for a non-technical user. Consequently, you would spend more on training on QlikView and would need a more technical minded person to be able to build dashboards with it. 
Overall winner: Tableau

Ease of Data Transformation/Extraction/Access: Both need data in database format. However, at the first look it is not immediately obvious whether QlikView can integrate with the same range of data sources as Tableau. Business users would need a data analyst/ technical person to extract, transform, and load data in both, but more so in Qlikview. Tableau provides access to OLAP cubes while QlickView doesn't. 
Overall winner: Tableau

Raw Power: In terms of technical power, QlikView appears more technical and customisable than Tableau for a power user familiar with databases and SQL.
Overall winner: QlikView 

Pricing: Oveall complex pricing plans, but I understand that Tableau may be overall cheaper.
Overall winner: Tableau

Ease of exploration & training: QlikView provides an unlimited personal use edition and Tableau provides free public desktop application. There is good support for training.However, QlikView appears to have a more well defined learning path than Tableau. For example, I could find a well-defined certification track for QlikView, but not for Tableau (as on 28 May 2015).
Overall winnerQlikView


Summary: If you have a team who knows how to build visualisations and is reasonably strong technically, go for QlikView for the sheer power of the tool. You will have to spend some time training for it. If you are in a hurry and want to get to a good looking solution fast, Tableau is the answer. Personally, I am inclinded to overall favour Tableau of the two for its ease of use for the business user. 

The above review was done as a first time business user based on initial impressions by trialing the products over 14 days.

Friday, May 22, 2015

14 Days of Tableau

I recently trialed Tableau, a data visualisations tool used for Analytics. My initial impression as a novice user (based on loading data from an excel and doing a few online trainings) is that it is a fantastic tool for following scenarios:
  • We have database acceess, or want to analyse data coming directly off a known client system (SAP, Salesforce)
  • The data available is structured inline with database tables
  • We need to monitor KPIs over a period of time
  • To extract regular insights from predictable management information
Pros:
  • It is a dedicated tool with sole purpose of getting insights out of data, and is therefore more powerful than excel for charting/ data visualisation
  • The ability to connect with and combine varied data sources makes it a class apart for large data sets that would simply kill excel
  • The ability to build graphical, interactive storyboards that can be shared online take analysis and engagement to a new level
  • Very strong for the four scenarios identified above, especially for building dashboards that refresh based on an underlying, changing data
Cons:
  • Needs data in a database format. This may need extra effort and planning. E.g. Converting a simple monthly Management Information for balance sheet to a database friendly format can be quiet a task. This would especially hurt if the model changes often, or the number of rows is very large.
  • Missing data points and incomplete excel data can be tricky to deal with
  • Without training, too many options for data cutting can be confusing
  • May not always be worth the effort as there may not be enough time or resources for it (vs doing a simpler excel based analysis)

After this, I intend to trial Qlikview (another BI tool) and compare. Will keep posting my thoughts.

Wednesday, May 20, 2015

Making Sense of Data

With the ever improving ability of companies to track and store data, it is only natural that business intelligence (BI) tools have gained increasing importance in C-suites. In fact, the market is glutted with umpteen BI tools, vying for this extremely lucrative space. Needless to say, it has been an equally lucrative opportunity for consulting companies as well.  

However, the businesses need to be very careful. Data analysis can often be the right way to reach a wrong conclusion. To truly unlock value from mountains of data, they would need multi-disciplinary teams that understand the importance of the task and are willing to work together. The same is true for consulting firms that want to cash-in on the desire of businesses to use their data more effectively.

From business perspective, there are four key challenges on the road to using data effectively:
  1. Capturing and organising data
  2. Making the data useful and accessible for the business user
  3. Ensuring that data analysis is statistically significant
  4. Making the whole process timely and cost effective 
Based on these, logically it would help if the team has the following profiles:
  • business owner to fund the project & articulate the answers sought from data
  • business analyst to bridge the gap between techology and business
  • trainer to teach business users about how to go about accessing/ manipulating the data
  • data analyst to help business owners to analyse data and decide if the data interpretation is actually significant statistically. Many modern BI tools can help business owner to manipulate data by himself, but he may still need support to extract, transform, and load data into the system. Given the technical nature of things, help may be needed to troubleshoot as well
  • business consultant with industry specific expertise to help business owners to refine the questions they seek answers to, and create processes to ensure data integrity
  • project manager to coordinate the team, budget, and execution

Needless to say, one person can play multiple roles. 

Wednesday, July 30, 2014

Getting Force.com IDE to Work

Was exploring a bit of Force.com platform by Salesforce and started by setting up the Eclipse IDE. A few key things that I can point out are:

  • Ensure both your Eclipse and the JDK are the same "bit" version (32/64)
  • If you cannot get the "Force.com" perspective to appear, instead of adding a vm arg to eclipse ini file, set "JAVA_HOME" and "PATH" system variables on your machine: eclipse should pick it up. I have linked the documentation for setting PATH. You can use the same process for JAVA_HOME 

Monday, October 28, 2013

Dynamic Filtering


Dim filterValues() As String

'add all required values to the filter
'actvate the sheet that has filter
'you can use a dynamic range and filter column as well
'Field corresponds to column used to filter

ActiveSheet.Range("$A$1:$Z$6000").AutoFilter Field:=6,_
 Criteria1:=filterValues, Operator:=xlFilterValues

Friday, October 4, 2013

Handy Functions for Tables (ListObject)

Functions to get row number or column number for an active cell selected in the table

Function GetActiveCellTableRowNum() As Long
    Dim currTable As ListObject
    Set currTable = ActiveCell.ListObject
    
    If currTable Is Nothing Then
        GetActiveCellTableRowNum = -1
    Else
        GetActiveCellTableRowNum = _ 
            ActiveCell.Row - currTable.HeaderRowRange.Row
    End If
End Function


Function GetActiveCellTableColNum() As Long
    Dim currTable As ListObject
    Set currTable = ActiveCell.ListObject
    
    If currTable Is Nothing Then
        GetActiveCellTableColNum = -1
    Else
        GetActiveCellTableColNum = _
           currTable.ListColumns(ActiveCell.Column - _
           currTable.HeaderRowRange.Cells(1).Column + 1).Index
    End If
End Function

Monday, September 30, 2013

Validation in VBA using Regular Expressions (RegEx)

Will keep appending the validations I use (and have to think/ research before using) in this post. 

'check if it is alpha numeric
 Dim theRegex As Object
 Set theRegex = CreateObject("VBScript.RegExp")
 With theRegex
      .MultiLine = False
      .Global = True
      .IgnoreCase = False
 End With
 theRegex.Pattern = "([^A-Z^a-z^0-9^\s])"

 Set MyMatches = theRegex.Execute(nameStrRefToCompare)

 If MyMatches.Count <> 0 Then
     MsgBox ("Can have spaces, text, and numbers only")
 Else
     'do something else
 End If

Tuesday, September 24, 2013

Taking User Inputs

Post MBA I am working in Financial Services. Programming skills are, nevertheless, handy with excel and VBA. Again, just collating things that I looked for while solving problems. Not a VBA expert, so some ways may not be most efficient, but they work. For many things you can simply record a macro and play with it. For other tasks you have to do a bit of research.

To get string input:

Dim strInput As String
strInput = InputBox(Prompt:="Please input a value:", _
                Title:="Box Title")


To get range input:

Dim inputRange As Range
On Error Resume Next 'needed in case user does not select
Set inputRange = Application.InputBox _
        (Prompt:="Please select a range:", _
         Title:="Select Range", _

         Type:=8)

If inputRange Is Nothing Then

      MsgBox ("No value selected")
Else
      'do something
End If

Friday, February 24, 2012

More Patterns-2

The Decorator Pattern attaches additional responsibilities to an object dynamically. It provides a flexible alternative to subclassing for extending functionality.
Decorators (java.io is a good example):
  • Have same supertype as the objects they decorate
  • You can use one or more decorators to wrap an object
  • Objects can be decorated at runtime
  • The decorator adds its own behaviour either before and/or after delegating to the object it decorates to do the rest of the job
  • Can make code complex and cause problems if not well-thought, need to be careful before using it
Decorator pattern = responsibility. New responsibilities or behaviours are added to the design, without altering existing code.

The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which classes to instantiate. Factory Method lets a class defer instantiation to subclasses.

Factory employs two parallel class hierarchies: the creator classes and the product classes. The pattern isolates object creation and reduces object dependency.

he Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.

The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.

To prevent problems with multi-threading in Singleton creation, you can:
  • Synchronise the getInstance method. This is expensive, but is easy and can be done if we don’t expect it to be called many times
  • Use eager instantiation of the instance, if that is not too expensive and we expect Singleton to be definitely used early on
  • Use “double-check locking”. Can be done only in Java 5 and greater and can be an overkill
public class Singleton {
    private volatile static Singleton uniqueInstance;
    private Singeton() { }
    public static Singleton getInstance(){
        if(uniqueInstance==null){
            synchronized(Singleton.class){
                if(uniqueInstance==null){
                    uniqueInstance = new Singleton();
                }
            }
        }
        return uniqueInstance;
    }
}

The Command Pattern encapsulates the request as an object, thereby letting you parameterise other objects with different requests, queue or log requests, and support undoable operations.
Think of command as a waiter carrying requests from customer to chef for execution. Command itself does less work, with most of the work offloaded to an encapsulated class.
public interface Command {
 public void execute();
}


Monday, February 13, 2012

More on Patterns - 1

Useful reminders for some useful patterns:

The Template Method Pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses. It lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure.

The Template Method Pattern ensures that the algorithm lives in only one place.

A hook is a method declared in the abstract class containing the template, but given an empty or default implementation. It can be used to help the subclasses to conditionally control the flow of the algorithm, or implement/skip an optional part of the algorithm.

A lot of people use this pattern, especially for making frameworks.

Factory Method is specialisation of Template Method

Strategy and Template Method Patterns both encapsulate algorithms, one by inheritance and one by composition

The Composite Pattern allows you to compose objects into tree structures to represent part-whole hierarchies. It lets clients treat individual objects and composition of objects uniformly.

Composite Pattern often used in UI design.

If the composite structure is complex or expensive to traverse, it may help to use caching.

There are trade-offs in implementing Composite: need to balance transparency and safety with your needs.

The State Pattern allows an object to alter its behaviour when its internal state changes. The object will appear to change its class.

Strategy and State look very similar, but differ by intent. Think of Strategy Pattern as a flexible alternative to subclassing. You change the behaviour by composing with a different object. Think of State Pattern as an alternative to putting a lot of conditionals in your context. You can simply change the state object in the context to change its behaviour.

The Proxy Pattern provides a surrogate or placeholder for another object to control access to it.

Remote Proxy controls access to remote objects (RMI), Virtual Proxy controls access to resources expensive to create (loading messages), and Protection Proxy controls access to resources based on access rights (Java dynamic proxy).

Thursday, December 15, 2011

Basic Patterns Catalogue

Summarising key patterns used in development for reference.

A Pattern is a solution to a problem in a context.

An Anti-Pattern tells you how to go from problem to a bad situation.

The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.

The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.

Use Bridge Pattern to vary not only your implementation, but also your abstraction.

Use Builder Pattern to encapsulate the construction of a product and allow it to be constructed in steps. It encapsulates the way a complex object is created.

Use Chain of Responsibility Pattern when you want to give more than one object a chance to handle a request.

The Composite Pattern allows you to compose objects into tree structures to represent part-whole hierarchies. It lets clients treat individual objects and composition of objects uniformly.

The Command Pattern encapsulates the request as an object, thereby letting you parameterise other objects with different requests, queue or log requests, and support undoable operations.

The Decorator Pattern attaches additional responsibilities to an object dynamically. It provides a flexible alternative to subclassing for extending functionality.

The Facade Pattern provides a unified interface to a set of interfaces in a subsystem. It defines a higher level interface that makes the subsystem easier to use.

The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which classes to instantiate. Factory Method lets a class defer instantiation to subclasses.

Use the Flyweight Pattern when one instance of a class can be used to provide many “virtual instances”.

Use Interpreter Pattern to build an interpreter for a simple language.

The Iterator Pattern provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

Use the Mediator Pattern to centralise complex communications and controls between related objects. It can become overly complex without proper design.

Use the Memento Pattern when you need to be able to return an object to one of its previous states, e.g. if your user requests an “undo”.

Use the Prototype Pattern when creating an instance of a given class is either expensive or complicated.

The Proxy Pattern provides a surrogate or placeholder for another object to control access to it.

The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.

The State Pattern allows an object to alter its behaviour when its internal state changes. The object will appear to change its class.

The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

The Template Method Pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses. It lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure.

Use the Visitor Pattern when you want to add capabilities to a composite of objects and encapsulation is not important.

Please refer http://c2.com/ppr/ for more on patterns.

Tuesday, December 13, 2011

Force.com: What Gives?

When Salesforce.com came up with Force.com, briefly I did nurture the illusion that they wanted to make the new platform for the web. Too bad it turned out to be a marketing gimmick to tap into a wider creative potential. Brilliant strategic move, but not what I had hoped it would become.

Force.com licenses are now paid and Salesforce is coming up with a financial software. Too bad its Chatter and related ideas didn't amount to much eventually. Nevertheless, as a company it has a good future. I only rue that it could have really worked on making Force a platform for the web. That, however, would have needed a paradigm shift in business strategy. So, in a way, the company has come back to its roots; not letting itself being deluded by grandiose ideas about social networking.

Paying for Force.com is like being sold Java and then being expected to pay for it (thank God that didn't happen!): doesn't feel good. Business, however, is not about feeling good: it is about profit. Perhaps that's why Oracle bought Sun while Salesforce continues its growth saga. On behalf of people who support open-source, I can only say: RIP, Force.com (hopefully)!

Tuesday, November 29, 2011

10 Design Principles

Was going through my older notes, brushing up some technical bits. My first book for design patterns was the original book by the Gang of Four. However, the book that helped me understand Design Patterns the best was Head First Design Patterns. Following are the key design principles summarised in the book:
  1. Identify the aspects of the application that vary and separate them from what stays the same: use encapsulation.
  2. Program to an interface, not an implementation
  3. Favour composition over inheritance
  4. Strive for loosely coupled designs between objects that interact
  5. While inheritance is powerful, it does not always lead to the most flexible or maintainable designs
  6. Code should be closed to change but open to extension
  7. Principle of least knowledge: talk only to your immediate friends. Only invoke methods that belong to:
    • The object itself
    • Objects passed in a parameter to the method
    • Any object that the method creates or instantiates
    • Any components of the object
  8. Depend upon abstractions. Do not depend upon concrete classes
    • Avoid variables that hold reference to a concrete class (use Factory)
    • Avoid deriving class from concrete classes
    • Avoid overriding any of the implemented methods of a base class
    • You can ignore these guidelines if the class is highly unlikely to change
  9. Hollywood principle: don’t call us, we’ll call you. Low level components can hook into the system, but high level components determine when they are needed.
  10. A class should have only one reason to change
I have put this blog for my own reference, but hope it helps somebody else as well. To learn more, you will have to refer Head First. In next few posts I will summarise key design patterns as described in the book.

Saturday, September 18, 2010

Fewer Posts

Since I am starting my MBA from this September, this blog will see fewer posts. Nevertheless, I will log my technical learnings in general as I come across them! So, don't think I am gone, just hibernating :).

Wednesday, May 19, 2010

Debugging Tests For Blackberry Development in IntelliJ Idea

Thanks to Andrew's persistent and genius effort, the team now has a way to debug the tests in IntelliJ Idea for BlackBerry development. This still does not debug UI code in simulator, but is still a huge jump forward to help the team with super-effective unit testing. The build file has been updated to reflect the changes. Besides using this build file and the structure mentioned in the previous post, you need to follow these steps:

1. Lets assume your main application project is called SampleApp. This should appear in your Idea project as a single module. Create another module for your project and name it "testing" (say)

2. This will create a "testing" folder on your hard disk. Create an empty folder under the module and name it "src". In the project module settings set this to be source folder for the module

3. Using the ant build file, first build and test your SampleApp. This will create a "tests.jar" in the "test_build" folder and a "SampleApp.jar" in the application folder

4. Now, for the testing module open the module settings and go to the "Dependencies" pane. Add the SampleApp as Module Dependency. After this add the SampleApp.jar and test.jar. Finally, add all the dependency jars that we added for SampleApp and all the jars in the lib folder of the installed Ant. Use J2ME SDK as the module JDK

5. Now, open Run->Edit Configurations. Add a new configuration to "Application" and name it "ant run". Set the following parameters:

Main class: org.apache.tools.ant.launch.Launcher

Program parameters: -buildfile bb_build.xml -Dbasedir=C:\development\code\SampleApp test
(the base directory of your project with the ant build file in it)

Working Directory : C:\development\code\SampleApp
(has your build file)

Environment Variables: -Dant.home=C:\development\ant_installation

Use classpath and JDK of module: testing


Voila! You are ready to debug your tests! Put a break-point in your tests in SampleApp module and debug the testing module using this configuration.

Monday, May 17, 2010

Ant Script for Blackberry Development in IntelliJ Idea

To say that developing Blackberry J2ME applications is a nightmare is an understatement, especially is you wish to setup a comprehensive build and test environment for the team. It is possible to do things in bits and pieces, but having a single integrated development environment handle it all gracefully looks like a distant dream, forcing us to move to Ant and use its build scripts to get a build environment that is not only independent of the IDE but can also be used in continuous builds. Many thanks to Andrew for helping us to get this far. I have compiled the steps needed to set up the Ant environment in IntelliJ Idea.

1. Install Sun's Java ME SDK

2. Install Ant such as its path does NOT have a blank space in its installation path name

3. Install the relevant version of RIM JDE and emulator

4. Create an ordinary Java project. Change SDK to ME in project settings (Project Settings->General, you can bring up the dialog from File->Settings)

5. Check the folder in which the project has been created. Create the following sub-folders inside it: application, bin, lib, src, test, test_build, test_results. Within "test_build" create a "classes" folder

6. Even though you could link jar files from anywhere in the system, it may be a good idea to put following jars for following projects at one place in the lib directory:

Blackberry Ant Tools
JMUnit and Hammock
JDOM
J2MEUnit
Microemulator

Additionally, to make your life easier while coding, copy the net_rim_api.jar from the lib folder of the installed RIM JDE

7. In project setting (Project Settings->Modules), set "src" as the source folder and "test" as the test folder. In dependencies, add jars for RIM, JMunit, Hammock and J2MEUnit.

8. Expand the "Ant Build" panel and open properties dialog. Under execution, use custom ant and point to the intallation that does not have any blank spaces in its path. Under Additional Classpath, add all the jars that we had put in step 6. Be sure to have the ant tasks for JMUnit and Blackberry Ant Tools.

9. You are all ready to start coding under your "src" folder and write tests under your "test" folder. Now we need a build file that can enable you to actually build and test your code. For that, make a "build.xml" file, which will be your ant script, and place under the root folder. Use this script provided for you. Don't forget to adjust the paths as per your installations. With some luck, this should bring up 8 tasks on your pane: build, build_and_deploy, build_deploy_and_launch_simulator, launch_simulator, test, test_compile. Note that the build task will not launch test task in the current script, but you could change it if you please.

These tasks will accrue you the following benefits:

1. You can write your blackberry development code in Idea
2. You have an ant script that can be used to make contunuous builds and tests. The test also generates reports that are stored under the test_results folder.

My team has still not found a satisfactory answer to debugging, but current set-up helps us to develop using a more effective tool and get our automated build systems to run effectively for the wretched J2ME. Moreover, this Ant script can be run from any IDE (with similar configuration for the ant used). It is still not 100% perfect, but we are getting there: constantly thinking about testability, logging and sustainability of build environment. I will keep updating the build file so as it gets more comprehensive.

PS: We were able to build and test using Ant and Netbeans, but the build/deploy part was tightly coupled with Netbeans, which was not encouraging for automated build tasks.

Wednesday, April 14, 2010

An Ode To Testing

Even though I am all for quality, testing can get torturous at times. So here is a fun take on the perils of testing by yours truly :)

"O Horrible testing, in ways so many of thee
You take pleasure in tormenting me

Test cases are many, JUnit is one
And these useless stubs under the sun
Trying to focus my eyes water
As my head starts feeling hotter
And I yawn and I fall
Horribly sleepy one and all
In search of quality I seek thee
But a JMocking venomous smirk is all I see
Murderously as you try to JRun me
Yes, you take pleasure in tormenting me"

Tuesday, April 13, 2010

Thinking Quality: Basic Thumb Rules

Quality of code is often a critical issue in a development team. Ensuring the quality can get complicated for a variety of reasons, so let us explore the possible ways to ensure code quality.

First, it is important to get the programmer to think how he can keep improving the quality of his code. Bugs are inevitable, but that is no excuse for shabby programming. However, it is difficult to get most developers to take this seriously without antagonizing them. Nevertheless, making unit testing integral to development can check many if not all bugs. People can also be encouraged to develop a customized check-list for themselves to help them avoid common mistakes. Having a "company-wide" check-list may prove to be both counter-productive and bureaucratic.

Second, code reviews can be useful. However, it can cause antagonism within the team and people may be reluctant to criticize each other. Moreover, it can be done effectively only by senior and more experienced people in the team. Anonymous, time-bound reviews is one potential answer to use this tool.

Third, using Agile and related development technologies will help the manager to leverage the full experience of the team, get them closer to the requirements and avoid many bugs related with misunderstanding specifications.

Finally, the productivity of the team is the function of morale. Morale for different people can mean different things. The best way, however, to build it is by having a clear vision for the company and being able to percolate it meaningfully in every aspect of work. Further, focus on the strengths and interests of each team member instead of focussing on their weaknesses.