Friday, December 31, 2004

welcome 2005

Well we got back from Paris and now we must face reality. I really believe
that 2005 is going to be a better year. I recognize that this year I really
want to be more creative. This will include more work on Skin I think,
which I don't expect to finish this year even. (4 years so far), but at
least I should have a significant addition done.

I just added myself to boar.com's mailing list. mark is an inspiration too, he always has been. I miss playing d&d with him.

Tuesday, December 28, 2004

paris, redux to disillusion

well I tried to explain to stephanie that paris is not the best place to go in europe. it has this reputation, because all the history, but if you compare it to even NYC it doesn't hold a light.

one thing was suprising, I was expecting everyone to be really rude, because we were americans (which has happened to me before in paris), but most people were pretty understanding and kind. Basicall I tried to speak basic french to them and nod and point the rest, I guess that helped a little too.

we went on this boat trip, and although it sounds cheesy it really was better than fighting hoards of people at the attractions such as the louve, although it was really cold I could just take cool shots on the deck of a boat. that is superior.



Christophe and daisy were mega slow, I know it takes time to adjust to thier "rhythm", but it is hard when you have a travel agenda to just wait and wait, that's why I want to travel before we have a child, it will alter our "rhythm".

the next day we went to pompidou, which is my favorite thing to do in paris. i really love mid century art, and so does my wife, so walking through the halls made me think about deconstruction projects I would like to start. I got some good pictures of the outside while waiting in the wrong line, and then again after we were done in the museum.

Sunday, December 26, 2004

iluminated brussles

Brussles was quite nice on Christmas night. They illuminated the gran plas
with lights and lasers, while playing some sort of ambient music right out
of a Phillip Glass Opera. Daisy was wrong, it was worth seeing.







We had alot of fun in Brussles with Daisy, she even told us some secrets
about Christophe. I think people all over the world have hang ups, its what
make us human.

Anyway I feel good about installing firefox on thier computer, at first
they were reluctant, "this (IE) is what I know". It was very easy to
convence them, all I had to say was "Microsoft is America, Mozilla is the
world" and they bought into it. I guess I feel a little guilty manipulating
them based on thier prejududice about America but they are so rightous it
was easy.

I love European culture, I really do, but it is amazing how little reality
really bears on how they see the world. Science and objective thought is of
little importance thier conclusions about the world. They are as liberal as
they come, as long as it suites them. Daisy was going on and on about a
waterless toilet, and how using water and electricty pollutes the earth,
yet they use disposable plastic coffee makers and disposable diapers, dish
washer, etc. "It was already installed, if I remove it will cause more
pollution". They critisize people who are "closed to new ides", yet seem as
closed as anyone (including me).

Incredible hipocracy. I guess they probably see us the same way though, so
I shouldn't judge too much.

I feel bad that I have these feelings, they have been such great hosts, but
this is my blog, I will say what I want. I do love them both very much, I
just now know that Americans aren't the only people who choose not to
think, prejudice and limits to ones willingness to see that which is
unfamilliar is as human as art or language. I think I am one of those
people though whose politics doesn't match up with the talking points
common in todays world politics.

I appeciate Daisy and Christophe regardless of my internal disagreements
with thier perspective. They have been very kind to us in every way.

Saturday, December 25, 2004

longest dinner ever

The Christmas dinner we had at Christophes parent was the longest I have
ever had. The main course was 2 hours later than the first course which was
excellent even though Stephanie didn't like it (salmon). I have never had a
dinner that long and the southern way is to be long so we were made to look
as though we were board, I guess we were.

we had a very good christmas day though, after lunch of deer, which is a
special Beligian dinner we had a very nice walk through the streets of
Liediekerke.

We are going to gran plas tonight to enjoy the illumination which according
to Daisy isn't as much as it sounds.

I think we will have rabbit tomarrow.

Friday, December 24, 2004

rebel frameworks

It is starting to become apparent that people are tired of the complexity
of J2EE. Here is a good article concerning rebel frameworks.

Java rebel frameworks touted

Thursday, December 23, 2004

makro

well it is official there is universal demand for giant stores that have
millions of people shopping for the holidays, at least there is in belgium.
we went to the megastore "makro" today, stephanie spent about five
minutes in it before she wanted to go, i dont blame her, so we decided to
go the the restraunt and drink beer until daisy and christophe finished
shopping for christmas.

the food there was pretty good though i have never seen mussles being
served at a megastore restraunt, more familliar with pizza or hot dogs.
they even had trappist beer there so we ate frites and drank trappist beer
until daisy and christophe where done.

we came back and made christmas cookies, i think those or for show only
because they have so much frosting on them you cant really eat them.

pretty lazy day in all, we have been relaxing mostly, trying to figure out
what we can do tommorrow, if there is anything open. i want to do something
i don´t want to just lay around all day.

Tuesday, December 21, 2004

we made it to brussles

well I say I am brussles but we are really in a town outside called
ledekerke, and we have alreadystarted drinking killer beer. we actually had
thre before christophe even arrived.

this french keyboard is really hard to type on so I have qan excuse fore
typing so badly. the worst is the q is where the a is upposed to be.

we are up at 3 am because of the jet lag so I decided to send a note.

Monday, December 20, 2004

getting ready for belgium

ok, this is interesting. I really like that I can now send blogs via email.
I am getting everything together to do posts from europe. That should be
easy to just go to cristophe's computer and send messages. Anyway if this
works it will be a great first step to autmating my website from email
posts.

Sunday, December 19, 2004

Stephanie and I are going to Brussles and Paris for Xmas. I am getting everything together to do posts from europe. That should be easy to just go to cristophe's computer and send messages. Anyway if this works it will be a great first step to auotmating my website from email posts.

I thought I could do this by email. Oh well.

Saturday, November 27, 2004

I promised my friend Eric I would make the pictures available so I thought
to myself, why don't I just send out an email account of our travels to the
midwest instead.

http://www.newobjectivity.com/gallery/tenfelde_sessions/FrameSet.htm

Eric Tenfelde, also known as the Blues Godfather of Pilsen, threw this
killer session at the venue ala tenfelde (a renovated building in the inner
city of chicago) where the blues master Jake La Botz shared his very
strange William S Burroughs inspired version of the Blues.

I know its strange, I loved it!

http://www.jakelabotz.com/

Anyway it was a killer venue, very homey, and I met lots of great people.
It also didn't hurt that no matter how much wine I drank I could just
wander upstairs to go to sleep.

Thanks Eric for setting up such a cool happening.

Monday, March 01, 2004

well any web developer worth thier salt knows this little bit:

courtesy servlets.com

<HTML>

<p>Demo MultipartParser Upload Servlet</p>
<FORM ACTION="/tomcat/servlet/parserupload" METHOD=POST ENCTYPE="multipart/form-data">
What is your name? <INPUT TYPE=TEXT NAME=submitter> <BR>
Which file to upload? <INPUT TYPE=FILE NAME=file1> <BR>
Which file to upload? <INPUT TYPE=FILE NAME=file2> <BR>
Which file to upload? <INPUT TYPE=FILE NAME=file3> <BR>
<INPUT TYPE=SUBMIT>
</FORM>

/*
* DemoParserUploadServlet.java
*
* Example servlet to handle file uploads using MultipartParser for
* decoding the incoming multipart/form-data stream
*/

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

import com.oreilly.servlet.multipart.*;

public class DemoParserUploadServlet extends HttpServlet {
private File dir;

public void init(ServletConfig config) throws ServletException {
super.init(config);
// Read the uploadDir from the servlet parameters
String dirName = config.getInitParameter("uploadDir");
if (dirName == null) {
throw new ServletException("Please supply uploadDir parameter");
}
dir = new File(dirName);
if (! dir.isDirectory()) {
throw new ServletException("Supplied uploadDir " + dirName +
" is invalid");
}
}

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/plain");
out.println("Demo Parser Upload Servlet");

try {
MultipartParser mp = new MultipartParser(request, 10*1024*1024); // 10MB
Part part;
while ((part = mp.readNextPart()) != null) {
String name = part.getName();
if (part.isParam()) {
// it's a parameter part
ParamPart paramPart = (ParamPart) part;
String value = paramPart.getStringValue();
out.println("param; name=" + name + ", value=" + value);
}
else if (part.isFile()) {
// it's a file part
FilePart filePart = (FilePart) part;
String fileName = filePart.getFileName();
if (fileName != null) {
// the part actually contained a file
long size = filePart.writeTo(dir);
out.println("file; name=" + name + "; filename=" + fileName +
", filePath=" + filePart.getFilePath() +
", content type=" + filePart.getContentType() +
", size=" + size);
}
else {
// the field did not contain a file
out.println("file; name=" + name + "; EMPTY");
}
out.flush();
}
}
}
catch (IOException lEx) {
this.getServletContext().log(lEx, "error reading or saving file");
}
}
}


The issue with this is that you cant parse the request twice, which you may want to do if you want to encode the directions to the action in the result header, then process the request during the action itself in a standard MVC approach. This isn't a problem when using request.getParameter("action"), because you can get parameters out of the request as many times as you want, but since you have to parse the request (or so it seems) when you try to parse it a second time it gives an exception that it has unexpected end of header.

My solution is to create a generic form handler class, that reads the request at the beginning of processRequest(), then is made available as a request attribute. It will handel both regular and multipart forms.

If anyone knows a better way please email me!


cgraham@newobjectivity.com


Monday, February 23, 2004

PLEASE RALPH DON'T RUN! I usta think Ralph Nader was a cool guy, now I really really don't like him. He could have made a giant contribution to our country as a senator or congressman, but instead he is just a spoiler. He makes me think of people like Michael Moore, who say things like "Well it has to get worse before it gets better.", what a spoiler attitude. Its like they want our country to go to hell to prove they were right. Lame.

OK another neccesary bit of info. After being super sick of V$I*A!G)R%A ads showing up I researched sendmail blocking. Here is the definitive sendmail config:

FEATURE(`dnsbl', `sbl-xbl.spamhaus.org')dnl
FEATURE(`dnsbl', `blackhole.compu.net')dnl
FEATURE(`dnsbl', `list.dsbl.org')dnl
FEATURE(`dnsbl', `opm.blitzed.org')dnl
FEATURE(`dnsbl', `spam.dnsrbl.net')dnl
FEATURE(`dnsbl', `bl.spamcop.net')dnl
FEATURE(`dnsbl', `inputs.relays.osirusoft.com')dnl
FEATURE(`dnsbl', `relays.ordb.org')dnl
FEATURE(`dnsbl', `Spamsites.relays.OsiruSoft.com')dnl
FEATURE(`dnsbl', `Spews.relays.OsiruSoft.com')dnl
FEATURE(`dnsbl', `flowgoaway.com')dnl
FEATURE(`dnsbl', `blackholes.intersil.net')dnl

also goto spamhaus...

Wednesday, February 04, 2004

very useful snippet:


public static String getRequestParameters( HttpServletRequest aRequest)
{
StringBuffer aReturn = new StringBuffer("");
Enumeration parameterNames = aRequest.getParameterNames();
while (parameterNames.hasMoreElements()) {
String requestParameter = (String) parameterNames.nextElement();
String[] aValues = aRequest.getParameterValues(requestParameter);
for (int i = 0; i <> 0) {
aReturn.append("&");
}
aReturn.append(requestParameter);
aReturn.append("=");
aReturn.append(aValues[i]);
}
}
return aReturn.toString();
}

}