Monday, June 1, 2015

Devoxx4Kids PL

Another edition of devoxx4kids has just passed in Warsaw and again great thanks to organizers. I was just a volunteer and felt some exhaustion but the effort of organizers must have been amazing.



Last year i was taking care of 8-years-old group but this year i wanted a difference and became a teacher of blockly (similar to scratch) for 10-years-old group.


It was quite fun to see the difference of approaches and progress among children. When the rest of the group was in the beginning of exercise, 2 girls were clearly ahead and finishing it. As they confessed later, they already learned scratch before and this clearly shows a need for events like this. Not every school reserves sufficient amount of time for IT education and programming so important in the times we live, even less interest i observe among girls. This results later on in how many women land in IT jobs (very little).

My lecture took only 2 hours so i had rest of the day to see around the other groups and workshops and i come to the conclussion that the most hard groups are the youngest. They very easily loose patience, get tired and run they own path of doing things far away from what the teachers wanted them to learn. But this is not always bad. After all they came here to have some fun and as long as they try some programming, even not according to the teacher‘s plan, i think it‘s good.

The 12-years-old were the most quite and concentrated on what teacher told them to do. Isn‘t it the effect of education system over years that teaches this passiveness and taking what teacher says for granted and staying away from self-exploratory? I hope this is not the case. Thanks to such events children have chance to try their own ideas and noone shold tell them to wander away from the plan.

Seeing a few different lectures like Lego Mindstorms, 3D printers, Scratch, App Inventory  i must say the teachers did realy good job, even if some have mostly technical background and luck experience in working witch children (me included) the way they leaded was very professional.

I know from a back-stage conversations with ordanizers that the whole project of devoxx4kids started as a group of friends who wanted to make a workshop for their own kids last year but since then the event got so much interest that people from other cities than warsaw came in touch with them to organize an event in their town.

I though myself to start it in Lodz. Afer some observations this year and with some help from organizers in Warsaw i think the project has chance to succeed.
Stay tuned..








And some movies:



Wednesday, May 20, 2015

Atmosphere Conference, Cracow 18-19 May 2015



This is my brain dump from Atmosphere Conference in Cracow 18-19 May 2015
Only most important terms to memorize and google about.




JAMIE WINSORBuilding And Releasing A Massively Multiplayer Online Game A nice talk about caveats of game server internals and road of choosing right technology for online platform which is Erlang (elixir to be  precise), a video of the presentation is online http://www.youtube.com/watch?v=_i6n-eWiVn4
Dump:
Elixir
Terraform
https://github.com/undeadlabs/discovery

DUNCAN DAVIDSONWhat we've learned from writing dozens of polyglot micro services
Wunderlist jungle of polyglot micro services
Dump:
Json over Http2
Json over amqp
Spot instances aws

MILEN DYANKOVMicroservices and Modularity or the difference between treatment and cure!
Great presentation of refactoring Oracle demo EJB application into modular according to Uncle Bob`s "clean architecture" principles

Dump:
Jdepend

PIOTR STAPP, MARCIN PRZEKOPDevOps in mBank - lesson learned 
Dump:
Wcf connection (client-server)
Nuget CI
Splunk for log mgmt.


























Demo:



LEV POPOVService Operations Evolution at Spotify












KONRAD MALAWSKINeed for Async: In pursuit of scalable internet-scale applications
Dump:
Concurrent 《 lock free 《 block free
CAS compare and set Blocked Queue lock free
ConcurrentLinkedQueue wait free

C10k 10000 concurrent connection problem of scalability - epool function in linux

Distributed systems:
- latency enhancement by backup requests
- avoided duplicate load by combined requests

 ANDRZEJ GRZESIKThe path to repeatable builds

Dump:

TOMASZ NURKIEWICZHystrix – managing failures in distributed systems


Dump:
Hystrix dashboard
Turbine for multiple instances monitoring and aggregating to single stream


KASZ SZYDLOEnabling Continuous Delivery    Book worth reading: http://www.growing-object-oriented-software.com/

MARCIN BAZYDLOStrongly Typed Logs - Journeyman's story 


Dump: 
Kafka, Redis + ELS stack
Semantic logs
Elastic search depends on Lucene schema, version is important in the logs cause db supports many versions of the app throught lifespan
Zipco for distributed request tracing
Emaze - presentation editor

SETH VARGOThe 10 Myths of DevOps 
Google's April Fool's Day spot: Google Actual Cloud


   

Monday, July 14, 2014

Copy Android Kindle books to PC

In my previous post I explained how to use ADB utility to copy files from Android phone to PC.
If you happened to use Kindle eBook reader on Android and wondered where it stores books bought in Amazon, then it's here:

/sdcard/Android/data/com.amazon.kindle/files

File extension used by Amazon books is .prc
You can copy the file to PC using command like:

adb pull /sdcard/Android/data/com.amazon.kindle/files/B00FOT936Y_EBOK.prc /tmp/

You can also push .prc books to Android similar way:

adb push /tmp/mybook.prc /sdcard/Android/data/com.amazon.kindle/files/mybook.prc

If you bought the book from Amazon then it will be secured with DRM. This is easy to remove, some people do it even though illegal.




Backup Android photos with ADB

During my vacation a few days ago my Android phone (Samsung Galaxy S1) crashed unexpectedly.
I can only imagine that the reason was too little free sdcard space, but I'm not sure.
It happened to me already the second time and the first time I fixed it so that I rebooted the phone in recovery mode (reboot with pressing POWER + VOLUME UP + MENU buttons) and did factory reset, obviously loosing all data which was not backed up on the phone.
I think it could work as well this time, but the problem is I had plenty of nice picks done on vacation on my phone and would like to rescue them :)

This is what I did:

  1. Reboot phone in recovery mode (as described previously)
  2. Connect phone to PC with USB
  3. Run adb tool to restore photos to PC


I am using Ubuntu on my PC but the following would work similar on other OS. The only thing you will probably need to change is path to the temp folder on PC.


  • Run adb as root so that you can mount your sdcard in next steps


# adb root


  • Mount sdcard. Maybe you don't' need this step and your sdcard is already mounted. Mine was not.


# adb shell

then in shell type:

# mount /sdcard

Now you can list content of sdcard

# ls /sdcard

Among files on the list I could see folder DCIM
This is where camera photos and films are saved so I grab this to my temp folder.


  • Copy photos and videos to temp folder on PC


First exit shell:

# exit

Then copy:

# adb pull /sdcard/DCIM /tmp

This can take some of your drive space so be prepared otherwise the command will exit with message:
"No space left on device"





Thursday, June 5, 2014

RaspBMC Remote Desktop

First of all, although possible to connect to setup remote desktop on RaspBMC it works awfully slow and probably does not bring a other usability than navigating through UI.
Video simply hangs so it's impossible to watch any.

These are the steps to set it up:
1.  Open your favorite text editor and save the script,

e.g. command : nano vncserver
and paste this script:

!/bin/sh

case $1 in
  start)
    if [ -f /var/run/vnc.pid ] ; then
      echo "VNC server is already running"
    else
      initctl stop xbmc
      sudo vnc_dispmanx 2>/dev/null &
      echo $! | sudo dd of=/var/run/vnc.pid
      initctl start xbmc
    fi
    ;;
  stop)
    if [ -f /var/run/vnc.pid ] ; then
      sudo kill -TERM $(cat /var/run/vnc.pid)
      sudo rm /var/run/vnc.pid
    else
      echo "VNC server is not running"
    fi
    ;;
  *)
    echo "Usage $0 start|stop"
    ;;
esac

2. chmod +x vncserver

3. sudo mv vncserver /usr/local/sbin

4. vncserver start
If you want to check if it's running, check if vnc_dispmanx has the default VNC port open (5900)
pi@raspbmc:~$ sudo netstat -lnptu |grep vnc
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      3687/vnc_dispmanx

tcp6       0      0 :::5900                 :::*                    LISTEN      3687/vnc_dispmanx

5. When you're done, you should turn it off, as it's quite CPU hungry: 

vncserver stop

Connecting with VNC viewerFrom Ubuntu you can use vncviewer:

sudo apt-get install vncviewer

vncviewer 192.168.1.101:5900


Tuesday, January 7, 2014

Arduino LM35 termometer

In my previous post I described how to measure temperature with DS18B20 sensor. In this post I will show an alternative with LM35.


The source code with comments looks like this:
And the circuit like this (image borrowed from other interesting blog)

Additional explanation can be found in Arduino blog.
 

Arduino ds18b20 termometer


Waterproof DS18B20 Digital temperature sensor + extras

Recently I bought DS18B20 senson in waterproof sonda like that.
The purpose of it is to be able to measure water temerature in aquarium.
In broader scope I'd like to build in future a remote aquarium management kit with Arduino and Raspberry Pi, that would measure water parameters, record them and expose online, as well as manage light, feading, etc. remotely.

How to use DS18B20?

First you need to install 3rd party library of Dallas Temperature.
Download the zip from GitHub and extract in Arduino lib folder -
libraries can be installed as described here.
So i got:

~/sketchbook/libraries/DallasTemperature/DallasTemperature.cpp
~/sketchbook/libraries/DallasTemperature/DallasTemperature.h

I restart Arduino IDE and save program source:
Now lets connect circuit

The pullup resistor in most of tutorials is 4.7 KOhm but any from 2k to 5k should work. I tested my circuit with 4.9kOhm.