Skip to main content

Posts

Help kids work in group to develop a game

Together with some friends I manage the events of a local CoderDojo group: we meet once a month, gathering together some kids that want to create something interesting and fun with computers. We use different technologies, but we mostly build little games or stories in Scratch, and one day we decided to run an experiment. A typical Saturday afternoon starts with the mentors asking the kids what they want to create, but contrary to what it may seem this is not a simple task: some kids don’t have a clear picture of what they want to achieve and the greatest part of them tends to work individually. To overcome these problems we thought to provide the kids a sheet of paper with printed some directions and to ask them to gather in groups and take half an hour to fill in the blanks before starting to code. Actually, some groups were suggested by the mentors, but in the end they worked. The printed directions were simple and their goal was to lead the kids to create an outline of the ga
Recent posts

Web slideshow viewer

I recently developed a web based picture viewer useful to turn a tablet (or, actually, every device that has a web browser in it) into a digital photo frame. This tool is a client/server application that can be used on every device to display a slideshow of some pictures that are stored on a server (or NAS, etc.) in your local network. It is composed of a client part that retrieves the list of folders from the server and allows the user to select which folders the pictures to be displayed are in. Then it starts asking the server one picture at a time. The server part is based on node.js and it is so simple that can be run on a Raspberry Pi device (I actually run it on a RPi device with a nodejs version as old as v0.10.9). This part retrieves the list of folders and then one picture at a time when requested by the client. The server can be accessed by multiple clients at once because each one has its own session with a separate list of pictures to be displayed. If you are

A Data Engineer's Guide To Non-Traditional Data Storages

With the rise of big data and data science, many engineering roles are being challenged and expanded. One new-age role is data engineering . Originally, the purpose of data engineering was the loading of external data sources and the designing of databases (designing and developing pipelines to collect, manipulate, store, and analyze data). It has since grown to support the volume and complexity of big data. So data engineering now encapsulates a wide range of skills, from web-crawling, data cleansing, distributed computing, and data storage and retrieval. For data engineering and data engineers, data storage and retrieval is the critical component of the pipeline together with how the data can be used and analyzed. In recent times, many new and different data storage technologies have emerged. However, which one is best suited and has the most appropriate features for data engineering? Most engineers are familiar with SQL databases, such as PostgreSQL, MSSQL, and MySQL, whi

The Six Commandments of Good Code: Write Code that Stands the Test of Time

Humans have only been grappling with the art and science of computer programming for roughly half a century. Compared to most arts and sciences, computer science is in many ways still just a toddler, walking into walls, tripping over its own feet, and occasionally throwing food across the table. As a consequence of its relative youth, I don’t believe we have a consensus yet on what a proper definition of “good code” is, as that definition continues to evolve. Some will say “good code” is code with 100% test coverage. Others will say it’s super fast and has a killer performance and will run acceptably on 10 year old hardware. While these are all laudable goals for software developers, however I venture to throw another target into the mix: maintainability. Specifically, “good code” is code that is easily and readily maintainable by an organization (not just by its author!) and will live for longer than just the sprint it was written in. The following are some things I’ve discover

Build Ultra-Modern Web Apps with Angular Material

At the Google I/O Conference back in 2014, Google announced Material Design, their new design language. They have since converted much of their popular applications to adhere to this new spec in an effort to provide a consistent experience. Now they are trying to convince you to follow along as well. What is Material Design? After a visit to the official Material Design spec, you will immediately get a feeling of ultra-modern minimalism. Basic shapes and flat colors are the theme here. Going through the documentation is quite an experience. I recommend taking a look for yourself, but I will summarize it here. Goal The purpose is to create a visual language that synthesizes classic principles of good design with the innovation and possibility of technology and science. Also to develop a single underlying system that allows for a unified experience across various platforms and device sizes. Principles Material Design is founded on three principles. Material Is the Me

Pairing the Raspberry Pi 3 with your Playstation 3 controller

While setting up the MAME emulator on the Raspberry Pi 3 I decided to experiment with the PS3 controller trying to pair it with the RPi. I found a useful guide here: http://holvin.blogspot.it/2013/11/how-to-setup-raspberry-pi-as-retro.html At section 4 the author describes how to compile sixpair utility, test that everything is working and compile the QtSixA tool. But there are some differences to be noted when working with the Raspberry Pi version 3. First, and most obvious, of all: the RPi 3 has already a Bluetooth device built in, so you don't have to plug a dongle in it, and it's compatible with the PS3 controller. 1. Sixpair The sixpair utility succeeds in coupling with the controller. But to test that it's working I had to test the js1 joystick port, and not the js0 as stated in the guide; so the actual command is: jstest /dev/input/js1 2. QtSixA The QtSixA download link must be changed, because the one shown doesn't compile with the latest

Solr heatmap dashboard

The default Solr dashboard lacks the possibility to do faceting using spatial data and drawing the results as a heatmap, so I wrote a dashboard to do this: https://github.com/kronwiz/solr-heatmap-dashboard The dashboard is built up of an HTML + JS file and is provided with a small server (based on node.js) to proxy the requests to your Solr server to avoid CORS issues (sorry, I don't like JSONP solutions very much). This is a screenshot: The dashboard lets you tweak the parameters and see graphically what happens to the faceting results. If you, instead, want to see your data displayed onto a real map there's the Solr plugin for Leaflet from Jack Reed:  https://github.com/mejackreed/leaflet-solr-heatmap .