May 182015
 

I remember when 8 months ago Ivan came up with the idea to organize a conference, we were all - why the hell not. How hard can it be? I want to go back in time and give my cocky past self a slap in the face. A very hard slap.

We had already done many hackatons, pushed a couple of openjdk patches (which are as of now still not accepted) and drank many beers planning the bright future.

I remember feeling a bit in a rut. And this was a really good excuse to write some java code, meet new java people and work with some new java technologies.

I remember when we just talked about the conference for four months. It all got very real 4 months ago and we had a choice - organize the whole thing in 4 months (which then I had no idea was a really short time for a conference) or give up for next year.

We were very eager back then. We all decided to do it. I remember some of our organizers looking at us, probably thinking "let's sit and watch go down in flames".

4 months later I know a lot about accounting and VAT. I wrote a lot of code, most of the times after midnight. The funniest story is when we were deploying the electornic ticket system (epay integration) - proudly written mostly by me (but I'm ashamed of the code).

4 months later I can sign a contract in a couple of hours. A procedure previously taking me almost a week. I have optimized so many of the bureaucracy procedures I do. As a business owner I had the same issues, but after we started the conference I couldn't keep up and had to optimize again and again. Here's the place to send a special thank you for our lawyer and accountant - two of the people I would fail without.

4 months later I sleep less, and I do more. I hope the sleeping part will fix itself after the 27th. I now can read 30 emails in an hour (unfortunately after another hour I have 30 more). Half of my inbox has "Ivan" in the sender's field - he has the nasty habit of putting every little detail in an email, requires the same from me, and is pissed off if I fail to read something 2 hours after he sent it.

One of the funniest stories from the past week is me sitting in an office, signing a contract. The contract has to be signed, and I have to pay that contract in 10 minutes. So I'm sitting on my laptop sending the money, the other side sitting on theirs checking if the money is going to arrive. And at some point it feels as a movie scene where the good guy is going to appear any minute and break the drug deal.

So organizing a conference is tough, but it's a lot of fun. Next time (yes, if I have the opportunity, I'd do it again) it's going to be even better. My conference cherry is about to be popped in 27 days. Hope to see you there.

--Mihail S (and, yes, I know it says "by Admin", but we have more important things to fix first)

pixelstats trackingpixel
May 132015
 

Simon Scholz from Vogella presented Eclipse RCP development, the new Eclipse Mars (to be published in a month) and tips and tricks on migrating from eclipse 3 to eclipse 4.

IMG_4413

 

There were also examples on Maven Tycho, SWTBot UI testing. Simon bragged about fixing issues on the dark theme of Eclipse, which I adore, so now it's even better.

IMG_4414

Pretty funny, I had to pick Simon from the airport, so I had to have a sign:

Photo on 5-12-15 at 00.28

 

pixelstats trackingpixel
Mar 102015
 

I use one central email address: stephen@gmail.com (email anonymized). I want to add my work address stephen@fake.company.com to my primary address so I can control it from there.

Receiving

option1: gmail's pop3 importer

Gmail cannot use IMAP to download messages (or I haven't found out how) from other mail servers. It can use POP3:

 

option2: forwarding

What i prefer is to make the mail server at fake.company.com to forward all the messages to stephen@gmail.com. This depends from server to server.

Sending

If you want to pose as stephen@fake.company.com from stephen@gmail.com, you have to use fake.company's email servers, here's how it's done:

On stephen@gmail.com's settings, do:

Gmail -> settings -> accounts -> Add another email address you own

Screen Shot 2015-03-10 at 5.56.12 PM

Then add the info of stephen@fake.company.com:

NOTE: Uncheck "Treat as an alias"

Then add the server info:

Then an email with a code will be sent to stephen@fake.company.com

Give the code to gmail:

Now we're ready, compose a new email and put a different FROM address:

Now when you receive an email to stephen@gmail.com designated for stephen@fake.company.com and you click reply, gmail will automatically put stephen@fake.company.com as the FROM address.

NOTE: People on the other side will never know you use stephen@gmail.com.

pixelstats trackingpixel
Feb 252015
 

Screen Shot 2015-02-25 at 8.32.03 PM

Today (2015.02.25) we had a bgjug sponsored "intro to nashorn" event.

IMG_3956

Mitya, presented nashorn and avatar.js. Gave a lot of examples and had a hands-on - a node.js server working with hibernate.

pixelstats trackingpixel
Feb 172015
 

Today, 17.02.2015, the Bulgarian Java User Group (BGJUG) organized another hackaton. This time we wanted to fix warnings inside the jdk.

Screen Shot 2015-02-17 at 8.33.57 PM

First we did

make clean JAVAC_WARNINGS="-Xlint:all,deprecation,rawtypes,\
unchecked,cast,serial,dep-ann,static,fallthrough,try,varargs,\
empty,finally -Xmaxwarns 10000" DISABLE_WARNINGS="-Xlint:all"\
 LOG=info images

to generate a build.log to find out all the warnings. Then with any text editor one could open jdk9/build/linux-x86_64-normal-server-release/build.log and use these searches (using regular expressions) to find all the warnings:

openjdk/jdk9/corba(.)* warning
openjdk/jdk9/jaxp(.)* warning
openjdk/jdk9/jaxws(.)* warning
openjdk/jdk9/nashorn(.)* warning
(Substitute with your username)
The result was:
359 corba
100 jaxp
500 jaxws
0 nashorn
Initially Mitya proposed nashorn, but all of them were already fixed. Then Ivan and Nayden settled on jaxp. Because we all dislike corba.
Joe Darcy has a blog post on different warning types and how to fix them. We split the warnings into different types:
rawtypes 43
unchecked 14
serial 32
cast 10
dep-ann 1

Note: Dep-ann is to add the @Deprecated annotation.

We fixed the last three types and created a patch: http://bgjug.sty.bz/bgjug/~bgjug/fix-warnings-jaxp-part1/webrev.00/, because the unchecked and the rawtypes are a bit tricky as they involve changing public APIs.

We then tried to solve as much of the latter as possible and then created a second patch: http://bgjug.sty.bz/bgjug/~bgjug/fix-warnings-jaxp-full/webrev.00/

 

pixelstats trackingpixel
Feb 052015
 

barbadan.hit.bg беше сайт с няколко книги за мотоциклетна езда преведени на български. Когато стана ясно, че ще затварят hit.bg и безплатно хостнатнатите там страници, реших да спася цялото творчество и копирах сайта, за да се запази като знание.

Теми:
>Ефективни приоми на уличната езда.
>Кейт Код.
>Снимки.
>Спирачни_накладки_и_дискове_за_мотоциклети.
>ПТП.
>Техника на спортната езда.

Адрес: http://mihail.stoynov.com/barbadan.hit.bg/

Не знам какви са правата на съответните книги/статии. Ако все пак нарушавам нечии, моля да пише.

pixelstats trackingpixel
Jan 292015
 

So we in the Bulgarian Java User Group wanted to build Valhalla, and no IDE (Eclipse, Intellij Idea) supports it. We needed some simple text editor with some java support. And Sublime Text 3 (with Javatar) is the one we chose.

Sublime is a fancy editor written in C and Python. Javatar is a plugin that adds some Java support.

Installing Sublime Text 3 beta is straight forward. Installing Javatar is:

[openjdk@localhost valhalla]$ cd ~/.config/sublime-text-3/Packages/
[openjdk@localhost Packages]$ git clone git://github.com/spywhere/Javatar.git

Setting up the correct java is: Ctrl+Shift+P --> "javatar" --> Javatar Settings - Default

Then change the javac and java locations:

Creating projects is a bit uneasy - create new project is actually called "Project -> Save as".

And then we can run some code (fist compile, then run):

pixelstats trackingpixel
Jan 292015
 

Today we had a second bgjug hackaton for the month. Its topic was Valhalla.

Project Valhalla will probably be part of Java 10 (expected 2018). Among other things it allows using primitives as generic arguments.

Here's how you can build Valhalla yourself.

Here's a virtual machine with valhalla if you're lazy (virtual box).

This is the valhalla presentation by Ivan. And this is the video of the talk (in Bulgarian).

IMG_3676

Here are some of the code we ran:

Ivan created a simple ArrayList

public class SpecialArrayList<any T> {
	private static int INITIAL_SIZE = 10;
 
	private T[] elements = null;
	private int length = 0;
 
	public SpecialArrayList() {
		elements = new T[INITIAL_SIZE];
	}
 
	public T get(int position) {
		if(position >= length) {
			throw new ArrayIndexOutOfBoundsException();
		}
 
		return elements[position];
	}
 
	public void add(T element) {
		// Check whether array is full
		elements[length] = element;
		length++;
	}
}
public class Main {
	public static void main(String[] args) {
		SpecialArrayList<int> intList = new SpecialArrayList<>();
		intList.add(1);intList.add(2);intList.add(3);intList.add(4);
		System.out.println(intList.get(2));
 
		SpecialArrayList<String> stringList = new SpecialArrayList<>();
		stringList.add("1");stringList.add("2");stringList.add("3");stringList.add("4");
		System.out.println(stringList.get(3));
	}
}

Nayden tested a bit of crazy code - which is supposed to fail (IA impl = new IAImpl();):

public class B <any T> {
   protected T t;
   protected T[] ts;
   public B(){}
 
   public B(T t){
     this.t = t;
     this.ts = new T[100];
   //  System.out.println(this.t.getClass());
   }
 
   public T[] getTs(){
     return this.ts;
   }
 
   public T getT(){
     return this.t;
   }
 
   public static void main(String[] args){
       B<int> b = new B<>(100);
       System.out.println(b.getT());
 
       System.out.println(b.getClass());
       System.out.println((new B<String>("dada")).getClass());
       System.out.println(c.getClass());
 
       IAImpl<int> ludnica = new IAImpl<int>();
       ludnica.setT(100);
       System.out.println(ludnica.getT() instanceof Object);
 
       IABase<String> base = new IAChild<int>();
       base.setT("dada");
       System.out.println(base.getT());
       System.out.println(base.getClass());
 
       IA<String> impl = new IAImpl<int>();
 
       impl.setT("dada");
       System.out.println(impl.getT());
       System.out.println(impl.getClass());
   }
}
 
 
interface IA<T>{
 public T getT();
 public void setT(T t);
}
 
 
class IABase<T>{
 private T t;
 public T getT(){
   return this.t;
 }
 public void setT(T t){
   this.t = t;
 }
}
 
class IAChild<any T> extends IABase {
 
}
 
class IAImpl<any T> implements IA {
 private Object t;
 public Object getT(){
   return this.t;
 }
 public void setT(Object t){
   this.t = t;
 }
}
pixelstats trackingpixel