Thursday, November 30, 2006
Coding Dojo FAQ
Monday, November 27, 2006
Unconferences and open spaces
Open spaces are conferences propelled by a concept or question. The driving concept could be anything from "How do we make our neighborhood cleaner" to "What is the best way to utilize web services". These are not preplanned conferences. The person or organization who wishes to explore a concept/problem will send out invitations in the community. People/companies who have similar interests will accept the invitation to attend. An invitation fee is usually charged to compensate for food, equipment, and conference room costs. The conference is a self organizing conference, which means there is no pre-planned agenda. However the duration of the conference and time slot place holders are pre-determined. The time slots are later filled with a concrete agenda. On the day of the conference the initiator gives a keynote presentation on the main issue, after which participants volunteer topics that they would like to explore under the main umbrella. Each participant who volunteers a discussion fills up a time slot and place. Those with similar interests also sign up. Note that all time slots and spaces may not be signed up for. More topics may emerge after the discussions start.
Once the self organizing agenda has been determined, participants group up in various corners or wherever they want to, and discuss the issue they signed up for. Participants may move around from one group to another or may stay with a group for the planned duration. The person who initiated a particular topic is responsible for maintaining the transcripts and documenting any interesting findings or observations. On the last day all conversations are consolidated by the lead participants (participants who initiated discussion topics) by briefly telling everyone what was discussed and any interesting findings that may have emerged. Important findings and insights are noted and may be published on a website or a technical journal for later reference.
Notes: This text was originally posted on my earlier blog at http://www.adaptivelearningonline.net
Here are the comments from the original post
-----
COMMENT:
AUTHOR: ranjan
EMAIL:
URL: http://ranjanjha.blogspot.com
DATE: 11/28/2006 01:05:03 PM
I hope to attend( I am in the wait list) the ' unconference' by Global Voice(http://www.globalvoicesonline.org) in Delhi on 16th Dec ...
Thanks a lot for this post sir..
I know what an unconference is ... otherwise I always thought its just on of the spelling mistakes that people make :)
COMMENT:
AUTHOR: Parag
DATE: 11/29/2006 08:07:35 AM
That's nice Ranjan. Do blog about your experience and let us know what it was like.
--
Parag
Monday, November 20, 2006
Java infrequently answered questions
Peter Norvig has an excellent list of Java related IAQ's (Infrequently Answered Questions) on his website. He talks about stuff that cover various subtleties in Java. Here's an example:
Q:Within a method m in a class C, isn't this.getClass() always C?
No. It's possible that for some object x that is an instance of some subclass C1 of C either there is no C1.m() method, or some method on x called super.m(). In either case, this.getClass() is C1, not C within the body of C.m(). If C is final, then you're ok.-- Peter Norvig
Free Web Based Courses On Java Programming Best Practices and Obect Technology and Design
Thursday, November 16, 2006
Learnings from a discussion on EJB 3.0
Yesterday I had a learning discussion session with some developers on EJB 3.0 It was a very interesting discussion and we all took home some new and interesting stuff. The key learnings were:
- EJB 2.1 was a 300 lb gorilla that used a crane to lift a peanut. EJB 3.0 is a nimble chimpanzee :-)
- EJB 3.0 uses annotations instead on the xml deployment descriptors that were so hard to maintain. So beans, security constrains and everything that was earlier defined using the deployment descriptor can now be done in code using annotations. I think this is really neat, especially for small applications.
- We no longer need to define all the 2.1 interfaces to get an EJB working. In fact we need not define interfaces at all. A business interface will be automatically created for us by the annotation processor. I read somewhere on the net (do not remember where), that we must not generate the business interface automatically (but create it manually and have the EBJ implement it), because the automatically generated interaface will include every public method from the bean and make it available to client code. Now I think that should not be a problem. Public methods are meant to define the public interface of a class, so if we do not want client code to invoke a method, then it should not be public. So the existence of public methods that should not be available to client code, smells to me of bad design.
- EBJ 3.0 entity beans are now POJO's, which is again really nice and makes development light weight. Again a big plus for small applications, and for maintainability.
- EBJ 3.0 uses dependency injection. The container will inject environment related objects in the client automatically. Client code now does not need to do any complex JNDI lookups. By the way Martin Fowler has written an excellent article on dependency injection here.
- We can still use deployment descriptors to override annotations, but in my opinion this should be avoided (unless absolutely necessary), because it will make the application harder to maintain.
Saturday, November 11, 2006
Coding dojo
Last Saturday we conducted a coding dojo session for a software development company in Pune. A coding dojo is an exercise that brings the element of practice to programming. All sportspersons, musicians... practitioners of any craft, do a lot of practice, where they explore various aspects of their art, explore different techniques, tools, and solutions. But software developers never do that. The way they enhance their skills is by learning while working or traditional workshops.
Workshops are a good way to bring a group of people up the learning curve on a new technology, but they fall short when we use them to improve developer's programming skills. Programming skills are best improved by practice. Practicing alone is good, but practicing with a group and a mentor is even better. This is exactly what a dojo is. A group of software developers that gets together to practice programming, to explore solutions, learn and improve their programming skills in the process.
For this dojo, we decided to code Dave Thomas' Kata 4 - Data Munging. We were a group of six developers. After an explanation of the exercise, we started programming in pairs, but not all at the same time. What we actually did was projector programming. The first pair started coding and the rest watched as a participative audience. By participative I mean, they were not just watching, but also suggesting solutions, pointing typos, and generally participating in the solution. After 20 minutes, the first pair went in the audience and the next pair took over for the next 20 minutes... and so on.
Here's what we had after completing part 1 (Weather data) and part 2 (Soccer data).
WeatherMain.java drove the weather data. Actual parsing of data was done by WeatherDataParser.java and WeatherData.java represented the data. Ditto for soccer data.
Part 3 of the coding kata is DRY fusion. We have to identify repititive code and refactor it so that it follows the DRY (Don't repeat yourself) principle.
I would like to urge you to actually program the solution as explore how we can elliminate duplicate code. We can elliminate duplication with inheritance or with composition. I am inclined to use composition as the first choice because inheritance trees are more difficult to maintain, and also since polymorphism is not warranted here. Your views however might differ, and if they do, please write about them as a comment here or as a trackback to your own blog.
We will solve the DRY fusion problem this week, and will explain the solution here.
Thursday, November 09, 2006
Ending notes on software design series
Software design is all about decontructing a system into manageable units, identifying relationships among them and getting the units to interact to fulfill system requirements. To become a good object oriented designer, you first have to replace the "procedural mindset" with an "object oriented" one. That, however is not as simple as it sounds. The best way to get there is by practice, lot's of it. Take every opportunity to create a good design.
When creating an entire system, think about the classes, their relationships, and interactions. When creating a class, think of what responsibilities it should fulfill. What should the API be like? How does it relate to other classes? When creating methods, think about the method signature and about the code in the method. Does the method do one and only one thing? What exceptions should it throw? Is is intuitive and easy to use? At whatever level you are creating the system, you can always think of design. Remember, there is a lot of power in the process of understanding, reflecting, practicing, and writing. Use it to learn continuously.
The natural progression after understanding basic design principles is understanding design patterns and then enterprise architecture. Start with the "Gang Of Four's" design patterns and then move towards more complex topics.
A few good resources for for reference:
Wednesday, November 08, 2006
Your feedback on translating requirements into system design
Please take a couple of minutes to give your feedback on this section. Would you like to see any additions, subtractions, or changes? How did you like the audio and video descriptions used in this section? I know they are not optimal, and I hope to improve them, but it will really help me if I get feedback on exactly what should be improved to make the course more effective for you.
Note: This post was originally posted on my blog at http://www.adaptivelearningonline.net
Friday, November 03, 2006
What is object oriented programming - by Alan Kay
Alan Kay coined the term object oriented programming in the 60's. Even though the progression of this paradigm has been a collaborative effort, Alan Kay has played a very important part in the creation of this paradigm.
In 2003 Stephan Ram could not find an authoritative source on what "object oriented" really meant, so he decided to ask Alan Kay himself.
Here's a link to his reply. A must read for anyone who is interested in object oriented programming and design.