# Thursday, November 13, 2008

Javac bug, Eclipse innocent, bug in static imports

I had an issue compiling some java classes. Javac failed, Eclipse's compiler worked. The issue is described here.
I was blaming Eclipse, I was blaming java6's endorsing. I was thinking it was due to JAXB.

It comes out they all were innocent.

Here's my code:

package f;

 

import static f.ProblematicClass.E1.E2.VALUE;

 

import javax.annotation.Resource;

 

public class ProblematicClass {

 

    @Resource

    public static enum E1 {

        F(VALUE);

 

        private E1( E2 requiredBankAccounts ) {

        }

 

        public static enum E2 {

            VALUE;

        }

    }

}


The result with javac is:
>javac f\ProblematicClass.java

f\ProblematicClass.java:9: cannot find symbol
symbol  : class Resource
location: class f.CorrectClass1
        @Resource
         ^
1 error


After some research I think I simplified the problem:
(If I continue to simplify it would still fail to compile but at some point it would start to compile which yesterday drove me crazy.
This is the most simplistic case that consistently fails to compile)

package f;

 

import static f.ProblematicClass.E1.VALUE;

import javax.annotation.Resource;

 

public class ProblematicClass {

 

      @Resource

      public static enum E1 {

            VALUE;

      }

}


All of these changes fix the compilation error (from javac):

...

// Reverse the order of imports

import javax.annotation.Resource;

import static f.ProblematicClass.E1.VALUE;

...

or

...
      // Use the FQN of the annotation

      @javax.annotation.Resource

      public static enum E1 {

            VALUE;

      }

...


This all makes me think that the static import fails the next one only if the next one is an annotation (I've tried with a java.util.Collection - it compiled).
I have tried this with jdk6u3 and jdk6u10.
I don't have jdk 1.5. Can someone test it on jdk 1.5?



Update: GRRRRRRRRRRRRRR, Somebody found it before me:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6391197
It was reported on 27th of June, 2006 :'(

Here's what they say:

Workarounds:
1) switching the order of the import statements works (although they often get changed back by our development tools).
2) Commenting out the static import statements, then compiling, then putting the import statements back and
compiling again with the old classes still there also works. This means that the compiler errors happen at the strangest
of times
, and in large programs it can be very difficult to work out how to workaround the problems.

Weird javac case - Eclipse's compiler is wrong again.

I have some code.
I have two classes. They both have inner enums.
The two inner enums have an annotation.

But one of them does not compile. The other one compiles just fine.

In eclipse there's no error, but when I build the code from ant I get a compilation error - the annotation class is not found:

    [javac] ProblematicClass.java:147: cannot find symbol
    [javac] symbol  : class XmlType
    [javac] location: class package.ProblematicClass
    [javac]     @XmlType(name="fff")
    [javac]      ^
    [javac] 1 error

I spent some time looking for it - I thought that the classpath is wrong, I endorsed an updated version of the API (java 6). The issue persisted.

Then I decided to use javac directly:


javac -verbose -classpath lib\X.jar;lib\X2.jar -d bin -sourcepath src -encoding UTF-8 src\package\ProblematicClass.java

Strangely enough I got the same error?! Then I did the same for the class that did compile successfully using ant - it worked.
So there was a difference between the two classes and I had to find it.

And I found it, can you find it?

//Does not compile

public class ProblematicClass {

 

      @XmlType( name = "fff1" )

      public static enum InnerType {}

}

 

// Compiles

public class CompilableClass {

 

      @XmlType( name = "fff2" )

      public enum InnerType {}

}

Yes, you're correct. The second enum is not static.
This only happens with inner static enums. The anomaly does not occur if it's an inner static class. I don't know why.

So I'm thinking that in the ProblematicClass the annotation is not visible because the import of XmlType is not visible.
I was correct - this one works:

//Does not compile

public class ProblematicClass {

 

      @javax.xml.bind.annotation.XmlType( name = "fff1" )

      public static enum InnerType {}

}

I just supplied the FQN of @XmlType.

So eclipse is working, javac is not. Now is the time to say that Eclipse is not using javac. I thought it was using jikes (made by IBM), but that's not correct. Eclipse is using its own incremental compiler part of JDT Core. JDT stands for Eclipse Java Development Tools.

http://www.eclipse.org/jdt/core/:

JDT Core is the Java infrastructure of the Java IDE. It includes:

  • An incremental Java compiler. Implemented as an Eclipse builder, it is based on technology evolved from VisualAge for Java compiler. In particular, it allows to run and debug code which still contains unresolved errors.
  • ...

So either javac or Eclipse's compiler is wrong. I would bet that javac is following the spec more strictly.

This is the second time I'm catching Eclipse's compiler of misconduct. The first time was something related to a very complex case with generics - one of the compilers said it was a warning, the other - error. More here.


Update: I was wrong. I was trying to report the problem. I was making a pretty simple case. I used a different annotation: @javax.annotation.Resource. It worked both on Eclipse and on javac.
So the problem is somehow linked with JAXB.

 JAXB is an API bundled with Java 6 (an 'endorsed standard' a 'standalone technology'). The version bundled was JAXB 2.0. If one wants to use a newer version, say JAXB 2.1, an 'Endorsed Standards Override Mechanism' had to be used.

Info on JAXB here.
Info on endorsed mechanism here.

I'm currently with JDK 6 update 10. Somewhere I saw that 'endorsed standard override mechanism' was no longer necessary.

It looks like the problem is more on javac side than on Eclipse's compiler.

I will investigate further.


Update2: It comes out that 'Endorsed Standards Override Mechanism' was existing prior to java 6. Only the standalone technologies were added in Java 6.

Update3: It comes out that 'Endorsed Standards Override Mechanism' is still used.

Update4: It comes out that this bug is very hard to reproduce. My simple examples at some point just started compiling :(

Update5: I just created some code that consistently reproduces the bug. I'll write it in a new entry to be cleaner.

Update6: I fixed coloring and finished the new article on the bug.

# Wednesday, November 12, 2008

JAX-WS: Always clean-up generated stuff before regenerating.

I'm using JAX-WS.
When I'm generating stuff for a web service I generate the jaxws package in a 'gen' source folder.
I don't need the compiled stuff so I generate it to a temp folder that I don't care about.

It comes out that I do have to care about that folder because yesterday I got an obscure error:

com.sun.xml.ws.model.RuntimeModelerException: The serviceName cannot be retrieved from an interface.

This error has only 1 (one) hit on Google. Don't trust me?
Try this one out:
http://www.google.com/search?q=%22com.sun.xml.ws.model.RuntimeModelerException%3A+The+serviceName+cannot+be+retrieved+from+an+interface.%22

The use case in the forum has nothing to do with my environment so I cleaned up and everything worked like a charm.

I've always been unhappy with how production unready wsgen is (here).
# Tuesday, November 11, 2008
# Monday, November 10, 2008

A very cool merge and copy program that's free

WinMerge has great shortcuts for next/previous change, copy left/right.
It has textual comparison feature which works pretty well.

Thumbs.db

Recently I had to move 200GB from one hard-drive to another.
It was imperative to make sure everything was copied successfully.

Using a binary comparison tool would take a really long time. So I only check the total file size of all files copied and the number of files.
I tried copying these 200GB files several times and never succeeded. I was too lazy or busy to investigate until today when I got really pissed off.

It comes out that the difference comes from thumbs.db files.

Thumbs.db is a thumbnail cache used by Windows XP and Windows 2k3 Server.

How to stop the creation of these files:
  1. Click Start
  2. Double-click Control Panel
  3. Double-click Folder Options
  4. Click on the View tab
  5. Check off the circle next to Do not cache thumbnails
  6. Click the Ok button

# Wednesday, November 05, 2008

Firefox new shortcut

Ctrl + Num = switch through tabs. Useful.

# Tuesday, November 04, 2008

Quote of the day

Those who would sacrifice liberty for security deserve neither.
Benjamin Franklin

In Bulgarian:
Този, който е готов да пожертва свободата заради сигурността, не заслужава нито едно от двете.
Бенджамин Франклин

Google translating whole sites

I accentally went to http://www.gaijin.at/.
The weird part is that when one presses "English" (since it's in German) it goes to:
http://translate.google.com/translate?hl=de&langpair=de|en&u=http://www.gaijin.at/index.php
I didn't know that Google can translate whole web sites.

The translation seems to be pretty good.
The site look&feel is exactly the same.

Very good thing.
# Friday, October 31, 2008

Пощенска банка - поредната олигофренска банка

Бях си казал, че повече с глупости няма да се занимавам.

Но, бях отново опроверган мислейки си, че вече най-големите тъпотии от банки съм ги видял. Особено след тъпотиите на Първа инвестиционна банка.

Сега основната ми банка е Пощенска банка: прилично е-банкиране.


Малко предистория:
Реших в сметката си вързана с дебитна карта да не държа прекалено много пари. Направих си втора (някакъв тъп влог) и я вързах с е-банкирането си.

Поредната олигофрения:
Оказва се, че тоя олигофренски влог не може да се управлява от е-банкирането. А като го правех изрично казах, че искам да ползвам от е-банкирането си.
Другите видове можели, но точно моя не може. И се оказва, че имам сметката, но точно като се опитам да превеждам - не може.

Естествено грешката се вижда от някакво забито меню, на самия трансфер не я пише.

Няколко часа се опитвах да се свържа на официалния им телефон - или заето или никой не вдига. Звънях и на други телефони - или не се вдигат или все ми се казва - не мога да помогна.

Писах им два имейла - чак на втория след 2 часа ми отговориха и даже ми се обадиха.
Като ми обясниха каква е хавата, естествено ги питам как да го реша сега проблема си? Те - ами отивате до някой клон. И сега аз ще трябва да се вдигна в работно време и да ходя до олигофренския им клон. Те естествено не са виновни и нищо не могат да направят.

Естествено мога да отида и да се навикам на пиклата, която не ми е обяснила тази подробност. Но какво ще ми донесе това?

Update:
Бях в един клон на банката. Първата мацка естествено ми каза: "Ама то би трябвало да може". Явно не е наясно горката, но аз бях кратък и ясен: "Искам да говоря с някого, който знае как работи всичко" и тая има благоразумието да ме насочи към правилния човек.
Говорих си с "администраторката" (явно нещо като шефка във фронт офиса им). Първо и тя: "ама то би трябвало да работи". После "ама ние нямаме други видове влогове". Докато накрая стигнахме до "ааааааааааааааааааааа". Явно разбраха какъв е проблема.
Направиха ми нова сметка прехвърлиха ми каквото трябва. Обещаха ми до днес (04.11) на обяд всичко да е в онлайн банкирането ми и да работи.
Естествено не работеше. Към 15 часа сметката се появи, но без наличност. От предната сметка знам, че след известно време всичко сработва, но досега (почти 19) това не се е случило.
Естествено не успях да се свържа с "администтраторката", за да я питам защо лъже.
В онлайн банкирането дори се опитват да бъдат забавни:
"Сметката не е на клиент на eBank (може и да е ама още не се грижим за нея)"
Дори пунктуационни грешки имат. И това банка. И кои сте вие, дето се "грижите" за нея? Обгрижихте я добре.

Въпроси към Пощенска:
Защо лъжете? Това е непрофесионално.
Толкова ли е трудно да си намерите качествени хора? Аз ви опознах системата за 24 часа и последния път като бях във ваш офис, я познавах по-добре от служителите ви.
Защо не си вдигате проклетите телефони?! Това е непрофесионално.
Защо олигофренския ви влог (с гръмкото име "мега") не може да се управлява онлайн?
Ако беше кредит и трябваше да го погасявам сигурно един ден закъснение щяхте през носа да ми го изкарате?

Оправданието:
Естествено пиклата ще каже: "Ама да сте питали". Common sense, скъпа, common sense е да ми кажеш за тая подробност.

Изводът:
Още една олигофренска банка, която не струва. Услугата ѝ е скапана.
Трябва ли да имам 5 дебитни карти с 10 сметки вътре?!
Трябва ли да си намеря някой пенсионер, който да ходи всеки ден и да ми е един вид "електронното банкиране"?
Трябва ли просто да се науча да си държа парите кеш, защото няма ни една банка, която просто да работи?
Update (към извода):
Стоят ми парите в банка - банката ги използва.
В разплащателна сметка по-скоро аз плащам (лихва няма, таксите са меко казано високи). Вие ми вземате парите, аз плащам?
Във влога уж получавам някаква келява лихва, но нищо не работи и тия олигофрени ми хабят време (което е в пъти по-ценно от смешната им лихва).
Често се случва тия приключения да завършат по кофти начин - аз тоя уикенд до тия пари достъп нямах.
Мисля си, че да си държиш парите в банка е тъпо, адски тъпо. Аз обиколих няколко банки, все нещо не им е наред. И обслужването - нямам думи, един долнопробен ресторант по морето има по-адекватно обслужване (поне служителите си познават ресторанта).

Въпросът:
Някой знае ли поне една професионална банка, която предлага само едно: да ми достави безупречно електронно банкиране? Не искам нито да я виждам на живо, нито да комуникирам с безумно противните лелки/какички, които знаят само едно "не сме ние виновни". Искам просто да ми се предоставят ограничен набор от услуги и те да работят 24/7.

П.П. Определено тонът ми е груб, но тия са поредните олигофрени, които ми губят времето и ми лазят по нервите.

П.П.2 И не, определено няма да пиша "молби" или "оплаквания". Отговорът ще е в стил Мтел: "ми откраднахме ти 100 лева за половин мегабайт интернет, ама да не си блял, целият ни бизнес план се гради на измами, ти кво искаш - да спрем да работим ли?"

# Wednesday, October 29, 2008

Apache Tomcat 6 - enlarge VM's heap space

By default enlarging Java VM's heap space happens via "-Xms128m -Xmx512m".

How do we tell Tomcat 6 about it? They say via the CATALINA_OPTS variable (which is shared by all Tomcat instances on that machine). Or even via JAVA_OPTS (all java programs would use these settings).

But what if I want to set these options only to a specific Tomcat instance?
Google couldn't answer that.

I could mess with the startup scripts, which is not a good idea.

The best solution I found is to set the variable (CATALINA_OPTS) only on the console instance that is to start the Tomcat. This variable is not visible to other instances.
This works on windows - because of the temporary variables.

# Monday, October 20, 2008

Vista...again...for the last time

I had a 2GB MemoryStick Duo Pro left from the last phone and I didn't know what do with it.
ReadyBoost was a nice feature to try out (Vista uses the flash card to boot faster).
The card was small in size so it wasn't a problem to keep it always in. I rarely if never use the card reader.

Now Vista starts even slower. The last boot it stood at least a minute on the login screen and hdd went crazy.
After my desktop appeared the it took a few more minutes for the hdd to calm down.

I'm waisting so much time complaining about it. I won't write for Vista anymore.

# Friday, October 17, 2008

XP and Vista restart when they've installed a new update

So I choose to do something on my laptop (Vista) and just when I start doing it there's this annoying window - you have to restart - and it's bugging you once and a while. If you choose to ignore it long enough, it'll restart the machine right in the middle of a movie. How frustrating is that?!

There's an XP machine I have that has a service running. The service MUST be up all the time. The choice of operating system was not mine. So the XP updates and then restarts without restarting the service. How frustrating is that?!

I know that Vista and XP are end-user OSs, but how can Vista restart while I'm using it?!

# Thursday, October 16, 2008

Slides + workspace on the java.util.concurrent lecture

Here are the slides and an eclipse workspace (eclipse ganymede) from the lecture Krasi and I did yesterday evening:

bgjug.concurrency1.ppt (3.83 MB)    (MS Office 2003)
bgjug.concurrency.pptx (488.64 KB)    (MS Office 2007)
bgjug.concurrent.workspace.zip (313.84 KB) (demos on CyclicBarrier, CountDownLatch, Non-blocking stack, Producer-consumer implemented with two Conditions, interruptable Lock)

This is the poster with the annotation.




# Monday, October 13, 2008

For the first time: Vista rulez: the WinBtn+[0..9] shortcuts are amazing.

WinBtn + 1
...
WinBtn + 9
are shortcuts for launching programs from the QuickLaunch. It doesn't work in XP, so it's new in Vista.
It's great.

# Saturday, October 11, 2008

I accidentally deleted the blog

I'm sorry, my dear reader, I accidentally deleted the blog, so duplicate articles may appear as I restore them from the logs.

# Monday, October 06, 2008

Ferrari motorcycle

Some student made this very cool motorcycle concept:
http://3d-files.co.il/Ferrari_Motorcycle_02.htm
http://3d-files.co.il/Ferrari_Motorcycle_01.htm
http://3d-files.co.il/adds/Ferrari_V4_Yellow_Bike_2008.html


Engine:
http://3d-files.co.il/Ferrari_V4_Drive_Unit_2008.html


Problems that I see
No windshield.
No shield for the legs - too strong a wind.
The seat does not look soft.


The front look is not that good.
The front fender looks like the face of an owl.


But overall it's amazingly looking thing :)

UPDATE: the author: this project has not been authorized neither sponsored by Ferrari and any past use of the trademark was not authorized and for this reason was stopped

Too bad. It was so pretty.

'Vista's User Account Control

After a year with it, I switched it off.

It's slow and it proved useless.

Let me explain:
It's slow because switching to this darkened look while in Aero is taking a while. Caching keypresses is off, but I guess this is part of the idea.

It's useless:
Most software now requires privilege elevation, because ...well, I don't know. To spy better I guess. Why would Skype or Picasa require elevation otherwise?
It's useless because after you confirm the elevation, this software can do practically anything.


I prefer the old-school way of doing things right - never ever enter the machine with an administrator.
Very, very rarely elevate some CHECKED software with an admin user.
This is the best way to keep windows clean.
There's no need for an antivirus, only very rarely to assert one's self that everything is all right.


Does anyone know a good antivirus with the following characteristics:
1. Uses a maximum of one or two processes
2. It's easy to switch the real-time part of it off. To be able to switch it off completely without having to user regedit.
3. Small memory footprint.
4. To do a pretty good job.
5. Simple minimalistic interface where the "scan memory, registry and harddrives" button is on the front panel and there are no other buttons but the Update one.

Hibernate, @EmbeddedId and renaming columns

Making a composite natural key looks like that: (example from Manning book for JPA/Hibernate):

public class UserId implements Serializable {
    private String username;
    private String departmentNr;
    ...
}

And using it:

class SomeClass {
    ...
    @EmbeddedId
    private UserId userId;
    ...
}

The column names in SomeClass are id_username and id_departmentNr.
So one can't do the following

@SuppressWarnings( "unchecked" )
List<SomeClass> old = (List<SomeClass>) em.createQuery(
    "from someClass sc where sc.userId.username = :username and
sc.userId.entityType = :departmentNr")
          .setParameter(...).getResultList();


Because Hibernate wouldn't recognize the column names - it would say something like "someclass0._username - cannot find it".
So one has to do column names rewriting:


class SomeClass {
    ...
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride( name = "
username", column = @Column( name = "username" ) ),
        @AttributeOverride( name = "
departmentNr", column = @Column( name = "departmentNr" ) ) } )
    private UserId userId;
    ...
}

Which sucks :(

dasBlog cannot query gmail

Because gmail uses port 995. at least in smtp the port is definable in dasBlog.

KFC sucks

On Saturday while shopping we decided to have a lunch at KFC (not because I like them, but because there were no duners around).

We had stomach issues for two days.

On top of that KFC is as expensive as grabbing a pizza in a decent restaurant.

KFC is full with idiots waiting to buy crappy food. I had to wait on a queue.

At KFC the chicken thing was full with water - I guess it was frozen and then directly fried.

KFC is unsanitary - I had to eat on a table used by some teenagers who left a ...(how to delicately put it).. a mess.

For me everybody eating at KFC is a complete moron.

I think McDonalds is the same shit, but at least I never had stomach issues after eating there.

I don't like reset.bg

They are not very polite.
# Sunday, October 05, 2008

Back online

The server hosting this blog was offline for a few days due to a persisting problem with the TCP/IP stack.

I had to reinstall everything which took a while. And these days were not the perfect time for that.

The good side of all this is that this was the perfect opportunity to do all the changes I was planning to do but delayed due to "lack of time".

Post page: http://mihail.stoynov.com/blog/2008/10/05/BackOnline.aspx

# Monday, September 29, 2008

Again for Vista and SP1

After SP1 was installed 7 months after it was released my Vista started downloading updates on an hourly basis. It was like SP1 was too big and my Vista was constipated. After it was installed it installed a couple of other updates, restart, then it started downloading new updates immediately, and this repeated twice. Installed so far:



Off topic: SP1 required an amazing 4.5 GB?! Dudes at microsoft, my HDD is 80 GB, do you plan to fill it all up with this shitty operating system?!

My windows folder is 14 (fourteen !!!!) GIGABYTES. And I have to clean it up, because windows is unable to do that for me.
# Sunday, September 28, 2008

Dell battery totaly out after a year of less than moderate use.

Have you seen this before?

(Editing done with MS Paint, hihi)

# Saturday, September 27, 2008

*Good* technology

Recently I was asked what piece of software/hardware do I use daily and I think is good:
Eclipse, the clean one, no WTP, the Java perspective is awesome.
My phone Nokia E71, still not used to it, but the multitasking rocks. Very sturdy device. My previous one was great too.
Gmail
MPlayer
Opera Mini
Windows Server 2003 without the last incident.

# Thursday, September 25, 2008

Vista's "lock user" feature, part 2

I'm using an extended desktop (an extra screen) with Vista.
Unlocking takes like 10 seconds of intensive blinking of both screens and irresponsive mouse and interface.
And I unlock like 20-30 times a day.

Vista's "lock user" feature

Sometimes I lock my machine using WinBtn+L.
Sometimes while locked, windows thinks Alt is pressed. So I can't write my password because certain characters invoke some commands.
It's really annoying. I have to press the control (gray ) buttons several times, sometimes this does not help I have to use "swich user" which is (as every single part of Vista) SLOW.

I should make a separate "Vista SUCKS" section.

# Wednesday, September 24, 2008

Eclipse 3.4 Ganymede

Still crashes on some update sites - it did hang on a modal window while downloading SoapUI.

Great new shortcut - middle button closes tabs as in browsers (only IE does not do that) - VERY, VERY COOL.

JAX-WS, the knowledge I gathered during my research

Some notes I could later use.
A stack comparison of most (I don't see JAX-RPC) of the available Web Service stacks in Java: http://xfire.codehaus.org/Stack+Comparison
(Could be somehow biased since it's made by the guys that do one of the stacks).

https://metro.dev.java.net/ = JAX-WS+WSIT

JibX - fast XML processing tool, JAX-WS can't use it - it can only use JAXB.

SoapUI - cool tool for testing web services, as a standalone and as an eclipse plugin - www.soapui.org

WSIT - Java API for better integration with .NET WCF and the WS-I standards.

Slacker Uprising is out

Michael Moore's new movie is out.
They don't allow non-US IPs so use a torrent and download it.

And ... VOTE !!!

Update: The movie is inspiring. 20 mln. youngsters voted - an unique record. I don't know if Moore the reason.

# Friday, September 19, 2008

Windows Server did something so Microsoftish

It's 2 o'clock in the morning. I'm tired, I'm frustrated and I hate all that is Microsoft more than ever.

What happened.
Few hours ago there was a power surge. After the power was all back, my server started, I could ping it, but that was pretty much it. Nothing else worked.

I had to get a monitor at one past midnight to diagnose.
Long story short (it's 2 o'clock remember?) it came out that RRAS (Routing and remote access services) somehow started itself up to such an extent as to f*ck up my firewall, so my server went dead (network wise) - the ipnat.sys issue - very common it would seem.

After an hour of trial and error I fixed it using Safe Mode (Stopping the Firewall, starting RRAS, stopping RRAS, starting the Firewall, and the ICS afterwards). Fortunately neither the ICS, nor the Firewall lost their settings.

And..... I have to get up after three hour to drive to Greece.

I hate you microsoft software..

# Thursday, September 18, 2008

My eclipse shortcuts and tweaks

In a project where requirements change on a daily basis, refactoring is one's biggest friend.
I'm currently in such a project - not my kind of thing but reality sometimes sucks.
Anyhow, I've tried to look at it from the bright side.

I'm currently perfecting my refactoring skills in eclipse.

Here's what I can share.

Everybody knows about

Ctrl + Shift + R - find resource (file )
Ctrl + Shift + T - find type (class)

Alt+Shift+C - Change method signature
Alt+Shift+S - Context menu for source generation.

Alt+Shift+X, J
- Launch current focused code as Java Console App
Alt+Shift+D, J - Debug current focused code as Java Console App
Ctrl + L - go to line - when watching stack traces. NEW
Ctrl + O - find method in class.   NEW
Ctrl + T - Hierarchy of a class (subclasses + base classes).   NEW

But do you know these:
Alt+Shift+X, Q - Launch current focused script as an Ant Build Script (focused on a target in the 'Outline' window launches only that target, very handy)
Ctrl + >, Ctrl + < - Navigates through warnings and errors in a source file. Extremely handy.
Ctrl + 1 - launches the solution box or whatever that's called.
Ctrl + 3 - finds any window.
Middle button closes tabs as in browsers (only IE does not do that) - VERY, VERY COOL. Ganymede (Eclipse 3.4) only.
Ctrl + E - list of all the open windows (by Joke). NEW
Ctrl + J - incremental search (like Ctrl + F, F3 in browsers (real browsers, IE can't do that)), then arrow up/down to go to next previous, Enter to stop (by rado). NEW

Ctrl + Shift + / - collapse all. NEW2
Ctrl + Shift + * - expand all. These are very nice in long classes. NEW2

Debugging
Ctrl + Shift + I - inspect selected source code while debuging.
The 'Display' window is my biggest friend - inside it you can write code and evaluate it with Ctrl + Shift + D (print result in the box) and Ctrl + Shift + I ( inspect the code in a context window.

That's for now, I'll update this regularly. If someone uses something regularly that is not here, please tell.

# Tuesday, September 16, 2008

Young people, voting and Michael Moore

Michael Moore's new movie's gonna be out in a week. It's about his going to colleges and making young people vote 4 years ago. It's gonna be free for download.

In my own country young people don't vote, they don't care about politics. It's a kind of silent protest, they say.

To my fellow country men (The aforementioned young ones):
So somebody is f*cking you in the *** and all you do is silently protest?! What kind of behaviour is that?!

Take a little responsibility, you're going to live in this country for quite a while, not the elderly people (who vote).

Currently we're being governed by coalition of ex-communists and an ethnic party and we're the laughing stock of the EU.

You put under the same denominator the last two right and the last two left governments.

Please, shut up, read a little more and go and vote the next time. There aren't any good candidates, you say? CHOOSE THE LESSER EVIL. I'll bet that you won't vote for that ethnic party, right? We all dislike this guy, right?

Vote for the single reason of getting him out of the parliament, he has done enough harm.

Just vote, please.

# Friday, September 12, 2008

My new favourite rapper.

He's like a parody version of Eminem.
The chosen topics.
The lack of delicacy discussing the topics.
The topics nobody wants to speak about.

I very well understand that this is a parody but it's an Eminem-styled parody. I connect because I recognize myself as the looser character in his Everyday Normal Guy 2.
Please, my one good reader, don't write nasty comments, please.

Some info on the guy:
http://en.wikipedia.org/wiki/Jon_Lajoie

Some songs:
Everyday normal guy (favourite)
Everyday normal guy 2 (favourite, part 2)

Stay At Home Dad

# Tuesday, September 09, 2008

S60 Sucks, The phone rulez

S60 is a software platform for mobile phones, running on Symbian OS.
I have to work with it since I got my new Nokia E71.
Well I don't know if it's Symbian or S60, but I don't like it.

First, I can't save my laptop as a trusted bluetooth device. So it asks me on every single operation if my laptop is trusted. WTF? My previous phone could do that.
Second, I can't see my IP while in a wireless connection. No such option. This is important to me.
Third, I can't find the control panel which is for the keyboard layouts installed. WTF? I can't find the control panel for bluetooth. I can't find the control panel for anything.
Fourth, the Cyrillic language layout is really weird. Yea, ok, it's actually Russian, but still, it's weird.
   MTEL, YOU BASTARDOS, MAKE A BULGARIAN PHONE, YOU LAZY FUCKERS, FOR ONCE DO SOMETHING ON YOUR OWN AND DO IT RIGHT.
Fifth, I can't get the flash card and plug it in, the phone has to be restarted. WTF? My previous phone could do that.
Sixth, The phone crashes too often. At least it reboots fast and goes right in the menu where it crashed. This is nice.
Seventh, I can't use the Cyrillic capital characters of М, Н, О, П in my address book, since the Address book crashes. It cannot list them, but the quick search works. WTF? My previous phone worked perfectly with Cyrrilic.
   Now my whole Address Book is in Latin. I don't like that. I want to use Cyrrilic. I'm really dissapointed.
Eighth, The software for editing the address book sucks. It's slow. Opening a contact list - 3-4 seconds. Saving it - 4-5 seconds. WTF?


These are the bad things, and they are driving me crazy. I'm waiting for an update. This is an example how Nokia can skrew such a nice phone with such a stupid OS.Do
Don't get me wrong I don't regret bying this phone and I'll find a way around all those things.