from my work as a developer
Posts tagged ted
what I learnt
Nov 25th
Do you remember my posts about the fourth question and fast thursday ?
Here is another constant behaviour for another day – friday with constant question: what you learnt (during this week).
Your answer can be related to your job or to hobby or to whatever you want. Give just one small example of what you learnt, it can be something small and funny or huge and very important
It’s up to you, but share your knowledge, make other start wondering what to do next, maybe you’ll inspire others to do something like you. It’s very informative attitude, you’re expressing yourself, showing you aren’t just a nerd
Ok, so what I learnt ? I remember two things:
- below 0 degrees it’s hard drive a bike, not because it’s cold, but because a glass from the helmet freezes and you see nothing on the road
- at last I understood what’s the difference between @Inject (JSR-330) i CDI (JSR-299), CDI bases on @Inject, but you cannot put equal mark between them
There were probably more, but it isn’t important to say about all of them, just two is enough. Please try, share your knowledge!
And as usual some nice presentation from TED – be smart, play games
a fast thursday
Oct 27th
Do you remember the post about the fourth question ? If so, there is a little backward of that. Some people like to talk, they talk a bit too much, especially in a case of the Daily StandUp. You should answer short and on topic, not to talk about what if … just answer the three questions: what I did, what I’m going to do, what blocks me.
The fourth question should be used to bit relax the discipline (it isn’t the Army
) , but overused it can have negative influences. To stop that, we introduced a fast thursday – the day without the fourth question, you must answer the standard three questions. Nothing more.
Some says, if you talk too much, you did nothing
So, don’t talk, answer!
Today I have another interesting presentation from TED, to sum up: “All right, so for some of you, this may be really, really out there.”
copy pattern
Jun 8th
Recently I’ve joined a new ongoing project. In theory it should have been easily jump into it, but as usual each project is specific. The team developed a custom framework to generate JSF view base on an entity class. The framework after first look is quite simple, but as always the devils is in the details
So, I’ve spent a bit of time to catch up what is real going on. The next thing I had to implement was an option to export entire view to PDF – there was already an example how to do it and I followed it. Just copied the source and started adjusting it to my needs.
That’s the Copy Pattern. It’s used very often when you join a new project, when you learn a new language, when you do something first time. You need a pattern to base on, to follow.
So, it isn’t a bad idea to use the copy pattern, but you cannot stop on that. After first step, after you grasped the problem you must apply another patterns – real software development patterns. Leaving the code as is after using the copy pattern is bad – we’ve seen it a lot in many places. The copy pattern is just a beginning, is the easiest way to get into the project.
And the beauty of this is that you can change the name of the class, extract methods, extract new classes – just before messing with a code repository, before posting too match changes,that no one will know what is really happening;-)
Don’t be afraid to use the copy pattern, but also don’t stop on it!
And as usual at the end a talk from TED, this time about a car for blind people. And about new control interfaces we can face soon
Enjoy!
How to make the Confitura ?
May 25th
Less than three weeks left to Confitura conference and we still have discussing with new Partners. Many of the local companies are supporting us, it’s so nice to see them with us! But it’s a hard work, lot of mails, phone calls and some paper work at the end. Especially it’s hard for me as a one of the Organizers – I’m ordinary Software Developer and quite often don’t understand what moves business forward
Anyway it can be the largest free of charge conference in Europe (regarding Java, software development, etc). Right now we have over 800 participants (some of them will give up just before the conference – as usual
), 13 Partners (and we’re discussing with another few), 20 lectors from around Poland – huge event and everything because of passion
So, if you don’t know what to do on 11th of June, come in and see how it is.
And at the end two presentation from TED – maybe not really, but they’re funny and practical as usual
and How to tie your shoes ?
reactivation
May 6th
I’ve decided to reactivate my technical blog (in Polish) hosted on Java Developer’s Network – why? I’ve stared missing strict technical entries and discussion over them. And there are plenty of english technical blogs out there, so I didn’t want to be another one here. I’m still planning to post some small examples in English, but larges one will be posted there.
Few weeks ago I was moved to join a new project and for last two weeks I was trying hard to recall how JSF 2.0 works. It isn’t an intuitive way and for a guy as me – who was growing up on request-response paradigmate of the Web - the whole components approach is a big fake
The frameworks are cheating us and the users, http protocol is stateless and over it we try to build a statefull application. Jsfize are flying in the air
What else is going on? A lot, I can say. A brand new Apache Struts 2 is out – the web page should be updated soon (on my todo list), also we’ve a few new very active contributors and a new PMC Chair. It looks like we’ve a new opening
The fourth thing, another we are working to prepare upcoming annual Warsaw Java User Group conference – Confitura 2011 aka Javarsovia. It’s a hard peace of wood now, but hopefully we redo it in something nicer
And the last thing – a new Agile conference in Warsaw is over the horizon – Agile By Example!
That’s it folks …. naha … what’s left is some new presentation from TED – not only software can be open sourced
laugh, laugh, …
Feb 2nd
It was quite busy beginning of the year. I was working on the two projects – in both partially
Anyway I found out the way how to handle such situation. What works the best are the short Sprints (Scrum), about a week. So I’m working hard one week on the first project and at the end of the week I’m delivering some peace on a functionality. Next week I’m starting a new Sprint but for the second project.
In such a case, I can focus and get into the project for a long time. I don’t feel disrupted that I forgot to finish something.
On the beginning I was trying to switch the project each day, but it worthless and useless. Human’s brain needs up to 20 minutes to switch a context. For large tasks (like a project) even more, for me it was around half a day to get into – to check what I did previously, what are the new task and where the project is in matter of functionality.
Short Sprints demands a short estimation and short tasks. After second, third sprint I’ve got used to it
And it was even funny to work that way – short sprint are the best!
To be more specific what I did, I’m going to share my deep knowledge with you
The first project is related to Circular – I’m writing a Desktop Client which will be able to communicate throughout a REST API with the service. Is written in Java Swing and the latest Java 1.6 brings many new futures to cooperate with a Desktop System. The first is the java.awt.Dekstop class. It can be used to open file with a default editor, open links with the default browser and so on. Very useful class. The next is the javax.swing.SwingWorker class. It’s used to launch long running process which must communicate with a Swing UI, e.g. to display progress.
You’re wondering why I’m using the native Swing instead Eclipse RCP or NetBeans Platform. The answer is easy – size of the file. With the current solution, the executable file has around 3.6 MB with all the dependencies included in it – you can use Maven Shade Plugin to do it. I’m also using a modified Launch4j Maven Plugin to create Windows Executable file from my Mac OSX – the modified source code you can find here.
The second project I’m working on is the Attikis service. It’s used to monitor Alarm Systems throughout a phone line. The UI is built using JavaServer Faces 2.0. And the last time I spent the whole day to solve a problem with the SelectManyListBox tag that has a custom converter attached to it. In such a case, you must use a bean with well defined equals() and hashCode() methods or just a simple String as a SelectItem. In other case you will end up with strange error: Field not valid!
It’s a very weird behaviour, whilst you will attach a built in converter, you can use Integer or what else you want
Ok, that’s it for today and at last I’ve got something from TED that I want to share with you
camels and rollbacks
Dec 16th
I had been preparing a new Struts 2 release for last few weeks. It contains only a tiny change regarding security and I had been counting that it shouldn’t take more than a week to release it. How wrong I was
Everything had started smoothly, I’ve created a new Subversion branch, to not interfere with current on-going development of the new Struts 2.2.2. The branch was made from Subversion tag (yeah, branches, tags and trunks are all the same, just copies
). Next, I’ve applied a patch to solve the security hole and I was truly sure that’s it – I can start the release process. So I’ve gone ahead, mvn release:prepare command went smoothly, so the next step was mvn release:perform. And after almost waiting 1h I’ve got a strange looking massage: not all licenses were approved !?!
The first thought, I’m using the latest Maven 3.0.1 and that’s the problem, but it wasn’t. I started looking into RAT plugin source code to check what could be wrong. I’ve just discovered that the plugin is checking wrong Apache License header but also looking for the License’s URL so it should be ok. The origin of the problem was quite simple. The Maven Release plugin allows to make release only from a SNAPSHOT version, so I’ve changed the version only in the parent pom of the project. The rest was unmodified. After changing all the version signatures in all the poms the problem was gone
To launch another release process I’ve had to rollback all the changes made during previous launching release command. mvn release:rollback did the job but I’ve had to manually remove the tag from Subversion repository. And of course I’ve removed the wrong one
Thanks to Wes for a tip how to rollback such a huge mistake, the command looks like this:
svn copy https://svnrepo/project/tags/TAG_1@10 https://svnrepo/project/tags
TAG_1 is the removed tag, number 10 is the revision -1 when the tag was removed.
So I’ve started again, to make a release and again something went wrong. I noticed the release plugin is making a tag base on wrong path – it was using the original path of the tag from which the branch was made of instead the branch path. And again I’ve had to rollback all changes and remove the tag – this time the correct one
Resolution was easy – change scm tag in all the poms to point to the branch
And again, I’ve started the release process and this time everything went more than smoothly, all the artifacts were uploaded to Apache Nexus, so the last think before calling a vote was to close a staging repository. And again I was wrong, during that, Nexus reported that two jar files don’t have corresponding files with signature. I’ve checked locally and everything was ok. After short conversation with guys from support, I’ve got the solution – upgrade to latest Apache Parent
Yep, easy, but to do that I’ve had to once again rollback everything, prepare a new Struts Parent that will inherit from the latest Apache Parent, release it and call for a vote
Finally, after almost 2 months I was able to release Struts 2.2.1.1 – the vote is under way, so if you are Struts PMC, please test the release and vote!
Just to relax a bit, take a time and watch that very inspiring talk about camels:
migration and bosses
Dec 1st
The whole last week I was migrating my current project from the JBoss AS 6 M2 to the JBoss AS 6 CR1. First of all I had been thinking it should be easy, just switch few things, use other Java packages and so on. Niether I had been expecting some problems nor it will take a week. So I’ve just started my migration “project” – yep, you should always treat it that way, it isn’t just renaming packages or tweaking some configuration files. It’s a huge project that either can take a hour or a week. So be prepared!
To move to the JBoss CR1 I had to also switch to latest versions of our internal libraries, commonly called SML Commons. The main problem was with the CDI Extension package, which base on WELD. During switching the version I discovered some problems during an application deployment. First of all Bean Manager was missing in JNDI context. Googling and looking through existing solution didn’t help. I had to prepare a demo application and try to register an issue with JBoss’ JIRA. The problem was, that my demo application was working just fine with the JBoss CR1. Just Adam was able to break it – the trick was to include in EAR package another module as a Java JAR archive with CDI enabled beans. Then the application blown up!
After few hours we got answer to the problem – add additional beans.xml file to WAR archive!
So I thought the rest should be easy, but wasn’t
The next problem was with the application’s tests. All the tests that were base on Arquillian started yielding – wrong dependency in Maven pom, I had to remove few of them, cut out some unused profile and everything went smoothly.
So, the next problem was with Selenium and it looked strange as the whole JVM blown up with irritating ”red zone” message. And till now I don’t know what it was, maybe just wrong configuration or missing dependency. And during solving that problem I discovered a really interesting CDI behaviour. When you defining a bean with @Produces annotation you have access to the InjectionPoint object. It provides many different information about where your bean will be injected.
But there is a slight diference how InjectionPoint.getBean() is working. If your @Produces annotated bean will be used / injected in already CDI managed bean, getBean() will return that bean. But in other way it will return null
Finally, I gave up
After passing all that problems, another one hit me directly in the face and I haven’t had enough energy to solved it. I shelved all my changes with IntelliJ IDEA and returned to normal coding work, ufff….
And just to change my attitude, today’s morning I got monthly newsletter from TED and I want to share with you that brilliant talk about why bosses and meetings are boilerplate at work, enjoy!
reborn
Sep 16th
At last I’m back online – to be correct – my blog is back online
After some rumour with switching hostig providers finally I managed to close all the DNS issues. Hopefully, I don’t have to worry for loooong time
Recently lots of things are happening in my life, to say just few – I’m changing company, project and technology (but still Java but who knows
)
Just for the beginning some nice talks from TED. If you have opportunity, I strongly encourage you to join TEDxKrakow at 15th of October – I’m waiting for confirmation!
The first presentation is about Crowd-Accelerated Innovation – YouTube-driven communication and future learning:
The second talk is directly connected with our work as a Software Developer, just switch context – why everything is broken by Seth Godin
Seth Godin at Gel 2006 from Gel Conference on Vimeo.
overwhelm
Jun 18th
That’s it, I’m totally overwhelmed by organization of Javarsovia 2010 conference. For the last few days I’ve been hanging on a phone all day, discussing and answering sponsor’s questions. I wrote hundreds of mails to management board internal group. I have no more space in my daily schedule to read blogs
Hopefully it’s the last week and we are solved almost all the issues we had – shirts, catering, rooms, etc. We have more than 880 registered attendees! It’s two times more than last year!
Any way I found a little time to watch that very nice TED speech, it’s about how to start movement and be a leader – very interesting and all in three minutes!
PS. I’m also not able to write posts from work, something went wrong when I migrated my DNS server
