Sunday, 23 May 2021

Academia Hacker


El Instituto Nacional de Ciberseguridad ha organizado la Academia Hacker, una iniciativa para fomentar el aprendizaje en ciberseguridad. Es una actividad en la que durante ocho semanas los equipos se enfrentan a cinco retos cada semana en diferentes temas, tales como criptografía, ingeniería inversa, esteganografía, programación, etc.

Después de tres semanas, la verdad es que el balance es muy positivo, porque nos ha forzado a mirar temas y herramientas que de otra manera no habríamos tocado. Aunque solo sea arañar la superficie, es divertido sentirte hacker por un rato (by the way, white hat). Algunas herramientas que hemos usado por ahora son VirtualBoxKali LinuxCyberchefWiresharkJohn the Ripperradare2gdbIDA y una verdadera gema, el Z3 Theorem solver. Algunas ya las conocía, pero otras no.

Por ahora hemos conseguido resolver casi todos los retos, aunque supongo que cuando empiecen a subir de dificultad la cosa cambiará. Lo bueno es que al fonal de cada semana publican un vídeo con la forma de resolverlo. Más oportunidades para aprender (!)

Saturday, 8 May 2021

Mapa de españoles en Alemania (2020)

 


If you have some time, it is relatively straight forward to combine data sources and create the map above, which combines geometry and population information at the county level (Kreise) from open sources. Total population iaw Destatis is just above 180k.

Geometry: This dataset from Bundesamt für Kartographie und Geodäsie with Data licence Germany – attribution – Version 2.0

Population; Destatis - Statistisches Bundesamt with Data licence Germany – attribution – Version 2.0

Code adapted from this example with postal code areas from Dr. Juan Camilo Orduz.



As reference, same map in 2001 (note the huge difference in scale!) with total population just below 130k.





Wednesday, 7 April 2021

Online "tute"





Did it ever happen to you that you bought a book with the best of intentions and then you never find time to read it? Well, that was me with this book, which you can also read for free in Miguel Grinberg´s famous flask mega tutorial. At some point I went through several chapters but never really put together my own app, or deployed it somewhere.

For me the problem with tutorials is how to get really engaged. In terms of learning experience, there is a big difference between just following steps and actually trying to create something else by yourself (even if still mostly based on the tutorial steps). Because once it is your own persoanl project, you are automatically engaged. My CoderDojo is still paused because of COVID, but something I used to recommend to children (and parents) was to find something that really interests you and then work your way through the problems. A lot of the learning happens when trying to solve a problem.

A few weeks ago, someone at work mentioned pythonanywhere, which gives you the opportunity to deploy an app easily. I just needed an idea. And I had it over Easter. My father and my son often play tute when we are in Spain. However last time we were there was Christmas of previous year, so I had the idea to make an app to play tute. Oh, I hear you say, but there are plenty of web pages which already allow you to play and are way better than anything you can hack in a few days. Yes, but you don´t learn a lot playing with other people´s apps!

So after my very own (and short) Easter of Code, version 0.1 is up and running. We already played a game with my father this morning and it was a good laugh. Hope we do it now from time to time.

Things I have learned:

  • I didn´t really know all the rules of tute. Thanks to wikipedians!
  • I set up VS Code to debug flask apps.
  • SQLite is not great a choice when model changes, as dropping columns seems a bit of a pain when the model changes. I ended up restarting the database a couple of times.
  • Page reloads are good enough for us. Ajax or websockets would be better though, even more learning opportunities.
  • Know when to take a break. Impossible problems one day are magically solved in five minutes in the morning with a fresh head.
  • Styling matters. Thanks to my brother for advice.
Updated April 17th: Code available in GitHub