Tuesday 1 August 2017

D3 Js Gleitender Durchschnitt

Updates: 1) I8217ve legte alle Codebeispiele in codepen. iocollectionnjzYxo 2) Ich schreibe diesen Beitrag nach I8217m fertig meiner Visualisierung mit React-Serie, weil it8217s 4 Jahre alt und es gibt andere Möglichkeiten, dies zu tun jetzt. Daten sind das erste D in d3 (oder möglicherweise das dritte, aber es8217s definitiv einer von diesen). Sowieso. Setzen Sie Ihre Daten in die richtige Form ist entscheidend, um prägnante Code, der schnell läuft und ist leicht zu lesen (und später zu beheben) zu haben. Also, welche Form sollten Ihre Daten in Sie zweifellos haben viele Optionen. Um dieses Tutorial zu befolgen, gehen wir davon aus, dass Sie die Beziehung zwischen R038D-Ausgaben und dem BIP-Wachstum für eine Reihe von Ländern skizzieren möchten. Sie haben diese Datei. Voll tabellarischer Daten, die für jedes Land einen Namen, einen Kontinent, die Brutto-R038D-Ausgaben in Prozent des BIP, das BIP-Wachstum und für die Kontextpopulation und das Pro-Kopf-BIP auflistet. Also eine sehr grundlegende Ansatz wäre, um jede dieser Variablen in einem unabhängigen Array. (Don8217t bower scrolling, it8217s mehr von der gleichen) Dann können Sie nur erstellen Markierungen für jedes Datenelement und holen jedes Attribut unabhängig. Let8217s tun ein Blasendiagramm zum Beispiel. (Small aside: in der Post habe ich gewonnen8217t gehen Sie durch den Code, um die svg Container oder die Waage, anstatt sich auf die Datenstrukturen. Dieser Code, der wirklich nichts Besonderes ist, finden Sie im Quellcode der Beispiele) . Um unsere Kreise zu kreieren, würden wir so etwas schreiben: Siehe Beispiel in einem eigenen Tab oder Fenster, aber das ist die Hölle. Wenn aus irgendeinem Grund ein Fehler in einem der Werte auftritt, beispielsweise aufgrund einer Katze oder eines kleinen Kindes in der Nähe des Computers, ist der Fehler sehr schwierig zu beheben. Ein weiteres Problem ist, dass es sehr schwierig ist, jede Art der nachfolgenden Behandlung auf die Daten anzuwenden. Zum Beispiel werden Sie feststellen, dass es kleinere Blasen vollständig innerhalb der großen Orangenblase, die geschieht, auf sie zu sein. Es ist also nicht möglich, die kleineren Blasen zu überstreichen. Ein Weg, um Adresse, die zu sortieren Daten in der Reihenfolge der abnehmenden Bevölkerung (die Größe der Blasen), so dass es unmöglich wäre, diese Art von Situation zu haben. Nun, während es möglich ist, 6 Arrays nach den Werten von einem zu sortieren, ist es sehr chaotisch. Idealerweise sollten Sie alle Werte haben, die in einem einzigen Objekt grafisch übersetzt werden sollen. Sie möchten ein Array dieser Objekte haben, das Sie an die Datenmethode übergeben und so etwas schreiben können: Hier haben Sie nur eine Datenquelle, die viel sicherer ist. Also, wenn you8217re denken: Ich weiß, ich sollte eine Variable wie folgt zu erstellen: und dies getan, und darüber hinaus, wenn Sie 8220Hey denken, kann ich dies in Excel aus meiner CSV-Datei, mit einer Formel, die ich über die rows8221 kopieren , Müsst ihr jetzt im Namen all dessen, was gut und heilig ist, aufhören. Obwohl es funktioniert: Dieser Ansatz hat eine Reihe von Fehlern, die Sie alle vermeiden können, wenn Sie lesen. Zuerst wird die Ausführung Ihres Programms gestoppt, während Ihr Browser den Quellcode liest, der die Variable 8220data8221 enthält. Dies ist für 36 Zeilen vernachlässigbar, aber da Objekte immer größer und komplexer werden, kann eine äquivalente Variable Sekunden oder sogar Minuten zum Laden benötigen. Und jetzt haben wir ein Problem. That8217s ein Problem für Ihre Benutzer. Nun zu Ihnen: das Erstellen einer JSON-Variablen aus tabellarischen Daten ist mühsam und fehleranfällig. Die Formelbearbeitung Schnittstelle in Excel doesn8217t wirklich helfen Ihnen, wo Sie ein Zitat oder einen Doppelpunkt verlegt haben. Infolgedessen ist dies sehr zeitaufwändig. Don8217t tun, dass: es ist ein viel einfacher Weg. Gibt die Funktion d3.csv ein. Here8217s, wie es funktioniert. Sie sagen Ihrer d3.csv-Funktion den Speicherort einer csv-Datei (die wir alle zusammen hatten) und eine Funktion, die auf dem Array von Objekten ausgeführt werden muss (was wir immer wollten), indem Sie die erste Zeile als Schlüssel erstellt haben. Mit anderen Worten, sobald innerhalb der d3.csv-Funktion, die 8220csv8221 Variable wird genau das, was wir zugewiesen 8220data8221 früher, mit einem großen Unterschied, dass wir didn8217t haben, um diese Variable zu produzieren oder jede Art von manuellen Eingriff zu machen: wir sind Bestimmt entspricht er genau der Datei. Eine nette Sache mit dieser Methode ist, daß, da Ihre Variable nicht explizit im Quellcode ist, Ihr Browser es viel schneller lesen kann. Die Daten werden nur gelesen, wenn die Funktion d3.csv aufgerufen wird, im Gegensatz zum vorherigen Ansatz, bei dem die Gesamtheit des Quellcodes (einschließlich der Daten) gelesen werden musste, bevor die erste Anweisung ausgeführt werden konnte. Natürlich macht es nur einen Unterschied, wenn die Datengröße signifikant ist. Aber mit der d3.csv Ansatz würde Sie anzeigen eine 8220loading data8221 Warnung irgendwo auf Ihrer Seite, und entfernen Sie es, wenn in d3.csv. Viel besser als eine leere Seite. Drei Einschränkungen mit dieser Methode. Dies funktioniert nicht mehr in einem lokalen Dateisystem (dh beim Öffnen einer Datei im Browser). Die resultierende Datei kann nur auf einem Webserver laufen, der lokal sein kann (dh die Seite hat eine URL). Was auch immer in der d3.csv-Funktion geschieht, ist nicht mehr im globalen Geltungsbereich des Programms. Dies bedeutet, dass nach dem Start des Programms können Sie nicht öffnen Sie die Javascript-Konsole und überprüfen Sie den Wert von 8220csv8221, zum Beispiel. Dies macht diese Programme etwas schwieriger zu debuggen (es gibt natürlich Möglichkeiten, wenn). Alles, was aus der Datei gelesen wird, wird als Strings behandelt. Javascript macht eine Menge von Typ-Konvertierung aber darauf achten, dass, oder Sie haben Überraschungen. Dies ist, warum ich schrieb x (d. GERD) zum Beispiel (vor einer Zeichenfolge konvertiert sie in eine Zahl). Um diese überlegene Art der Datenerfassung zu feiern, werden wir in eine animierte Dateneingabe geworfen: Die Kreise werden bei einem Standardwert initiiert und bewegen sich zu ihrer Position. Sie können den Link überprüfen, um den Übergangseffekt zu sehen. So ist auf der Ebene der Marke (dh unserer Kreise) die bequemste Form der Daten ein Objekt mit mindestens so vielen Tasten, wie es grafische Eigenschaften dynamisch ändern. Eine flache Datenreihe ist in Ordnung, wenn wir nur eine Datenreihe haben. Aber was, wenn wir mehrere Serien in der Tat haben, haben die meisten Visualisierungen eine Struktur und eine Hierarchie. So let8217s gehen mit unseren Daten, aber jetzt let8217s nehmen an, dass wir Werte für verschiedene Kontinente als verschiedene kleine Scatterplots (8220small multiples8221) zeigen wollen. Intuitiv: we8217ll wollen 5 8220g8221 Gruppen zu unserem svg Behälter addieren, eine für jeden Kontinent und fügen dann ein Punkte pro Land in jedem Kontinent diesen Gruppen hinzu. Unsere Flat-Array so8217t Arbeit so gut dann. Was tun? Die Antwort d3 auf dieses Problem ist der d3.nest () Satz von Methoden. D3.nest () dreht ein flaches Array von Objekten, das dank d3.csv () ein sehr einfach verfügbares Format ist, in einem Array von Arrays mit der Hierarchie, die Sie benötigen. Nach unserer Intuition, wouldn8217t es schön, wenn unsere Daten wäre: Ein Array aus 5 Elementen, eine für jeden Kontinent, so könnten wir die 8220g8221 Gruppen erstellen, Und wenn jedes dieser 5 Elemente enthalten ein Array mit den Daten aller entsprechenden Länder, noch in diesem Objekt-Format, das wir lieben Dies ist genau das, was d3.nest (). D3.nest (), go Mit der. key () - Methode geben wir an, was wir zur Erstellung der Hierarchie verwenden werden. Wir wollen diese Daten nach Kontinenten gruppieren, so dass wir diese Syntax verwenden..sortKeys wird verwendet, um die Schlüssel in alphabetischer Reihenfolge zu sortieren, so dass unsere Panels in der alphabetischen Reihenfolge der Kontinente erscheinen. Wenn wir dies auslassen, erscheinen die Panels in der Reihenfolge der Daten (dh Ozeanien zuerst als Australien ist das erste Land). Wir hätten das vermeiden können, indem wir zuerst die Daten nach dem Kontinent sortierten, bevor wir sie verschachtelten, aber es war einfacher. Hier haben wir nur eine Ebene der Gruppierung, aber wir könnten mehrere durch Verkettung mehrere. key () - Methoden haben. Der letzte Teil der Anweisung. Einträge (csv), sagt, dass wir diese Operation auf unsere CSV-Variable zu tun. Hier ist, was die Daten-Variable aussehen wird: Nun, da wir unsere Daten in einer idealen Form let8217s ziehen die Marken: (Sie können auf den Link klicken, um den Übergangseffekt sehen und lesen Sie die vollständige Quelle). Dies ist alles sehr schön, aber wouldn8217t es besser sein, wenn wir einige aggregierte Informationen von den Kontinenten Let8217s versuchen, um herauszufinden, die durchschnittlichen Werte für R038D Ausgaben und BIP-Wachstum zu charakterisieren könnten. Kann es leicht gemacht werden Dies ist ein Job für die andere main d3.nest-Methode, Rollup. Rollup ist die Aggregationsfunktion. Hier ist ein Beispiel. Denken Sie daran, wie die Kombination von. key () und. entries () ein Array in Arrays von kleineren Arrays umgibt, wobei der Wert, der an die Funktion innerhalb der Rollup-Methode übergeben wird, jeder dieser Arrays ist Array von allen Objekten entsprechend Ländern in Amerika, dann ein Array von allen Objekten entsprechend Ländern in Europa, etc.) Auch wenn wir sortKeys in unserer vorherigen Nesting-Bemühung verwenden, verwenden wir sie auch hier besser. Hier ist, was die Variable aussehen wird: Unglaublich nur die Werte, die wir brauchen. Jetzt geht es nur darum, sie zur Skizze hinzuzufügen. Zwei kleine Ergänzungen hier: Dies ist das letzte Beispiel 8211 wieder können Sie auf den Link klicken, um den Übergang zu sehen und erhalten Sie die Gesamtheit der Quelle. Auf der Markierungsebene möchten Sie Objekte mit so vielen Eigenschaften haben, wie Sie grafische Variablen (wie x, y, füllen usw.) mit d3.csv () und eine flache Datei benötigen (d3 bietet auch Funktionen wie D3.json oder d3.xml, um Daten in einem anderen Format zu verarbeiten). D3.nest kann Ihnen helfen, gruppieren Sie Ihre Einträge, um Ihre Daten zu strukturieren und erstellen Sie mehr anspruchsvolle Visualisierungen Rollup kann verwendet werden, um die Daten gruppiert mit d3.nest Post navigation Lassen Sie eine Antwort Antworten abbrechen Sehr gut Tutorial Jerome 8211 während CSV doesn8217t bieten 8220spontaneous8221 Daten wie a MySQL-Abfrage, es verbessert sich erheblich auf die manuelle Eingabe-Ansatz. Ich vermute, die CSV könnte mit genug Flexibilität und Detail entworfen werden, um eine Datenbank zu simulieren, mit verschiedenen Filtern in d3. Hallo, danke obwohl d3 kann komplett interagieren mit einer Datenbank wie mySQL mit einem ähnlichen Ansatz jeromecukier. netblog20120102using-d3-mit-a-mysql-Datenbank, aber wenn Sie Daten im tabellarischen Format zu beginnen, ist d3.csv sehr praktisch Sehr nützlich Tutorial I8217d wie zwei Fragen zu stellen: Erstens: kann ich umbenennen die Attribute GERD und Wachstum, sagen wir. Als avgGERD oder avggrowth anstelle des alten Namens (Think of the AS-Schlüsselwort in SQL) zweite Frage: Bin ich gezwungen, zuvor alle Länder gruppieren, um die gleichen Attribute (in diesem Fall GERD und Wachstum) über das Array zu durchschnittlich Der Länder in einem Kontinent I8217m sollte auf einer ähnlich verschachtelten Struktur und I8217ve einige Mühe arbeiten, da ich can8217t definieren einen Accessor für die d3.mean () - Funktion. Vielen Dank im Voraus funktionieren würde. (Oder einen gültigen Schlüsselnamen anstelle von a und b). 2) technisch, nein. Aber Sie können wollen. Für jede Datenoperation in d3 oder javascript im Allgemeinen, und dies ist etwas, das ich in das Tutorial gesetzt haben könnte, gibt es die Möglichkeit, von einer leeren Struktur (entweder ein leeres Array oder ein leeres Objekt), Schleife durch die Quelldaten und starten Fügen Sie etwas zur Struktur hinzu. Zum Beispiel könnte ich schreiben: avgs csv. forEach (Funktion (d) var cd. continent wenn (avgs) avgs. navgs. n1 avgs. GERDavgs. GERDd. GERD avgs. growthavgs. growthd. growth sonst avgs) keys (avgs). Für jede (Funktion (c) avgs. GERDavgs. GERDavgs. n avgs. growthavgs. growthavgs. n) wird dies die gleiche Ausgabe wie zuvor ohne eine Nesting-Funktion, it8217s ein bisschen länger zu schreiben, aber möglicherweise klarer. Weniger triviale Operationen sind auch während der Schleife möglich. Vielen Dank für die schnelle Antwort Irgendwann habe ich das gleiche mit Ausnahme der Tatsache, ich habe nur einfach Javascript. Ich war neugierig, wenn man die Aufgabe innerhalb der. rollup () - Funktion ausführen könnte. PS: Kudos für Ihre große Lehre Stil, I8217m Lernen d3 und dieses Tutorial war unglaublich nützlich. Haufen von Kommentaren hier reden über die Arbeit mit einer echten Datenbank aber die nette Sache über dieses aus csv ist, dass Sie immer die Daten aus Ihrer Datenbank zu ziehen und schreiben csv-Dateien mit ihm 8211 auf diese Weise die Daten sowohl herunterladbar und funktioniert mit Das Tutorial sehr schön. Das würde obv geben dem Benutzer mehr Flexibilität, um die Daten auf andere Weise verwenden, sollten sie wollen oder müssen. Hallo Jerome. Das ist unglaublich hilfreich für mich. Eine Frage 8211, wie ich den Code ausführen, ohne die Namen der Attribute (Kontinent, GDP, etc.) I8217m sehr neu zu d3 so leid, wenn dies einfach ist. Ihr Code für die Referenz unten: d3.csv (8220data. csv8221, Funktion (csv) zuerst sortieren wir die Daten, dann erstellen wir die Markierungen, die wir in eine Ausgangsposition svg. selectAll (8220circle8221).data (csv).enter ( (8220c8221, Funktion (d)).attr (8220c8221, Funktion (d)) jetzt beginnen wir 8211, die Markierungen an ihre Position zu bewegen Große Tutorial, dies War super hilfreich für meinen Eintritt in d3 mit csvs I8217m versuchen, ein Liniendiagramm mit Datum als die x-Achse, die Summe der Aufträge als die y-Achse, und eine Zeilenfarbe für jeden meiner drei Läden. Mein Datensatz hat eine Zeile für Jeden Auftrag, so muss ich die Reihenfolge nach Datum und speichern: d3.csv (Datei, Funktion (Fehler, Daten) Daten data. map (Funktion (d) return store: d. store, date: parseDate (d. date ), Bestellungen: d. orders) Ich bekomme immer einen Fehler an dieser Zeile in den Code, und obwohl die Achse sind auf der Seite gezeichnet, gibt es keine Daten: Können Sie bieten jede Einsicht Vielen Dank im Voraus i can8217t definitiv ohne zu sehen Datendatei, aber meistens, definieren Sie Ihre Zeile Funktion irgendwo gut, würde der Name der Attribute von Ihrer Datendatei kommen. So dass davon ausgegangen, dass Sie wissen, Ihre Datei. Dass gesagt, für jedes Element des Arrays, können Sie tun, d3.keys (), die die Liste der Eigenschaften dieses Elements zurückgeben wird. Dh d3.keys (csv0). Hi Jerome, ich bin sehr neu in D3.js, derzeit arbeitete ich an einem Schulprojekt mit d3 und json. Ihr Tutorial war sehr hilfreich, so entscheide ich, es in meinem Projekt implementieren, da es die verschachtelten Daten seine viel ähnlicher zu mir, obwohl meine ist json Datei. Im Moment gruppiert es die Daten korrekt leider die einzelnen Daten, die durch den Kreis dargestellt wird, funktionieren nicht. Ich frage mich, was schief gelaufen ist, ich schätze es wirklich, wenn Sie einen Blick an ihm nehmen können. Hier ist der link zum projekt (githubemeshIPU-Zabbix-D3) Vielen Dank im Voraus Hey, danke für das Tutorial. Ich war ein wenig weg von den 3 Vorbehalte, aber they8217re eigentlich viel kleiner als Sie es klingen: 1. Ein wirklich einfacher Weg, um etwas auf einem Webserver laufen wird mit Site44 8211 Host die Dateien aus Ihrem dropbox. 2. Nicht sicher, dass ich dieses verstehen. Definieren Sie einfach eine globale Variable, dann weisen Sie ihr Werte im Callback zu. 3. Yep. Viele Tutorials über die Verwendung von json oder csv mit d3.json oder d3.csv, aber die einfachste Idee der Verwendung eines Arrays oder Datenobjekt ist immer noch ein mystery8230 Für einfache Anwendungen, die Aktualisierung eines Json oder CSV-Datei dynamisch ist ein Albtraum. In der Lage, ein Objekt mit den erforderlichen Daten dynamisch laden sollte einfach sein, verdammt es wirklich hilfreich Tutorial. ThanksRecently, ich wurde gefragt, wie Sie ein nachhaltiges Wissensmanagement schaffen. Die Antworten, die sie zuvor anscheinend auf diese Linien lagen, waren: unterschiedliche Wissensmanagementsysteme, Prozesse, Governance, Artefakte und Strukturen Das an diesem Wissensmanagement arbeitet. Denken Sie daran, dies war kein Projekt auf Wissensmanagement, sondern ein Programm, dass der Client war immer in. Sie dachten, dass sie Wissensmanagement dafür. Es gibt nichts, um die Antwort Schuld. Jahre des Management Lernens lehrte uns, dass, wenn wir ein Problem lösen wollen, mieten Menschen, es zu tun, Ressourcen zuzuteilen, und zeigen Engagement für sie. In der Tat, wir sprechen darüber, wie organisatorische Change Management (OCM). Sicher genug, dass es Beispiele für solche Fälle gibt. Bekanntlich zeigte IBM, wie es neue Systeme schaffen und unterstützen kann. Microsoft neu erfunden in der Internet-Ära, indem Sie genau das gleiche, bei der Schaffung einer neuen fokussierten Division. Doch in diesem Fall ist diese Antwort völlig falsch. Es sei denn, das Unternehmen ist im Geschäft des Wissensverkaufs, Wissensmanagementsysteme scheitern. Diese Art von Ansatz scheitert, wenn der Schwerpunkt nicht Wissensmanagement bedeutet. Dieses Problem ist insbesondere in vielen Wissensaustauschanwendungen, Kollaborationssystemen, Ausbildungssystemen und so weiter. Die allgemeine Erklärung, dass die Menschen geben, ist, dass die Designer scheiterte bei der Schaffung der richtigen Programme. Dass sie sich nur auf Computersysteme konzentrierten und OCM vernachlässigten. Oder, dass sie nicht genug Geld für die Unterstützung zuteilen. Alle diese Gründe sind richtig, aber nicht wirklich vollständig korrekt. Es gibt einen Grund, warum viel mehr Geld nicht zugewiesen wird, das Management sieht nicht den ROI. Oder, es ist ein Grund, dass sie OCM vernachlässigt dies war nicht der Fokus. Also, sagen wir, dass diese Systeme nicht wichtig sind Können wir sie wichtig machen Oder sollten wir sie sogar wichtig machen Lassen Sie uns dieses Thema ausführlich betrachten. Wie Organisationen versuchen, digital zu werden, erkennen sie die Bedeutung dieser Art von unterstützenden Systemen und noch nicht wissen, wie sie erfolgreich zu machen. Sie arbeiten über bringen viel mehr Berater, die Organisationskultur zu ändern und weiterhin scheitern. Daher verdient es ein tieferes Verständnis. Theorie der Nachhaltigkeit Am Anfang, in der Frage, die ich gefragt wurde, gab es ein Schlüsselwort: 8220nachhaltig8221. Normalerweise sehen wir dieses Wort in Ökologie, Architektur und Sozialwissenschaften. Dort spricht man über dauerhafte Systeme, Systeme, die sich selbst auffrischen, Systeme, die keinen externen Reiz benötigen, um sich selbst zu unterstützen. Normalerweise spricht man in der Ökologie über den Fußabdruck der Systeme: die Bemühungen, ein System zu schaffen, ein System zu pflegen und so weiter. Um ein System nachhaltig zu machen, wollen wir sicherstellen, dass es einen geringen Platzbedarf hat, und es hängt nicht von irgendjemandem explizitem Bemühen ab, es zu behalten. Lassen Sie uns zum Beispiel die nachhaltige Architektur betrachten: Es bedeutet, dass der Grundriss der Architektur niedrig ist. Es kann sich selbst durch geringen Energieverbrauch und vielleicht mit Solarenergie erhalten. Auch kann es recycle Wasser. Es kann Abfall zu reduzieren. Alle diese Metriken bedeuten, dass es nicht viel dauert, um die Architektur zu erhalten. Zum Beispiel in meinem Dorf, sind diese strohgedeckten Häuser mit Crossflow-Belüftung und Freiflächen gebaut. Heute werden die modernen Häuser mit Ziegelsteinen mit Fenster-AC-Einheiten gebaut. Kommen Sommer-Stromausfälle, sind die modernen Häuser unerträglich, während die alten Häuser sind nur unangenehm. Es ist das gleiche mit städtischen Design auch, wenn es mit der Natur harmonisch ist, ist es einfach zu erhalten. Die meisten Städte können nicht erhalten, ohne viel Mühe in diesen Tagen in die Straßen, Parkplätze, öffentliche Verkehrsmittel, Sanitär-und Wasserversorgung. Stellen Sie sich vor, wir bauen Städte für Menschen. Wir können sie nachhaltig machen. Sehen Sie den Kontrast zwischen zwei Entwürfen: Der erste setzt auf Parkplätze braucht es mehr und mehr Parkplätze, da es mehr und mehr Platz braucht und nur Autos können die Strecke zu durchqueren. Der zweite ist für Menschen gebaut, wo zu Fuß ist der Weg zu umgehen. Es funktioniert, weil es weniger Platz braucht. Bilderhöflichkeit: andrewalexanderprice Sicherlich können wir aus diesen Systemen bei der Gestaltung unseres Wissensmanagementsystems Lehren ziehen. Entwerfen für Menschen mit geringer Wartungs - oder Wartungsfreiheit oder mit der Art, wie Menschen es tun, anstatt sie zu verändern Eine neue Kultur aufzuzwingen. Nudge wie soziale Experimente anstelle von, sagen großen Sprung nach vorn Diese sind harte Fragen, ohne definitive Antworten. Dennoch können wir versuchen, die Rolle der nachhaltigen Systeme in der IT und die Schlüsselelemente für die Schaffung solcher Systeme zu verstehen. Drei Arten von IT-Systemen Lassen Sie uns sagen, dass eine Bank in neue Unternehmen der Massen-Wohlstand Kunden zu bekommen. Historisch dienten sie nur die Kunden mit 10 Millionen Dollar oder mehr. Jetzt wollen sie die gleichen Dienste für Menschen mit 250K zu verlängern. Lassen Sie uns sagen, dass die Organisation baut eine neue Abteilung zur Unterstützung dieser Initiative. Auch wenn es einfach klingt, ist dies eine schwierige Aufgabe. Erstens, die Mitarbeiter werden verwendet, um die Millionäre zu halten. Sie werden verwendet, um die Prozesse zu umgehen, um den Superreichen gerecht zu werden. Nun, dass sie mit regelmäßigen reichen Leute arbeiten, können ihre alten Wege nicht auf die neuen Zahlen skalieren. Und ihre Kompensation früher kann von verschiedenen Metriken abhängen: Handling ein paar HNI. Nun müssen sie verschiedene Metriken verwenden können insgesamt Geld unter Verwaltung. Die Systeme, die sie verwenden, werden für die am häufigsten verwendeten entworfen. Lassen Sie uns beschränken uns auf die Computersysteme (und unterstützende Prozesse), um diese Sparte laufen: Lassen Sie uns sehen, was diese Systeme tun und wo Nachhaltigkeit einen großen Unterschied machen kann. Kernsysteme Ohne diese Core-Systeme läuft das Unternehmen nicht einmal. Das Management stellt sicher, dass der Fokus auf diesen Systemen liegt. Diese Systeme laufen mit strengen SLAs, mit ausreichender Finanzierung und oft mit Meilensteinen, Boni und Strafen. Diese Metriken sind sehr eng mit den Geschäftsmetriken verknüpft. Diese Systeme müssen nicht nachhaltig sein, es gibt genug Unterstützung, um sie durch die Bereitstellung von externen Reiz. Es kann jedoch sein, dass die Architektur dieser Systeme nachhaltig gestaltet werden kann. Häufig werden diese Systeme umgeschrieben, um Veränderungen in der Wirtschaft zu unterstützen. Diese Umschreibungen können teuer sein und können Verzögerungen bei der Fähigkeit zur Reaktion auf die Märkte verursachen. Wenn wir die Architektur nachhaltig gestalten, können wir Änderungen am System vornehmen, ohne wesentliche Änderungen an der Kernkomponente der Architektur vorzunehmen. Zum Beispiel, wenn wir gute Modularisierung, gute Schnittstellen und kohärente Philosophie der Daten haben, können wir die bestehende Architektur ohne Änderungen erweitern. Zum Beispiel, wie Unix dauerte für die letzten 50 Jahre, ohne grundlegende Änderungen. Diese Art von Build-for-Change-Architektur kann Kernsysteme veränderbar machen und eine nachhaltige Architektur schaffen. Erforderliche Support-Systeme Die erforderlichen Support-Systeme gehören nicht zu den Core-Systemen. Aber um die Core-Systeme laufen zu lassen, brauchen wir diese Systeme. Die Metriken auf diesen Systemen, die SLAs und wie gut sie ausgeführt werden, werden nicht direkt in die Hauptkernmetriken übersetzt. Dennoch sind sie wichtig, wie Versicherung. Zum Beispiel, wenn die Sicherheit ein Problem ist, würden Sie hören. Wenn Operationen ein Problem sind, würden Sie wieder davon hören. Wenn es keine Probleme gibt, sind die Chancen werden Sie nicht über diese Systeme überhaupt hören. Ein interessanter Aspekt ist, dass diese Systeme in verschiedenen Unternehmen sehr ähnlich sind. Zum Beispiel wäre die HR, die anders für eine Bank, sagen wir, ein Einzelhandelsunternehmen Die Chancen sind, dass sie weg mit der Verwendung der Computersysteme, die Generika sagen können, sind Software als Dienst in der Cloud. Oder, noch besser, können sie sogar auslagern die meisten dieser Funktionen nach außen. Cloud passt hier sehr gut, sei es als Full-End-to-End-Service oder als Teildienst. Da diese Systeme obligatorisch sind, auch wenn es keinen direkten Geschäftswert gibt, wird die IT häufig auf diesen Systemen gemessen. Aus diesem Grund müssen diese Systeme nicht selbsttragend sein. Dennoch, da diese nicht Kern des Unternehmens sind, sehr selten wollen Unternehmen in diesen Systemen zu innovieren. Optionale Support-Systeme Diese Systeme sind das, was das Management in der Vision spricht. Zum Beispiel, wenn ein Unternehmen sagt, dass die Mitarbeiter die besten Vermögenswerte sind, das sind die Systeme soll den Wert dieses Vermögenswertes zu erhöhen. Jedes visionäre Programm spricht darüber, wie diese Systeme geschaffen und gepflegt werden. Und doch sind diese Systeme, die am Ende oft fehlschlagen. Da diese nicht im Weg der Kernlieferung sind, selbst wenn diese Systeme ausfallen, wirft niemand Alarme auf. Sie sind wie der Klimawandel Vorboten. Ein paar Eisbären sterben Nicht ein Mainstream-Interesse Aber wir alle wissen, dass ohne diese Systeme, modernen digitalen Unternehmen nicht überleben können. Warum habe ich so eine kühne Erklärung Werfen Sie einen Blick auf die Modelle der modernen digitalen Unternehmen: Google, Facebook, Netflix und so. Fast alle von diesen legen viel Wert auf die Einstellung, die Schaffung und die Pflege Talente. Sie nehmen diese optionalen Systeme und machen sie zu wettbewerbsfähigen Vermögenswerten so viel, dass die meisten Unternehmen, die digital sein wollen, wollen sie auf diese Aspekte zu emulieren. Die ganze Idee von Innovationslaboratorien oder - gremien oder 2-stufigen IT - oder datengesteuerten Organisationen nehmen diese Praktiken als einen Weg, solche dynamischen Organisationen zu schaffen. Für eine Organisation, die diese optionalen Support-Systeme als eine Kernkraft sehen will, muss man sich nicht nur auf digitale Unternehmen verlassen. Sie können sich auf Open-Source-Ökosysteme, wo diese optionalen Systeme sind gut entwickelt und nachhaltig. Zum Beispiel, in der Open-Source-Welt, wenn ein Freiwilliger sich einer neuen Software-Entwicklungsaufwand, wie er es geht, kann er den Code und die Dokumentation auf Github lesen. Er kann die alten Notizen oder Diskussionen über Mailing-Listen-Archive oder Google-Gruppen lesen. Er kann an den schwachen Kanälen teilnehmen. Er kann den Code forkeln Er kann einige einfache Probleme beheben und zurückgeben Er kann die Dokumentation verbessern. Kurz gesagt, ohne irgendwelche Ressourcen zu besteuern, kann er ein produktives Mitglied des Teams werden. Tatsächlich sind dies die herausragenden Merkmale dieses Entwicklungsprozesses, die ihn nachhaltig machen: Alle optionalen Systeme werden in die erforderlichen Systeme eingebacken: Das Wissensmanagement ist Bestandteil des Versionskontrollsystems. Die optionalen Systeme sind einfach. Zum Beispiel sind die meisten der Dokumentation in Abschriften geschrieben. Es ist ein Teil des Quellcodes. Es ist nicht aufwendig, aber schnell auf den Punkt der Boot-Umreifung. Es begrüßt die Mitwirkenden. Der Vorgang des Gabelns und des Codes ist einfach. In der Tat, die erste denken, die Menschen handhaben ist diese Vereinfachung, bevor sie das Projekt in Github. Wenn sich die Führung ändert, kann das gesamte Projekt geklont werden. Es gibt keine versteckten Informationen. Im Gegensatz dazu, in einem Unternehmen, ist dies, wie es sein könnte: Ein lokales, spezielles Toolset, das Leute zwingt, zu lernen, bevor sie beitragen Ein spezielles Team, das Onboarding Dokumentation, die oft ist out-of-date beizubehalten, Wenn man hat Um einen Beitrag zu dem Projekt zu leisten, wird es die Handhabung eines bestehenden (oft beschäftigten) Teammitglieds erfordern. Keine schnelle Befriedigung für die neue Ecke, dh es gibt keinen Anreiz für neue Teilnehmer, dem Programm beizutreten. Kurz gesagt, die Open-Source-Weg ist nachhaltig, weil es einfach ist, begrüßt es zu neuen Ecken, so dass sie das System erhalten können. Nachhaltige Organisationen Die gleichen Prinzipien arbeiten auch bei der Schaffung von Organisationen. Die meisten Unternehmen konzentrieren sich auf Kunden und Ergebnisse, die zu den direkten Metriken beitragen. Die indirekten Metriken, die diese Metriken auf lange Sicht ermöglichen, können für eine Weile fokussieren, aber in dem Moment, in dem sie weniger wichtig werden, fallen sie auf der anderen Seite. Weil sie nicht nachhaltig sind, besteht die Gefahr, dass sie zu einer Ödnis der Systeme mit Lippenbekenntnissen werden. Die meisten Organisationen erkennen dieses Problem. Ihre Lösung ist, den Fokus auf dieses Problem zu erhöhen. Aber das löst das Problem nicht für immer. Stattdessen wird es wie US-medizinische Gesundheitsversorgung. Der Witz ist, dass Menschen mit reichen Plänen am Ende immer schlechte Behandlung, wie jeder will sie für etwas zu behandeln. Und Menschen ohne Versicherung auch am Ende immer schlechte Behandlung. Nur mit der richtigen Art der Versicherung erhalten wir die richtige Behandlung. Die Idee ist der Fokus sollte die Schaffung solcher nachhaltigen Systeme die Systeme, die ohne kontinuierliche Fokus laufen können. Diese Systeme sollten als Nebenprodukt der Hauptmetriken laufen. Sie sollten laufen, weil die Traditionen gegründet. Sie sollten laufen, weil sie egoistische Interessen der Menschen dienen. Sie sollten laufen, weil die kollektiven Interessen der Menschen, um andere zu bestätigen. Checkliste für nachhaltige Systeme Mit dem Wissensmanagement haben wir begonnen und nachhaltig umgesetzt. Ich gab keine Antwort auf diese Frage. Stattdessen ging ich weiter auf die Erklärung der Nachhaltigkeit. Nun wollen wir auf ein nachhaltiges Wissensmanagement zurückgreifen. Während wir es nicht definieren können, können wir in der Lage sein, bei der Erstellung einer Checkliste zu helfen, um zu sehen, ob ein System nachhaltig ist. Offensichtlich wollen wir, dass es einen geringen Platzbedarf hat, aber das ist nicht genug. Die folgende Checkliste kann ein guter Anfang sein. Im stationären Zustand sollte das System keine zusätzlichen Ressourcen benötigen, um es zu unterstützen. Bis es in den stabilen Zustand gelangt, sollten sich die Stakeholder dafür einsetzen. Das System sollte sich automatisch selbst halten. Es sollte im Interesse einer Person sein, es zu benutzen. Es sollte im Interesse einer Person sein, dazu beizutragen. Es sollte im Interesse des Teams zu nutzen und zu pflegen. Es sollte einfach sein, mit dem System zu beginnen. Sie sollte nicht den bestehenden Arbeitsweisen widersprechen. Solche Systeme können auf Dauer erhalten werden. Wenn wir ein nachhaltiges Wissensmanagement aufbauen, ist dies die Liste, gegen die wir vorgehen sollten. Geschrieben von rama um 10:03 Uhr Was wäre, wenn ich Ihnen sagen, dass die E-Commerce-Website, die Sie entwickelt haben, könnte auf einer statischen Website gehostet werden, die es bieten würde Premier Performance Oder dass das Dokumenten-Management-System auf jeder Ebene ausgeführt werden könnte, Alten statischen Server wie Apache. Nginx. Stick mit mir und gut erforschen dieses Thema. Diese Informationen können auch für fortgeschrittene Entwickler zu grundlegend sein, aber für die meisten Manager kann diese Einführung längst überfällig sein. Ein bisschen Geschichte Vor langer Zeit waren die meisten Websites statisch. Alle, die sie dienten, waren Seiten html, Text und Bilder. Hyperlinks erlaubten uns, von einer Seite zur anderen zu navigieren. Die meisten waren inhaltsreiche Websites mit Informationen, Unterhaltung und Fotos. Jetzt ist es unvorstellbar, dass das Klicken auf die Hyperlinks die einzige Möglichkeit war, mit den Seiten zu interagieren. Wie in der Abbildung gezeigt, ist das Protokoll zwischen dem Webserver und dem Benutzer fest: http-Protokoll. Die Art und Weise der Webserver interagiert mit Backend-Informationen (im Falle von statischen Web, es ist html, css, js, Bilder und so) ist bis zu uns. Eine statische Website dient diesen Informationen direkt aus dem Dateisystem. Als die Leser begannen, Websites auf interessante Weise zu navigieren oder durch das Hinzufügen von Inhalten mit den Websites (wie Kommentare) zu interagieren, begannen wir serverseitige Programmierung zu benötigen. Serving aus einem Dateisystem wird nicht. Die Anwendung muss komplexe Anforderungen zu verstehen und irgendwie verwenden Sie die Informationen in den Dateien (oder Datenbanken), um die Informationen zu dienen. Da Datenbank eine populäre Wahl ist, um strukturierte Informationen zu halten, fing Web an, als Schnittstelle zu den Datenbankarten der einfachen crud Operationen zu dienen. In der Tat, Anwendungen wie phpMyAdmin sogar lassen die Menschen verwalten die Datenbanken im Web. Zurück zu den Web-Anwendungen, die ich erwähnt, 8212 E-Commerce, digitale Marketing-, Dokumenten-Management-Systeme 8212 alle diese Websites gelten als interaktive, dynamische und programmierbar und benötigen daher einen Web-Applikationsserver. Im Moment wählen Sie eine Plattform (in der Regel bedeutet es einen App-Server, eine Sprache, ein Framework, eine Reihe von Bibliotheken), youre stecken mit ihm für immer. Mal sehen, wie wir unseren Ausstieg gestalten können. Statisches Web mit automatisierter Look-and-Feel-Unterstützung Lassen Sie uns einen einfachen Fall der Informationsdarstellung betrachten. In this setup, all the consumers want to do is read the information. In that case, why not stick to a static website We can. The advantages are obvious. First and foremost, a static website is simple. It does not require any moving parts. Any old webserver can serve static content. You can even run a static website, with a simple one-liner in Python ( python mSimpleHTTPServer in Python 2.7 or python3 m http. server ). It is also incredibly fast. The server has to simply send pages it does not have to do any other computation. As such, it can be sped up even more by caching the content locally, or even using CDN (content delivery networks). You can use special purpose webservers such as nginx, that are optimized for serving static content too. Furthermore, it is simple to maintain. You can back it up in the cloud, move to a different provider, and even serve it from your own desktop. You do not need to back up a database or worry about software upgrades, portability issues, or even support. But, what are the downsides Let us consider the problems: How do you create nice looking pages Let us say that you want to create a standard look and feel. If you are the kind that use hand-coded HTML, you will cut and paste the HTML template and then edit it. Pretty soon, it becomes complex. If you want to change the look and feel, you will have to go through all the pages and edit the few lines. How do you create standard elements of a website For example, you want a menu scheme. If you add a new area, then you have to go to each page and add a link in the menu to this new area of website. Or, if you want to create a sitemap, you will find yourself constantly updating the sitemap. Considering that a website has repetitive information depending on the context, static way of maintaining a website is cumbersome. That is why, even for the static websites, people prefer WordPress. Joomla. or Drupal all of which are meant for dynamically creating websites. In these systems of dynamic content generation, the content is generated based on the request. No matter what application you use, it will have following issues: The application becomes slow: The server needs to execute the program to generate a page and serve the page. Compare it to the earlier scenario where the server merely had to read the file from the file system and serve In fact, the server can even cache it, if the file doesnt change often. The application becomes complex: All the flexibility of combining content with the themes based on configuration comes at a price. The application server has to do many things. Consider the following full description of the stack. Any web server that is generating pages dynamically, needs to depend on an execution engine. It can be an engine that interprets a language, or executes a binary. For any language, we need a framework. For instance, if we are using Javascript, we can use Express as the framework. This framework can do many things. At a bare minimum, it can route the calls that is, it interprets any request and maps the request to the right response. Next, it needs to have libraries that deal with writing the logic to actually manipulate the data. To present the data, we need a templating engine. Of course, you have fancy names like Model (the data), view (the templates etc), and the controller (the routing) for this kind of framework (MVC). The problem with any stack is that once you are committed to it, it is incredibly difficult to change it. To make matters worse, the frameworks that let you start easily (for example, lot of php based frameworks) are not the best frameworks for enterprise strength requirements (like say Java, which is excellent in libraries that deal with lot of integration). Ask Facebook They started with Php and had to lot of optimizations to get the performance they want. How can we do better Can we still use the static website, and support better usability of the website Reduce the costs of maintenance The answer is yes. If we were to separate the content generation and content delivery, we can get best of the both worlds. From this activity, what did we gain We gained performance: The runtime has to serve static files, giving us several different options to improve the performance. We gained simplicity, somewhat: Technically, it is possible to mix and match different systems of generation (which is somewhat like using different languages and compiling down to machine code). Readers can observe that content delivery networks can do this job of caching generated content on-the-fly, giving us the illusion of static generation of content. Static website generators If we are going to generate static website, what options do we have Let us see the alternatives. Firstly, we can use the same dynamic content generators and dump out the entire site in static pages. That is, if we are using Drupal, we can dump all the nodes. Or, with WordPress, or any other content management site. The challenge is, what if there is no unique URL for a content Lot of content management sites offer multiple ways of accessing the static content. For example, Lotus notes was notorious for such URL generation. Then, the static content dumping can be difficult. More over, these systems are not meant for static website generation the limitations keep showing up as you start relying on them. Secondly, we can use WYSIWYG editors such as Dreamweaver. They can create static content, apply a theme, and generate the website. They come with several beautiful themes, icons, and support scripts as well. The challenge is that these systems are not programmable. Suppose you are generating content from external system. These systems do not provide a way to automate the content ingestion and upgrading of the website. Thirdly, we can use a programmable system that generates the content. These days, this is the favored approach. These systems generate or update the complete website just from text based files. You can programmatically import content, update the website and publish it to production all through scripting. Furthermore, they offer standard templating, support for CSS and Javascript libraries. The downside, of course, is that these systems are not mature. They are not general purpose either. Still, for an experienced programmer, this is a wonderful option. There are several examples of the third type of generation systems. The most popular ones are the ones that support blogging. For instance, Jekyll is a popular static website generator, written in Ruby, with a blog flavor. The content is authored in markdown format. Octopress is built on Jekyll supporting blogs. In Javascript world, there are blacksmith. docpad. and a few more. Out of all the contenders, for my use, I like hugo and docpad. Hugo is the simplest of the lot and extremely fast. Docpad is more versatile in supporting lot of different kind of formats, templates, and plugins. In hugo, all that I had to do was to create a hierarchy and drop in. md files as description. Based on the folder structure, it creates the menus, content layout, and the URLs. Docpad is a bit more complex, but it is also essentially the same. Static web with high interactivity There is a big problem with the earlier approach. Consider the example we were giving about a document management system: what if we want to search for the right document Or, sort the documents by date Or, slice and dice the material Or, draw graphs, based on the keywords For all these tasks, historically, we depended on web server doing all the heavy lifting. Do you want to sort the documents Send a request to the server. Do you want to filter the documents Send another request. While this kind of interaction between the user and the web server gets the job done, it is not terribly efficient. It is a burden on the server it increases bandwidth requirement it feels sluggish to the user. Thankfully, the situation changed with advancement of Javascript. Turns out when any HTML page is digested by the the browser, it creates a data structure called DOM. With Javascript, you can query and change the DOM. That means, at run time, you can do sort, filter, display, hide, animate, draw graphs all that with the information available to the browser. With this kind of power, we can design interactive websites without going back to the server. With this additional requirement, how we develop web pages and what technologies we use will be different. See the sequence diagram titled JS based interactive sites. The web server sends the data, html, and javascript the first time. After that, any interaction is handled by the script itself. It can compute the new content based on the user interaction, from the existing data and make the necessary modification to the page by changing the elements of DOM. The implications of this design option are enormous. We do not need to burden the server we do not need to overload the network we provide quick interaction to the customer. The range of interactions is limitless. For instance, if we are offering an electronic catalogue of books, we can search the titles, sort by authors, filter by publishing date, and so on. In fact, these kinds of interactions are common enough to have several mature libraries supporting them. For example, for the tasks I mentioned in the previous paragraph, I would use dataTables. If I am doing the same with millions of entries, I would use Pourover by NYTimes (which used this library for their oscar award fashion slicing and dicing web page). Static web for collaboration For the kind of interactivity we discussed earlier, Javascript libraries work well. If you think about it, all those web pages are providing is read-only interactivity. What if you want readwrite interactivity For example, if you have a website with lots of content. You want to provide people a way of adding comments. Take the case of earlier Octopress itself we may want to add commenting capability to those blog posts. How would we do that We certainly need server side capability to do that. Fortunately, the server-side capability need not come from us. We can easily use 3rd party server for these capabilities. For instance, we can use disqus or Facebook for comments. We can use Google analytics to track the users. In fact, the 3rd party server ecosystem is so strong these days, we can develop highly interactive websites, with just static content served out of our server. You can learn what other leading web companies are using on their web pages and what services they are using from stackshare. io . How do you integrate into your website Here is an example: This action creates a checkout button. When the user checkouts, it creates a token and provides the browser. You do need to have some server side component that takes this token and charges the user it goes beyond the usual static website I was describing. But, for most other less critically secure website, you can conduct the updates from the browser itself. For example, take a look at how you would integrate the analytics from Google on your website: You find this code in several websites, which posts a click data to the Google server. Admittedly, most services need server to interact with them, for security purposes. Nevertheless, the heavy lifting is done by some 3rd party web server. Static website special case: Server less setup A special case of static website is desktop website. Suppose you want to share a folder with your friends. Easiest way to put the folder in dropbox and share it with them. Now, suppose, you want to provide some interactivity, say, searching the files etc. What would you do You could host the files in a website. Too much trouble. You could run a local webserver. But, that is too complex for most people. Why not run the site with file: protocol, without requiring a server, directly opening a file in the browser This approach works surprisingly well. The workflow could be as easy as this: Let people, including you, place the files in the shared folder. Watch the folder on update (or, do it periodically) and run a script that generates the data file. The user can open the index. html folder, which uses the data file to create a web page. With suitable library (like datatables) the user can navigate, search and sort the files. This is a simple poor mans content management service. You can enhance the document authoring process to add all other kind of meta data to files so that you can make more effective slice and dice operations of the folder. Static web for e-commerce: An exercise for you Let us take it up one more notch. Can we design an entire e-commerce site as a static website (or, at least with minimal server components) We want to be able to display the catalogue, let the users browse, discover, and even readwrite the comments. In addition, we should let them add items to shopping cart and check them out. We may even want to add recommendations based on what you are looking at. Now, how many items can we keep in the catalogue Remember that images are in separate files. We only need the text data. Looking at general information, it is max 2K per item. While there is no limit to the amount of data browser can load, anecdotal evidence suggests that 256MB is a reasonable limit. So, 100,000 items can be displayed in catalogue, without problems. Remember that all this data and images can be served out of a CDN. We can do one better. We do not have to load all the items at once. We can load parts of items, based on demand. Now, if the commerce site has different divisions, and the customer chose one of them, we only need to load that part. If we can reduce the number of items to say 10,000 to start with, that makes it less than 20 MB, which is the size of a small video. So, it is entirely reasonable, for user experience perspective, to be able to load 20 MB for a highly interactive site. What about other services We can manage the cart in JavaScript. The actual checking out: payment, receipt, and communication to the backend need to be done an actual server. Anything less would make the system less secure. Anybody with knowledge of the JavaScript can easily spoof the browser so, best not to make direct calls to the backend, from the browser that assumes any valid data from the browser. All you are doing is a providing the integration in the browser We can think of some more modifications. What if we design a mobile application We only need to ship the deltas in the catalogue. After choosing the catalogue, the application can send a request to fulfillment with some additional credit card information. Now, go ahead do the following tasks: Draw the technical architecture diagram Create a data model and generate sample data in JSON Create a set of javascript programs to support the following activities users browsing the catalogue Adding items to the cart Checking out cart (here, you might some server components do it an a different server). Searching the catalogue Managing the cart For additional credit, do the following Cross-selling and upselling (people who bought what you looked for also bought the following or, buy this additional item at a discount). Discuss the security implications. Develop a mobile application that caches the entire catalogue on the device. Figure out a way to keep the catalogue data synchronized on demand. Because of Facebook, I have been in constant touch with friends, acquaintances and even people that I did not meet. I am using this annual letter as a way of summarizing, introspecting, and filling in the gaps in my usual communications about technologies to friends. It is heavily slanted towards technology, not the usual intersection of business and technology. There are three ways that I learn about technologies. One is by experimenting on my own. By actually coding, practicing, verifying hunches, validating ideas, and playing, I learn a bit. By talking to customers, sales people, engineering managers, and developers, I understand what the problems of application of technologies are. By reading books, news papers, and blogs, I try to see the interrelationships between different subjects and the technology influences in the modern world. Let me review from the annual perspective, what these three different influences taught me. (Cloud) Container based technologies I played quite a bit with container based technologies. Specifically, I tried various docker based tools. In fact, I setup systems on Digital Ocean that lets me create a new website, make modifications, and push to public, in less than 10 minutes. That is, using the scripts that I cobbled together (most of them are public domain, but I had to make some tweaks to suit my workflow), I can create a new docker instance, initialize with the right stack, provision reverse proxy. and push the content to that machine, install all dependencies, and start running the system. Minimal, cloud-ready OS8217s From my experiments with docker, I see that the power of virtual machine that can run any OS is not much useful. I don8217t want to think in terms of OS. What I want is a stack to program in. My OS should be cloud-aware OS. It should be minimal, should work well in a hive, should support orchestration, and should be invisible. Since I am unlikely to interactively work in it, I would place a premium on programmability, and support for REST services. Of course, it needs to secure, but since it is minimal OS, I want security at different layers. Based on all these requirements, I see hope for CoreOS kind of OS. I don8217t know if coreos is it, but something like that 8212 a minimal, cloud ready OS is going to succeed. Companies like Google and Facebook already use such systems for their internet scale applications. (Server side technologies) Node. js technologies I entered this year having learnt a bit about node. js. I have a love-hate relationship (who doesn8217t) with JavaScript. On one hand, I love its ability to treat functions as first class objects, its polymorphism, its ability to extend objects etc. Its approach to type system is dynamic, flexible, and incredibly powerful. Yet, I find lot of things to hate about JS. It scoping is infuriating. Its support for basics of large scale programming are absent. Its ability to type check are minimal. It leaves our crucial features of programming, letting users create competing idioms. For small to medium systems that are cobbled together by REST services, node. js still is a quick way of getting things done. And, I like npm 8212 it is even better than CPAN. I am not a fan of reinventing the wheel with all the tools like gulp, bower etc. The proliferation of these tools is confusing, putting off a casual user with their own standard tools. (Java was the original culprit in these matters.) In Node. js, the technologies I played with are: Express. Of course, duh. There may be better ones there, but I needed one standard one in my arsenal. This one will do. Mongo. The power of using JavaScript across all the layers is seductive. I don8217t have to translate from one format to another. And, let somebody worry about performance (well, not actually, but will do for the most part). Usual set of libraries, involving, parsing, slicing and dicing, and template management. Front end JavaScript I have been frustrated with the front end technologies. There are too many frameworks. MVC MVCC And, the complex edifice makes my head swim. At the end, I am not able to make sense of it all. Thankfully, I see things changing. I am able to settle down on a few choices for myself 8212 not because they are the best (in some cases, they are), but they are good for a generalist like me. JQuery. I still find it the best way to manage a DOM from JS. I never bothered to learn the full DOM API, and I find JQuery convenient way of managing. Web components. Specifically, I fell in love with Polymer. Why Think about this. HTML has a standard set of tags. Suppose you want to introduce a new tag. You need to create JavaScript that parses the new tag and manages it for you. So, your code is strewn in a few places: the JavaScript code, CSS specifications, and the HTML. It is too messy, too unmaintainable, and more importantly, difficult to mix different styles. Enter web components. You can create new elements as first class entries in DOM. The looks of the new element are specified via CSS in there itself. The behavior through the JavaScript also goes there. You expose specific properties and interactivity. The big thing is since it is first class element in DOM (as opposed to translated to standard elements through JS), you are able to reference it from JQuery and manage it just like you would a heading. Since not many browsers implemented web components, we need a Polyfill . a way of mimicking the behavior. Thanks to Polymer. now we have JavaScript code that makes it appear that the browser supports this DOM behavior of web components. This polyfill intercept every call to DOM and translates appropriately. Summary: It is slow and buggy at the moment. In time, it will take off, creating a nice 3rd party market for web components. It almost like what COM did for Microsoft. Assortment of libs: While I did not reach my ideal setup (where the machine can speak IKWYM 8211 8220I know what you mean: language), there are several libs that help me now. Specifically, I like the templates with inheritance like nunjucks. I also use Lodash to make life simpler. And, async. js to use the async paradigm of JavaScript. HTML looks and feel As an early adapter of Bootstrap, I stand vindicated in pushing it for my corporate users. Now a days, almost all development we do is responsive, built on standard template driven development. Within that, I dabbled with a few design trends because I found them interesting: Parallax Effect: You see pages where the background images roll slower than the text It gives a 3D layering effect. It is particularly effective in creating narrative stories. When the images are also responsive, this 3D effect can make the web pages come alive. To take a look at some examples, see: creativebloqweb-designparallax-scrolling-1131762 Interactive HTML pages: Imagine you are telling a story, where by changing some choices, the story changes. For examples, tabs change the content. But, imagine creating new content based on the user input, not merely showing and displaying the content. For instance, once we know the name of the reader, age and other details, it is easy to change the text to incorporate those elements. Or, if we know what they need, we can directly address in a sales dialog. While I did not carry out this idea to completion, I satisfied myself which the technology and the framework to do this interactive narrative sales tool. Naturally, this framework has a little bit of JS magic. Auto generation of web pages: As I was writing text, converting the text to HTML and a suitable web page became an obsession with me. I finally settled down to using combination of md5, bootstrap, and yaml properties to generate a good looking web page to share with people. If you are interested, please see these two blog posts, from yester years: Static web apps As I started seeing the advances in the web front ends, I see the possibilities of static web site. For instance, it is easy to create and run a static e-commerce application, with 10K or so SKU8217s without any trouble. We can even have recommendation engine, shopping cart, various payment methods 8212 all these thanks to web services and HTML5. The following are the technologies that I found useful in the static websites. markdown for html generation: For generic content, markdown is easy to author format. In fact, we can even author books in this format. asciidoc for book authoring: For larger format HTML with more whizbangs, asciidoc is what I tried. docpad for static website generation pandoc for format conversions For the in-page manipulation of large number of objects, I find the following very useful: pourover. The amazing slice and dice web sites for displaying large tables is done by pourover library from NY Times. I have high hopes for it. I think there are lot of innovative uses for this library, with its performance, and ability to cache the results. One of my favorite problems is to develop a web applications, without any db in the backend, a pure static application that acts as a library interface. We can search, slice and dice the selection using various criteria. For instance, latest document about a particular technology, written by author XXX, related to YYY document. Mobile amp Hybrid application development I have for a long while, bet on hybrid application development, instead of native application. Now, I concede that on the higher end market, native apps have an edge that is unlikely to be equaled by hybrid applications. Still, in the hands of an average developer, hybrid platforms may be better. They are difficult to get wrong, for simple applications. This year, I was hoping to do native application development, but never came around to it. With polymer being not yet completely ready, I dabbled very little with Angular based framework called Ionic. It was OK for the most part. Still, for simple pattern based development, I hold lot of hope in Yeoman. For corporate contexts, one can develop various scaffoldings and tools in Yeoman generator framework. That leads to compliant applications that share the standard look and feel without expensive coding. In my mind, right now, there are three kinds of languages: ones that run on JVM 8212 that includes scala, Java etc. Ones that translate to Javascript: these include Typescript. Coffeescript etc. And, the rest, like Go etc. Innovation in other languages has slowed down. Despite that, the three languages I dabbled this year are: Scala for big data applications, specifically for spark Python, again for data applications, specifically statistical processing, and Javascript, as I mentioned earlier. I liked typescript. especially, since it has support from Visual studio. I started on R, but did not proceed much further. Another language I played with a bit is Go, in the context of containers and deployments. Data and databases This year, I gave a 3 hr lecture in Singapore on bigdata, in the context of internet of things. I should have written it up in a document. The focus of that talk is what are the different areas of interest in big data are and what technologies, companies, and startups are playing in those areas. This holidays, I experimented with Aerospike. a distributed KV database developed by my friend Srini8217s company. Whatever little I tried, I loved it. It is easy to use, simple to install, and fast to boot. According to their numbers, it costs only 10 per hour to do 1 million reads per second on google compute platform. I will replicate and see how it compares against other databases like Redis and Cassandra that I am familiar with. On the statistics front, I familiarized with basics of statistics, which is always handy. I focused on greenteapressthinkbayesthinkbayes. pdf to learn more. I followed Quora to learn about the subjects in Coursera. I wanted to get to machine learning, but that will have to wait for 2015. On particular aspect of big data and analytics that fascinates me visualization. I played with D3 8212 it was of course the basis of most of the visualization advances that we see these days (bost. ocks. orgmike ). I am on the lookout for other toolkits Rickshaw. I will keep following it to see the new upcoming advances to make it more main stream. Other computing tools I find myself using the following tools: Atom for editing text files. Brackets. io for editing html files, and for live preview of the static web pages. VMWare workstation for my virtual machine needs. Markdown for note taking. Developer tools from Chrome for web development. Visual studio for web development Digital Ocean as my playground of coding activities OVH for any large size applications and servers Customer conversations Since most these conversations have some proprietary content, I cannot give full details here. In general, the focus in on innovation and how corporations innovate in the context of established businesses. Typically, it is a mix of technology, processes and organizational structure transformations to change the way businesses are run. I will need to talk about in byte size postings some other time. Wish you a happy 2015 May your year be full of exciting discovery See you in 2015 I looked at the way that the corporate training happens in technology areas and I find them wanting in several respects. This is my attempt at a bringing some best practices to corporate or institutional training. Most corporations have training programs, especially the ones that deal with IT technologies. The goal of these trainings is to train people so that they can be useful, productive members of a project. This is meant for training competent engineers, craftsmen who can support delivery of projects. A typical company gets two kinds of people to train: People fresh out of college . They went through latent learning, without clear goals. They learnt different subjects in college, without clear understanding of how that knowledge is meant to be used. They tried to understand concepts without real practice. People with a little experience . They worked on few projects, churning out code. Conditions in the industry is such that they were not exposed to quality code. Most of them do not understand the value of quality not do they understand what quality is. Current training methodology: What is wrong with it Typically any corporate training follows a standard process: they get nominations on who to train. They hire or get instructors, who are experts in that area. They put all of them in a room, sometimes away from all the distractions. Over the course of a day or two, the instructors will take them through (with the aid of power point), the nuances and the details of the material. For example, if the training is on Java, the students will go though the static methods, public, and annotations etc. If the training is advanced, they might even cover some patterns of usage as a way of best practices. are Typical evaluation of students are carried out through multiple choice questions which will test the users on the intricate details of the language. These questions cover a lot of trick questions to test the understanding of the language. What are the problems with this approach Let me count the ways: It doesnt train the students for what they encounter in the job. It doesnt make them a better developer or project manager or whatever. It only tests the book knowledge, which is almost one Google query away. It is that much cheaper to invest in a good quality internet connection. After a few days of training, they forget the knowledge. Of course, they can always look up a book when they need to but that was the situation they were in, to start with, anyways. Even if we train them using actual small projects, these problems will continue to exist. New way of training: What we want to achieve The education market in the US is being continually disrupted. I am going to list a few lessons from those disruptions and later describe how to apply those lessons to our training process. Let us see each of these lessons in turn. Inversion of classroom and home Known as Flip-teaching, this method of teaching became popular because of Khan Academy. The problem with class room training is that the teachers are going at lecturing at the same pace for everybody. When the students need help with homework, they are on their own. In the flipped learning, the instructor doesnt teach via lecture. There are enough number of books and videos that can teach the subject. Instead, the instructor, in the classroom setting, works with the group to solve problems. Practicing for muscle memory Here is a quote from the book, Art amp Fear. The ceramics teacher announced on opening day that he was dividing the class into two groups. All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality. His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the quantity group: fifty pound of pots rated an A, forty pounds a B, and so on. Those being graded on quality, however, needed to produce only one pot - albeit a perfect one to get an A. Well, came grading time and a curious fact emerged: the works of highest quality were all produced by the group being graded for quantity. It seems that while the quantity group was busily churning out piles of work and learning from their mistakes the quality group had sat theorizing about perfection, and in the end had little more to show for their efforts than grandiose theories and a pile of dead clay. If you want to learn JavaScript, write lot of code. Through writing the code, you keep improving. None of those Learn X in 10 easy steps can get you to this level of deep learning. Hacking community realizes this aspect of learning well. Look at the following approach to learning by coding a lot: LxTHW (Learn X the hard way). The approach started with a popular book on Python, called Learn Python the Hard Way. If you follow that book, you dont endlessly learn syntax and nuances of the language. Instead, you will code, and you will code a lot. It starts out this way: Do not cut and paste. Type the code as is. Make the code run. Now, modify the code to solve slightly different problems. And, make that code run. Keep repeating till you internalize all the concepts through practice. In fact, this kind of learning through practice is applied by several people successfully. An example that I found very impressive was the case of Jennifer Dewalt. On April 1st, 2013, she started on a project to develop 180 websites in 180 days one each per day. All these websites are simple enough to be coded in a day. With practice she got better and better you can see the progress of her websites for yourself. Even more experienced programmers like the inventor of JQuery, John Resig, feels that writing code everyday helps him keep his skils. Here is the famous blog post that he wrote: ejohn. orgblogwrite-code-every-day In summary, our courses should not be teaching tricks and nuances of languages, libraries, or tools they should be teaching the people practicing the craft. Attention to basics The big obstacle is coding or practicing the craft is not having the right basics. Even when two people are practicing equally, the one with the better basic tools will win. Unfortunately, most colleges do not teach the tools of the trade. They focus, rightly on the fundamentals. Yet, there is no part of the education that covers the good use of tools and ways of working. If practicing is the way to teach, the students need to have the right infrastructure to practice. In fact, practicing on that kind of infrastructure teaches them on how to use such infrastructure. These days, the basic infrastructure should be: Making use of the cloud Making use of the right OS, editors, and IDE Making use of the right tools for version control, bug tracking, requirements etc Even for small projects, it is best to have at least a cloud based setup to try the code, a version control to keep the code history, and the right editor to train your muscles to use the right key strokes. Quality through osmosis We can get people to practice on the right infrastructure and churn out finished goods fast. But, will the output reach world-class quality While we made the argument that quality comes from quantity (through long practice), a more important ingredient is having right role models. That is where right mentorship can help. This is where intervention by a teacher that give feedback on quality of the output can help. There are multiple ways we can bring this to practice say if you are learning programming in JavaScript: Especially, in the third step, and to lesser extent other two steps, good mentors can help. They can point out what the best practices are, idioms are, and why some practice is good. Assessment through real-life tests The current crop of testing, because of automation, is focused on multiple choice questions. Unfortunately, it only focuses on the nuances of the programming language or system. The world is far more complex there is no single correct answer. Even if your problems were to come in the form of these questions, you could always find out answers from the internet. In contrast, in real life, you will have to produce code or an artifact. Why not prepare you for that, during training Here is an approach that works: Pick a large enough problem that we encounter during our work. Lot of these problems require programming in the large. Abstract it sufficiently so that it can be solved in limited time. For instance, you can choose only one module (say, adding new users to the system). Write a full fledged system that solves that sub-problem. If multiple people choose different parts of the system, then, we can have a fully functioning system at some point. Training process If you were to subscribe to this approach of corporate training, how would you start Here is the approach I suggest. Start with a clear statement of what you want the students to be able to do . This part is surprisingly difficult. For instance, do not say I want my students to learn Java. That does not give them a new capability. Instead say I want them to solve the following kinds of problems. Now, these problems can be your way of assessing their status after the training. Create a pre-conditions for the material: Not just only for assessment, but as a way of setting expectations, you could ask the participants to do some tasks. For instance, if they are going to be doing JavaScript programming, they should know how to use Firefox or Chrome extensions. You could test for that. Create a curated content of the material: Since there is so much of material online, create an annotated list of material. For instance, you could give a link to the articles, books, slideshare entries or Youtube videos, with some notes about what the expectations from that videos are. You could construct them as a series of lessons. For each lesson, create a set of problems they should solve: In fact, more problems they practice, the better it is. If there is an entity like LxTHW, we could just follow that. If not, create a set of problems for them to solve so that the lessons really sink in. Create a basic infrastructure with tools . Even before they start solving problems, provide them an infrastructure such that: They can use the tools to develop the solutions They can use the infrastructure to collaborate with others They can use it to show the mentors They can test their solutions Provide the mentors . This part is tough. Just as we mentioned earlier, at the minimum, show them (embed in the curated content), what you consider as good quality to achieve. Create a post-training evaluation . Crate a large enough problem for the people to choose a part of the problem to solve. Using the mentors see how fast they are developing the solution (it indicates how they internalized the solution practice makes for speed). how good a solution they are developing (it indicates how well they learnt from the masters) Create a community so that they can interact with each other post training : A training is not complete unless it is followed up. Since resources are difficult to get, use the power of community. Create a social space where people can discuss what they learnt even after they graduated from the course. Concluding Remarks I am no fan of corporate training but I realize that not all people are self-motivated to learn and learn well. I think corporate training can be reformed to take advantage of the modern best practices such as incorporating internet material, using repetitive training, and intentional techniques in training, especially for acquiring technical capabilities. This note is an attempt towards that direction. Posted by rama at 1:12 pm You are the CIO. Or, the director of application development. You hear about consumerization of IT, in different contexts. You hear about mobile applications developed by teenage kids in only months, and these apps are used by millions of adoring people. And, your business people are demanding why cant be more like those kids. What should you do Retrain your staff on some of the consumer technologies Get a partner who has the skills in the consumer technologies Move existing applications to consumer-friendly devices Are they enough And, why are you doing all these anyway In last couple of years, I have been working with different IT leaders to evolve a definition and an approach to this problem. By training, I am a technology person the kind that develops the consumer technology. By vocation, I help IT departments help adapt technology to meet their strategy. Being in both the sides of fence, I have a perspective that may be interesting. This note is derived from a few presentations I made at different industry conferences. The self-explanatory slide deck is available at: slideshare. netkramaraoconsumerization-32279273 Lets look at the following three questions, in order: What is consumerization of IT How does it affect IT departments What should the IT departments do about it Consumerization of IT: A bit of history The as coined in 2001, consumerization refers to the trend of building application that are people centric. Have we not been doing that always Yes and no. While we were developing the applications for people, our main focus was some where else. The focus was about either growth of the business (by managing the volume of data), automation of activities to speed up the processes, or automating the entire business value chains, or only recently, focusing on the customers. When we were building applications earlier, we were building them for a purpose: to solve a business problem. People were another peace of the puzzle they were meant to be a part of the solution, but not the purpose of the solution. Enterprise IT application development How are these applications developed Take a look at the sample development process. In the current traditional situation, the EA people map the needs of an enterprise to a technical gap, see if there is a packaged app, and either customize one or build a new one. The biggest questions often boil down to Build vs. Buy or, what to buy. A few things that you will observe are these: Applications take long time to develop . Typically they are large, and serve long term needs of the enterprise. Any other kind of applications are difficult to retrofit into this model of development. For example, if you want an application by marketing department for one-time event, existing processes of IT makes it difficult to offer that service. That is why, we find marketing is one of the prime movers behind consumerization. Applications serve common denominator . They address most common needs of the people. If your needs are very different from others, they will be ignored, unless you are the big boss. No wonder, that IT departments still develop applications with Best viewed on IE 6 sticker. Applications lag behind the market needs . Since the focus is to create the applications with longevity, the design uses tested technologies. The pace at which these technologies are evolving, this design decision makes the technology foundations obsolete by the time applications are delivered. For example, even today, IT departments use Struts in their design a technology that is already dead. Applications, developed based on consensus needs, lack focus . Since there is a going to be one large monolithic application meeting requirements of several groups with different needs, the applications lack focus. For example, the same application needs to support new users and experienced users. Or, it needs to support management interested in the big picture view and the workers interested doing the processing. Naturally, any application that is developed to such diverse and divergent needs ends up being unfocused. Applications are expensive to develop . Compared to consumer apps, where we hear apps getting developed for a fraction of cost, the process and the enterprise quality requirements impose lot of additional costs on the application development. That is, this process yields applications that are built to last . Let us look at how consumer applications are developed. Consumer application development Historically, consumer applications have been developed differently. As you can see, in each era, the consumers are different the focus is different and the distribution mechanism is different. File it away, as this historic view is important as we look at consumerizing IT. Dwelling deeper into the current era, we see the following: Consumer applications almost always are better focused on end results than the users needs. For example, take the case of Instagram. In its history, it discovered if it followed user needs and demands, it would end up being another FB clone. Instead, it decided to keep the focus on one metric: How to get most number of photos uploaded by the consumers. That focused design led to its success. Consumer applications are also built in collaboration with the consumers. By creating a model of constant experimentation, feedback from the field, and ability to improve the application, without ramifications of user support, the creators of the applications are able to build systems that are built for change . But, what are the disadvantages for the consumer applications, compared to enterprise applications Only interesting applications get developed . Go to Apples app store, and you find so many applications around weather apps or gaming apps. You do not find enough applications to do genome analysis. Developers are impatient with problems they do not understand, or the problems that require lot of knowledge to solve. Capabilities may be replicated in many applications . The strength in consumer applications, namely catering to different groups of people, means some core functionality gets repeated in applications. Instead of getting high quality apps, we might end up with lot of apps that are mediocre. Lack of uniformity in solutions (depends on the platform) . While some platforms are famous for creating a uniform and consistent experience, the applications themselves, provide fragmented experience. Unlike enterprise applications, they lack control or governance. Consumerization: Why should IT care We established that enterprise applications and consumer applications have different focus. We also established that they are built, distributed, and operated differently. Still, why should IT care about consumer applications Why should it consumerize itself I can think of three reasons. Consumer focus of the businesses Several service industries like retail, banking, entertainment, music, and health deal with consumers daily. Their business models are being disrupted by startups that bring new technologies and new breed of applications. While IT does not exactly lead the business transformation, at least by bringing the right capabilities, IT can support businesses better. Internal users as consumers Demographics of the employees are changing. More and more young people are joining the workforce. They are used to different kind of experience using modern devices and modern applications. Even the older people are used to consumer applications: they use Gmail at home, facetime on their IPad, Facebook on their laptop, and LinkedIn at work. They come to work and they use Exchange without the benefit of Bayesian spam filters they use Lync video instead of facetime or Hangouts they do not even have something like Facebook or LinkedIn at work. By not exploiting the modern technologies and application paradigms, enterprises are risk losing productivity and ability to attract the right talent. Cheaper and better Consumer technologies Large investments in the consumer technologies are making them cheaper and better, at a faster pace than the enterprise technologies. For instance, git is improving at a faster pace than perforce. Those companies that took advantage of the cheaper alternatives in consumer technologies, reaped the benefits of cheaper and better infrastructure, application construction, and operations. Google built their data center on commodity boxes. Facebook leverages open source technologies fully for their needs. The following are the main reasons why the consumer technologies are often better choices than the enterprise grade technologies. So, considering that enterprises are being pushed towards consumerization, how should IT react Consumerization: an IT perspective The best course of action for IT is to get the best of the both worlds. On one hand, it cannot run business as usual without its control and governance. On the other hand, it cannot react to markets innovatively without the consumer technologies. As we bring both these best practices together, we see some interesting facts emerge. At least for certain aspects of application domain, we see that old style of large scale application development does not work. As consumerization increases, we end up with large number of small applications instead of small number of large applications. Of course, the definition of application it self is subject to change. For our purposes, consider any isolated, independent functionality that people use to be an application. Historically, we used to talk about modularizing the application. Instead, now, we break down large application into smaller pieces. Some of these smaller pieces may have multiple versions to suit the extreme segmentation that consumerization supports. If we are moving towards such IT landscape, what does it mean to traditional activities In fact, all the following are impacted by this aspect of consumerization. Development Life cycle plan Deployment Support Governance Enterprise Architecture


No comments:

Post a Comment