Mathematical barbecue riddle

On the 19th of November, the Dutch Financial Times (Financieel Dagblad) has published a barbecue riddle on page 14. It is a combinatorial problem that certainly will have a nice theoretical solution, but that “we programmers” tend to solve in a few minutes using our favorite scripting language. The problem states (freely translated): Problem “Today is ‘International Men’s Day’ and that’s why we have a mathematical riddle about barbecuing. On our roof terrace there is a big barbecue with enough space for twenty pieces of meat next to each other. On this joyful day we have bought plenty of slices of bacon and hamburgers. Everybody knows you should never put two slices of bacon next to each other on the barbecue: the fat that drips from the bacon will make the coal catch fire. That’s why next to a slice of bacon you should always put a hamburger, except for the position at the end of the BBQ, where there is no more room for meat. ...

November 21, 2016 · Maurits van der Schee

Devoxx 2016 videos online

Devoxx 2016 (a developer conference) was held November 7-11 in Antwerp, Belgium. Hubert Sablonnière’s excellent talk titled “100% Stateless with JWT” is available on Youtube! The other 43 “top-rated” talks (a list curated by Devoxx) can be found below. Talks Flying services with the drone [45:40] Declarative Thinking, Declarative Practice [1:00:54] Make CSS Fun Again with Flexbox! [30:51] Reactive Programming [2:36:06] Twelve Ways to Make Code Suck Less [1:00:44] How Google DeepMind conquered the game of Go [52:56] Refactoring to Java 8 [52:10] Continuous Delivery At GitHub [1:01:13] Java Language and Platform Futures: A Sneak Peek [1:00:25] Modular monoliths [52:45] Java EE, TypeScript and Angular2 [2:48:41] Machine Learning for Developers [58:31] Optional - The Mother of All Bikesheds [58:43] Javaslang - Functional Java The Easy Way [50:00] How Angular Makes the Mobile Web Awesome [45:44] Zen & The Art of Angular 2 [52:33] 100% Stateless with JWT (JSON Web Token) [57:50] The end of polling : why and how to transform a REST API into a Data Streaming API? [25:50] A Crash Course in Modern Hardware [59:21] Thinking In Parallel [1:00:04] Deep Dive into JUnit 5 [1:02:24] Security and Microservices [1:00:49] Easily secure your Front and back applications with KeyCloak [31:38] Effective Service API Design [1:00:41] Using Machine Learning to Enhance your Apps [44:08] Java 9 Modularity in Action [2:26:10] Keynote Session by Mark Reinhold and Brian Goetz [37:29] Advanced Spring Data REST [1:02:00] Reactive Web Applications with Spring 5 [58:25] g ∘ f patterns [1:01:40] Project Jigsaw: Under The Hood [59:58] Java Collections: The Force Awakens [50:05] Designing for Performance [56:56] It's a kind of magic: under the covers of Spring Boot [2:35:09] Why you should really care about the blockchain [1:00:35] Do you really want to go fully micro? [31:20] Developing Reactive applications with Reactive Streams and Java 8 [2:40:59] Anticipating Java 9 - Functionality and Tooling [30:49] Hot.orElse(Not) [15:00] Microservices Evolution: How to break your monolithic database [1:00:30] Devoxx Belgium 2016 Opening Keynote [2:00:22] Billions of lines of code in a single repository, SRSLY? [16:07] Authentication and Authorization in a Cloud and Microservice World [53:20] Are you looking for other talks? There are 178 talks from Devoxx Belgium 2016 available on YouTube! ...

November 18, 2016 · Maurits van der Schee

Stop using passwords

Every site nowadays has a username/password login and that is problematic. Google plus and Facebook OAuth2 login exists, but it’s coverage is not 100% and there are privacy concerns. Luckily there is an alternative that has 100% coverage and no privacy concerns. So, let’s stop using passwords. This post will explain how. Single field login Your login form should be: Email: __________ [OK] That’s it! You will receive an email containing a link that you can click to be logged in. The link contains a JSON Web Token (JWT) with the claims “username” and “ip” and is signed by the website with a user specific secret (generated password). ...

November 12, 2016 · Maurits van der Schee

Programming C# on Ubuntu Linux

In this post we will be installing Microsoft .net Core SDK and Visual Studio Code on Ubuntu Linux and create high performance HTTP end-point in C# on which you can build a micro-service (or anything else). Runtime installation Follow instructions on https://www.microsoft.com/net/core#ubuntu: sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 sudo apt-get update sudo apt-get install dotnet-dev-1.0.0-preview2-003131 This instructions are for Ubuntu 16.04, but other operating systems are supported as well. ...

November 10, 2016 · Maurits van der Schee

Spatial/GIS support in PHP-CRUD-API

PHP-CRUD-API is a single PHP file that provides an instant powerful and consistent REST API for a MySQL, PostgreSQL or MS SQL Server databases. It now supports spatial/GIS columns and filters. PHP-CRUD-API uses reflection to “detect” the table structure and then provides an API without requiring you to write code. Spatial data is automatically detected (both on input and output) and converted from and to Well-Known-Text (WKT) format. Example If you want to find the country of a specific location: ...

October 24, 2016 · Maurits van der Schee

JavaScript is too expensive to use

Programming in JavaScript is free. Free as in “free speech”, but also free as in “free beer”. There are no fees to pay for platforms, tools or run-times. Still the choice for JavaScript too expensive to make as it increases the cost of development both from a personal and a product point-of-view. The main cause for this is that the ecosystem is changing so rapidly that both people and products are struggling to keep up. ...

October 22, 2016 · Maurits van der Schee

Boolean comparison in JavaScript has a bug

A few days ago, a colleague pointed out some unexpected behavior in JavaScript. After a few hours of investigation this weekend I think I have found the cause: a bug in boolean comparison. This post shows my investigation and will help you to reach that same conclusion. A tricky question What does the following expressions evaluate to? > [] && [] == false true Yes, it is “true”! If you don’t believe me, try it. The question that is addressed in the remainder of this post is: “Really? Why?!” ...

October 16, 2016 · Maurits van der Schee

Free Scala progamming course

I have been doing an online (MOOC) Scala programming course via Coursera. It is a free very well-constructed and challenging course taught by prof. Martin Odersky (the creator of Scala) at the EFPL (École Polytechnique Fédérale de Lausanne) in Switzerland. I have finished it within a few weeks and have now started 2 of the 4 follow-up Scala courses to further sharpen my Scala skills. Free Scala programming courses The following links allow you to sign up for the 5 individual courses for free: ...

October 1, 2016 · Maurits van der Schee

The Tao of Programming

I’ve found a document on the web titled “The Tao of Programming” that contains IT wisdom. It was copied and translated by Geoffrey James who found it on a NASA website with URL “http://misspiggy.gsfc.nasa.gov/tao.html" (not responding anymore). Below you find my three favorite IT wisdoms from the document. 1. Development team wisdom A manager went to the Master Programmer and showed him the requirements document for a new application. The manager asked the Master: “How long will it take to design this system if I assign five programmers to it?” ...

August 29, 2016 · Maurits van der Schee

Developer Anarchy or Extreme Agile

Agile development is all about reducing “waste” (bureaucracy) and optimizing the percentage of development effort in the process. This makes sense, even for larger organizations to improve the effectiveness of their software development. Startups on the other hand need even less process as value creation is really all that matters. For these organizations Extreme Agile (or ‘Developer Anarchy’ as Fred George calls it) may be a good fit. Bureaucracy is a good thing Larger organizations want to have process that ensures consistent quality and reduces risk of failure. Certifications like ISO 9001 and 27001 require that you have written down your process and that you follow this closely. They may not be helped with an Agile process that steers towards a flatter, more efficient organization where roles are combined to ensure minimal procedural overhead (hand-overs). ...

August 22, 2016 · Maurits van der Schee