[jug.bg] jProfessionals 3.0 Venkat Subramaniam

Usually I do the review of what we do in our JUG, but Dmitry did quite a good job and he has the best pictures.

Some minor additions from me:

Venkat Subramaniam also known simply as Venkat was here. Venkat is a rockstar (JavaOne Rockstar is someone who did an amazing session at JavaOne. Venkat is 16 (sixteen!!!) times J1 Rockstar in just 4 years).


Venkat did two sessions and a workshop. The two sessions (one on lambdas and one soft-code session on bad code) were highly popular, probably 150-200 people came.

Then there was a workshop that turned into a discussion on lambdas and quality code in general. Which was awesome.

More info on the event page in facebook and on our jProfessionals social page. Photo album.

Some highlights:







Java, JDK, JRE locations on OSX

JRE for browsers (mine was 1.8.0_101, 160mb, was up to date):
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

JDK, JRE installed with installer:

I had only:
$ du -d1 -h
312M ./jdk1.8.0_25.jdk

Was not up to date.

After installing U101, I had:
$ du -d1 -h
338M ./jdk1.8.0_101.jdk
312M ./jdk1.8.0_25.jdk

I removed the old one.

Cleaning up a linux machine (arch)


journalctl --vacuum-size=100M #remove all logs, only retain 100mb
pacman -Scc #remove all package installation files (obsolete and current)
pacman -S bleachbit
bleachbit -c system.*

First, what's big on the system

du -d1 -h / 2>/dev/null | sort -h

This shows a sorted list of the largest dirs in `/`
You can do two levels down:

du -d2 -h / 2>/dev/null | sort -h

My result is:

0 /proc
0 /sys
0 /tmp
12K /dev
12K /srv
16K /lost+found
632K /run
4.3M /boot
13M /opt
15M /etc
75M /root
93M /home
2.4G /var
3.2G /usr
221G /mnt
227G /

I ignore /mnt (because that's an external drive)
Two dirs stand to mind: var and usr.
Let's see what's inside:

du -d1 -h /var /usr 2>/dev/null | sort -h

Then, a little bit deeper:

du -d1 -h /var/log /usr/share /usr/lib /var/cache 2>/dev/null | sort -h

Let's start with the logs

I have 717mb in /var/log.

I'm not a fan of deleting directories randomly, so let's do it the clean way:

$ journalctl --disk-usage
Archived and active journals take up 728.7M on disk.

Let's leave only 100mb of logs:

journalctl --vacuum-size=100M
Deleted archived journal /var/log/journal/ba5391...b.journal (8.0M).
Vacuuming done, freed 616.6M of archived journals on disk.

More info here on how to configure journalctl here.


I have 660M /var/cache/pacman. It was 1.8gb, but I ran pacman -Sc to remove unused packages. Let's remove the rest:

pacman -Scc


A lot of users do remove it, or at least clean it up. But I might be a problem. But checkout bleachbit (next paragraph).


Automatic cleaner. Will delete a lot of stuff, but for it was mostly locales.

$ pacman -S bleachbit
$ bleachbit -p system.*
Disk space to be recovered: 488.8MB
$ bleachbit -c system.*

You can look for more stuff to delete:

bleachbit --list
bleachbit -p thunderbird.*

Buying a new openwrt-compatible router. Howto

I need a new router, because the time machine I have been using for so long is finally giving up. It was a pretty strong machine. God bless her soul. Now I'd like to have something like this as a router:
solid run
https://www.solid-run.com/product/clearfog-pro/ But that's pricey and needlessly powerful, it costs extra to add wifi, box, power and so on.


Since I found out OpenWRT exists I have continuously rooted my routers. OpenWrt is minimalistic linux made especially for routers. I don't like the fact that it's not a full-fledged linux - they had to minimize the footprint and some packages are incomplete/different. But it does its jobs perfectly.

There is a hardware compatibility list which now features devices with 1gb ram and 4gb flash. Unfortunately they either have no wifi, or not enough lan ports. Even the Bulgarian producer Olimex is featured close to the top.

Starting from top to bottom, here's how I chose my router:
(I skip all that have no wifi)

  • 256/1024/Gateworks Ventana GW5xxx/only two GbE ports;hard to buy
  • 16/128/EnGenius ECB1750/no GbE
  • 16/128/Belkin F9K1115/hard to buy
  • 32/128/WZR-HP-AG300H/no ac
  • 32/128/Meraki Z1/no ac
  • 16/128/EnGenius ECB1750/no GbE

Possibilities (all of them are available in local shops):
(all of them support some type of ac on 5Ghz)

  • 128/512/Linksys WRT1900AC/€235
  • 128/128/Cisco-Linksys EA6300/€106
  • 128/256/Buffalo WZR-600DHP2-EU/€100
  • 128/128/Netgear R6100/€100
  • 16/128/ZyXEL NBG6616/€85
  • 16/128/TP-LINK Archer C7/€98
  • 16/128/TP-LINK Archer C5/€75
  • 16/128/D-Link DIR-860L/€53

In the table I didn't put CPU type and whether they have USB 2/3 ports.

Poor guy's monitor emulator

Some mainboards won't boot without an active graphics chip which in turn won't start without a monitor connected.

This hack works with 3 resistors (75 ohm (50-150 is fine), 0.25 watt (0.125-0.500 watt is fine)).

Putt them like this




Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)

I did a talk on Jigsaw at BGOUG.

The talk is for a very important new feature in Java SE 9. Code named Jigsaw, this feature modularizes the Java SE platform.
The coolest thing I do at the talk is to create a custom JRE.

Of course the jug and jPrime were mentioned.

Code: https://bitbucket.org/stybz/jigsaw.sty/src/



[jug.bg] Speaking at Riga Dev Day

So I'll do a talk about Http/2.0 at Riga Dev Day Conference. I'll be there representing the jug.bg. I'm pretty psyched to check out Latvia.

My session is on the first day



Update: my talk didn't go too well, because the technicians couldn't manage to connect my laptop to the projector - even though they asked about what kind of laptop I had. It took us 15 min, the it was flickering the whole time and that made me nervous and I overshot my time, because of wrong time on screen.

And to top it all of they recorded it and said it will go to youtube in a couple of months. 🙁

Not that it matters, but all my demos worked, kind of a Pyrrhic victory.

Update2: Riga is awesome and very beautiful.

IMG_6612 IMG_6616 IMG_6641