Monday, January 28, 2019

A Model for Quality Assurance via Software Testing

Remember that all models are wrong; the practical question is how wrong do they have to be to not be useful.
The most that can be expected from any model is that it can supply a useful approximation to reality: All models are wrong; some models are useful 
With that well known disclaimer, here's presenting a hopefully useful model for addressing your software development project's quality assurance needs. 

It starts at the root Test and Quality Assurance Documentation entity which is an aggregation of the following 3 top level header entities of 

  1. Planning - Test Strategy and Test Management Plan
  2. Doing - Test Cases
  3. Reporting - Test Reports

The main goal of the model is to help kick start the thought process for a software project's new quality assurance development via software testing. The model identifies many entities in the software testing domain and draws relationships between them.

This approximate model could perhaps be further extended for your specific project's needs for quality assurance and software testing.

Your inputs are welcome!

Feel there are more core basic entities that can be added to this model?
Any extension entities or new relationships between entities?
Please, write in the comments section below.


A Model for Quality Assurance via Software Testing
A Model for Quality Assurance via Software Testing

Friday, September 30, 2016

A minimalist problem solving model that avoids the creep in of the law of instrument (Maslow's hammer)

This blog article presents a simple model to help avoid the creep in of subtle (or not!) effects of the law of instrument (Maslow's hammer) while problem solving in general. This is applicable to research projects with partners across organisational, geographic boundaries in particular.

A minimalist model for problem solving for business and research projects

At the outset, the model differentiates between and isolates the domains of the problem and the solution. It is important to understand stakeholders' needs 'independent of' and 'in isolation from' technology, known and previously produced solutions thereby focusing purely on the problem. Chances are better that this approach could lead to new innovative 'thought out of the box solutions'.

At the very least, it avoids the expertise in the solution domain introducing the effect of the law of instrument (Maslow's Hammer). That is 'I have a hammer (solution) and everything (problem) looks like a nail to me'.

The model (shown in the diagram above) is derived from the text description in the article from the year 2000 - Features, Use Cases, Requirements, Oh My! - by Dean Leffingwell. The diagram elaborates only high level objects and their relationships and links the problem and solution domains. After this level, it is possible to extend the model by introducing objects that are unique to one's needs (for e.g. use cases, pre-conditions, post-conditions etc.).

This is a minimalist model and in particular it has been effectively used by EU research projects such as STREETLIFE (an FP7 funded research project) for all project members to quickly align with the purpose and goal (the big picture) of their activities. The model is introduced in the deliverable D2.2.2 Blueprint Architecture, Security Architecture and Pilot Specific Architectures (Intermediate) and is effectively employed for the mobility management and control panel (MMECP) use case descriptions.


References

  1. Features, Use Cases, Requirements, Oh My! - Dean Leffingwell, SVP, Rational Software, 2000
  2. The law of Instrument, Maslow's Hammer
  3. STREETLIFE Deliverable D2.2.2
    1. Blueprint Architecture, Security Architecture and Pilot Specific Architectures (Intermediate)
    2. Download the document from the Cordis Europa Site here
  4. The STREETLIFE project on the Cordis Europa Site
  5. The STREETLIFE project website

Saturday, March 12, 2016

A framework for an Integrated Technical Architecture in EU research projects with a geographically and organisationally distributed partner setup

Disclaimer: The author of this blog entry is also the editor/co-author of the document which describes the Technical Architecture Integration Concept that this blog entry recommends/promotes as a best practice for EU commission funded research projects.
Getting straight to the point, this deliverable document from the STREETLIFE project (available here @ CORDIS which is the European Commission's primary public repository and portal to disseminate information on all EU-funded research projects and their results) has to offer "a reusable framework for an early approach within European Union (EU) research projects with a distributed partner/pilot platform setup to arrive at an integrated technical architecture". Although, this could generally also be applied in situations where a Software Architect needs to work with a cross organisational distributed setup for research or business projects. To understand the background and associate it with the need for an integrated technical architecture in your architecture projects, continue reading further.

1. For WHOM is this relevant?

In general, the approaches try to address working with constraints put forth by organisational and geographical boundaries when working within projects that are setup with teams picked across organisations and regions. In my opinion, this is a pattern that occurs often within many EU projects commissioned by the former FP7 or the newer Horizon 2020 framework. Hence, this article is particularly relevant for Software Architects working in such projects.

2. WHY?

Mel Conway from his 1967 paper on "How committees invent?" submitted to the Harvard Business Review states
"Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure."
Therefore, the structure of the software built by partners within an EU project will tend to reflect the social boundaries of the organization(s) that produced it. EU projects are in general composed of partners that are distributed across the European Union and have completely disconnected managements, software development processes, test and deployment environments. As a result, the architectures of software built within an EU project is bound to be under duress. This is due to the organisational architecture of the partners within the project which defines the communication structure from which the definition of the architecture design is derived.

In my opinion, at the beginnings of many EU projects with a distributed team/pilot/partner setup, it is highly unlikely that all architectural views and viewpoints are laid out and most importantly 'agreed' upon by all partners. It might be that the Architect will need to define such architectural views during the early part of the project's lifetime for addressing the purpose/goals of the project. Development work can only begin after some high level views and viewpoints are agreed upon.

A collaborative pattern persists in EU projects of this nature. There are partners from many EU corporate companies, EU city administrations, EU research institutes/universities that participate in the project jointly.

Probability is high that the partners will have their own development and deployment environments to satisfy their own local experiments. Therefore, having a common software platform in most instances is not a viable option.

This normally leads to conflicting requirements within the project. An example below,
  • Requirements from the EU commission's project office that the partners'/cities' platforms should work in a completely connected way as a necessity to provide concrete re-usable results, standalone software components at the end of the project. 
This conflicts with the following,
  • Requirements from partners within the project that their platforms need to work independently due to intellectual property restrictions, data privacy restrictions or speed of deployment or control restrictions.
These constraints complicate the overall system architecture. More such constraints are described in the D2.2.2 deliverable document within the context of the STREETLIFE project.

3. HOW? 

In particular, within the scope of the projects it should be avoided right from the start that similar solution components are developed in each city's pilot site leading to a 'reinventing the wheel' phenomenon. Ideally, the solution components needed across all pilots are shared after it is agreed upon where it is to be built within the project. Ideally, the pilots also develop common project goals and evolve them into scenarios that involve some process orchestrations across different city pilot solution components.

The document in focus here (Deliverable D2.2.2 from the STREETLIFE project) attempts to address all these constraints and generalize all the solutions into a framework that could be reused/reapplied within EU research projects with a distributed team/partner/pilot setup similar to STREETLIFE. For details, one can always lookup the document from the link above or from the references section. These concepts are based on the Integration Architecture concept from the 'Managed Evolution' book by Stephan Murer and Bruno Bonati.

In summary, the deliverable details how to define integration in your projects and then defines two concepts - vertical and horizontal (gif animations below) through with many constraints presented can be handled.

Vertical or Scenario based Integration Concept

Horizontal or Component based Integration Concept

4. REFERENCES


  1. STREETLIFE Deliverable D2.2.2
    • Blueprint Architecture, Security Architecture and Pilot Specific Architectures (Intermediate)
    • Download the document from the Cordis Europa Site here
  2. The STREETLIFE project on the Cordis Europa Site
  3. The STREETLIFE project website
  4. CORDIS - the European Commission's primary public repository and portal to disseminate information on all EU-funded research projects and their results in the broadest sense
  5. Managed Evolution - Stephan Murer and Bruno Bonati

Thursday, February 11, 2016

Software Architecture Communication Tweaks

This article describes a software architecture communication tweak that could potentially be applied with low effort in development projects with 20-30 developers. Although, in my opinion, with some tooling support this is scalable and can be applied to larger development projects too.

1. Why?

As a Software Architect, do you feel the need to
  • use UML based sketches to express designs within your team?
  • have your design documentation and code housed in one project artifact?
  • enable easy acceptance of documentation needs within development teams?
  • delegate the creation/maintenance of designs to developers? 
  • aggregate individual designs into a 'big picture overview' of the architecture? 
  • have the latest versions of designs accessible at all times to all stakeholders?
  • be able to view these designs without additional software (preferably in a browser)?

2. How?

2.1 Get a buy-in from the development team

The objective is to get development teams to agree to create and maintain designs of structure and behavior of components in their area of responsibility.

This might be easier if the Architect's documentation methodology does not take the development team away from their favorite and familiar development environments. It should also not introduce new tools and additional work for the development team.

Most often than not, from a developer's perspective, it helps if the designs can be expressed in a 'code like' fashion within familiar development environments.

It also helps if the code and its design are co-located. That way, the developer who makes code changes can also make changes to the design that the code expresses. And with a little bit of discipline and perseverance ... viola! they are both in sync. Anytime you as a Software Architect look it up you are viewing the latest state of the design and code.

2.2 Marry code and design

Employ PlantUML. It is a simple way to 'code' UML that can be rendered into images by GraphViz. PlantUML is used to draw UML diagrams, using simple and human readable text descriptions. Due to its code like form PlantUML can be easily embedded directly within your code so that there are no 'two' separate locations where the design and the code live for their happily ever afters.

2.3 Version designs

Hopefully, you already version your code! Since the code and design 'live' together it is natural to use the same system to version your designs as well. A version system (for e.g. SVN or Git based Server) that is setup in your local network and also has web interfaces is ideal for the next steps.

2.4 Make the versioned designs accessible

2.4.1 Viewing designs via a consolidated architecture documentation

If you already have a documentation model for your architecture, you will need to figure out how to embed and render the PlantUML images in their latest avatars in your documentation. For example, if your architecture documentation was within a wiki, it should be easy to embed the images that PlantUML rendering software can output image files accessible via URLs on your version system. You could even think of embedding these images within the markdown files within your version system's wiki itself.

2.4.2 Viewing individual designs directly within a browser

To enable your browser to directly render PlantUML code you might want to install the PlantUML Viewer - a PlantUML rendering Chrome Plugin.

3. Sample Implementations with GitHub

Here are a few samples that use GitHub as the version system and also as an interface where consumers of the architecture can access the latest version.

Requirements to view the diagram directly in a browser

NOTE: This does not work on your mobile's google chrome browser since the chrome plugin is not available for it.

Once you have the above installed you are all set! Just navigate to the links in the list below and you should see the PlantUML text rendered into UML diagrams directly in your browser. Rendered images are also attached below this list for your reference - these images are what you should see when you click on the links below.
  1. A simplified RSA CryptoSystem based communication expressed as a sequence diagram
    1. Structural design expressed using a Component Diagram  
    2. Behavioral design expressed using a Sequence Diagram
    You can download the source code for these PlantUML text files on GitHub.

    A Simplified RSA CryptoSystem based communication
    A Simplified RSA CryptoSystem based communication

    Structural Design of the CryptoUtility Package
    Structural Design of the CryptoUtility Package

    Behavioral Design of the Actors interacting with the CryptoUtility Package
    Behavioral Design of the Actors interacting with the CryptoUtility Package

    4. Conclusion

    In summary, an architecture needs to be descriptively documented, communicated and accessible in its current version to all stakeholders as it evolves over time. As an architecture evolves, chances are that its current version as implemented and the documentations are not in sync. Keeping them in sync and enabling easy access to the latest version of the architecture to all stakeholders are challenges.

    The methods described in this article are ways that a Software Architect can ensure that stakeholders with the responsibility to create and update architectural designs can do so easily and effectively and stakeholders who read the architecture are always provided with the latest version of the architecture. Thereby closing the gap between production and consumption of architectural designs and effectively enhancing architecture communication within the development and management organisations.

    5. References

    1. Plant UML - PlantUML is used to draw UML diagrams, using simple and human readable text descriptions. 
    2. PlantUML Viewer - A chrome plugin by Peter Prikryl
      1. If you like this plugin, support the original author via the PayPal button on the PlantUML site
    3. The GitHub Project - Get all examples shown in this article
    4. PlantText - The PlantText tool is an online tool for quickly creating UML diagrams
    5. Alice and Bob: IT's inseparable couple

    Sunday, February 16, 2014

    Music for the moment - A process for organisation of your music files to support recall criteria such as mood and occasion

    The software needed to organize and recall your music based on the usual criteria of artist, title + mood, occasion, tempo
    This post is for folks owning a large local (not in the cloud) music collection looking to clean up the tags in these music files. The music files can be of type mp3, flac or ogg (may be applicable to other file types as well). The final objective of the process proposed in this post is to support recall - to be able to play music for a particular occasion or mood without the listener having to frequently intervene and interact with the player by searching, creating playlists (smart or otherwise) etc. ...... and all this with low effort to support the players which aid recall - so the theme of this post is to support you to stop seeking, organizing music and start listening to what you have now.

    Disclaimer: The author is not associated in any way other than being a user of the software MusicBrainz Picard, MediaMonkey & JukeFox that are mentioned in this post.

    Step 1. Clean up the tags in your music files

    This is possible with MusicBrainz Picard (it's free). It is possible to use acoustic fingerprinting to tag your music with this tool. This is extremely accurate as compared to other free tools that tag music only based on information already preexisting within the tags.

    If your collection consists of whole albums, this is an ideal solution.

    This documentation of MusicBrainz Picard details how one can tag one's music collection.

    Step 2. Add additional tags such as genre, grouping, mood, tempo, occasions to support selective recall

    To add the album cover art and tags such as genre, grouping, mood and tempo to your music files plugins have to be enabled within MusicBrainz Picard. These are the Cover Art Downloader plugin, Last.fm and Last.fm Plus plugins. Of course all this depends on how well the files are tagged within the MusicBrainz Picard Database - this is done by the community - so expect some discrepancies. This seems to be quite minimal though. And especially if your music collection is quite disorganized - something that supports recall is better than nothing at all. But MusicBrainz Picard does provide the user good control options to not overwrite some tags etc.

    The options available to give one fine control over what goes into the genre,grouping, mood and occasion tags

    Contributing to the community MusicBrainz Database
    If you do not find listing for any tag data for some of the CDs that you own you can add them to the MusicBrainz Database by creating an account for yourself.

    It is important to note that the data that goes into the genre tag from the Last.fm plugin are many times a list of multiple genres each separated by a semicolon. For example you will find So you will see a tag entry such as Beatles; Oldies; 60S; Pop; British; The Beatles; Rock; Classic Rock in the genre tag and Classic Rock in the grouping tag. This grouping tag, as the name suggests, groups a bunch of genres together. This is also another way for one to be specific or generic towards the style of music being played.

    Performance of the Tool
    MusicBrainz Picard works much better on Linux than on Windows. It might crash unexpectedly when adding a large number (>750) of songs for tagging on Windows 7. On Linux Mint it performed fine even with a large number (>3500) of songs.

    Step 3. Use players that support these extra tags to selectively recall your music based on criteria such as mood, occasion etc.

    Now for the best part .... to listen to the sweet sound of success!

    Let us say your requirement is that you are working on a project that requires a lot of concentration. All you need is look for files with the tag occasion with value background and viola! songs that blend into the background will start to play.

    The next step is to find players that leverage these extra tags found in your music files to 'automagically' give you what you want to hear at the moment.

    On the desktop - one could use MediaMonkey which supports multiple genres, moods, occasions and tempo tags as shown in the picture below. MediaMonkey has a free and a paid version at the time this article was written and is available on windows only. One can run it with WINE on a Linux box.

    The grouping, classification tree node in MM and what it can help you find
    On an android device - A quick search on google for 'smart music player for android' the top hit is Jukefox (JukeFox on the Playstore). It is free and offers some neat innovative features for someone looking to play music to suit a mood or occasion. It learns your actions (play, skip, forward etc.) and associates it with what you want to listen to at the moment. For example - In one session of using the player in a shuffle mode, it learns what music you are skipping without listening to and stops suggesting songs of the same style, genre or artist to you. It seems to have lots of other smart features as well and is worth exploring. During the first import of your music into the player the software recommends (though I feel its a requirement for it to get smart) that you are connected to the internet so jukefox can infuse some more of its grouping smartness. During normal playing though it does not require an internet connection. The video below shows all the features at a glance.

    Friday, November 22, 2013

    Reducing your Android phone's battery power consumption

    Gone are the days when one charged a 'not so smartphone' once in 2 to 3 days. Smartphones these days are known to need charging on a daily basis. That is understandable, but my  Samsung Galaxy SII GT-I9100 reached a point where it demanded charging every day - twice a day !!!

    The situation was bad, especially, when I was out & away from power sources for my phone for extended periods of time. When I needed it the most I would find the low battery warnings. I would want to use the phone for some critical purpose (like calling someone) and what do you see - a 'Low Battery' warning. I would have a wonderful 'kodak moment' to capture with the phone's lens and my smartphone's flash would not work because of 'Low Battery' ! It was frustrating !

    My first assumption was that the battery was kaput and needed replacement. Before building on that thought, I checked if the software was not party to the crime ! I was right, the operating system software of the smartphone was indeed a major suspect in the 'battery drain' case !

    Hence this post that articulates some of the steps I took to work around this problem. With these measures taken, nowadays after a full charge I am still left with around 60% of battery even after 10-12 hours of normal usage and without hampering any communications via the phone. Earlier I would have needed to charge the phone once in that period.

    Some points mentioned below may be specific to the Samsung Galaxy SII GT-I9100 but similar configuration screens would be available on your android phone.

    So, what are the things that you can do to save yourself some smartphone juice when you 'really' need it ?!

    Phone settings to pay attention to for battery conservation & usage stats








    Reflect on what is consuming the battery ?

    • Tools to support this reflection
      • In the phone settings you will find the Power saving settings
        • Use this to setup your phone for power savings
      • In the phone settings you will find Battery 
        • Here invariably most phones will show the display is consuming most battery
        • So how can you reduce your screen usage 
          • Check the display settings for and set them appropriately to consume lesser battery.
            • Brightness - what brightness settings have you chosen ?
            • Screen timeout - how long do you want your phone to stay on ?
            • No Smart stay ? 
    • Is the phone's GPS on ?
      • (this is a very quick battery drainer - you forget to switch off GPS after using it and in a short time you might not be able to make calls on your smartphone! Read below about AutomateIt on how to not let your slacker memory be cause of a battery drain) 
    • Is the phone's Bluetooth on ?
    • In addition you will find some apps seems to be consuming lot of battery
    • Reflect on whether you need all the apps that you have on your smartphone, it is so easy to go overboard with installing apps and with time forget about them as they idle in the background and consume battery power. In some cases these apps are pre-installed and come from the device manufacturer. If you do not have the liberty to root the device perhaps you will not be able to get rid of them. Some examples of heavy battery consumers are apps such as Google Now. This is because of their data connection requirements. Also synching of your google accounts causes a battery drain especially if you are using it to synch your pictures.
    • You might also want to review your smartphone's data and wifi settings
      • Is your phone constantly searching for a wifi connection ?
      • Are apps on your phone constantly trying to get onto the network ?
          ......... now, this leads us to review and reflect on your smartphone usage habits.
          

    Reflect on your own smartphone usage habits

    • Do you need to be online all the time?
      • If not, you have a very good chance of saving unnecessary power consumption by your phone - read below about AutomateIt and how it can help make your smartphone smarter in terms of power consumption.
        b. What are the main uses of the smartphone
            You might come up with a very finite small number of apps that will help you meet those uses, this is a very good input for your making the most of the AutomateIt app !

    AutomateIt - Make a smarter smartphone with AutomateIt !

    Disclaimer: I am not associated with the makers of AutomateIt in anyway that I an aware of. I  only use the Android app and find good utility in it!


    AutomateIt - read as Automate it
    Would you like your android phone to
    • go mute and stay silent automatically when you are in meetings?
    • go mute during certain times of the day?
    • seek for WiFi networks only when you are in certain regions (for example only at home)?
    • make the WiFi/Data connections active only when the apps that need them are activated?
    • routinely schedule a data or wifi connection to allow apps?
    • switch on GPS only when you are using Maps or any other such application?
    • keep the screen on longer only when you are on certain apps and otherwise go off sooner to conserve battery power?
    The above are just a very small set of what you can use AutomateIt for (and most of them help conserve your battery power).

    AutomateIt has a very simple model - A rule consists of a trigger that results in an action.

    You select the triggers from one screen and then select an action in the next, you name the rule and schedule it if necessary. That's it.

    AutomateIt configuration options

    The video here shows how a simple rule of setting your phone to silent on a schedule with AutomateIt.



    AutomateIt has a free version and a paid pro version. Personally for me, playing around with the free version for a while convinced me that I could do more with the pro version. The pro version comes with composite triggers, calendar triggers and sensor triggers. I have heard that iOS devices do many of the battery conserving activities by some blanket rules. Again personally, I appreciate the better, configurable control that comes with the Android phone and the apps in its ecosystem.

    Where to get AutomateIt?

    Do you already use and like AutomateIt ? How do you use it ?

    References

    1. Samsung Galaxy S 2 website
    2. The AutomateIT app website
    3. AutomateIT on the Google Playstore and Amazon's app store
    4. Other tools for further analyzing and fine tuning battery usage 

    Saturday, November 9, 2013

    Innovation versus Invention

    This post does not conclude with answers, rather attempts to sequence a set of thoughts in the direction of the topic and poses questions that you are welcome to answer or corroborate with your own thoughts.

    Innovation vs. Invention : Word usage over time

    The Google books Ngram Viewer clearly shows that starting around 1972 the word innovation has appeared more that the word invention in the English corpus it indexes.



    Putting aside questions about the quality of the corpus etc. can we ask the question - Is it true that innovation is more of recent times than those of the yesteryears ?

    Innovation vs. Invention : Wikipedia definitions
    The Wikipedia's entry defines innovation and contrasts it with improvisation and invention

    Innovation : Innovation is the application of better solutions that meet new requirements, inarticulate needs, or existing market needs.
    Invention : Invention refers more directly to the creation of the idea or method itself.
    Improvisation : Is not doing anything new but doing the same thing in a better way.

    The diagram below attempts to capture the same thought pictorially.

    Innovation is connecting the dots
    Innovation vs. Invention :  Creativity Vs. Associativity?

    Inventions are definitely creative in nature but an innovation from the above section seems to indicate that it is associative in nature. So what is the relationship between associativity and creativity ?

    The paper on 'Cognitive Mechanisms Underlying the Creative Process' details the following along with the two distinct forms of thought for a creative process.

    'The first is a suggestive, intuitive associative mode that reveals remote or subtle connections between items that are correlated but not necessarily causally related. This could yield a potential solution to a problem, though it may still be in a vague, unpolished form. The second form of thought is a focused, evaluative analytic mode, conducive to analyzing relationships of cause and effect . In this mode, one could work out the logistics of the solution and turn it into a form that is presentable to the world, and compatible with related knowledge or artifacts.

    This suggests that creativity requires not just the capacity for both associative and analytic modes of thought, but also the ability to adjust the mode of thought to match the demands of the problem, and how far along one is in solving it.'
    • Does innovating require the first form of thought - suggestive, intuitive and associative ? 
    • Does inventing require a more focussed, evaluative analytical form of thought? 
    • How do these words fare in the Google books Ngram Viewer ?
    Oh yes, there is an answer for the last question.



    References
    [1] The Wikipedia's take on innovation
    [2] Cognitive Mechanisms Underlying the Creative Process - Liane Gabora
    [3] Google Books Ngram Viewer