Important points are: standard code hierarchy, automatic download of dependencies, a distribution command with versioning support and source control interaction, a simple command to build each part of the project. In Java best candidates are a sophiticated ant build, or maven2. Maven2 is quite good since it forces you to do some of those steps, even though I think ant can’t really be avoided for many more specific tasks.
Once, I got wrong code before I left for a customer site, because code given to the customer was not checked into a source repository everytime before it was given to the customer. Furthermore the code I had could not be built because of missing jars, and the project structure forced some source directories containing source code common with other projects to be in a very specific directories at a particular level, because project isolation was poor. It took me 7 days to understand their very awkward build process.
A good build process is dependent on good CVS (or other source control system) management, which is itself dependent on good code split. CVS head should always compile. If CVS head does not compile, then people will start trying to work around it. Unfortunatly working around it means use it as rarely as possible (either by just not updating your code frequently, or by working in a branch that can not merge well because head is in a bad state). I have seen that on projects, the result is integration headaches, and extremely poor overall quality.
A good check for a build process is to see how long and how many steps you have to do to build the latest deliverable on a new machine, and how difficult it is to put that in production.
In an open space, people keep on coming to discuss various issues with various people, issues that have nothing to do with your work. You end up either being distracted, or annoyed by the increased noise level.
Apparently at Microsoft, they have private offices for each programmer. It might be extreme, paradoxally not in the XP (extreme programming) sense, but it is much better than open space for productivity. In XP, it’s almost the opposite with 2 developers working often together.
If you have to lay off in your job, do it quickly. I don’t understand companies that want to keep someone as long as legally possible when this someone wants to leave. First the employee won’t be as motivated, but more importantly, you will continue to train that person to your company’s software and ways of work. This would be much better used on another person, that will stay in the company. Time for layoffs should exclusively be used for knowledge transfer.
Someone modified a simple launch script on a integration machine. This pissed off the author of the script. Why?
Just because the guy who modified the script never worked before with the author of the script. If only the author had been notified verbally or by mail of the modification, he would have been happy. Furthermore this would increase the quality of the change since the new guy might have made a change that has other impacts, that the author will best evaluate quickly.
I tend to forget this now and then to grep on a specific list of files:
find . -name "*.xml" | xargs grep "iwantthis"
And I also tend to forget the vi keys. Small extract:
h - move left one character j - move down one line k - move up l - move right $ - go to the end of the current line 0 - go to the beginning of the current line G - go to the last line in the file 15G - go to line 15 control-F - forward one page
control-B - backwards one page
n (N) - next (previous) in search mode (/ or ? forward or backward)
s/OLD/NEW/g - replace on current line
%s/OLD/NEW/g - replace every occurence in file (or use 0,$ instead of %)
x - delete one character
Update I have to add the standard replace in multiple files via sed command. Here is an example of how to move your eclipse workspace to another directory:
find . -name "*.xml" | xargs sed -i "s,c:[/\\]java[/\\]eclipse,d:/eclipse302,gi"
I am starting a series of posts about software construction, based on good and bad experiences while working for my many employers.
“Software construction (a.k.a. architecture), is the only activity that’s guaranteed to happen on every project”. It is not rare that projects or new features are abandoned either because they are too costly, or because they are not needed anymore, or because they are other more important priorities.
In the same vein: “Measure twice, cut once”. “Measure twice, cut once” is highly relevant to the construction part of software development, which can account for as much as 65 percent of the total project costs. The worst software projects end up doing construction two or three times or more. Doing the most expensive part of the project twice is as bad an idea in software as it is in any other line of work.
When you see Software that change versions (major versions) while not really having been used much, this is a sign there is something wrong in the construction part.
My reference book on Java concurrency is Doug Lea's Concurrent Programming in Java: Design Principles and Patterns. He is one of the authors of this new book, Java Concurrency In Practice. There is also Joshua Bloch, author of Effective Java, that many people love (but I am less a fan of it, even if I would recommend it to Java newbies), and author of Java Puzzlers, that I found more fun.
With such authors, I had relatively high expectations. I was surprised that there is not much material in common between Doug Lea's book and this one, which is a good thing. It's a different presentation, that focuses on different problems.
There is some very interesting material, I especially enjoyed chapter 16 on the Java Memory Model. There are not many books with information on it. I did not know that initializing a final member in the constructor was providing thread safety for the accessor method of the corresponding field if there is no other modifying method, no synchronization needed. And not having the member declared as final was breaking the safety.
I also had not heard of Amdahl's law before. It seems quite intuitive, but then the example in the book about processing parallel tasks using a synchronized LinkedList (improvement up to 3 threads, no more later due to time spent on synchronization) shows that the reality is not that intuitive.
I enjoyed how the book is written, and how information is presented. There is for example their concept of publication and escape (in chapter 3) which tells you important things, like not starting a Thread in a constructor (and if you still want to do it they present a nice way to do it).
I think this book is a simpler read that Doug Lea original book, and probably a better introduction (that still goes very deep) to Java concurrency programming.
I am currently quite busy learning about Websphere Commerce. I was surprised to notice that they still use Entity EJBs 1.1. My experience was that many companies turned away from Entity EJBs, sometimes from the beginning, preferring TopLink or Hibernate (later).
I know that Entity EJBs are more heavy to use than Hibernate, but with the proper tooling support, it’s not really a big issue. Are there more fundamental reasons? There are probably some mapping limitations, but IBM implementation is apparently quite good in term of features.
I will write a complete post about my own analysis of EJB 1.1 vs IBM EJB 1.1 vs EJB 3.0 vs Hibernate, but I was wondering first what was your feedback on EJB 1.1.
That’s it, I have done it, the unthinkable. I have switched from MacOs X to Windows XP. My idea was first to install Ubuntu on the Mac Mini, but if you want to keep the Mac Os X install, the methods I have read on the web required to use bootcamp. At around the same time I was annoyed by problems I had with bluetooth and Skype in MacOs.
So, with bootcamp installed I decided to give a try to Windows. And it works quite well on the Mac. As I use it mostly as a media box (movies, photos, jukebox, browser and tablature reader) and not really as a developer, I find Windows quite convenient. I have always preferred Picasa to iPhoto. And moving back to Picasa for my photos is a joy. I can’t believe the speed difference between the two apps, and it’s not a matter of memory, I have 2gb. The crappy ways iPhotos deals with my folders is over. I am also happy to use again foobar2000 instead of bloated (and limited (only MP3s and MP4s)) iTunes. In my quest to look for a convenient setup, I discovered ProjectM visualisation, also available for MacOs X (with iTunes) and Linux. I am quite impressed with the animations. I have the impression that graphics are much faster under Windows than under MacOs, it’s probably due to much better optimized drivers.
Today I gave a try to Netbeans 6.0. It’s not a dev machine, but I find convenient to sometimes be able modify quickly an existing program, or test some java stuff. It’s still in beta, and it shows, I found it so slow! Plus functionality is really not on par with Eclipse when it comes to code analysis. It reports some errors way too long after I corrected them, and it does not report other important errors, for example when a library requires another library. With Netbeans, you see the library problem only at runtime. Under Eclipse, you have an alert in your project, before running it.
What’s not working very well is the broken Apple keyboard, I really don’t understand why they changed all the non alphanumeric keys in the French keyboard layout. But it’s broken in MacOs as well, Another thing is the bluetooth headset. Apple bluetooth drivers don’t do that. Anyway Apple bluetooth range in the Mac Mini is a joke. My thinkpad offers a much wider bluetooth range. Overall I am quite happy with the current setup, being able to use Picasa, foobar2000, Open Office,.and latest software like Skype 3 or Photoshop 9. And I don’t have to lose any more time with the freaking Finder backward interface.
I had a revelation yesterday while thinking about del.icio.us, the most well known social bookmarks site. I find out that I almost never use my tags, and I am often not satisfied by results when I search using tags. What use can you make of 100s of tags? in the end only less than 10 are usable to classify very different stuff. And even then compared to a search it’s not a much useful classification.
If del.icio.us search engine was decent then I am sure I would never use tags. But their search engine is slow, and does not search much (it sometimes fails to find results on words in titles).
What is needed is really a social search engine, where you could look things up by user as criteria, and possibly by dates. I googled for it and immediately saw that my “revelation” was quite common. There are several social search engines. There is cranky, where you can see eventual reviews by some users, added to search results. There is eurekster, where you can search in any user bookmarks, but you can’t search everybody (how silly). There is Yahoo MyWeb, quite decent if you ignore the presentation and if they added descriptions on results.
A friend of mine told me that furl, another social bookmarks site, is more search oriented, but unfortunately a bit slower to use since it keeps a copy of the page you bookmark.
But still I feel like none of the sites do the right thing, some have too many features, others bad presentation, focusing on useless crap. I actually think that google should have that feature integrated with the common search. I am sure it will in the future, but they seem to be late on the social side of the web.