niceideas.ch
Technological Thoughts by Jerome Kehrli

Blockchain 2.0 - From Bitcoin Transactions to Smart Contract applications

by Jerome Kehrli


Posted on Tuesday Nov 22, 2016 at 09:29PM in Computer Science


Since Satoshi's White paper came online, other cryptocurrencies have proliferated on the market. But irrespective of the actual currency and the frequently debated deflation issues, the actual revolution here is the Blockchain protocol and the distributed computing architecture is supports.

Just as thirty years ago the open communications protocol created profitable business services by catapulting innovation, the blockchain protocol has the potential of being the same kind of breakthrough, by offering a just as disruptive foundation on which businesses start to emerge. Using the integrity lattice of the transactions, a whole suite of value trading innovations are beginning to enter the market.

The key innovation here are Smart Contracts. This relatively new concept involves the development of programs that can be entrusted with money.

Smart Contracts are autonomous computer programs that, once started, execute automatically and mandatorily the conditions defined beforehand, such as the facilitation, verification or enforcement of the negotiation or performance of a contract.
They are most of the time defined in a Programming Language, which in the case of the Ethereum Blockchain 2.0 technology form a Turing Complete Programming Language.
Smart Contracts are implemented as any other software program, using conditions, loops, function calls, etc.

If blockchains give us distributed trustworthy storage, then smart contracts give us distributed trustworthy computations. To illustrate a possible use of smart contracts, let's take the example of travel insurance: finding that 60% of the passengers insured against the delay of their flight never claimed their money, a team created during a hackathon in London in 2015 an Automated Insurance system based on smart contracts.
With this service, passengers are automatically compensated when their flight is delayed, without having to fill out any form, and thus without the company having to process the requests. The blockchain's contribution here consists in generating the confidence and security necessary to automate the declarative phases without resorting to a third party.

The main advantage of putting Smart Contracts in a blockchain is the guarantee provided by the blockchain that the contract terms cannot be modified. The blockchain makes it impossible to tamper or hack the contract terms.
By developing ready to use programs that function on predetermined conditions between the supplier and the client, smart programs ensure a secure escrow service in real time at near zero marginal cost.

Smart Contracts enable to reduce the costs of verification, execution, arbitration and fraud prevention. They enable to overcome the moral hazard problem. The american cryptograph Nick Szabo is deemed to be the inventor of the concept, whom he spoked about in 1995 already. He used to mention the example of a rented car, whose smart contract could return the control to the owner in case the renter forgives the paiements.
Interestingly, as a sidenote, Nick Szabo is also believed by some to be one of the person behind the Satoshi Nakamoto identity.

In a general way, Smart Contracts from the heart of the Ethereum blockchain. Even if Rootstock aims at enabling the implementation of Smart Contracts on the bitcoin blockchain, the development of Smart Contracts technology is really rather related to Ethereum. The next versions of Ethereum are increasingly targeted to offering end users an App-Store-like User Experience to Smart Contracts.

This article intents to be a pretty complete introduction to Blockchain 2.0 technology and Smart Contract applications, detailing both of them as well as list the state of the state of the art of possible use cases being currently studied or discussed.
A big part of this article focuses on the Ethereum blockchain.

Read More

Ethical hacking : a glimpse on local program vulnerabilities exploitation techniques

by Jerome Kehrli


Posted on Saturday Oct 08, 2016 at 12:19AM in Computer Science


Ethical hacking is a very interesting field, and a pretty funny hobby. Well, y'a all penetration tester out there, don't get me wrong: I am well aware that Penetration testing and Ethical Hacking is a full and challenging Software Engineering Field and an actual profession, don't get upset.

I am rather saying that studying vulnerabilities exploitation techniques in one's free time is pretty fun and intellectually rewarding. With the all time and everywhere connection of everything for all kind of usages (understand Internet of Things), current focus in the field of vulnerabilities exploitation is really on Web application, networks, distributed systems, etc.
In addition, most recent progresses in CPU-level protections and compiler-level protections have made local programs exploitation techniques somewhat outdated and such techniques are not very much presented or discussed anymore.

During my master studies, I followed an extended set of lectures on Ethical Hacking and Software Security in general and got quite interested in the field. I wrote a paper for a study in the context of the university at that time which I am reporting today in this blog.
The following article presents various classical vulnerabilities exploitation techniques on local programs.

Read More

Blockchain explained

by Jerome Kehrli


Posted on Friday Oct 07, 2016 at 12:01AM in Computer Science


I interested myself deeply in the blockchain topic recently and this is the first article of a coming whole serie around the blockchain.

This article presents an introduction on the blockchain, presents what it is in the light of its initial deployment in the Bitcoin project as well as all technical details and architecture concerns behind it.
We won't focus here on business applications aside from what is required to present the blockchain purpose, more concrete business applications and evolutions will be the topic of another post in the coming days / weeks.

This article presents and explains all the key techniques and mechanisms behind the blockchain technology.

The blockchain principles and fundamentals are really coming initially from the design work on the Bitcoin. Most of this article focuses on the design and the principle of the blockchain put in place in the Bitcoin system.
Some more recent (Blockchain 2.0) implementations differ slightly while still sharing most genes with the original blockchain, making all that is presented below valid from a conceptual perspective in these other implementations as well.

Read More

The Blockchain ...

by Jerome Kehrli


Posted on Wednesday Oct 05, 2016 at 05:17PM in Computer Science


The blockchain and blockchain related topics are becoming increasingly discussed and studied. There is not one single day where I don't hear about it, that being on linkedin or elsewhere.

I kept myself busy on other topics these last years, mostly large scale information systems and analytic systems architecture in the finance business so I really missed the Bitcoin and blockchain hype.
I've been to an OCTO Technology event recently on the Blockchain. To be honest I went there more for the pleasure of seeing my former colleagues than for any specific interest on the topic. Yet I listen carefully to OCTO's presentation ... and I didn't imagine I would be so much intrigued and soon passionated by the subject.

I strongly believe the blockchain technology has the potential to be one of the most disruptive progress in computer sciences of these 10 last years. I studied and keep studying all the technical details, evolutions and business implications of this technology and will post various blog articles in the coming days / weeks about this topic:


Big Data and private banking, what for ?

by Jerome Kehrli


Posted on Wednesday Oct 05, 2016 at 10:50AM in Computer Science


Big Data technologies are increasingly used in retail banking institutions for customer profiling or other marketing activities. In private banking institutions, however, applications are less obvious and there are only very few initiatives.
Yet, as a matter of fact, there are opportunities in such institutions and they can be quite surprising.

Big Data technologies, initiated by the Web Giants such as Google or Amazon, enable to analyze very massive amount of data (ranging from Terabytes to Petabytes). Apache Hadoop is the de-facto standard nowadays when it comes to considering Open Source Big Data technologies but it is increasingly challenged by alternatives such as Apache Spark or others providing less constraining programming paradigms than Map-Reduce.

These Big Data Processing Platform benefits from the NoSQL genes : the CAP Theorem when it comes to storing data, the usage of commodity hardware, the capacity to scale-out (almost) linearly (instead of scaling up your Oracle DB) and a much lower TCO (Total Cost of Ownership) than standard architectures.

Most essential applications for such technologies in retail banking institutions consist in gathering knowledge and insights on the customer base, customer's profiles and their tendencies by using cutting-edge Machine Learning techniques on such data.

In contrary to retail banking institutions that are exploiting such technologies for many years, private banking institution, with their very low amount of transactions and their limited customer base are considering these technologies with a lot of skepticism and condescension.

However, in contrary to preconceived ideas, use case exist and present surprising opportunities, mostly around three topics :

  • Enhance proximity with customers
  • Improve investment advisory services
  • Reduce computation costs

Read More

Sudoku Laboratoy

by Jerome Kehrli


Posted on Tuesday Aug 30, 2016 at 09:02AM in Computer Science


I have written a little Sudoku program for which I provide here the source code and Windows pre-built executables. Current version is Sudoku 0.2-beta.

It supports the following features:

  • A GUI to display and manipulate a Sudoku board
  • A Sudoku generator
  • A Sudoku solver
  • A Sudoku solving tutorial (quite limited at the moment)

Sudoku Laboratory - Screenshot 1 Sudoku Laboratory - Screenshot 2
At the moment there are two resolution methods supported, one using human-like resolution techniques and a second using backtracking. The resolution of a solvable Sudoku board takes a few milliseconds only.
A solvable Sudoku board is a Sudoku board than has one and only one solution.

The Sudoku board generator generates solvable Sudoku boards. It usually generates boards between 18 and 22 pre-filled cells. (which is quite better than most generators I could find online).
Currently it generates the best (i.e. most difficult) board it possibly can provided the random initial situation (with all cells filled) of the board.
The problem I'm facing in this current version is that it can take from a few seconds only up to several minutes to generate the board (this is discussed in the algorithms section below).
In addition, the difficulty of the resulting board is not tweakable at the moment. In some cases it generates an extremely difficult board (only solvable with nishio) in a few seconds while some other times it needs two minutes to generate an easy board.

The software is written in C++ on Linux with the help of the wxWidgets GUI library.
It is cross-platform to the extent of the wxWidgets library, i.e. it can be compiled on Windows, OS X, BSD, etc.

A makefile is provided to build it, no configure scripts, i.e. you need to adapt the makefile to your own Linux distribution (or on Windows Mingw, TDM, etc.).
Happily only few adaptations should be required.

Read More

Data Management

by Jerome Kehrli


Posted on Thursday Aug 07, 2014 at 04:22PM in Computer Science


Data management comprises all the disciplines related to managing data as a valuable resource.
Data Management is the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise.

During my MS studies, I followed two interesting lectures related to Data Management.

  • Introduction to Data Mining (Summary)
  • Introduction to Information Retrieval (Summary)

Data Mining is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. In the context of Data Mining, Data Warehouses (DW) form an important aspect. Data Warehouses generalize and consolidate data in multidimensional space. The construction of DW is an important pre-processing step for data mining involving data cleaning, data integration, data transformation.
I have summarized all the notes I have taken during the Introduction to Data Mining lecture as well as some of my solutions to the exercises within the following document : Summary of the Data Mining Lecture.

Information retrieval (IR) is finding material (usually documents) of an unstructured nature (usually text) that satisfies an information need from within a large collections (usually stored on computers). Information Retrieval is a field concerned with the structure, analysis, organisation, storage, searching and retrieval of information.
Here as well I have summarized the notes taken during the lecture within the following document : Summary of the Information Retrieval Lecture.


Hard software engineering interview questions

by Jerome Kehrli


Posted on Friday Dec 06, 2013 at 04:11PM in Computer Science


For some reasons that I'd rather keep private, I got interested in the kind of questions google, microsoft, amazon and other tech companies are asking to candidate during the recruitment process. Most of these questions are oriented towards algorithmics or mathematics. Some other are logic questions or puzzles the candidate is expected to be able to solve in a dozen of minutes in front of the interviewer.

If found various sites online providing lists of typical interview questions. Other sites are discussing topics like "the ten toughest questions asked by google" or by microsoft, etc.
Then I wondered how many of them I could answer on my own without help. The truth is that while I can answer most of these questions by myself, I still needed help for almost as much as half of them.

Anyway, I have collected my answers to a hundred of these questions below.

Read More

AirXCell - online programmable spreadsheet and R GUI

by Jerome Kehrli


Posted on Tuesday Mar 27, 2012 at 01:10AM in Computer Science


I want to share an interesting project that has appeared on the Web recently : the AirXCell project.
(As some of you already know, I am somewhat involved in this project :-)

AirXCell is an online R application framework currently supporting a programmable spreadsheet and an R development environment.

AirXCell is based on R - The GNU R Project for Statistical Computing. Current version is still somewhat limited yet fully functional.

Quoting the AirXCell User documentation :

AirXCell intents to revolution the world of spreadsheet applications and computational software by providing a product that:

  • implements a web application on the most cutting edge of technology that outpaces the current classical spreadsheet applications in terms of user experience, potential and features,
  • merges the world of spreadsheet application (e.g. Microsoft Excel, GNUmeric, etc.) and the world of computational software (e.g. Mathematica, Mathlab, etc.) and
  • revolutions the usual approach in spreadsheet applications.

Read More

Funny developer tale

by Jerome Kehrli


Posted on Thursday May 06, 2010 at 11:03PM in Computer Science


I've been working a few years ago on an architectural concept for some very specific piece of software my former company had to develop. The technical challenges were huge and the field was pretty complex. In addition, the timeframe was very little and we have had to rush a lot to get it ready and prototyped in time.

In the end we screwed up ... totally. The concept was miles away from what was required and we pretty much had to start it all over. Months of work were just good enough to be thrown away with the trash.

Not used at all to such failures, I decided to take some time to understand what happened, what went wrong.

My investigations led to the following story, a pretty funny though quite common developer tale :

Read More

Functional programming in Haskell

by Jerome Kehrli


Posted on Sunday Jan 24, 2010 at 05:28PM in Computer Science


Functional programming addicts,

I'm following an Haskell programming course. It was a short course, though we ran pretty much completely through the book "Programming in Haskell" by Graham Hutton. My personal view on this is that Haskell is a great language which offers a concision rarely reached by other languages, even other functional ones. The book sucks though. It's follows a way too much theoretical approach which makes it quite cumbersome and not interesting at all.

I've been told though that Hutton's book is the reference for Haskell programming. On my side I really found the various tutorials I could find online much more useful than the thorough lecture of this book I've been pretty much forced to follow.

Anyway, as usual I made a nifty summary on this book, so help yourself :

Haskell summary

The summary stands on three A4 pages and should serve as a reference for those who are initiated to Haskell programming and seek for a quick programming reference.

Happy reading, HTH


Introduction to the theory of computation

by Jerome Kehrli


Posted on Saturday Jan 23, 2010 at 11:05PM in Computer Science


Guys,
I have written a quite amazing summary on the book "Introduction to the theory of computation" by Michael Sipser. It's definitely not a replacement for the book itself as it lacks the basic explanation required to understand the presented concepts. But if you have read this book and you're looking for a short summary standing on 7 A4 pages, there you have it.

The summary focuses on the most important concepts presented by the book and holds the mandatory illustrations going along the various concepts. Well there isn't much more to say about it, so if you have read that book, check out this summary. You should be pretty amazed to see that pretty much everything actually is in it ... in less than 7 pages.

It's worth to mention though that it's quite a big file (3.8 Mb).

Summary Theoretical Computer Science

Good reading, HTH