Nach Einspielen eines Windows-Updates (hier: KB4503286) funktionierte die WLAN-Verbindung nicht mehr. Das WLAN Tray Icon war weg, im Windows-Dialog „Netzwerkstatus“ war auch nichts zu sehen. Unter „Adapteroptionen ändern“ war dann aber „WLAN“ sichtbar. Eine Diagnose durch Windows meinte, dass das TCP/IP-Protokoll nicht richtig eingebunden war. Eine automatische Reparatur konnte jedoch durchgeführt werden.

Abhilfe schafften die beiden folgende Befehle auf der Kommandozeile:


netsh winsock reset
netsh int ip reset

und anschließender Neustart. Dabei werden Einstellungen zurückgesetzt.

Die Befehle muss man übrigens mit Administratorrechten ausführen. Die passende Kommandozeile bekommt man übrigens mit der Suche nach „Eingabeaufforderung“, Rechts-Klick auf den Eintrag und dann „Als Administrator ausführen“.

LNP242 Make §§§ fast (Logbuch:Netzpolitik)
Das Logbuch Spezial zum besonderen elektronischen Anwaltspostfach Das besondere elektronische Anwaltspostfach soll eigentlich eine elegante Lösung sein, die sichereren E-Mail-Verkehr zwischen deutschen Anwälten und deutschen Gerichten realisieren kann. Nach einer... Das Logbuch Spezial zum besond...

Hier folgen meine Gedanken zu den Problemen bei der Umsetzung des „elektronischen Anwaltpostfachs“, wie sie im „Logbuch Netzpolikt 242“ (Podcast) dargestellt werden. Ich habe sie dort auch als Kommentar veröffentlicht.

Hier nur noch kurz der Kontext: was ist das „beA“: „Das besondere elektronische Anwaltspostfach (beA) ermöglicht Rechtsanwälten die sichere elektronische Kommunikation mit der Justiz und untereinander. Jeder in Deutschland zugelassene Rechtsanwalt verfügt über ein solches elektronisches Postfach.“ Markus Drenger (CCC) hat mehrere Sicherheitslücken in der Implementierung gefunden (Talk).

Hier nun mein Kommentar.

In meiner Wahrnehmung werden mittlerweile überwiegend Webanwendungen entwickelt. Ich weiß nicht, wie es konkret bei Atos aussieht, aber das Wissen um das Bauen von nativen Anwendungen scheint mir mittlerweile nicht mehr so weit gestreut zu sein wie bei Webanwendungen. Letztere haben ja auch unbestrittene Vorteile: eine zentrale Installation auf einer bekannten Umgebung statt vieler dezentraler Installationen auf unbekannten Umgebungen. Ein Patch ist da eingespielt oder nicht eingespielt, bei nativen Anwendungen gibt es immer was dazwischen.

Beim beA ist jedoch eine lokale Installation notwendig, um auf die Smartcard zugreifen zu können. Also wird ein Server installiert, um mit der Smartcard zu kommunizieren, und auf eher abenteuerliche Weise mit einem Zertifikat ausgestattet. Wie machen denn das andere Lösungen? Die z.B. mit dem ePerso kommunizieren? Nun hat man sich dann doch eine lokale Installation ins Boot geholt und muss gleichzeitig Kopfstände machen, um damit zu kommunzieren. Ein lokaler Server … da merkt doch der Nutzer viel weniger, wenn da was schief läuft, der z.B. nicht startet. Ich stimme zu, dass hier eine lokale Anwendung passender wäre. Die Unterstützung von mindestens Windows und MacOS, mglw. auch Linux, in diversen Versionen ist jedoch sicherlich nicht einfach.

Die Sache mit den Terminalservern scheint mir ja die Vorteile der Smartcards zu nichte zu machen. Wie oft werden die eingesetzt? War das der BRAK vor Beginn des Projektes bekannt?

Die „Vertretungsregel“ begründet die Einführung des HSM, das die „Umschlüsselung“ durchführt. Damit ist die Ende-zu-Ende-Verschlüsselung kaputt. Fachlich finde ich die Anforderung nachvollziehbar. Muss denn wirklich der Rechtsanwalt persönlich adressiert werden, oder reicht es, seine Kanzlei zu adressieren? Bei den Gerichten wird man doch wohl auch nicht einzelne Personen adressieren, oder? Wenn man eine ganze Kanzlei oder Teile davon adressieren kann und die betreffenden Mitarbeiter Zugriff auf das Postfach haben, bräuchte niemand umschlüsseln. Dito bei den Absendern.

Dann könnte man auch fast schon De-Mail einsetzen. Aber halt, die Kommunikation erfolgt über OSCI. Das ist aber nur ein Transport-Protokoll. Ist die Payload weiter strukturiert? Wird z.B. ein Aktenzeichen angegeben, damit die Nachricht im Gericht gleich einer elektronischen Akte zugeordnet werden kann? Das geht dann auch in die Richtung „wir bräuchten einfach mal eine Open-Source-Komponente, die E2E-Verschlüsselung zwischen Alice und Bob ermöglicht“ – was wird genau ausgetauscht?

Das habe ich auch nicht verstanden: man kann sich als einfacher Bürger anmelden, wie kann man dann kommunizieren? Braucht man dann auch beA?

Zu guter Letzt: PDF. Ja, PDF ist nicht sicher. Ich vermisse jedoch einen Gegenvorschlag. Nur Text und JPG/PNG? Unrealistisch. Statt PDF ginge PDF/A, aber wer erklärt allen RechtsanwältInnen, dass statt PDF PDF/A zu erzeugen ist und wie man das im Programm der Wahl macht? Habe ich übrigens auch schon gehen: eingehende PDFs mittels Ghostscript in PDF/A wandeln wg. IT-Sicherheit.

Über das beA ließe sich also mindestens nochmal 2 Stunden diskutieren.

In Who do you want to KISS? – About simplicity in coding Ralf Westphal reflects on what simplicity means in programming:

Who do you want to KISS? – About simplicity in coding

He observes that simplicity is relative, esp. relative to the „scarcest resource“. For Ralf „in the long run the scarcest resource therefore is reading or modification time„. In TDD there is a step when you can create simplicity in respect to reading/modification time:

It means, you need to find time to optimize for reading/modification later. Interestingly TDD has this time built in. That’s what the refactoring phase is for. During refactoring you apply the KISS principle once more – now creating simplicity for reading/modification time. If thereby the simplicity for coding time is destroyed so be it.

And even then, simplicity regarding code reading and modification is in the eye of the beholder. Some programmers like high level abstractions like higher order functions while other like a more verbose but easier to follow procedural style. This is often related to the level of experience:

A simple solution for one person can be a complicated solution for another person. Sad, but true. The only way out of this is to keep all team members close together in their competencies (as long as there is a chance one member needs to deal with another’s simple solutions).

There is a great interview with David Allen about his new 2015 edition of the „Getting things done“ book. David says „I rewrote the whole book although the basic methodology did not really change at all but more how it is framed [… plus extra chapters]“.

Here is a kind of a timeline with some notes:

00:00 Intro
02:00 How this methodology came to be & how he decided to write the book?
05:00 Overview of GTD and how it has changed in last 15 years
07:08 The "strategic value of 'clear space'"
08:48 Creativity and limitations
09:38 How has GTD changed in last 15 years with new technology, connectivity etc.
        changed vocabular: 
        collect -> capture, 
        process -> clarify, 
        review  -> reflect, 
        do -> engage; 
        new book is more positioned as "this is a life style, a life long thing"
        not really about "getting things done" but more about 
        "creating your optimal 'being-present state'"
13:25 GTD helps making intentional choice of "what to do"
        "paying attention to what has your attention" - why does this
        have your attention & how to get it of your mind; 
        new chapter about cognitive research that supports GTD
16:17 Is there anything you changed your mind about?
        "No".
18:07 Squeezing more workflow in a day
20:20 why did you move to Amsterdam
        "Amsterdam is the San Fransisco of Europe"
23:20 One piece of advice for people that feel overwhelmed
       "externalize everything out of your head, keep nothing in your head"

I think I will get the new edition and refresh my GTD knowledge.

Books that are mentioned in the interview:

Berlin

Anfang Oktober wurden neue Bahnsteige an den Bahnhöfen Ostkreuz und Warschauer Straße eröffnet (Berlin).

Leben

„Joshua Fields Millburn & Ryan Nicodemus write about living a meaningful life with less stuff for 2 million readers.“ Start here.

Software-Entwicklung

Alistair Cockburn über „Elefanten-Capaccio„. Der Elefant ist ein Use Case, der in möglichst kleine Teile geschnitten wird, die dann nacheinander implementiert werden. Die Teile müssen einen Wert liefern. „learn to write micro- user stories from the use cases so your agile developers can work in micro-increments.“ Find ich eine gute Idee.

Johanna Rothmann meint „Large Program? Relase more often“ (und meint interne Releases, nicht notwendigerweise Deployments in der Produktivumgebung) Wenn man die Iterationen kürzer macht, dann muss man die user stories kleiner machen (siehe Elefanten-Capaccio). Das Team muss sich mehr „konzentrieren“.

Ralf Westphal greift das „Single Responsibility“-Prinzip (aus den SOLID-Prinzipien) auf, nach dem eine Klasse nur „one reason to change“ haben soll, also nur eine Verantwortlichkeit. Aber wie „Responsibilities zählen„? Das ist ganz interessant. Es erinnert mich an etwas aus Siederslebens Buch „Moderne Software-Architekturen“. Da muss ich mal nachschlagen.

I recently felt the need for accessing the metrics / statistics of a JDBC Data Source from within an application that is deployed on a Oracle Weblogic Server. I did not succeed right away, so I document it here.

Basically we just need some calls to JMX. Using the Weblogic RuntimeServiceMBean we navigate from ServerRuntime and JDBCServiceRuntime to JDBCDataSourceRuntimeMBeans. From there we get ObjectNames for each JDBC Data Source that we can access from our application. Using these object names we can retreive the metrics.

First we get the MBeanServer via JNDI:

  1. MBeanServer getMBeanServer() throws NamingException {
  2.   InitialContext ctx = new InitialContext();
  3.   MBeanServer server = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
  4.   return server;
  5. }

Then we navigate as described before:

  1. ObjectName[] getJdbcDataSourceRuntimeMBeans(MBeanServer server)
  2.       throws MalformedObjectNameException, AttributeNotFoundException, MBeanException,
  3.       InstanceNotFoundException, ReflectionException {
  4.     ObjectName service = new ObjectName(
  5. "com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
  6.     ObjectName serverRT = (ObjectName) server.getAttribute(service, "ServerRuntime");
  7.     ObjectName jdbcRT = (ObjectName) server.getAttribute(serverRT, "JDBCServiceRuntime");
  8.     ObjectName[] dsRTs = (ObjectName[]) server.getAttribute(jdbcRT, "JDBCDataSourceRuntimeMBeans");
  9.     return dsRTs;
  10.   }

To get the current number of active connections and the current capacity of the connection pool, we access the attributes ActiveConnectionsCurrentCount and CurrCapacity:

  1. MBeanServer server = getMBeanServer();
  2.       ObjectName[] dsRTs = getJdbcDataSourceRuntimeMBeans(server);
  3.       for (ObjectName dsRT : dsRTs) {
  4.         String name = (String) server.getAttribute(dsRT, "Name");
  5.         Integer activeConnectionsCurrentCount =
  6.             (Integer) server.getAttribute(dsRT, "ActiveConnectionsCurrentCount");
  7.         Integer currCapacity =
  8.             (Integer) server.getAttribute(dsRT, "CurrCapacity");
  9.     // do something with these metrics
  10.       }

There are a bunch of metrics. Here is a list. You can enumerate them using MBeanAttrbuteInfo:

  1. /**
  2.    * Returns MBean-Attribute Infos such as Name, Type and Description
  3.    */
  4.   public MBeanAttributeInfo[] getMetricsAttributeInfos() {
  5.     try {
  6.       MBeanServer server = getMBeanServer();
  7.       ObjectName[] dsRTs = getJdbcDataSourceRuntimeMBeans(server);
  8.       if (dsRTs.length>0) {
  9.         return server.getMBeanInfo(dsRTs[0]).getAttributes();
  10.       }
  11.     } catch (Exception e) {
  12.       // your favourite error logging mechanism here...
  13.     }
  14.     return new MBeanAttributeInfo[]{};
  15.    
  16.   }

every MBeanAttributeInfo contains name, type and description of the attribute.

Note: I am using Weblogic Server 11g here. I have not tried this on WLS 12c.

I love to use Emacs, mostly for org-mode. I also use Notepad++ as an text editor (when using MS Windows), although I would like to use Emacs more. I noticed I choose Notepad++ when I quickly need an editor buffer to paste some text to because Notepad++ has this „New“ icon in its toolbar that creates a new buffer quickly.

Emacs is easily extendible, so how about creating a „quick new buffer“ function myself? It is really easy.

To create a new buffer you use Ctrl-x b (for function switch-to-buffer) and type a buffer name. But even typing in a name is too much for me. Automatically name the buffer „New“ and add a unique number to it! There is a function called rename-uniquely which does what it says. Now we can create a function make-new-buffer:

  1. (defun make-new-buffer ()
  2.   "makes a new buffer, uniquely named"
  3.   (interactive)
  4.   (switch-to-buffer "New")
  5.   (rename-uniquely))

Super easy: it creates a buffer named „New“ and renames it so that it has a unique name. Bind this to a key, I use F5:

  1. (global-set-key (kbd "<f5>") 'make-new-buffer)

Put this code in your .emacs or whatever.

When you have a bunch of buffers called „New<2>“, „New<3>“ etc., take a look at buffer-menu. You get a list of all buffers. Now you can operate on them. For instance, mark a buffer for deletion with d, repeat for other buffers and execute the command with x. Now you have killed a bunch of buffers quickly and easily.

If you are new to customizing keybindings and writing custom functions, Sacha Chua wrote a nice article „Read Lisp Tweak Emacs (Beginner 3/4): How can I make things more convenient?

Update: Xah Lee over at ErgoEmacs has published a similar article. He came up with the following, slightly more complex function:

  1. (defun xah-new-empty-buffer ()
  2.   "Open a new empty buffer."
  3.   (interactive)
  4.   (let ((buf (generate-new-buffer "untitled")))
  5.     (switch-to-buffer buf)
  6.     (funcall (and initial-major-mode))
  7.     (setq buffer-offer-save t)))

What is the difference? It uses generate-new-buffer to generate a new buffer and make sure it has a unique name (line 4). Then it switches to that buffer (line 5). It sets the major mode of the new buffer to the one declared in variable initial-major-mode, if any (line 6). Setting buffer-offer-save to t let Emacs ask you for saving that buffer before exiting Emacs (line 7).

This entry is part 7 of 7 in the series OOP 2014 Report

At OOP 2014, Martin Fowler gave the final keynote, broadly called „Software Design in the 21st Century“. He delivered his keynote in two parts, „Workflows of Refactoring“ and „Not just code monkeys“. An infodeck for the first part is available online, so I won’t cover it here.

Frustration with Agile

Martin Fowler expressed his frustration with Agile. He observes that often programmers are dropped user stories onto them to turn them into code. But the Agile Manifesto talks about conversational stories, that Users/Analysts and Coders have conversations about what to build. He demands developers building domain knowledge (and I agree with him), with a reference to „Observed Requirement„.

Responsibility

Being part of those conversations brings responsibility to developers. As an example, Fowler referred to darkpatterns.org:

A Dark Pattern is a type of user interface that appears to have been carefully crafted to trick users into doing things, such as buying insurance with their purchase or signing up for recurring bills.

Someone have build those user interfaces. So Martin asked devs for „impact judgement“: question „which impact has the software on the users, which impact have the users to the world?“.

Not just code monkeys

Martin Fowler identified two areas of our impact as a developer:

  1. Privacy
  2. Alienating Athmosphere

There is a video on youtube that shows the rest of the keynote. I encourage you to watch it (it’s about 6 minutes).

Martin  Fowler ended with strong words:

Change the world and make it better

I was really surprised by this strong statement and I think most of the audience was. It made a strong impression on me.

Here is another account on the keynote (in German).