Skip to main content

NSND 2012 Кирилица - Struga


Java and Python joined together
Nista se nece dogodite (NSND)  or roughly translated into English - Nothing will happen is a geek/hackers unconference  where people get together to share knowledge about pretty much anything, starting from programming and computer networks going to growing food on top of buildings and women's rights. The full list can be found on the flowing ether-pad http://piratepad.net/nsndstruga. This year the main event in Macedonia was in Struga and there were very cool talks. I missed some of them but  so here are few that I can take a note of:
  • Happy food production by Luca Pescatore(http://www.pescatoreluca.com)
    File:CDC South Aquaponics Raft Tank 1 2010-07-17.jpgHe talked about aquaponics, windows farming, deep water culture, compositing and basically how to do farming almost anywhere and not just that but also how to farm efficiency. His main idea was to encourage everyone to just try things out. One cool experiment that he did was creating a small farm on top of building.



  • Why python has special methods and why in the world would I use them anyway - Baze Petrushev(twitter)  
    He talk was mostly about the magic methods in python and how they can be used  http://www.rafekettler.com/magicmethods.html. Some considered this a good thing other bad but anyway it was an interesting way to see the operator over-overloading in Python used for good.
  • Wireless Mesh Networks with sensors, Internet Of Things, Open Network project Valent, Valentino, Jasna, Aleks (www.wlan-si.net, www.otvorenamreza.org)
    As the title states the talk was basically about running open networks and how one can setup various sensors and then use the data is gathered via the sensors.
  • ZeroMQ in python - Baze Petrushev and Damjan Gergievski (http://damjan.softver.org.mk/)
    Basically, they covered the idea behind ZeroMQ and they showed us a few small examples on how to get started:
  • I didn't get the chance to see: 
    • Rabsbery Pi by Glisha and Chombe(Chombium)
    • Non-Commercial potatoes by Andrea
    • Free Android by Ivo 
    • Hacklab collaboration disquisition  by Marcel 
      , but from what I heard they were all really inspirational and cool.
  • And last but not least was Women in IT + Open Eduction discussion that became very heat-et. We raised the question on:
  • IBM computers in 1957, 1:1 male female ratio  
    • Do male and female programmers  have equal opportunity?
    • Why is there so small percentage of girls in engineering?
    • Why their only a handful open-source project leaders that are female? 
    • Are program's like Google summer of Code and Gnome women outreach good for improving that percentage and is that artificial?
    • What do Hacker-spaces do right or wrong to have so small percentage of females?

      I cannot say that we had unanimous answers or a simple solution on any of these questions but most definitely the talks were interesting and led to various opinions on the subject.
Females in Engineering talks

Overall it was a great NSND where we had a lot of fun and I hope to see everyone on the next one. Until then:


Popular posts from this blog

HTML 5 data-* attributes, how to use them and why

It is always tempting to add custom attributes in HTML so that you can use the data stored there to do X. But if you do that there is no way of knowing if your HTML attribute will not be overridden in the future and used for something else and additionally you will not be writing valid HTML markup that can pass HTML 5 validator and with that you can create some very bad side effects. That is why there is a spec in HTML 5 called custom data attributes that enable number of useful features.

You may go around and read the specs, but the basic idea is very simple, you can add any attribute that starts with "data-" and that attribute will be treated as non-visible data for that attribute. By non-visible I mean that it is not something that gets rendered to the client so it does not affect the layout or style of the page, but it is there in the HTML so in no way this is private.
So let's get right into it, the following snippet is a valid HTML5 markup

<div id="aweso…

Basic Authentication with RestTemplate

Spring Rest Templates are very good way of writing REST clients. By default they work with basic HTTP so if we need to use Basic Authorization we would need to init the rest template with custom HttpClient. This way the Rest Template will automatically use Basic Auth and append to the HTTP headers "Authorization: Basic BASE64ENCODED_USER_PASS".

HttpClient client = new HttpClient(); UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("USERNAME","PASS"); client.getState().setCredentials( new AuthScope("www.example.com", 9090, AuthScope.ANY_REALM), credentials); CommonsClientHttpRequestFactory commons = new CommonsClientHttpRequestFactory(client); RestTemplate template = new RestTemplate(commons); SomeObject result = template.getForObject( "http://www.example.com:9090/",SomeObject.class );

In EE application this would probably be managed by DI framework like Spring Core and only initialized once sin…

Temporary files and directories in Java 7 and before

Sometimes we want to create a temporary file, whether to save some data that gets written by some other application or just to temporary store stuff. Well, usually applications have their own temporary folder where they do this and it gets somehow configured. But why not use the underlying OS specific file like "/tmp/" in Linux so there must be some system property that has this info and there is. The key is "java.io.tmpdir" resulting in "/tmp" in my case or by code:
String tempDir = System.getProperty("java.io.tmpdir"); We can use tempDir  folder as a temporary place to store files, but there are a lot nicer ways to work with files like this even in JDK6 not just in JDK7:
import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class TempFile { public static void main(String[] args) { try { // create a temp file File tempFile = File.createTempFile("old-file",…