Saturday, September 11, 2004
Tuesday, September 07, 2004
synergy makes kvm's pretty useless and unpractical if both your machines have a lan connection... you gotta use it to appreciate how insanely useful this piece of software is... it basically allows you to use one keyboard and mouse on two or more machines... works on unix and windows or a combination of it... even the mouse wheel works... yipee!
work stuff... naming conventions... the stuffs related to persistence was previously named like this:
e.g.
com.thecompany.hb.customers
contains both the interface and the implementation classes... hbm xdoclet generated files follows the same format except that its prefix is hbm, like hbm.thecompany.hb.customers
much to my front end pal's dismay i changed all the package names to follow this convention:
e.g.
com.thecompany.customers
to contain just the pojo and the dao and service interfaces... and for the actual implementation:
e.g.
com.thecompany.customers.hb
at least my co-developers will only need to worry about the interfaces and let me worry with the implementation... which is newly migrated to hibernate for now... but will likely try a jdo implementation in the near future...
spring framework is really doing a great job of supporting structures like this... and i can try varied implementations without driving my co-developers insane... also our discussions would be centered on services and dao's in a much more abstract way... shielding them away from the implementation and likewise do things in parallel based on assumptions... this also allows me to junit test the implementation as much as i want... the previous ejb cmp/cmr implementation was such a pain to test...
on hibernate... using the postgres sequence with it was not clearly documented... or it took me a good deal of google time to find out...
for example you have a sequence and a table like this:
create sequence customer_id_seq;
and you have a table like so:
create table customers (
id integer DEFAULT nextval('customer_id_seq') NOT NULL,
name varchar(20),
address varchar(5),
constraint custumers_pk primary key (id)
);
the correct xdocletized pojo class would be:
/**
* @hibernate.class table="customers"
*
**/
public class Customer {
// primary key field
private java.lang.Long id;
// other fields
private java.lang.String name;
private java.lang.String address;
// eclipse's generate getters and setters...
// here is the correct xdoclet tag to be able to use the
// postgres sequence
/**
* @return Returns the id.
*
* @hibernate.id generator-class="sequence"
*
* @hibernate.generator-param name="sequence" value="customer_id_seq"
**/
public java.lang.Long getId() {
return id;
}
// other getters and setters here....
...
}
there... hope this could be of help to anyone who wants to get his sequences to work with hibernate and is using xdoclet to generate the mapping files...
change topic... firefox crashes evertime i visit a flash enabled site... reinstalling and upgrading doesnt help... cant pinpoint if the problem is gentoo, xorg or linux specific...
e.g.
com.thecompany.hb.customers
contains both the interface and the implementation classes... hbm xdoclet generated files follows the same format except that its prefix is hbm, like hbm.thecompany.hb.customers
much to my front end pal's dismay i changed all the package names to follow this convention:
e.g.
com.thecompany.customers
to contain just the pojo and the dao and service interfaces... and for the actual implementation:
e.g.
com.thecompany.customers.hb
at least my co-developers will only need to worry about the interfaces and let me worry with the implementation... which is newly migrated to hibernate for now... but will likely try a jdo implementation in the near future...
spring framework is really doing a great job of supporting structures like this... and i can try varied implementations without driving my co-developers insane... also our discussions would be centered on services and dao's in a much more abstract way... shielding them away from the implementation and likewise do things in parallel based on assumptions... this also allows me to junit test the implementation as much as i want... the previous ejb cmp/cmr implementation was such a pain to test...
on hibernate... using the postgres sequence with it was not clearly documented... or it took me a good deal of google time to find out...
for example you have a sequence and a table like this:
create sequence customer_id_seq;
and you have a table like so:
create table customers (
id integer DEFAULT nextval('customer_id_seq') NOT NULL,
name varchar(20),
address varchar(5),
constraint custumers_pk primary key (id)
);
the correct xdocletized pojo class would be:
/**
* @hibernate.class table="customers"
*
**/
public class Customer {
// primary key field
private java.lang.Long id;
// other fields
private java.lang.String name;
private java.lang.String address;
// eclipse's generate getters and setters...
// here is the correct xdoclet tag to be able to use the
// postgres sequence
/**
* @return Returns the id.
*
* @hibernate.id generator-class="sequence"
*
* @hibernate.generator-param name="sequence" value="customer_id_seq"
**/
public java.lang.Long getId() {
return id;
}
// other getters and setters here....
...
}
there... hope this could be of help to anyone who wants to get his sequences to work with hibernate and is using xdoclet to generate the mapping files...
change topic... firefox crashes evertime i visit a flash enabled site... reinstalling and upgrading doesnt help... cant pinpoint if the problem is gentoo, xorg or linux specific...
life goes by pretty fast... rojan is turning three and gabriel is almost a month old now... gabriel, is now my coding companion... he wakes up at around 2am, just in time to remind me i need to get a break away from the keyboard and cuddle him for a while... rojan is now getting really interested on books and would argue if your telling the story the wrong way... hehehe...
seriously need a good computer chair for the home office setup... good back support is a must... should allow me to lean back safely to support both gabriel and me... and to withstand being pushed around the room by an almost 3 year old kid..
last song syndrome: shake yer head by the eraserheads... brings back fond memories of those years when am young and naive... *sigh*... its nice to be born upside down...
seriously need a good computer chair for the home office setup... good back support is a must... should allow me to lean back safely to support both gabriel and me... and to withstand being pushed around the room by an almost 3 year old kid..
last song syndrome: shake yer head by the eraserheads... brings back fond memories of those years when am young and naive... *sigh*... its nice to be born upside down...
Wednesday, September 01, 2004
Tuesday, August 31, 2004
the weather is gloomy... i feel gloomy... my spirit dampened... the price of working in IT... everything is a blur... everything is volatile... nothing is contstant... i worry not for myself, come to think i never worry for myself nowadays... its always for my loved ones, my children specially...
rain, rain... go away... come again another day...
rain, rain... go away... come again another day...
seriously reading effective java now... man, this book rocks! geez even my iterator drill is lame... as the book points out using while for iterators is a no-no, for loops is better and more efficient... at least my being stubborn of insisting separating those layers is paying off... i can do a lot of fine tuning and unit testing of the business logic without giving the front end dev a lot of headache...
its raining cats and dogs outside... time to drink some coffee...
its raining cats and dogs outside... time to drink some coffee...
Monday, August 30, 2004
also been hacking this hal+dbus based applet to use static ip addresses for a while. the current gnome cvs version doesnt allow for static ip's and Ad-Hoc wlan mode...
of course, since am a gnome coding newbie, the end result was the network applet having hard coded values... but it *somehow* works...
of course, since am a gnome coding newbie, the end result was the network applet having hard coded values... but it *somehow* works...
Sunday, August 29, 2004
as a result of my frustration with firefox sage plugin and gnome straw (gentoo build doesnt compile cleanly) for rss feeds, i downloaded the planet aggregator python app to have a local version of mig's pinoytechscene... a few minutes of configuring planet and pixel pushing with gimp resulted to this (click on the link get a bigger picture):
i'll try to find the wackiest pictures of those people in the list and create hackergocthi versions of their heads soon ;)...
i'll try to find the wackiest pictures of those people in the list and create hackergocthi versions of their heads soon ;)...
Tuesday, August 24, 2004
distcc: a fast, free distributed C/C compiler... i should have configured this first before attempting to build openoffice-ximian... i had these working nicely on the fbsd servers... i wonder if it would be possible to use those distcc with gentoo... hmmn...
substring evilness... i wanted to produce serial numbers of uniform length for the index (5 characters)... this is my lame solution...
the inner loop:
this produces padded serial numbesr e.g. 00001, 03450. certainly not optimal... but will do for now ;)
this obviously limits the number of entities to 99999... converting to hex would increase the limit a bit, but the printer guys argued its too much of a hassle to check the correct sequences since its still done manually... ok, so be it...
the inner loop:
int serialIndex = 100000 + index;
String serial = serialPrefix + String.valueOf(serialIndex).substring(1);
this produces padded serial numbesr e.g. 00001, 03450. certainly not optimal... but will do for now ;)
this obviously limits the number of entities to 99999... converting to hex would increase the limit a bit, but the printer guys argued its too much of a hassle to check the correct sequences since its still done manually... ok, so be it...
Monday, August 23, 2004
>> eRadioPortal.com : Welcome to the Digital Age <<.... the nu 107.5 stream rocks... kudos to the totem developers for making it possible to do this in unix... btw, realplayer 10 for linux is also out and totally loving it...
FreeBSD/i386 5.3-BETA1... hopefully 5.3 stable will come out soon... a lot has been done on the acpi front (hopefully this fixes the X issues i encountered)... acpi_asus has been added to the kernel...
am currently happy with gentoo for the degatto... but i still miss freebsd's way of configuring the kernel via a single text file and how trivial it is to test new kernels as opposed to linux make menuconfig or its make config... also freebsd's new ULE scheduler will certainly be able to provide a more repsonsive desktop/server environment... if this is indeed what will be tagged as teh stable branch, i'll set aside time to test this out...
am currently happy with gentoo for the degatto... but i still miss freebsd's way of configuring the kernel via a single text file and how trivial it is to test new kernels as opposed to linux make menuconfig or its make config... also freebsd's new ULE scheduler will certainly be able to provide a more repsonsive desktop/server environment... if this is indeed what will be tagged as teh stable branch, i'll set aside time to test this out...
XStream, looks slicker than xom... i wonder how this compares to betwixt... i've been looking for a POJO<->XML converter for sometime now...
Sunday, August 22, 2004
woke up early, in the mood to do work... had a great weekend with the family as well as completely happy with the outcome of last saturdays meeting...
meanwhile...
dude, i cant afford your fee for now (even if i do eventually paypal wont let me)... but i direly need your viPlugin. please reconsider releasing an eclipse 3 compatible version for free... all i want is basic navigation and cut-copy-paste-delete functionality... throw in a few search and replace functions if your feeling kind ;)... *hikbi* i swear by my aching hands that i'll put a thank you note on all the files i create using your plugin...
meanwhile...
dude, i cant afford your fee for now (even if i do eventually paypal wont let me)... but i direly need your viPlugin. please reconsider releasing an eclipse 3 compatible version for free... all i want is basic navigation and cut-copy-paste-delete functionality... throw in a few search and replace functions if your feeling kind ;)... *hikbi* i swear by my aching hands that i'll put a thank you note on all the files i create using your plugin...
Thursday, August 19, 2004
2Checkout.com - credit card processing / merchant account alternative... hopefully this fits into one of my client's requirements...
Subscribe to:
Posts (Atom)