Sep 14 2009

Java stuff

Category: TechnicalIuliana @ 18:36

I just got back from a test for a job as Java Developer. This interview has been very confuzing for me. First I did not know that java allowed simple blocks of code inside the class definition. Something like this:

class Test{
{Sytem.out.println(“bla bla”);}
public Test(){}
}

The funny thing is that they are allowed but they ar treated as they were not there. Then what’s the freaking use for these?(I got enlightened :D, read the comments)
The second thing… why would anyone declare an interface as being abstract? Why ? By default an interface is abstract, what the hell was that about? (Trick question… I got tricked… :(  )
Third…though I sudied a month ago a book about J2EE patterns, Bridge pattern was not included.
Conclusion: I totally fucked this test up!


Sep 04 2009

How Windows® actually got its name

Category: Funny,TechnicalIuliana @ 16:55

De aici.


Aug 24 2009

SQL Foreign key role

Category: English posts,TechnicalRpx @ 18:05

Lately I’ve been working with SQL for a project. What concerns me is the utility of the foreign keys for database systems which don’t enforce the integrity of the data entered as key values.

For example, in SQLite, the following code snippets give the exact same result:

create table foo (id INTEGER PRIMARY KEY, str VARCHAR(40));
create table bar (id INTEGER PRIMARY KEY, refId INTEGER, str(VARCHAR(40), FOREIGN KEY (refId) REFERENCES foo(id));
INSERT INTO foo VALUES (‘1’, ‘foo’);
INSERT INTO foo VALUES (‘2’, ‘bar’);
INSERT INTO foo VALUES (‘3’, ‘baz’);
INSERT INTO bar VALUES (‘1’, ‘1’, ‘asdf’);
INSERT INTO bar VALUES (‘2’, ‘4’, ‘qwer’);
SELECT bar.id, foo.str, bar.str FROM bar,foo WHERE bar.refId = foo.id;

create table foo (id INTEGER PRIMARY KEY, str VARCHAR(40));
create table bar (id INTEGER PRIMARY KEY, refId INTEGER, str(VARCHAR(40));
INSERT INTO foo VALUES (‘1’, ‘foo’);
INSERT INTO foo VALUES (‘2’, ‘bar’);
INSERT INTO foo VALUES (‘3’, ‘baz’);
INSERT INTO bar VALUES (‘1’, ‘1’, ‘asdf’);
INSERT INTO bar VALUES (‘2’, ‘4’, ‘qwer’);
SELECT bar.id, foo.str, bar.str FROM bar,foo WHERE bar.refId = foo.id;

The output is:

1|foo|asdf

For an integrity checking DB (like MySQL with InnoDB backend), the line

INSERT INTO bar VALUES (‘2’, ‘4’, ‘qwer’);

would yield an error because the id ‘4’ does not exist in the foo table. But for InnoDB or SQLite it doesn’t.
My question is: In these cases, what is the utility of the foreign keys?


Aug 23 2009

Truly, Madly, Deeply Heartbreaking

Category: English postsIuliana @ 9:08

How can a man write and sing about abuse in such a heavenly way? This song is truly, madly deeply heartbreaking! Too bad there are people in the world that can’t be moved by songs like these and can’t understand the message behind the song.

Tags:


Aug 20 2009

I need help or else…(Fixed! :D )

Category: TechnicalIuliana @ 17:13

So… given the fact that somebody a few days ago asked me to send him some of my projects in a form that he would just run them and see how the work and look I realised that after three and a half yers of programming in java I am still not in control of compiling and achiving class files into working projects. More precisely, I cannot seem to obtain a runnable .jar when external jars are involved. Ok , no problem I cannot do it myself from the command line let Ant do it. I created a clean, compile&jar and a run task. The first two worked just fine. But the run task doesn’t work and screames in red on the Eclipse console the can’t find a class from the external jar. I tried everything, I put that freaking jar in the classpath, copied in the jre/lib/ext/ directory. Nothing seems to work! I’ll put here the structure of my freaking project, my freaking ant file hoping that a developer better than me can offer me a solutin. (I would really love to keep on working with Ant!)

Continue reading “I need help or else…(Fixed! :D )”


Aug 20 2009

Top Favourite Series

Category: English postsIuliana @ 0:02
  1. CSI (Season 10 first episode -24 september 2009)
  2. CSI NY
  3. CSI Miami
  4. Cold Case (Season 7 first episode – 27 september 2009)
  5. Bones (Season 5 first episode – 17 september 2009)
  6. Fringe (Season 2 first episode – 17 september 2009)
  7. Heroes
  8. Supernatural (Season 5 first episode – 10 september 2009)
  9. Terminator(The Sarah Connor Chronicles) –  I really hope they did not cancel it!
  10. Lost
  11. Two and a half men (Season 7 first episode – 21 september 2009)
  12. Smallville

No need to tell me, I know I’m addicted :D

Tags:


Aug 13 2009

Taming KDE4

Category: Miscellaneous,TechnicalRpx @ 16:01

In sfarsit e gata…
Continue reading “Taming KDE4”