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)

Nvidia's GauGan App

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