7.8.10

Survival Guide Checklist

Below is a very useful checklist (test) for a software project from the book “Software Project Survival Guide” of Steve McConnell. You can also find an excel version of this survival test on the webpage of the book.

Survival Test

Give the project 3 points for each "yes" answer. Give the project partial credit if you feel that is most accurate—for example, give it 2 points for "probably" and 1 point for "kind of, but not really." If the project is in the early stages, answer the questions based on the project plans. If the project is well underway, answer the questions based on what has actually happened on |the project. The section following the test explains how to interpret the score.


Requirements
1.  ____  Does the project have a clear, unambiguous vision statement or mission statement?
2.  ____  Do all team members believe the vision is realistic?
3.  ____  Does the project have a business case that details the business benefit and how the benefit will be measured?
4.  ____  Does the project have a user interface prototype that realistically and vividly demonstrates the functionality that the actual system will have?
5.  ____  Does the project have a detailed, written specification of what the software is supposed to do?
6.  ____  Did the project team interview people who will actually use the software (end users) early in the project and
               continue to involve them throughout the project?
7.  ____  Does the project have a detailed, written Software Development Plan?
8.  ____  Does the project’s task list include creation of an installation program, conversion of data from previous versions of the system, integration with third-party software, meetings with the customer, and other "minor" tasks?
9.  ____  Were the schedule and budget estimates officially updated at the end of the most recently completed phase?
10.  ____  Does the project have detailed, written architecture and design documents?
11.  ____  Does the project have a detailed, written Quality Assurance Plan that requires design and code reviews in
                 addition to system testing?
12.  ____  Does the project have a detailed Staged Delivery Plan for the software, which describes the stages in which
                 the software will be implemented and delivered?
13.  ____  Does the project’s plan include time for holidays, vacation days, sick days, and ongoing training, and are
                resources allocated at less than 100 percent?
14.  ____  Was the project plan, including the schedule, approved by the development team, the quality assurance team, and the technical writing team—in other words, the people responsible for doing the work?


Project Control
15.  ____  Has a single key executive who has decision-making authority been made responsible for the project, and does the project have that person’s active support?
16.  ____  Does the project manager’s workload allow him or her to devote an adequate amount of time to the project?
17.  ____  Does the project have well-defined, detailed milestones ("binary milestones") that are considered to be either
                100 percent done or 100 percent not done?
18.  ____  Can a project stakeholder easily find out which of these binary milestones have been completed?
19.  ____  Does the project have a feedback channel by which project members can anonymously report problems to their own managers and upper managers?
20.  ____  Does the project have a written plan for controlling changes to the software’s specification?
21.  ____  Does the project have a Change Control Board that has final authority to accept or reject proposed changes?
22.  ____  Are planning materials and status information for the project—including effort and schedule estimates, task 
                 assignments, and progress compared to the plan thus far—available to every team member?
23.  ____  Is all source code placed under automated revision control?
24.  ____  Does the project environment include the basic tools needed to complete the project, including defect tracking software, source code control, and project management software?


Risk Management
25.  ____  Does the project plan articulate a list of current risks to the project? Has the list been updated recently?
26.  ____  Does the project have a project risk officer who is responsible for identifying emerging risks to the project?
27.  ____  If the project uses subcontractors, does it have a plan for managing each subcontract organization and a single person in charge of each one? (Give the project full score if it doesn’t use subcontractors.)


Personnel
28.  ____  Does the project team have all the technical expertise needed to complete the project?
29.  ____  Does the project team have expertise with the business environment in which the software will operate?
30.  ____  Does the project have a technical leader capable of leading the project successfully?
31.  ____  Are there enough people to do all the work required?
32.  ____  Does everyone work well together?
33.  ____  Is each person committed to the project?

Total
______  Preliminary score. Add up the points next to each answer.
______  Size multiplier. Write in 1.5 if the project team has 3 or fewer full-time– equivalent people including developers,
              quality assurance personnel, and first-level management. Write in 1.25 if it has 4 to 6 full-time–equivalent people. Otherwise, write in 1.0.
______  Final score. Multiply the preliminary score by the size multiplier.



Scoring Guidelines

This is a difficult test for most projects; many will score less than 50 points. The table below explains how to interpret the score.

Score/Comments


90+
Outstanding
  A project with this score is virtually guaranteed to succeed in all respects, meeting its schedule, budget,
quality, and other targets. In terms of Chapter 1’s project needs hierarchy, such a project is fully "self-actualized."
  80–89
Excellent
  A project at this level is performing much better than average. Such a project has a high probability of delivering its software close to its schedule, budget, and quality targets.
  60–79
Good
  A score in this range represents a better-than-average level of software development effectiveness. Such a project stands a fighting chance of meeting either its schedule or its budget target, but it probably won’t meet both.
  40–59
Fair
  This score is typical. A project with this score will likely experience high stress and shaky team dynamics, and the software will ultimately be delivered with less functionality than desired at greater cost and with a longer schedule. This kind of project stands to experience the greatest benefit from applying the plan described in this book.
  < 40
At Risk
  A project with this score has significant weaknesses in the major areas of requirements, planning, project control, risk management, and personnel. The primary concern of a project in this category should be whether it will finish at all.

(Source: Software Project Survival Guide, S. McConnell, ISBN: 978-1572316218)

1.8.10

Kommunikation: Grundlagen

Kommunikation ist die wichtigste Form der menschlichen Interaktion. Zum Kommunikationsprozess gehören:

  • Direkte Kommunikation (face-to-face)
  • indirekte Kommunikation (Massenkommunikation, Telekommunikation)

Zwei Theorieansätze sind für die Praxis herausragend bedeutsam:

  1. Das Kommunikationsmodell (nach Paul Watzlawick): Jeder Kommunikationsprozess besteht aus Sender, Nachricht und Empfänger. Der Sender codiert seine Nachricht (Sprache, Zeichen) und der Empfänger hat die Aufgabe, die Nachricht seinerseits zu decodieren, die kommunikative Botschaft also in das individuelle Syste, seiner Bedeutungsbezüge einzuordnen. Jede Nachricht beinhaltet einen sachlichen Aspekt und einen Beziehungsaspekt.
    (Die Kommunikation über die Kommunikation wird als Metakommunikation bezeichnet.)
  2. Modell der vier Seiten der Nachricht (nach Schulz von Thun): Schulz von Thun hat das Watzlawick’sche Modell weiterentwickelt und unterscheidet vier Seiten einer Nachricht:
    • Inhaltsaspekt: Worum geht’s? Wie ist der Sachverhalt zu verstehen?
    • Beziehungsaspekt: Wer redet mit wem? Wie steht er zu mir? Wie ist unsere Beziehung?
    • Selbstoffenbarung: Wer ist er?Was beschäftigt ihn? Was ist mit ihm los?
    • Appell: Was will er von mir? Was soll ich denken, fühlen, tun?

(Quelle: Mitarbeiter Führung, Oppermann-Weber, 2008, 3. Auflage, ISBN: 978-3-589-23405-9)

5.7.10

Replace invalid characters with Regular Expression

The code snippet below replaces all invalid characters for a filename with Regex’ static Replace method;

/// <summary>
/// Replaces invalid path/file characters in given string with an underscore
/// </summary>
/// <param name="getString">string array to get string from CTX-Release</param>
/// <param name="lParamCount">number of parameteres which is set by CTX-Release while calling the function</param>
/// <returns>string with invalid characters replaced with underscore</returns>
public string ReplaceInvalidPathChars(object[] getString, int lParamCount)
{
string retValue = String.Empty;
if (getString.Length > 0)
{
retValue = getString[0].ToString();
char[] invalidChars = System.IO.Path.GetInvalidFileNameChars();
string invalidString = Regex.Escape(new string(invalidChars));
retValue = Regex.Replace(getString[0].ToString(), "[" + invalidString + "]", "_");
retValue = retValue.Replace(" ", "_");
}
return retValue;
}





(Source: C# in a Nutshell by Albahari)

29.6.10

XML Serialization objects generically

Below is an example to serialize and deserialize an object using generics in C#:

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

public class MyClass
{
public static void RunSnippet()
{
string test = "abc";
int number = 123;
WL(XMLSerializationUtility.SerializeObject(Encoding.UTF8, test));
WL(XMLSerializationUtility.SerializeObject(Encoding.UTF8, abc));

}

#region Helper methods

public static void Main()
{
try
{
RunSnippet();
}
catch (Exception e)
{
string error = string.Format("---\nThe following error occurred while executing the snippet:\n{0}\n---", e.ToString());
Console.WriteLine(error);
}
finally
{
Console.Write("Press any key to continue...");
Console.ReadKey();
}
}

private static void WL(object text, params object[] args)
{
Console.WriteLine(text.ToString(), args);
}

private static void RL()
{
Console.ReadLine();
}

private static void Break()
{
System.Diagnostics.Debugger.Break();
}

#endregion
}



public class XMLSerializationUtility
{
public static T DeserializeObject<T>( Encoding encoding, string xml )
{
try
{
using (MemoryStream memoryStream = new MemoryStream( StringToByteArray( encoding, xml ) ) )
{
using ( XmlTextWriter xmlTextWriter = new XmlTextWriter( memoryStream, encoding ) )
{
XmlSerializer xmlSerializer = new XmlSerializer( typeof( T ) );

return (T)xmlSerializer.Deserialize( memoryStream );
}
}
}
catch
{
return default( T );
}
}

public static string SerializeObject<T>( Encoding encoding, T obj )
{
try
{
using(MemoryStream memoryStream = new MemoryStream())
{
using ( XmlTextWriter xmlTextWriter = new XmlTextWriter( memoryStream, encoding ) )
{
XmlSerializer xmlSerializer = new XmlSerializer( typeof( T ) );
xmlSerializer.Serialize( xmlTextWriter, obj );

memoryStream = (MemoryStream)xmlTextWriter.BaseStream;
}

return ByteArrayToString( encoding, memoryStream.ToArray() );
}
}
catch
{
return string.Empty;
}
}

private static Byte[] StringToByteArray( Encoding encoding, string xml )
{
return encoding.GetBytes( xml );
}

private static string ByteArrayToString( Encoding encoding, byte[] byteArray )
{
return encoding.GetString( byteArray );
}
}






Source: http://www.dotnet-snippets.de/dns/objekt-serialisierung-SID1407.aspx

25.6.10

Early warning signs that an SW-Architecture is in trouble

  • The architecture is forced to match the current organization.
  • Top-level architecture components number more than 25.
  • One requirement drives the rest of the design.
  • The architecture depends upon alternatives in the system software.
  • Proprietary components are being used when standard components would do.
  • The component definition comes from the hardware division.
  • There is redundancy not needed for reliability (or load balancing).
  • The design is exception driven (emphasis on the extensibility, not on core commonalities).
  • The architect or project manager has difficulty identifying the stakeholders.
  • The project team has difficulty identifying the architect(s) of the system.
  • Developers have a plethora of choices in how they design and code.
  • The architect, when asked for architecture documentation, produces class diagrams and nothing else.
  • The architect, when asked for architecture documentation, provides a large stack of automatically generated documents which no humans has ever seen.
  • Documents provided are old and apparently not kept up to date.
  • A developer, when asked to describe the architecture, is either unable to or describes a much different architecture than the architect presented.

14.6.10

Checklist: questions the architect should plan to answer

  1. What are the driving architectural constraints, and where are they documented? Are they requirements or goals? Are they measurably quantitative or qualitative? In particular, what are the system's real-time constraints?
  2. What component types are defined? For each, what are its:
    • Responsibilities
    • Methods, data members
    • Limitations
    • Composition rules
    • Other characteristics
  3. What component instances are defined by the architecture?
  4. How do components communicate and synchronize? In particular:
    • Mechanisms used
    • Restrictions on use
  5. What are the system partitions?
    • Composition
    • Restrictions on use and visibility
    • Functional allocations
  6. What are the styles or architectural approaches used?
  7. What constitutes the system infrastructure?
    • Supplied functionality
    • Resource management
    • APIs
    • Restrictions
  8. What are the system interfaces? (this includes HMI, devices, external systems)
    • Participants
    • Mechanisms, formats, protocols, modes
    • Identification/typing/versioning What are the strategies and tools used for persistent storage?
  9. What are the strategies and tools for enforcing security requirements ?
    • Trust boundaries
    • Threat model
  10. What are the strategies and tools for handlings faults and failures ?
  11. What is the process/thread model of the architecture?
  12. What is the deployment model of the system?
    • Server and datastore partitioning/instances
    • Topology
    • Capacity and sizing
  13. What are the system states and modes?
    • Control
    • Responsibilities
    • State knowledge dispersal
  14. What COTS (Commercial off-the-shelf) are used? How are they chosen and integrated?
  15. What variability (in terms of implementation changes and not data or scenario changes) mechanisms and variation points are included in the architecture ?
  16. How far along is the development? Were the block delivery dates met? Did the blocks meet their functionality requirements?
  17. What documentation tree and human help do new employees get?
  18. What is the skill level and experience of the development team members?

11.6.10

3 arten der Serialisierung bzw Deserialisierung in C#

Man versteht darunter eine Abbildung von Objekten auf eine externe sequenzielle Darstellungsform. Serialisierung kann für das Erreichen von Persistenz für ein Objekt verwendet werden, aber auch in verteilten Softwaresystemen spielt Serialisierung eine bedeutende Rolle.[Quelle Wikipedia: http://de.wikipedia.org/wiki/Serialisierung]

Es gibt unter C# 3 Arten der Serialisierung:
* BinaryFormatter (Objekte werden binär abgespeichert)
* SoapFormatter (Objekte können gelesen werden)
* XMLSerializer (Objekte werden in eine XML Datei gespeichert)

using System;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization.Formatters.Soap;
using System.Xml.Serialization;
using System.IO;
using System.Collections;


namespace SerializationSample
{
public class Tester
{

private readonly string serFolder;
private static ArrayList arrList = new ArrayList();

public Tester()
{
serFolder = Path.GetTempPath();
}

public static void Main()
{
Tester abc = new Tester();
arrList.Add((Person) abc.AddPerson("Hans", "Müller", "CH", 39));
arrList.Add((Person) abc.AddPerson("Luft", "Hansa", "D", 82));
arrList.Add((Person) abc.AddPerson("Soto", "Mayer", "ZSQ", 55));

abc.serializeXml();
abc.serializeSoap();
abc.serializeBinary();
Console.WriteLine("Press enter to begin deserialization...");
Console.ReadLine();
abc.deserializeXml();
abc.deserializeSoap();
abc.deserializeBinary();
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}

//....(ArrayList füllen .....)
private object AddPerson(string Vorname, string Name, string Land, int Alter)
{
Person p = new Person();
p.Vorname = Vorname;
p.Name = Name;
p.Land = Land;
p.Alter = Alter;
return p;
}

/*****************
* XmlSerializer *
*****************/
private void serializeXml() {
Console.WriteLine("Serializing in XML...\n");
using (FileStream fs = new FileStream(Path.Combine(serFolder, "Personen.xml"), FileMode.Create)) {
XmlSerializer xmlSer = new XmlSerializer(typeof(ArrayList), new Type[] { typeof(Person) });
xmlSer.Serialize(fs, arrList);
}
}

private void deserializeXml() {
try {
using (FileStream fs = new FileStream(Path.Combine(serFolder, "Personen.xml"), FileMode.Open)) {
XmlSerializer xmlSer = new XmlSerializer(typeof(ArrayList), new Type[] { typeof(Person) });
arrList = (ArrayList) xmlSer.Deserialize(fs);
}
Console.WriteLine("Deserializing XML...\n");
foreach (Person p in arrList)
Console.WriteLine(p.ToString());
}
catch (IOException ex) {
Console.WriteLine(ex.Message);
}
}

/******************
* Soap Formatter *
******************/
private void serializeSoap() {
Console.WriteLine("Serializing in SOAP...\n");
using (FileStream fs = new FileStream(Path.Combine(serFolder, "soap.dat"), FileMode.Create)) {
SoapFormatter soaFormatter = new SoapFormatter();
soaFormatter.Serialize(fs, arrList);
}
}

private void deserializeSoap() {
try {
using (FileStream fs = new FileStream(Path.Combine(serFolder, "soap.dat"), FileMode.Open)) {
SoapFormatter soaFormatter = new SoapFormatter();
arrList = (ArrayList)soaFormatter.Deserialize(fs);
}
Console.WriteLine("Deserializing SOAP...\n");
foreach (Person p in arrList)
Console.WriteLine(p.ToString());
}
catch (IOException ex) {
Console.WriteLine(ex.Message);
}
}

/********************
* Binary Formatter *
********************/
private void serializeBinary() {
Console.WriteLine("Serializing in Binary...\n");
using (FileStream fs = new FileStream(Path.Combine(serFolder, "binary.dat"), FileMode.Create)) {
BinaryFormatter binFormatter = new BinaryFormatter();
binFormatter.Serialize(fs, arrList);
}
}

private void deserializeBinary() {
try {
using (FileStream fs = new FileStream(Path.Combine(serFolder, "binary.dat"), FileMode.Open)) {
BinaryFormatter binFormatter = new BinaryFormatter();
arrList = (ArrayList)binFormatter.Deserialize(fs);
}
Console.WriteLine("Deserializing Binary...\n");
foreach (Person p in arrList)
Console.WriteLine(p.ToString());
}
catch (IOException ex) {
Console.WriteLine(ex.Message);
}
}
}

//Die zu serialisierende Klasse
//(Die XML-Attribute werden nur für die Xml-serialisierung gebraucht)
[Serializable()]
public class Person {
[XmlElement("Vorname",DataType="string")]
private string vorname;
[XmlElement("Nachname", DataType = "string")]
private string name;
[XmlElement("Alter", DataType = "int")]
private int alter;
[XmlAttribute("Land", DataType = "string")]
private string land;

public Person() { }

public string Vorname {
get { return vorname; }
set { vorname = value; }
}

public string Name {
get { return name; }
set { name = value; }
}

public int Alter {
get { return alter; }
set { alter = value; }
}

public string Land {
get { return land; }
set { land = value; }
}

public override String ToString() {
return vorname + "\t" + name + "\t" + alter + "\t" + land;
}
}
}





28.5.10

Systemcheck: Die 10 schlimmsten Performance-Bremsen

Bernd Greifeneder, Gründer und Chief Technology Officer von DynaTrace, hat für Computerworld den zehn häufigsten Performance-Bremsen für Entwickler zusammengefasst.

Weiter lesen unten Computerworld Artikel

8.4.10

Die Unfähigkeit,zu entscheiden

Manager müssen harte Entscheidungen treffen. Solche Entscheidungen werden verzögert oder an untere Chargen delegiert, um sich aus der Verantwortung zu stehlen.

Softskills für ProjektManager
Rund 90 Sekunden nach dem Abheben bemerkte ich: Da waren Vögel. Sie verdunkelten die gesamte Windschutzscheibe. Grosse Vögel. Zu nahe, um auszuweichen.» So beschrieb Airbus-Captain Sullenberger dem Nachrichtensender CBS im Februar 2009 den Beginn der wohl dramatischsten fünf Minuten seiner Pilotenlaufbahn. Am Ende dieser Odyssee setzte er das Flugzeug sicher auf dem Hudson River auf und rettete damit 154 Menschen das Leben. Angesichts der Tatsache, dass eine Notlandung auf dem Wasser zu den schwierigsten Manövern überhaupt zählt, kann Sullenbergers Tat sowohl menschlich als auch fachlich nicht hoch genug eingeschätzt werden. Geradezu euphorisch wurde er darum danach von allen Seiten gefeiert. Ein neuer amerikanischer Held war geboren und Präsident Barack Obama lud ihn zu seiner Amtseinführung nach Washington ein. Auf dem Höhepunkt der Finanzkrise, als Unsicherheit vorherrschte, weil viele US-Bürger um ihren Job bangten, zeigte Sully etwas, nach dem sich die Amerikaner, aber auch wir Schweizer sehnen: Die Bereitschaft eines Vorgesetzten, Verantwortung zu übernehmen und in Krisensituationen die richtigen Entscheidungen zu treffen.

Source: http://www.swissitmagazine.ch/services/ict-aus-weiterbildung/articles/257214/

8.3.10

Checking the entry of a textbox with Regular Expression

If you want to be sure, that the user can just enter a numeric value in a textbox, there is a wise way to check this as following;

private void TextBoxNumericOnly_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8)
{
if ((!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), @"\d+")))
e.Handled = true;
}
}





In the “KeyPress” of textbox the entry is validated with the help of Regular Expression. (e.KeyChar != 8 ensures that backspace is not checked, so that the user can delete his entry with backspace.)

5.3.10

Observer Pattern

The observer pattern (a subset of the publish/subscribe pattern) is a software design pattern in which an object, called the subject, maintains a list of its dependants, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.

image

Pic1. Subject-Observer relationship in Observer Pattern

Observer Pattern

Pic2. UML Diagramm of Observer Pattern

 

Sources:

1.3.10

Rhetorik und ZABA Methode

Rhetorik ist die Kunst, als Person klar und überzeugend zu sein – also nicht bloss glänzend zu reden. Erfolgreiche Rhetorik ist nicht primär eine Technik, sondern vielmehr eine Haltung mit Selbstvertrauen und Selbstbewusstsein.

Zur Vorbereitung einer Präsentation, bei der es um die Einführung einer neuen Software geht, kann man folgende ZABA-Fragen stellen:

  • Ziel: Was will ich erreichen, was soll die Präsentation bewirken?
  • Anliegen: Worum geht es mir? Was soll für die Gegenseite klar werden? Was muss allenfalls noch geschehen, damit ich erfolgreich bin (Atmosphäre, etc.)
  • Botschaft: Wenn mein Auftritt eine Werbung wäre, wie würde meine Botschaft lauten (ein Satz, der leicht verständlich ist, in Erinnerung bleibt und mir hilft, mein Ziel zu erreichen)?
  • Argumente: Welcher Nutzen entsteht, für wen und in welchem Umfang? welches sind meine zwei bis drei überzeugendsten Argumente (Zahlen, Fakten, Erfahrung, glaubwürdige Erlebnisse, Studien, etc.)? Die beste Argumentationsformel dafür ist “1-2-3”: das überzeugendste Argument zuerst, das zweitbeste am Schluss, alle weiteren dazwischen.

(Quelle: Computerworld.ch Nr. 4/2010, Seite 17, www.thetalkcompany.ch)

1.2.10

Classes vs. Structures in VB.Net

If there are no requirements for polymorphism and events, then structure type is a good candidate instead of a class.

If the container types make use of inheritance and polymorphism, then using class is preferable.

A structure can be preferable when:

  • You have a small amount of data and simply want the equivalent of the UDT (user-defined type) of previous versions of Visual Basic
  • You perform a large number of operations on each instance and would incur performance degradation with heap management
  • You have no need to inherit the structure or to specialize functionality among its instances
  • You do not box and unbox the structure
  • You are passing blittable data across a managed/unmanaged boundary

A class is preferable when:

  • You need to use inheritance and polymorphism
  • You need to initialize one or more members at creation time
  • You need to supply an unparameterized constructor
  • You need unlimited event handling support

Source: Using Classes and Structures in Visual Basic .NET

Nvidia's GauGan App

NVIDIA's GauGAN AI Machine Learning Tool creates photorealistic images from Simple Hand Doodling http://nvidia-research-mingyuliu.com/...