from my work as a developer
Archive for November, 2009
down to business
Nov 18th
I got a new task! Hurraaa! I’mĀ not able to be bored at work
It was once again related to print layout, but I’m not complaining. Many of them was quite simply – move one line there, make some part of text bold, change text size and so on. Nothing complicated. Till the last task.
I had to show on a print page customer’s bank location, but not a name – some 6 digits long number! We have dedicated web service to retrieve such informations base on logged in user. So I started looking in to it to find that data. Yeah… bunch of XMLs with different data structures… hopeless job! I tried asking around, maybe someone already did that or would be able to push me in right direction, but no luck! I asked our architect, but he didn’t know also, he will try to find someone who did the web service
The last chance left, try to ask a business guy for some example of the value and then traverseĀ databases to find that data
So, it looks like I have a work for next day!
two days at once
Nov 17th
I hadn’t have any particular tasks for last two days. Some minor updates to print layout – that’s it! So I had time to work with Apache Struts2 project and with Xwork project. Also I prepared another presentation from Javarsovia 2009 conference and uploaded it on beta.parleys.com.
Today we had Code Review – it was a bit to long, over three hours! Code Reviews are great if they are organized more often, but hopefully we will have another Code Review soon
back to work
Nov 4th
I returned to main task today. It was a good idea to disconnect myself from the task the day before – I was able to take a distance look on my problems. Yap, that being said, I had a hard time today trying investigate how out project web framework is working – with all this flow control, JavaScript around. I tried many different approaches to avoid exceptions, to allow flow working – once again I filled lost! Anyone I took the best possible solution – I asked my teammate for help, for his idea how to solve that. He didn’t give me a direct solution, but he figured out some points that I never thought about!
At the end of day I had working solution, that didn’t break anything – it was quite simple (if I look on it now
) – I just implemented the whole download logic in separated Struts action, not connected with the internal framework – that allowed me to skip the problems!
The last thing to do is write a unit test to confirm that!
community day
Nov 3rd
I spent the whole day working with Apache Struts 2 Maven archetypes – it’s an open source project hosted at struts.apache.org – basically Action Base Java Web framework.
During that I discovered strange Maven behaviour – when I lunched it with -o option (work in offline mode) it wasn’t be able to find installed archetypes. To clarify – I prepared a script that will build up the archetype from source code, install it in my local Maven repository, then create basic application base on that archetype and lunch them, the source is below:
#!/bin/sh
if [ -e demo ] ; then
rm -R demo
fi
cd $1
mvn clean install
cd ..
mvn -o archetype:generate -DgroupId=org.demo
-DartifactId=demo -Dversion=1.0-SNAPSHOT
-DpackageName=org.demo
-DarchetypeArtifactId=$1
-DarchetypeGroupId=org.apache.struts -DarchetypeVersion=2.1.8
-DinteractiveMode=false
cd demo
mvn jetty:run
cd ..
$1 – it’s a command line parameter specifying archetype folder which is also archetype name
So it shouldn’t be needed to access remote archetype repository to download archetype – it’s already in local repository! I tried that with different Maven versions – the latest 2.2.1 and with 2.0.10 – with both was the same.
After some time and many experiments I found the solution – do not use -o option used -B instead! And that I was able to test one archetype – another 3 are waiting!
a short day
Nov 2nd
The day was short, as I spent 5 hours in train coming back to city where I work (it’s a bit complicated to explain that in short
) so for work left not so much time
Anyway I integrated an application with corporate CMS system, I had to make some dirty hacks to achieve expected functionality and learned be past experience I wrote unit tests to cover all strange cases I could imagine
At the end of day I integrated that simple solution with the rest of the application and discovered that our internal web flow framework doesn’t support file download functionality! I’ve tried to use different approaches, but without luck
The worst thing, I will have to look into to find some solution, the current approach is breaking the application and it became useless
I left that behind and went for gym – to chill out myself!
