Time |
S |
Nick |
Message |
00:04 |
|
|
caverdude joined ##javaee |
00:32 |
|
|
caverdude joined ##javaee |
01:27 |
|
|
SoniEx2 joined ##javaee |
01:31 |
|
|
sfisque joined ##javaee |
01:32 |
|
|
sfisque1 joined ##javaee |
02:00 |
|
|
cavemanlg joined ##javaee |
02:17 |
|
|
caverdude joined ##javaee |
02:50 |
|
|
cavemanlg joined ##javaee |
03:01 |
|
|
caverdude joined ##javaee |
03:09 |
|
|
cavemanlg joined ##javaee |
03:15 |
|
|
mbc joined ##javaee |
03:25 |
|
|
caverdude joined ##javaee |
04:14 |
|
|
cavemanlg joined ##javaee |
04:17 |
|
|
caverdude joined ##javaee |
04:33 |
|
|
caverdude joined ##javaee |
04:48 |
|
|
caverdude joined ##javaee |
05:02 |
|
|
philbot joined ##javaee |
05:02 |
|
|
Topic for ##javaee is now Java (general & all kinds of) and Java Enterprise Edition (Java EE) discussion. | logs at http://irclog.greptilian.com/javaee/today. We are a bit more friendly, you may keep silence as a response but you have no right to insult/abuse a person in any case. |
05:18 |
|
|
philbot joined ##javaee |
05:18 |
|
|
Topic for ##javaee is now Java (general & all kinds of) and Java Enterprise Edition (Java EE) discussion. | logs at http://irclog.greptilian.com/javaee/today. We are a bit more friendly, you may keep silence as a response but you have no right to insult/abuse a person in any case. |
06:19 |
|
|
gurgus joined ##javaee |
06:19 |
|
|
gurgus left ##javaee |
07:52 |
|
|
xll11 joined ##javaee |
07:52 |
|
xll11 |
howdy |
10:02 |
|
pdurbin |
xll11: what's new? |
13:27 |
|
|
Naros joined ##javaee |
14:21 |
|
|
SoniEx2|2 joined ##javaee |
15:13 |
|
|
kobain joined ##javaee |
15:47 |
|
|
whartung joined ##javaee |
16:09 |
|
|
Quest joined ##javaee |
16:23 |
|
|
sfisque joined ##javaee |
16:25 |
|
|
mbc joined ##javaee |
16:33 |
|
|
mbc joined ##javaee |
16:41 |
|
|
mbc joined ##javaee |
17:05 |
|
|
mbc joined ##javaee |
17:18 |
|
|
mbc joined ##javaee |
17:27 |
|
|
mbc joined ##javaee |
17:36 |
|
sfisque |
got an interesting thing i'm tracking down in our product. it appears that somewhere between the servlet filtering and our controller layer, there is something going wrong that causes our controller's PostConstruct method to get executed 5 times (which should not be) even though the bean is annotated SessionScoped. |
17:36 |
|
sfisque |
anyone encounter something like this? |
17:37 |
|
sfisque |
platform is glassfish 3.1.2.2 with bundled mojarra (2.1.6) |
17:42 |
|
whartung |
wow |
17:43 |
|
whartung |
for the same object? |
17:44 |
|
sfisque |
yah. we had someone refactor a bunch of stuff from ManagedBean -> CDI @Named, and i'm thinking that might be causing some wierd interplay. so i'm doing an svn revert and see if the problem existed prior to his commit. if so, i'm going to have to do some forensics deep into the JSF layer, which i'm not relishing |
17:44 |
|
whartung |
yea |
17:44 |
|
whartung |
I've no real experience with JSF or CDI |
17:45 |
|
sfisque |
i know there is documented "wierdness" with mixing JSF with CDI but i've not seen this specific behavior discussed |
17:45 |
|
sfisque |
well, more specifically mixing ManagedBean and @Named |
17:46 |
|
sfisque |
i wish this guy did more analysis before doing such a large commit. especially since the regression footprint was rather large |
18:10 |
|
sfisque |
well there went that theory. the rollback build still executes the postconstruct method 5x. which means the problem has been lying undiscovered for at least a few weeks. /sigh |
18:11 |
|
* sfisque |
rolls up sleeves and puts on the deep forensics gloves... |
18:14 |
|
whartung |
grab the light and caving helmet |
18:15 |
|
* sfisque |
gives whartung a wink before grabbing the helmet, lantern, and a good sharp weapon... |
18:15 |
|
whartung |
"It's dark here. You are likely to be eaten by a Grue." |
18:16 |
|
sfisque |
lolz |
18:16 |
|
sfisque |
XYZZY!!! |
18:16 |
|
sfisque |
take gazebo |
18:16 |
|
sfisque |
"not bloody likely" |
18:16 |
|
whartung |
heh |
18:19 |
|
sfisque |
time for commute. cuiab. code strong! |
18:50 |
|
xll11 |
man I'm so frustrated, I really want to know at what level of knowledge I should be looking for a student job |
18:51 |
|
xll11 |
I really have motivation to learn, I love coding |
18:51 |
|
xll11 |
I love knowledge |
18:51 |
|
xll11 |
but I don't know if I'm qualified enough for entry level |
18:51 |
|
xll11 |
:() |
18:51 |
|
xll11 |
Can you guys supply me with some useful tips/insights regarding to my siutation |
19:14 |
|
|
kruszynka joined ##javaee |
19:22 |
|
Naros |
xll11: a lot of times it's easier to transition from a tester/QA to coder |
19:23 |
|
Naros |
but if you want to dive into coding, entry level coders need to have basic understanding of the language and it's constructs |
19:24 |
|
Naros |
ie: what's the benefit of using an iterator over a collection rather than looping based on some scalar index |
19:25 |
|
Naros |
a lot of entry level jobs give u some OJT on their own practices and sandboxes to play & learn. |
19:27 |
|
|
caverdude joined ##javaee |
19:32 |
|
whartung |
if it's a student job they should shave low expectations |
19:33 |
|
whartung |
the problem today is that you need to know more that "java". You need to know the language, an IDE, the build process, and some stack of functionality (JEE in this case), a bunch of libraries, etc. |
19:33 |
|
whartung |
it's so little about actually coding now |
19:35 |
|
xll11 |
I appreciate the input! any skill that is very mandatory to have? |
19:35 |
|
xll11 |
also, what is the advtantage of using iterators over scalar pointer? |
19:35 |
|
xll11 |
Out of bound avoidance comes to midn |
19:35 |
|
Naros |
iterator.remove() :P |
19:36 |
|
whartung |
you mean: for(String s : stringArray) { .. } vs for(int i = 0; i < stringArray.length; i++) { String s = stringArray[i]; … } ? |
19:36 |
|
Naros |
I was always asked that question and most of the interviewers expected you to say something to the affect of removing objects from the collection via iterator was more accceptable. |
19:36 |
|
Naros |
whartung: no |
19:36 |
|
xll11 |
Oh, thats a fine idea |
19:37 |
|
Naros |
for(int i = 0; i < collection.size(); ++i) { /* remove object based on criteria */ } |
19:37 |
|
xll11 |
Thanks for the tip, naros |
19:37 |
|
whartung |
yea, iterator.remove is probably the primary benefit. |
19:38 |
|
Naros |
I'd argue it's probably more efficient than testing scalar against size of collection too |
19:38 |
|
Naros |
where tight performance in a loop is critical |
19:38 |
|
whartung |
then don't do that :) |
19:38 |
|
Naros |
aye, the new construct you showed is another alternative :P |
19:39 |
|
Naros |
effectively an iterator under the scenes iirc. |
19:39 |
|
whartung |
it helps that the iterator delegates access to the collection, rather than the assumption that col.get(i) is actually efficient. |
19:39 |
|
Naros |
hehe, yep |
19:40 |
|
Naros |
But interview questions are so much more complicated these days than 15 years ago |
19:40 |
|
Naros |
hehe, speaking of loops :/ |
19:40 |
|
whartung |
yea |
19:41 |
|
Naros |
one of my jsps does a triple inner loop and sucks |
19:41 |
|
Naros |
gotta fix it LOL |
19:41 |
|
whartung |
:) |
19:41 |
|
whartung |
start running out of letters.. |
19:41 |
|
Naros |
that stuff runs fine on server side action/controllers but not in JSPs |
19:41 |
|
whartung |
for (i … for (j … for (k ... |
19:41 |
|
whartung |
is it the <c:forEach tag? |
19:41 |
|
Naros |
It's sad that taglibs are so inefficient in loops |
19:41 |
|
Naros |
nah; it's struts2 iterator tags |
19:42 |
|
whartung |
omg |
19:42 |
|
Naros |
<s:iterator value="x"><s:iterator value="y"><s:iterator value="z"></s:iterator></s:iterator></s:iterator> |
19:42 |
|
whartung |
how does the struts tag differ from c:forEach |
19:42 |
|
Naros |
afaik it really doesn't except struts uses a valuestack concept for objects rather than the page context directly. |
19:43 |
|
Naros |
but when you have nesed tags inside iterators with nested iterators with nested tags inside those, performance sucks |
19:44 |
|
Naros |
To show the last 5 years of usage data for a material (basically 13x5 grid) takes 21 seconds |
19:44 |
|
Naros |
and that's just on the JSP execution phase. |
19:45 |
|
Naros |
IDK if it's Jasper that is slow or what. |
19:47 |
|
whartung |
gah..guh..geep... |
19:47 |
|
whartung |
"unacceptable" :) |
19:48 |
|
Naros |
yah, if render takes more than 300ms, it's unacceptable. |
19:48 |
|
whartung |
see i'd at least make that a custom tag file and I'd do it in java wrapped by the tag file |
19:48 |
|
Naros |
Aye or just have the controller prep the data in a bean that can easily be streamed in the JSP without all the iterators. |
19:48 |
|
whartung |
right |
19:49 |
|
whartung |
that's a silly number |
19:49 |
|
whartung |
21s for 65 cells... |
19:49 |
|
Naros |
Aye, I've noticed that displaytag 1.2 and some of the struts2 tags are inefficient |
19:49 |
|
whartung |
so what is this value stack from struts? |
19:49 |
|
Naros |
particularly if the tags have nested tags which it must evaluate |
19:50 |
|
whartung |
yea |
19:50 |
|
Naros |
http://www.tutorialspoint.com/struts_2/struts_value_stack_ognl.htm |
19:50 |
|
Naros |
It's based on OGNL |
19:51 |
|
whartung |
we use stripes, the stripes guys absndoned OGNL due to performance -- but that was so long ago. |
19:51 |
|
Naros |
The stack allows you to find a value and it does a top down lookup |
19:51 |
|
whartung |
I don't see how it's any different from EL :) |
19:51 |
|
whartung |
it has it's own stack with the scopes it searched. |
19:52 |
|
Naros |
nod |
19:52 |
|
Naros |
We've used strings since like 1.1 or 1.2 here and never really noticed it until lately with some of our more complicated screens. |
19:53 |
|
Naros |
Displaytag's taglib isn't very efficient either when the columns contain nested content rather than using properties & decorators. |
19:53 |
|
whartung |
see, I wonder if <s:property value="name"/> is dramatically slower then ${name} |
19:54 |
|
Naros |
good question, idk. |
19:54 |
|
whartung |
I would think it is simply because the call mechanism of a tag is heavier than EL. |
19:56 |
|
Naros |
Most likely. |
20:16 |
|
|
sfisque joined ##javaee |
20:30 |
|
|
Quest joined ##javaee |
20:31 |
|
* Quest |
is back after some days of inactivity. missed friends :) |
20:31 |
|
Quest |
quite room. well new rooms are. |
20:36 |
|
sfisque |
it's actually been sporadically lively |
20:36 |
|
sfisque |
i think i found a whopper of a feature in the javaee platform. details to come after i run more tests |
20:50 |
|
Quest |
hm.. |
20:50 |
|
Quest |
whopper ? sfisque |
20:50 |
|
Quest |
you mean a bug? |
20:50 |
|
sfisque |
not sure if it's a "bug" or a "feature" , still testing |
20:51 |
|
whartung |
I'm all tingly in anticipation |
20:51 |
|
Quest |
hm. I was think some thing similar. machines dont make mistakes but are not intelligent. they cant think. humans are opposite. so bugs are normal in apps |
20:57 |
|
sfisque |
basically depending on how testing plays out, it's either a "hole" in the spec, or "undesirable outcome" in the implementation |
20:57 |
|
Naros |
hehe, bugs are features just waiting to be loved |
20:58 |
|
sfisque |
"loved" |
20:58 |
|
sfisque |
:P |
21:04 |
|
|
caverdude joined ##javaee |
21:07 |
|
caverdude |
well, I got eclipse working with my github account, setup a project and pushed the source up to github |
21:07 |
|
sfisque |
yay |
21:07 |
|
caverdude |
next I need to start two phone projects and do the same |
21:07 |
|
caverdude |
these are private projects |
21:07 |
|
caverdude |
I hear bitbucket is good too |
21:07 |
|
caverdude |
I may get a bitbucket account |
21:07 |
|
|
Quest joined ##javaee |
21:08 |
|
caverdude |
I'm almost ready to release version 3 of http://www.sf.net/p/javaledger |
21:08 |
|
caverdude |
but my phone app will be an editor for two xml files.. journal.xml and accounts.xml |
21:08 |
|
caverdude |
javaledger at this point will use those two to generate reports |
21:09 |
|
caverdude |
later the phone app may use the javaledger project to generate html and csv reports |
21:09 |
|
caverdude |
csv for spreadsheets |
21:09 |
|
caverdude |
html for browser on phone |
21:10 |
|
caverdude |
the phone app itself may even be able to browse the html it generates |
21:10 |
|
caverdude |
I'm going to put a basic version of the phone app up for free on google play for general accounting puposes |
21:10 |
|
caverdude |
purposes |
21:11 |
|
sfisque |
why? every smart phone has a browser built in. in a "constrained env" you should be leveraging solved problems |
21:11 |
|
caverdude |
then workon a specialized one for truckers |
21:11 |
|
sfisque |
re: able to browse the html it generates |
21:11 |
|
Guest12288 |
why dont just use html based GUi |
21:11 |
|
caverdude |
sure, I'm saying the app would browse the html instead of bringing up the browser |
21:11 |
|
Guest12288 |
it works on all plateforms |
21:11 |
|
caverdude |
but sure I will probably do that first to keep things simple |
21:12 |
|
caverdude |
ya |
21:12 |
|
sfisque |
seems counter productive. just sublaunch the built in browser |
21:12 |
|
whartung |
he just going to embed the web viewer in to his app |
21:12 |
|
caverdude |
well android api is android specific for some thigns |
21:12 |
|
sfisque |
and let's face it, html5 is not as "x platform" as they make it out to be |
21:12 |
|
sfisque |
same promises as html4, same failures |
21:13 |
|
Guest97266 |
well javascript / jquery will solve much of the problems with some basic css. to produce a gui that can run on any platform. |
21:13 |
|
caverdude |
well I'm not worried about running my app on an iphone |
21:14 |
|
sfisque |
well, that's the hype. i've yet to see that materialize. our designer wrestles with that every day |
21:14 |
|
caverdude |
maybe I should be but I'm not |
21:14 |
|
Quest |
I have really left JavaFx / swing or android (else than andoid apps) and moved to web based apps |
21:14 |
|
Quest |
caverdude, then whats the problem |
21:14 |
|
caverdude |
well thats one way to go too that I may do later on along with the phone app |
21:15 |
|
caverdude |
but I will have to maintain a server for that |
21:15 |
|
caverdude |
no problem, just talking |
21:15 |
|
Quest |
caverdude, where do you put your data? |
21:15 |
|
Quest |
no need for server |
21:15 |
|
caverdude |
quest with the phone app on the phone |
21:15 |
|
caverdude |
on the sd card or wherever |
21:15 |
|
Quest |
where are the accounts data and chart of acounts etc. book entries |
21:15 |
|
sfisque |
aye, android has an embedded sql db |
21:16 |
|
sfisque |
in the api |
21:16 |
|
Quest |
caverdude, i mean in what form? database, xml, files? |
21:16 |
|
caverdude |
Quest, well the xml files can be emailed to a desktop |
21:16 |
|
sfisque |
and you can "roll your own" with random access flat files |
21:16 |
|
caverdude |
or the user can use some sync tool |
21:16 |
|
Quest |
sfisque, yes. |
21:16 |
|
caverdude |
Quest, right now I have a report generator on desktop |
21:17 |
|
caverdude |
but with csv the data could be imported into a spreadsheet |
21:17 |
|
Quest |
caverdude, just tell me one thing. where is your all data? and what platforms do you target (even at extension of app) |
21:17 |
|
caverdude |
all data is in a single xml file journal.xml |
21:17 |
|
caverdude |
and accounts.xml |
21:17 |
|
Quest |
hm. platforms? |
21:17 |
|
whartung |
the data remains on the device |
21:17 |
|
caverdude |
so 2 xml files |
21:18 |
|
caverdude |
what do you mean platforms? |
21:18 |
|
caverdude |
just android and windows and linux and osx |
21:18 |
|
Quest |
caverdude, for what is the app for. pc, android, iphone, ? |
21:18 |
|
sfisque |
i think he's asking if its "android", ios, etc. |
21:18 |
|
caverdude |
android |
21:18 |
|
sfisque |
aye, what he said |
21:18 |
|
caverdude |
pc/android |
21:18 |
|
caverdude |
sorry |
21:19 |
|
Quest |
caverdude, you can use jQuery based web based UI. all the other things can remain as such as you already have (javascript / jquery can talk to databases and xml files) |
21:19 |
|
Quest |
caverdude, java can talk to xml files too |
21:19 |
|
caverdude |
sure if I want to maintain a server |
21:19 |
|
Quest |
the choice is yours |
21:19 |
|
Quest |
no |
21:20 |
|
Quest |
caverdude, you dont need to have a server. let javascript talk to .xml files |
21:20 |
|
caverdude |
oh, for iphone app |
21:20 |
|
Quest |
same |
21:20 |
|
Quest |
javascript runs on iphone ,android, mac, pc |
21:20 |
|
caverdude |
ya well, I'm not interested in getting that far away from Java alone right now |
21:20 |
|
sfisque |
you still need a process on the server doing r/w, regardless of whether it's smb, http, direct socket, etc |
21:20 |
|
caverdude |
so iphone users suffer but |
21:21 |
|
Quest |
sfisque, that proces can be java based |
21:21 |
|
Quest |
caverdude, ^ |
21:21 |
|
caverdude |
I don't see what you are getting at |
21:21 |
|
caverdude |
why? |
21:21 |
|
Quest |
caverdude, you can do that with java alone. the business logic. all i meant was to make javascript/html take care of view part |
21:21 |
|
caverdude |
I'm not interested in iphone |
21:21 |
|
sfisque |
aye but he's saying he doesnt want to support a server for now. no matter how you slice it, if you centralize the file handling you need a process running on a server |
21:22 |
|
caverdude |
sfisque, right |
21:22 |
|
caverdude |
or write some server software they can run on their pc |
21:22 |
|
caverdude |
if hey choose |
21:22 |
|
caverdude |
which I don't want to mess with either |
21:23 |
|
Quest |
you would only need a server if you run jsp / servlets. that you dont need |
21:23 |
|
Quest |
caverdude, the app you already have would do what its already doing. |
21:23 |
|
sfisque |
though, i will say for the record, if you leverage the embedded sql db, it would allow you to scale out to a client/server with less refactor. |
21:23 |
|
caverdude |
Quest, ok I guess I sortof see what you are getting at, you are only talking about the view part |
21:23 |
|
Quest |
all i meant is that make the view part go with webpages |
21:23 |
|
caverdude |
but all I need for that is html |
21:23 |
|
Quest |
as every platform has a browser |
21:24 |
|
Quest |
i thought the problem was the view part? |
21:24 |
|
whartung |
you can do standalone web apps on the iphone |
21:24 |
|
caverdude |
I think I don't care about iphone because they didn't care about Java so **** them |
21:24 |
|
Quest |
caverdude, and by the way. for an accounts app. i would never recomend .xml. a small database shoould be used |
21:25 |
|
* Quest |
agrees with whartung |
21:25 |
|
caverdude |
naw there is no problem I was just talking about what I was working on |
21:25 |
|
sfisque |
lol, caverdude (re: iphone and java) /grin |
21:25 |
|
caverdude |
quest, basic accouning is pretty darn simple |
21:25 |
|
Quest |
caverdude, do you intend to sell this ap? |
21:25 |
|
Quest |
caverdude, huge data will not make it simple |
21:26 |
|
caverdude |
quest possibly yes |
21:26 |
|
Quest |
I would just make a web server then............... |
21:26 |
|
caverdude |
a trucker version |
21:26 |
|
Quest |
or make each version of app for the specific platform. |
21:26 |
|
caverdude |
well hell it depends on the scale |
21:26 |
|
caverdude |
you can say that about any app |
21:26 |
|
Quest |
built in db for android. postgres for pc and mac |
21:26 |
|
whartung |
the trucker version should shave a pr0n easter eg. |
21:26 |
|
caverdude |
yes true my app may not be bought by corporations but I'm not targeting them |
21:26 |
|
whartung |
*have |
21:27 |
|
caverdude |
ha |
21:27 |
|
* Quest |
needs to go |
21:27 |
|
caverdude |
xml is working just fine for small scale stuff like home accounting for someone like a trucker |
21:28 |
|
Naros |
whartung: the issue with performance was because devMode=true, which forces a lot of reloading of things and debug mode internally in the framework. |
21:28 |
|
caverdude |
now however i have not tried to process the file on a phone yet so, only on my netbook |
21:28 |
|
whartung |
not sure what you're referring to Naros |
21:28 |
|
Naros |
setting devMode=false, performance is near equal to that of EL expressions. |
21:28 |
|
whartung |
which issue? |
21:28 |
|
whartung |
oh |
21:28 |
|
whartung |
OGNL |
21:28 |
|
whartung |
doh |
21:28 |
|
Naros |
Yah :P |
21:28 |
|
whartung |
oh good |
21:29 |
|
whartung |
so you found the GO FAST switch |
21:29 |
|
Naros |
I forgot I had it set to devMode cause it allows me to avoid unnecessary restarts for property file changes and hotswapping of java resources. |
21:29 |
|
Naros |
so yah, found the turbo switch |
21:29 |
|
whartung |
nice |
21:29 |
|
whartung |
heh |
21:29 |
|
whartung |
I remember turbo switches |
21:30 |
|
Naros |
same on my old 286 |
21:30 |
|
Naros |
when cases were made out of real metal |
21:31 |
|
whartung |
we had fun trying to play some games on our "new" 286 (12 MHz!!! ) |
21:31 |
|
Naros |
that thing weighed like 50lbs easy. |
21:31 |
|
whartung |
we used to cart around a full tower 486-66Mhz to do demos. We were able to convince the clients to supply a monitor however :) |
21:31 |
|
Naros |
I believe my father still has that old thing too, runs some crazy MSDOS-based BBS on it or some such with a modem :) |
21:31 |
|
caverdude |
my first pc was a 486-66mhz |
21:31 |
|
caverdude |
build it myself from parts |
21:32 |
|
whartung |
speaking of trucker pr0n... |
21:32 |
|
Naros |
lawlz, a 486 :o |
21:32 |
|
Naros |
those were super-computers compared to the 286s and 8086s |
21:32 |
|
caverdude |
maybe 486-dx66 |
21:32 |
|
caverdude |
paid $200 for 8 gigs of ram |
21:32 |
|
Naros |
The old Com64s :P |
21:32 |
|
sfisque |
first computer == ti99-4a with a WHOPPING 16k of memory and a tape drive |
21:32 |
|
caverdude |
:) I grew up on c64 |
21:32 |
|
Naros |
You mean 8 mb of ram? |
21:33 |
|
whartung |
yea, no kidding |
21:33 |
|
caverdude |
lol yup 8 megs sorry |
21:33 |
|
caverdude |
now I feel like Scotty in star trek when he said "I can't believe I've traveled millions and millions of miles. " bones "100's 1000's" |
21:33 |
|
Naros |
hehe, I remember going out and buying an 8-disc cd changer for my desktop back in the day. The cable to the PC was thicker than a power cable :O |
21:34 |
|
sfisque |
oh man, no doubt. scsi? |
21:34 |
|
Naros |
yah |
21:34 |
|
whartung |
I was giddy when I got my 120MB drive for under a $1/meg |
21:34 |
|
sfisque |
yah scsi was terrific, except for the fraggin cables |
21:34 |
|
Naros |
I had a SCSI flat-bed scanner too |
21:35 |
|
Naros |
now those things are integrated into printer/fax machines lol |
21:35 |
|
sfisque |
i know. it's hilarious how the tech has become "invisible" |
21:35 |
|
caverdude |
I wonder if anyone makes a modem anymore |
21:35 |
|
caverdude |
ha |
21:36 |
|
caverdude |
I'm sure they do of course for faxing and phone systems |
21:36 |
|
Naros |
When I got out of college, went to work for Bank of America and it drove me crazy that even then with all the technology, they still used green screen mainframes |
21:36 |
|
sfisque |
oh yah, you can get usb thumb modems. |
21:36 |
|
caverdude |
ya |
21:36 |
|
sfisque |
they're TINY |
21:36 |
|
Naros |
AS400 :/ |
21:36 |
|
sfisque |
i think the RJ11 connector is bigger than the on board circuitry |
21:36 |
|
sfisque |
eeewwwwww as400 |
21:36 |
|
caverdude |
government has gone to terminal sofware and still use cobol apps from 40 years ago |
21:36 |
|
whartung |
as400s are amazing. |
21:36 |
|
sfisque |
wells fargo still uses them |
21:37 |
|
whartung |
they're not pretty, but really amazing machines |
21:37 |
|
whartung |
they're not dead for a reason |
21:37 |
|
sfisque |
yah, except for the doc's. ibm couldnt document a 123's book if they wanted too |
21:37 |
|
Naros |
rofl |
21:37 |
|
whartung |
yea |
21:37 |
|
caverdude |
well, I think we should still be able to buy any scale computer we want, if you want 8 bit you should be able to get it, 16 bit, 32 bit 64 bit |
21:37 |
|
sfisque |
you can. e m u l a t i o n |
21:38 |
|
sfisque |
you can run a appleiie or a commie64 anytime you want |
21:38 |
|
sfisque |
or similar |
21:38 |
|
Naros |
Just isn't the same tho |
21:38 |
|
Naros |
Need those big loud keyboard keys |
21:38 |
|
Naros |
No mouse |
21:38 |
|
sfisque |
well, yah. i know you lose the "viceral" feel |
21:39 |
|
Naros |
god I'm old :o |
21:39 |
|
|
cavemanlg joined ##javaee |
21:39 |
|
* sfisque |
feels your pain :P |
21:40 |
|
Naros |
Ouch, Quest and this is why you must be careful with your ORM object graphics :o |
21:40 |
|
whartung |
you can hang out at 6502.org if you want to build a 6502 based micro computer |
21:40 |
|
cavemanlg |
ok cool |
21:40 |
|
Naros |
13 left outer joins and 2 inner joins on a table |
21:41 |
|
Quest |
Naros, hi :) |
21:41 |
|
Quest |
Naros, sorry what did you meant? |
21:41 |
|
Naros |
I have a query that runs and because of all the @ManyToOne relationships on an object, it's doing EAGER loads in Hibernate of 13 left outer joins and 2 inner joins |
21:41 |
|
sfisque |
i wonder how small they could shrink the entire hardware of a IIe (updating where appropriate of course because who even makes 5.25 floppy drives anymore) |
21:41 |
|
sfisque |
ACK! |
21:42 |
|
Naros |
Rule of the story: Be careful of your @ManyToOne mappings :P |
21:42 |
|
sfisque |
that's a lot of eagerness. |
21:42 |
|
sfisque |
give that object graph less caffiene |
21:42 |
|
Naros |
sfisque: sad part is the view doesn't use any of those fields either. |
21:42 |
|
sfisque |
Tuple<> is your friend |
21:42 |
|
Naros |
the final output is an aggregate |
21:43 |
|
Naros |
idk what the hell I was smokin when I wrote this code |
21:43 |
|
sfisque |
must have been good, please share :P |
21:43 |
|
whartung |
what do you mean "Tuple<> is your friend" sfisque |
21:43 |
|
sfisque |
in stead of trusting the graph walk, cull it down to the bare minimum needed to answer the question and pull back a Tuple of what's needed |
21:44 |
|
Naros |
Aye, tuple queries are much more efficient |
21:44 |
|
Naros |
puts a bit more work on the developer in some cases |
21:44 |
|
sfisque |
aye there is the trade off |
21:44 |
|
whartung |
boy what am I missing, I've not heard of Tuple queries. |
21:44 |
|
Naros |
o.O |
21:44 |
|
whartung |
yea |
21:44 |
|
whartung |
zakly |
21:44 |
|
sfisque |
ORMS can promote laziness on our parts (myself being guilty as well) |
21:45 |
|
sfisque |
though beware of "bugs" on the fringes. eclipselink has a nice bug in one of it's "coalesce" calls |
21:46 |
|
sfisque |
someone pasted the code from one method to another and didnt bother to make any changes.. BOOM |
21:46 |
|
Naros |
One of the things I've been doing is removing unnecessary joins/fetches in queries lately. it tends to happen when you design things under 1 paradigm, business shifts and certain crumbs get swepped under the carpet. |
21:46 |
|
sfisque |
i know that story all too well... /cry |
21:47 |
|
Naros |
Here's one for you that you'll laugh at |
21:47 |
|
Naros |
Query is suppose to return an aggregate of values from a table |
21:47 |
|
whartung |
just gonna leave me hanging or give me a hint about Tuple queries? |
21:47 |
|
sfisque |
http://www.objectdb.com/api/java/jpa/Tuple |
21:47 |
|
Naros |
But instead of allowing the DB to do the aggregate, the code does it on the java code side once all the records have been fetched from the DB |
21:48 |
|
Naros |
>.< |
21:48 |
|
* Naros |
shoots himself |
21:48 |
|
sfisque |
i can understand that... jpa does not have Union operator. GRRRRRRR |
21:48 |
|
Naros |
Not when you want to aggregate data across 45 million rows :P |
21:49 |
|
Naros |
But when this was first written, we had a measly few thousand rows :P |
21:49 |
|
sfisque |
aye but what else can you do if the API doesnt allow you make the db do it. unless you go the SProc route and JPA can s*ck it on supporting Sprocs |
21:49 |
|
sfisque |
another source of "GRRRRRR" for me |
21:49 |
|
Naros |
API can support it, I was just too lazy to add it :) |
21:49 |
|
sfisque |
how so? there's no union in jpa |
21:50 |
|
Naros |
why do I need a union? |
21:50 |
|
sfisque |
i'm assuming by "aggregate" you mean sum the records from 2+ queries |
21:50 |
|
Naros |
select fielda, fieldb, sum(fieldc), avg(fieldd) from entity group by fielda, fieldb |
21:50 |
|
|
l1ght- left ##javaee |
21:50 |
|
|
caverdude joined ##javaee |
21:50 |
|
sfisque |
OH, you meant aggregate the data values |
21:50 |
|
sfisque |
gotcha |
21:50 |
|
Naros |
Yah |
21:50 |
|
Naros |
lol |
21:50 |
|
sfisque |
i thought you meant aggregate the records |
21:51 |
|
* sfisque |
bonks self |
21:51 |
|
Naros |
hehe, that term gets used differently depending upon context :0 |
21:52 |
|
sfisque |
yup |
21:52 |
|
sfisque |
i was "out of scope" :P |
21:52 |
|
sfisque |
sfisque == NullPointerException; |
21:53 |
|
sfisque |
supposedly JPA 2.1 is adding better sproc support, but i'm not sure if union made the cut. i'll have to check the white papers |
21:54 |
|
Naros |
:) |
21:55 |
|
sfisque |
aye JSR 338 describes some better sproc support, but i don't see anything regarding unions. i guess we wait for 2.2 for that /sad panda face |
22:02 |
|
Naros |
alright, nite ladies & gents! |
22:02 |
|
Naros |
see you all in the am |
22:02 |
|
whartung |
nn Naros |
22:07 |
|
|
caverdude joined ##javaee |
22:09 |
|
caverdude |
you might have go tme interested in a 6502 project ha |
22:09 |
|
whartung |
:) |
22:09 |
|
whartung |
I had the itch, an unqualified itch, to "do something" like that. |
22:10 |
|
whartung |
for the time being, I scratched it by writing a 6502 simulator and assembler in Java |
22:10 |
|
whartung |
then I ported a Fig Forth to it |
22:10 |
|
whartung |
good times debugging 3000 lines of assembly with a buggy assembler AND CPU lol |
22:11 |
|
caverdude |
wow, is this emulator open source? |
22:11 |
|
caverdude |
ha |
22:11 |
|
whartung |
I haven't published it |
22:12 |
|
caverdude |
I see |
22:12 |
|
whartung |
I'd be happy to give it to you, I jus tghaven't published it. It's an "organic" development -- rising to my exact needs at the time :) |
22:12 |
|
whartung |
but I'll tell you this |
22:13 |
|
whartung |
it's a lot of fun being able to write code that doesn't use a single library :) |
22:13 |
|
whartung |
or framework |
22:13 |
|
whartung |
(it uses the java standard stuff, and swing, but...) |
22:15 |
|
whartung |
and i'm glad I didn't have to debug my forth on a actual 6502 board |
22:15 |
|
whartung |
there's a lot to be said about putting breakpoints in the cpU |
22:17 |
|
sfisque |
the cute aspect of that is if you ran apple basic on it, you'd be running a byte-code emulated language on a platform that emulated hardware on a byte-code emulated platform. |
22:17 |
|
whartung |
yea |
22:17 |
|
whartung |
there's an apple ][ simulator in javascript floating around on the web -- really pretty amazing lol |
22:18 |
|
whartung |
played LodeRunner pretty well as I recall |
22:18 |
|
sfisque |
i bet |
22:18 |
|
sfisque |
even "bad" emulation would fly since you're emulating a platform that run at 1-4 mhz |
22:18 |
|
sfisque |
**ran |
22:20 |
|
caverdude |
ha |
22:22 |
|
sfisque |
OH MY! there's a google project for hosting perl on java. i think i might swoon |
22:26 |
|
whartung |
haha |
22:26 |
|
whartung |
PJs? |
22:27 |
|
|
cavemanlg joined ##javaee |
22:31 |
|
cavemanlg |
whartung, c64 emulator would be cool for running c64 programs on android |
22:31 |
|
sfisque |
Jerl |
22:31 |
|
cavemanlg |
turn my android into a c64 and I'd be in heaven |
22:32 |
|
sfisque |
i'd take a IIe emulator on android. so i can play wizardry on my phone :P |
22:32 |
|
sfisque |
or tablet :P |
22:33 |
|
cavemanlg |
ya I liked a game called Questron |
22:33 |
|
cavemanlg |
rpg game |
22:33 |
|
whartung |
i can't imagine someone has not done that yet cavemanlg |
22:33 |
|
cavemanlg |
me either |
22:34 |
|
cavemanlg |
there are pc c64 emulators of course |
22:34 |
|
whartung |
of course |
22:34 |
|
whartung |
I read the details on a atari 800 emulator |
22:35 |
|
whartung |
it's an amazing piece because it goes deep deep deep into the details of the atari |
22:35 |
|
whartung |
my simulator is at the instructions |
22:35 |
|
cavemanlg |
ya |
22:35 |
|
whartung |
i.e. it just dispatches ADC to the "add" routine and calls it a day |
22:35 |
|
whartung |
the good ones are cycle perfect |
22:35 |
|
cavemanlg |
I remember a game on the atari 800 called 7 cities of gold |
22:35 |
|
whartung |
watching the clock ripple through all the harware |
22:36 |
|
whartung |
yea, that was a great game, back when EA were gods. |
22:36 |
|
cavemanlg |
yup |
22:36 |
|
cavemanlg |
Archon Chess |
22:36 |
|
whartung |
yea |
22:36 |
|
whartung |
MULE |
22:36 |
|
cavemanlg |
yup |
22:36 |
|
cavemanlg |
www.planetmule.com is a Java version |
22:36 |
|
cavemanlg |
sadly it won't run on this netbook |
22:37 |
|
cavemanlg |
screen is too short and I can't resize the game frame |
22:37 |
|
whartung |
gah |
22:37 |
|
cavemanlg |
that planetmule has great net play |
22:38 |
|
cavemanlg |
you can always find an oponent just about |
22:43 |
|
whartung |
I haven't played the game in 30 years |
22:44 |
|
whartung |
I used to play defender on my atari 800, I had to put the computer on the floor so I could use my foot for the space bar (smart bomb) before I broke -- before I would slam it down with my hand |
22:46 |
|
|
cavemanlg joined ##javaee |
22:48 |
|
cavemanlg |
whartung, you can play it today then |
22:48 |
|
whartung |
:) |
23:16 |
|
|
jxriddle joined ##javaee |
23:21 |
|
sfisque |
so here's the "feature" i've uncovered. (keep in mind, this isn't my code, so withhold judgement). we have a bunch of controllers that inherit down a chain. Ca -> Cb -> Cc -> Cd -> .... and each one has a postConstruct method that is annotated appropriately. they also do super.postConstruct() to make sure each layer is marshalled properly. the interesting thing is, since the method is overridden, the call is to the annotated method by the fra |
23:22 |
|
sfisque |
i'm going to try and "break" the @Override aspect, and make each postcontruct method uniquely named (annoying) |
23:22 |
|
sfisque |
that way the virtualized call should be "in scope" rather than relocated |
23:24 |
|
whartung |
wait what? |
23:25 |
|
whartung |
so the framework calls ALL of the postContruct methods? |
23:25 |
|
sfisque |
sort of. |
23:25 |
|
sfisque |
you would expect it to call all of them and it does, BUT |
23:25 |
|
whartung |
well I wouldn't, no :) |
23:25 |
|
sfisque |
it then virtualizes the call and enters at the top each time |
23:26 |
|
sfisque |
if a method is anotated @PostConstruct it BETTER get called |
23:26 |
|
whartung |
I would expect the super.postConstruct to do the work |
23:26 |
|
sfisque |
that's to spec |
23:26 |
|
whartung |
but it's ONE instance |
23:26 |
|
sfisque |
right but the container doesn't know that |
23:26 |
|
sfisque |
remember, methods do not "really" inherit |
23:26 |
|
sfisque |
they're all called virutally |
23:26 |
|
whartung |
what do you mean they don't "inherit"? |
23:26 |
|
sfisque |
even via this, it's still a virtual call |
23:28 |
|
sfisque |
if A -> B and B has B.x(). if you call A.x()... if you look at the decompiled byte codes, it's actually a virtual call to B.x() |
23:28 |
|
whartung |
yes |
23:28 |
|
whartung |
you mean |
23:28 |
|
whartung |
A = new B(); A.x -> calls B.x |
23:29 |
|
sfisque |
right. it's not A.x(). it's just A passes the call down to B |
23:29 |
|
sfisque |
or more specifically, A gets ignored and B.x is called unless A overrides it |
23:29 |
|
whartung |
A a = new B(); a.x -> invoke x on B |
23:29 |
|
sfisque |
right |
23:29 |
|
whartung |
B extends A |
23:29 |
|
sfisque |
A extends B in this example |
23:30 |
|
sfisque |
(sorry about that) |
23:30 |
|
whartung |
then you can do A a = new B() |
23:30 |
|
whartung |
*can't |
23:30 |
|
sfisque |
A a = new A(); a.x() is really a call to B.x() at the byte code level and A is totally ignored |
23:30 |
|
sfisque |
no |
23:30 |
|
sfisque |
TypeCastException |
23:30 |
|
sfisque |
or compile error |
23:30 |
|
sfisque |
depending |
23:31 |
|
whartung |
if A extends B and does not override x, then yes, B.x will be called |
23:31 |
|
whartung |
if A implement x, then A.x will be called |
23:31 |
|
sfisque |
right but at the byte code level, if there is no override, it doesnt even pass through A. A's not in the equation. if it were truly inheritence, A would get the call and pass it down |
23:32 |
|
whartung |
you might be thinking that's one way it could be implemented |
23:32 |
|
whartung |
if A implements x, it's up to A to delegate to B via super or not |
23:32 |
|
sfisque |
i'm not saying it's "wrong", it just yielded unexpected behavior in this case |
23:32 |
|
whartung |
A is not obligated to super.x() in its implementation of x |
23:33 |
|
sfisque |
so now i think i have to "break" the override chain and make each PC method uniquely named so i don't get the virtual short circuit to the top level impl |
23:34 |
|
sfisque |
i will report my findings if this "fixes" it. ultimately it will have to be refactored, because they're doing "bad things" in a PC. |
23:34 |
|
whartung |
to me, personally it does not make any sense to have, or want, the framework to call postConstuct on the parent classes. I think that should be the purview of the implementation (A,postConstruct may well not want to invoke B.postConstruct) |
23:35 |
|
sfisque |
taht would be one way to fix it, but i do not have the time to submit a "fix" to GF, especially since 3.1.x is goign to EOL now that 4.x is out |
23:36 |
|
whartung |
I must go read the CDI spec and see what is says about calling lifecycle methods :) |
23:36 |
|
sfisque |
the other fix is to refactor so that the inheritence chain is less "questionable" |
23:37 |
|
sfisque |
we really should not be calling PC methods directly. they're supposed to be provided for the container to use |
23:37 |
|
sfisque |
a sane API would scope them all private |
23:37 |
|
whartung |
certainly, you shouldn't call them yourself (save for super.PC…) |
23:37 |
|
whartung |
IMHO |
23:37 |
|
sfisque |
i woudl even posit that is potentially an anti-pattern |
23:38 |
|
sfisque |
i would prefer the spec were changed to require them to be private |
23:38 |
|
sfisque |
but that's an opinion :-) |
23:46 |
|
whartung |
Ah HA! |
23:46 |
|
whartung |
4.2. Inheritance of member-level metadata |
23:46 |
|
whartung |
lets see what that ssays |
23:47 |
|
sfisque |
read through that the other day, when i started down this road |
23:48 |
|
whartung |
so this rings true to me, I think it might even be relevant... |
23:48 |
|
whartung |
If X declares an initializer, non-static observer, @PostConstruct or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x(). |
23:48 |
|
sfisque |
so it might be a bug in GF then |
23:49 |
|
sfisque |
it might be "trying TOO hard to run the PC's" |
23:49 |
|
sfisque |
and because "this" points to the top most class, everytime it finds an annotation, it jumps to the top of the stack |
23:50 |
|
whartung |
yea it's not super clear |
23:50 |
|
sfisque |
i'll have to dig through the Glassfish code on this one. |
23:50 |
|
sfisque |
hopefully it's sorted out in 4.x |
23:50 |
|
whartung |
see I don't know what "Y inherits x()" means in this ase |
23:50 |
|
whartung |
because there's @Inherited as well |
23:51 |
|
sfisque |
@inherited is TYPE only |
23:51 |
|
crimsonfubot |
sfisque: Error: "inherited" is not a valid command. |
23:51 |
|
sfisque |
@Inherited is TYPE only |
23:51 |
|
sfisque |
it even says in the source code it gets ignored if the annotation is used on a method if it is tagged @Inherited |
23:52 |
|
sfisque |
in fact netbeans will complain |
23:52 |
|
sfisque |
if you create an annotation tagged @Inherited and then apply it to Methods |
23:53 |
|
whartung |
ok |
23:56 |
|
whartung |
then there's this |
23:56 |
|
whartung |
The method annotated with PostConstruct MUST be invoked even if the class does not request any resources to be injected. Only one method can be annotated with this annotation. |
23:56 |
|
sfisque |
if you want to see somethign really wonky WRT inheritence.. try this one. class A { private int x = 0 ; public getX() { return x; } } class B extends A { private int x = 1; } -- create a main() that instantiates one of each, and compare what you get when you call B.getX() and A.getX(); |
23:56 |
|
whartung |
that tells me there shouldn't be "multiple" ones |
23:57 |
|
sfisque |
aye |
23:57 |
|
whartung |
heh - nice, what does that do? |
23:57 |
|
sfisque |
try it out |
23:57 |
|
sfisque |
it was surprising to me |
23:59 |
|
sfisque |
or any similar permutation where you have a method that exposes a private var and the subclass creates a similar private var with same name |