It's not very easy, this is the first phone that is sophisticated enough to support the editing page and easy enough to be usable for that purpose. Uploading does not work. Rich editing does not work. But typing is fast enough and easy enough.
First, what's my goal
I want to do an audit log. I read the http://www.hibernate.org/318.html and there two different approaches were mentioned.
The first is using a Listener.
The second is using the new eventing model in Hibernate3.
The author said that he couldn't make the eventing approach work for an unknown reason.
I'm using Hibernate via JPA. I'm using it in an EJB. So the problem
with the first approach is that it is difficult (if possilbe) to supply
the same transaction to the interceptor so that it can write an entry
in the audit log. There is a solution with a static field holding a
session or an EM, but that seems ugly.
So I chose the second approach. I created a class, inherited few
eventhandlers (PreInsertEventListener, PostUpdateEventListener ) and
tried to add the class as a listener.
Using the API, it worked (the callback methods in the listeners were called):
Using properties (as if using persistence.xml) failed(the callback methods in the listeners were NOT called):
Today I passed the exam for category A (motorcycles above 50cc). Very happy.
There's a trend - there are a lot of articles here in which I bitch about something. So there should be a category called 'Sucks'.
Update: reviewing the articles I found a lot of candidates for the category, it comes out that all I'm doing is bitching about stuff - I should change the subtitle of the blog 🙂
When one implements an interface, the template in Eclipse puts an @Override and it does not complain about it. Ant javac task also compiles without warnings.
Sometimes other Eclipse instances start to complain exactly for that @Override stating that there's no method that's overridden. Well, Eclipse, please do make up your mind.
"Indicates that a method declaration is intended to override a
method declaration in a superclass. If a method is annotated with
this annotation type but does not override a superclass method,
compilers are required to generate an error message."
Well, that's not very clear. As far as I remember an Interface is a pure abstract class, right? So, which one's correct.
P.S. Sometime ago I was having a similar problem with Eclipse and generics - Eclipse only gave a warning about something (can't remember what exactly), but the javac said that it was an error - Google said something like "eclipse uses jikes, you use javac". So what, aren't there specs?!
Update: apparently JDK5 (or 1.5, suit yourself) does not allow that. So in order to get all the wrong @Overrides - set the Compliance level to 5.0 (Eclipse -> Window -> Preferences -> Java -> Compiler -> Compiler compliance level ) - and..... correct them. I have 29 left.
All the referrers to this blog from live.com come like that:
The search word seems to be only 'class'. I can't believe that I come out in a search for only the word 'class'. I guess all the other words from the search are stripped which, if on purpose, is stupid, and, if not, ignorant.
Той: em toq html nema izmestvane 100
Той: It can make direct calls to JavaAPIs that are
on the platform.
to pochva da prilicha na aplet 😉
всичките технологии са аплет-like
кой им е предшественика
samo ne znam kak opredelqt thin / fat client
sa razmiva leko
ajax-a e thin i toi uj 😉
група хора (аз също съм от тях), които са свикнали да пишат на силно типизирани
езици и име е адски трудно да разберат как технологии като perl, php, rss,
отговорът е в леснотата на употреба и бързината на разработка. А че се жертват
разни неща като добър стил и loose coupling - на кой му пука
Той: awe za html i www kvo mu e
Той: kat v ie raboti po edin nachin u firefox
Той: i staash na lud
Той: tva e nai-golemiq tashak 🙂
Той: prosto ne moa da povervam che sa go
Той: ako imashe pone malko tipizirane 🙂
Аз: There is a certain group of
people (counting me too) that are used to working with strongly typed languages.
It's really hard for that group of people to understand how technologies like
answer is (in my humble opinion) the ease of use and rapidness. Everybody can
learn to use them. Sacrificing the good style and the heavy approach (that
comes from the heavy books) comes out be (in most cases) an acceptable loss.
последното изречение го прочети няколко пъти
awe tva jnlo mn bavno zarejda obache
ima torque/power curve
to html i js uj prosto ama vari pravi ajax
винаги съм се дразнил на джава приложенията, че нямат райт клик
ne e prosto da praish dobar interface (ajax) za www
kav right click 🙂
to html i js uj prosto ama vari pravi ajax
ne e prosto da praish dobar interface (ajax) za www
Аз: apletite i сега javaFX нямат right-click
Той: nali vikash che sa razprostranilo shot
Аз: zabranen e
Аз: da, taka e
Той: em prosto da praish prosti neshta 🙂
Аз: taka 🙂
Аз: гмаил, гугъл мапс
Той: zashto tezi koito iskat da praat ne
prosti neshta tria da lejat varhu prosti tech
Аз: прости ли са?
Той: shot prostite tech sa sa nalojili
Аз: защото те са популярни и се поддържат от
Той: ili shot te samite sa prosti che ne sa
nalojili drugo vmesto da praat shitove running varhu prostite tech
Аз: бизнесът търси размах, дори и да имаш
супер технология, ако тя не се ползва, няма смисъл от нея
Той: mrazq bisnes 🙂
Той: i mrazq da mrazq 🙂
Аз: трудно е един бизнес да 'налага'
технологии (виж на Майкрософт колко им е трудно един стандарт да наложат)
Той: mi to ako e qko moje da se samonaloji
Аз: целият софтуер, който се пише е подчинен
на основни бизнес зависимости: (микроикономика 101) търсене и предлагане
Аз: има доста адекватни технологии, които не
са се наложили
Аз: причини много ()
Аз: една технология, за да се наложи и трябва
много повече от техническа адекватност
Аз: там отново се намесва мразения от теб
Той: biznesa razvalq sichko
Той: vnasq mn izkrivqvane
Той: ne sa prai shot e qko a shot tekat pari
Той: i vsichko e shit
Аз: приятелю мой, забавно е да те слуша човек
Аз: причината е в развитието
Аз: смята се, че пазарната икономика води до
най-високо развитие. Тя се гради точно тоя принцип с парите, търсенето и
предлагането и конкуренцията
Той: pazarnata ikonomika e shit 🙂
Той: vij posokata na razvitieto obache
Той: tva e edna dosta shibana posoka
Той: izkrivena ot bisnesa
Аз: бъди по-точен
Той: shit ot sekade 🙂
Той: posokata da se pechalat pari
Аз: разбира се
Той: razvitie saobrazno taq posoka
Той: tva e shit
Той: pitai malkite deca ako ne mi vqrvash 🙂
Аз: това е най-важния (ако не единствен)
показател колко добре се справяш - универсалният показател
Той: toq pokazatel vaji samo taq matrica 🙂
Той: v taq
Аз: така е
Аз: другите опитани модели са плановата
икономика (комунизмът), която практиката показва, че е не толкова успешна
Аз: Пазарната икономика е естествен механизъм,
който те принуждава да оптимизираш ресурсите, с които разполагаш
Аз: парите са просто универсално разменно
средство, нищо повече
Той: mn poveche ot tova sa 🙂
Той: za neshtastie 🙂
Той: ne che i na men ne mi triat ama ..
Аз: какво друго са?
Той: te promenqt horata we
Той: ne samo nekvi hartiiki
Аз: не перите ги променят, жаждата за
материалното ги променя
Той: e to e sashtoto 🙂
Аз: а то, материалното, се измерва с пари
Аз: но не забравяй, че тази жажда (или алчност
ако щеш) кара същите тези хора да се стремят към тях и да работят
Аз: двигателят на прогреса
Аз: точно тук е гениалността на пазарната
икономика естественото желание да купиш най-много с най-малко
Той: na metrialniq progres
Той: materialniq progres
Аз: ами духовното е индивидуално, много трудно
се измерва с пари и е трудно да се вкара в тая 'матрица'
Той: to ne moish da go izmervash s pari
Той: am kvo stana s html i js
Той: shte gi mahame li ot upotreba 🙂
Аз: едва ли скоро
Аз: бтв, мога ли да пусна разговора в блога
The answer is (in my humble opinion) the ease of use and rapidness. Everybody can learn to use them. Sacrificing the good style and the heavy approach (that comes from the heavy books) comes out be (in most cases) an acceptable loss.
Although it's short and incomplete it's really a cornerstone read. Every single Bulgarian must be forced to read it and memorize it:
In a few days this adventure (having a blog) is going to have its first birthday. I remember the birthday because it is embedded in the admin password (yea, try me ;).
Today I was reading a few articles about having a blog (here and here) and the impression I got left with was that starting a blog is not always a good idea and to do that you have to have something to share and to follow some rules and most importantly have a goal.
F**k that. (Update: I don't know why I put asterisks, maybe I'm afraid of the moderators ?!)
I don't know if I have something to share. I don't know if I have a goal set for my blog. I didn't know about the rules until today. But I don't care.
What made me start the blog was an article from Joel (I can't find it right now) that simply said that a blog can help you express yourself better, can help you perfect the language you present your blog in, can help you understand yourself better. And one other thing - get more feedback for yourself - and that one is particularly precious for me.
So, do I follow the rules - no. Do I care - I guess not. (yea, sometimes I check the logs to see how 'famous' am I and the good results and some comments boost my ego, but that's pretty much it). Overall, I find it a good experience and the time spent on the blog wasn't completely waisted.
What am I going to do from now on - I guess pretty much the same thing.
P.S. Thank you my one reader for the continuing support and the few comments you left from different IPs (appreciate the effort). I would gladly buy you a beer.
'I'm shocked' is what Charlie Sheen playing Charlie from 'Two men and a half' always says with a beer in his hand when his brother does something stupid.
(Comment to me: I have a problem: cannot produce short sentences.)
Here I am playing the dumb thing Vasko and I gave as a present to one crazy dude:
Last night I fell into depression, and called "the telephone of
My call is redirected to Pakistan.
I said that I'm
going to suicide.
They rejoiced and asked me if I can drive heavy trucks
Being stuck with SG Expressbank made electronic transfers impossible, because they didn't work with epay.bg (prohibited) nor did they work with the e-banking software (every recepient has to be registered offline on-site (bank office), and for the ones that are registered the software does not work 🙂 ).
Almost by accident I tested a card I had in epay.bg for the balance (most banks have stopped this service, because of too many requests). And... I got it. It was working. Strange.
I remebered that I had registered the e-banking for that bank and had left the user/pass somewhere.
After a few days of searching I found it. Keep in mind that getting the user/pass from the bank was quite an adventure and took more than 20 days and quite a few trips to the local office.
The login screen is right on the main page of the bank. I was amazed to see how easy the generation of the certificate was. While doing it I saw that they support smart cars (e-signatures). Well done.
The interface is really user friendly. Supports almost everything or at least it seems so. I haven't tried it yet, because the bankaccount is nearly emtpy.
From the interface notifications can be defined: SMS notifications, email notifications. Now I'm waiting to see whether it works.
A minor drawback was that I can't tranfer money to another bank account via epay.bg - I guess only FIB cards can (FIB is connected to epay).
And because I'm lazy to do it the old-fashion way - now I'm using the only possible way to transfer money electronically from SG Expressbank card to the new card I have - the epay's microbill (микросметка) - another thing I have to learn how to use. It was quite straight forward to start up and use, but it takes a few days (in my case 2 full days) to tranfer the money and the commissions are not going to be small.
ant junitreport task creates a html report from junit xml report files.
If the xml files are numerous enough and/or large enough (mine were 102MB total ), the task crashes with OutOfMemoryError.
Solution? set the GLOBAL variable ANT_OPTS. This changes defautl ant conf for the whole machine this setting is on.
Not very nice 🙂
Why can't there be software that just works?!
There's a CVS server (version 1.11.22) [one can get the version with cvs version -d cvs_root] on a Linux machine.
There's a Hudson on the Linux machine that queries the cvs just fine.
I have Hudson on a Windows machine that gives me:
The explanation? Here's the best I could find:
Now check the version of the server I have (in the beginning). So what do we do now?!
Why can't there be software that just works?!
Suppose there's an interface
now suppose there are a lot of classes like
So why did I mention Eclipse in the title:
When you go to the interface and press Ctrl + T on the interface itself you get a list of all the classes like Class1:
But you you press Ctrl + T on the method you get NOTHING:
Eclipse fails to show all the classes that implement this interface and this method.
If you have
and suppose you forgot to put Serializable to MyPictureClass, then guess what: there's no exception. You have to check the data in the DB.
Suppose MyPictureClassis a base abstract class and it is not Serializable. Suppose every inheriting class is Serializable. Then what happens? Well one thing's for sure: there wouldn't be an exception, but there wouldn't be any data in the DB (you'll get null). The runtime checks (in Hibernate) check the signature of the defining class I suppose, not the supplied class at runtime - and I would assume the opposite, because serialization works the opposite way. Maybe it's because Hibernate does some runtime bytecode modifications.
The JPA spec supports primitive types as @Columns. What they don't say (assuming Hibernate is the implementation (maybe TopLink does that too)) is that this column becomes nullable = false and the default value is the default for the primitive type. And that is so, even though the @Column(nullable by default is true.
So watch out.
The new firefox 3.0 (not final yet - rc1 for now) is awesome. Most plug-ins don't work yet, but that changes very rapidly.
The engine itself is unbelievably fast and looks pretty stable - for a few days it crashed only once - trying to start the updater.
Try it, definitely try it. Link.
Update: the RC2 is out. The link points to it.
Another bank that I'm unhappy with - SG Expressbank. Reasons
- They charge me with 0.69 on ATM withdrawal.
- They charge me with 1.39 (monthly fee)
- Interest rate: 0.00
- E banking application - outrageously bad (screws up every file format I request, cannot send money to an account without going to the bank (some security shit), ugly, not intuitive)
- The service is far from good.
I'm looking for a decent bank. Any ideas?
Strangely enough in on of the projects that had to be build I got:
I double checked the script in eclipse. It worked.
Manual call to ant on the eclipse machine also worked.
Then I went to the Hudson machine (a test environment). I ran the script manually. The same freaking error.
I copied the whole dir to another place on the test environment: no problem.
Maybe it's the credentials: added read/write to all. Still the same error.
Then I ran the script with: ant -verbose and see what I got:
Cannot create a process?!
So tired enough I did something desperate:
I went to
and it worked ..... 🙁
Keep in mind that in the same build project I was calling a few other build.xml doing <javac fork="true"
several times before this one.
But this one was the only one having a reference to junit.jar (somewhere on the net I saw an article saying something about junit but don't remember what).
So I left it like this.