Technical arguments
I thought this was pretty funny. And it helps keep things in perspective.
MindView Home Page
I thought this was pretty funny. And it helps keep things in perspective.
MindView Home Page
This is a brilliant essay. He talks sensibly about many things, and explains why my intuition has been telling me all this time that things like SOAP and their ilk are just wrong, somehow.
For some reason, partway through reading it, I had a sense of remorse for wasted college years. I had an Asian roommate once who had a study group. At the time I thought it was "an Asian thing," and perhaps it was, something brought from a culture that can live so closely together (although Confucious, I think, had a lot to do with that). But when I saw "The Paper Chase," I gained another data point about study groups, and attending a meeting of the Silicon Valley Patterns Group I saw a lot of value in working together. Jeremy Meyer came out to Crested Butte and helped me put together the Annotations chapter for Thinking in Java 4e, and I'm sure we got much more done together than we could have separately. Synergy exists, and I want more of it.
Perhaps it's because I'm trying now to schedule a couple of Open Space conferences (this Summer in Crested Butte) to produce this kind of synergy that I think back on what I might have accomplished in college if I had taken the step of forming study groups. Instead of working in isolation, we could have at least discussed and struggled with the ideas presented in class. Learning could have been collaborative. But are we guided away from collaboration by the idea that we must "do our own work?" And for that matter, do most college study groups devolve into test-preparation sessions?
I still think it would have been beneficial. Hey, why isn't this something that professors try to help the students do? At least ask if people want to form study groups, and give them time and chalkboard space to do so? That would be free for the university, but I think it could greatly benefit the experience (yes, I know there are the TA-led sessions, but that's not the same. The study group puts the responsibility on the individuals, and is thus a much better learning experience).
If you're still a student, try forming a study group, and tell me how it works out.
MindView Home Page
One of the messages produced by Lint4J is this:
I started to change these, then began wondering if it was really necessary. I thought "what do they do in the JDK?" I found System.getProperty("line.separator") called six times in the entire JDK, whereas \n was used over 1400 times.
Don't hardcode newline characters, use System.getProperty("line.separator") instead.
From a reader:
...I myself have been in the process of questioning my beliefs with regards to programming. I discovered object-oriented programming in 1997 using first Turbo Pascal For Windows and then Java. When I look back now, I cannot help but wonder if the reason I was attracted to OOP was not so much because it was a better way to program, but simply because it was new. I had never seen it before and relished the challenge of mastering a new skill. Seven years later, however, I have seriously begun to question the entire OOP paradigm.
Does OOP really help us to write better programs? The problem with starting with that question is that it concentrates on the technology. I believe we should start with ourselves. What do we need to know to program well? What does a competent programmer look like? What is the best way(s) to think about programs? It is difficult to recall any discussions which have tackled these questions. Yet it seems that we need to answer them satisfactorily before we can then take the next step and actually decide what programming paradigms help us to program well.
I'm beginning to plan the summer seminars and events. I've had two recent experiences which have made me rethink the approach I've been taking for seminars. One was last Fall's seminar for Sandia Labs, where I was forced to throttle back from my usual attempt to fit too much into a given amount of time. The result was that everyone seemed to have a much better experience. We didn't cover as much, but everyone learned it much better, and therefore they learned more.
The second experience is the process of writing the Fourth edition of Thinking in Java. This language, which was once hailed (admittedly, by the PR flaks at Sun itself) as being "much easier than C++" really isn't anymore. Sure, sure, lots of improvements and your efforts are usually much better spent, but still both complicated and complex in many cases. It's become clear that an introductory course will only be able to use some basic generics. It would just torture people to try to give any depth to Annotations or Concurrency or any of the more sophisticated ideas that are developed in the book. Indeed, the book itself has been separating into an introductory portion followed by more advanced (albeit necessary) topics.
So we're really talking about two seminars here. The introductory one, for people who are new to Java, Objects and the like, which will also work for non-C programmers (previously I would assume you knew basic C syntax, and the Thinking in C multimedia seminar is being reworked in Flash for internet distribution, so that should help even if C is no longer required). And the intermediate one will cover things like Type Information, Generics, Collections in Depth, Concurrency, Annotations, Enumerations in Depth, GUIs, Discovering Problems, Introduction to Analysis and Design, and will introduce design patterns along the way (I've been adding more of these to TIJ4). This one will be useful even for experienced Java programmers who want to catch up to the new features of J2SE 5 or to get more depth on some of these issues.
My question concerns scheduling. I can imagine that there might be some people who would like to take both seminars back-to-back, but I could be completely wrong about that. Work schedules etc. might make 2 weeks off completely unreasonable, and even if someone wanted to take both seminars, they would want them separate so that it didn't keep them out of the loop at work for more than a week. On the other hand, Europeans, Australians and other overseas-travelers might really like a 2-week stint.
Please add comments as to your preferences. Thanks.
I can't be the only one noticing this. Calvin Austin has just left Sun, following on the heels of Josh Bloch and Neal Gafter. These are not easily replaceable persons; these are leaders. The fact that they are all splitting within a few months of each other doesn't seem like coincidence. Something's going on. I've never had particularly good contacts within Sun -- anyone know the scoop?
You have to see this, it's combined nerdism (the next Star Wars + Java Generics). See it before he gets sued by someone.
I would like to see an example of "Autoboxing leading to NullPointerException," as Yoda asserts at the end of the piece. Can anyone post a code fragment in the comments?
I occasionaly fantasize about giving up Word and moving to OpenOffice, and someday even being able to live on a Linux box. But I push Word pretty hard and am able to do many interesting things with it, so unless OO gave me more and better it won't happen. One of the appealing things about OO is that it stores files in a true XML format, so I could imagine writing Python programs to do transformations on my books. The last time I looked at the XML format that Word used, it seemed like it was some strange proprietary thing, or that it could only be stored and not recovered, or something else that was too much of a limitation.
I told my friend Gary about OpenOffice, and he promptly went and tried it, and reported this:
Unfortunately, OpenOffice is quite inferior to Word, et al. I just uninstalled it and returned to Word. OpenOffice is woefully slow; it makes Word look like a high flyin' text editor, and it's not smart about memory. So if you load more than a couple of big files (the biggest I tested was 100+ pages, 8mb), it gets confused on the memory swapping. Finally, it did some repagination on a document, which I suspect doesn't mean much, but it does make me suspicious enough, and I have to stay compatible. So thanks, but I must stick with those bad guys in Seattle. Fun checking it out though.
Over the past few months I've had this impulse to look at PHP. Perhaps it came from seeing the ".php" extension in a lot of places. But usually I could just lie down for awhile and this impulse would pass. After all, PHP is the web language for the unwashed masses, right?
I just skimmed through the PHP tutorial, mostly looking at Objects, exceptions, that kind of thing. Classes in PHP5 have a syntax that's sort of a weird amalgam of Java, C++ (at least, the scope resolution operator), Python and Perl.
I discovered that I didn't run screaming in disgust from PHP. I didn't find it offputting; the fact that they lifted syntax from these other languages was not only reassuring (they didn't feel the need to invent everything from scratch, but instead stole proven syntax from elsewhere), but made me think that the time-to-productivity with this tool could be quite short because I know the syntax from elsewhere. The fact that PHP is designed to solve the web problem, and just the web problem (although I've heard that people have used it to create desktop applications), is also appealing. I'm sure I'll continue to run Zope for its basic functionality, and for things I can do with simple Python Scripts, but I just don't seem to be able to keep all the arcana necessary for Zope programming in my head, and I'm convinced only full-time Zope programmers have actually waded through the slings and arrows of the ill-kept Zope documentation and really know what's going on, because they use it on a day-to-day basis. I'm also interested in looking at Quixote, but as many have pointed out, no really standard Web system for Python has arisen; on the contrary, more seem to appear on a regular basis. And for my needs, I just want something that's a straightforward solution to creating interactive web pages, and I don't want to have to remember a completely different world view every time I have to go back and build new web stuff (this is why Quixote is intruiging -- it's basically Python with help).
The only thing that gave me a slight lurch in the PHP syntax is the Perlish $ in front of variables. But my concern was that it was going to be all Perl from then on, and that didn't happen. It seems to be a fairly isolated case, and the absence of the rest of the Perl syntax it really isn't an issue.
So I'm intruigued, and will probably want to experiment with it. Once the Java book is done. Enough distractions, back to it.
I just discovered (and tested, on my codebase) that in J2SE5 Swing, you no longer have to get the content pane in order to add something to another component. This was always wierd, because you could call add() and -- even though it was acceptable to the compiler -- nothing would happen; instead you had to call getContentPane().add(). (There's probably something in here about the failure of static type checking to solve the problem of calling the wrong method.)
At the same time (and this may have been the case for awhile; I might easily have missed a meeting about Swing), all the examples in the Swing Tutorial now have main()s that look like this:
public static void main(String[] args) {
// Schedule a job for the event-dispatching thread:
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() { createAndShowGUI(); }
});
}
As an experiment, I imported the current code base for Thinking in Java 4e into the latest Eclipse 3.1 beta, since everyone has been saying how very compliant it is to J2SE5. After fooling around a bit to get rid of classpath and package import issues, my code base, which builds without problem, reported 1021 errors in Eclipse. A lot of these errors came from other errors, and one of the show-stopper starting errors is this one:
The type List is not generic;
it cannot be parameterized with arguments <Character>
List<Character> chars = new ArrayList<Character>();
ArrayList<Character> chars = new ArrayList<Character>();
People have been bugging me about Ruby again, suggesting I write "Thinking in Ruby." Here are some fragments and replies from one conversation. The writer is talking about available books:
The first is the "Pragmatic Programmers Guide to Ruby" ... This book isknown as the "PickAxe Book" and is the standard reference most Rubyists keep at the ready... The online version covers Ruby version 1.6.7. A newer version of the book has been released recently and is updated for the current version of the language (1.8.2 ) . http://www.rubycentral.com/book
The next reference material would be "Why's Poignant Guide to Ruby". This, by far, is the most unconventional piece of reading I've ever found, but it has enough humor interjected to keep people reading. It's a bizarre piece of work, but you may find it to your liking. http://poignantguide.net/ruby
The last of the "standard" tutorials that I would refer you to (of the ones I've read myself) would be the Ruby tutorial that comes in the standard install. A copy is available through the Ruby Online Documentation website: http://www.ruby-doc.org/docs/ruby-doc-bundle/Tutorial
Having another world class author that got fired up and started releasing books would be wonderful ( The thought of a 'Thinking in Ruby' book is just too much ... )
5.times { print "Odelay!" }
exit unless "restaurant".include? "aura"
IT Conversations has a great speech by Macolm Gladwell (author of "The Tipping Point") about marketing and customer feedback, and how people don't tell you what they really want. This destroyed some of my preconceptions and really made me think. He starts by telling the story of the Aeron chair (apparently the most successful office chair in history) and how all the focus groups universally hated it.
I've long struggled with a variant of this problem: how to know that a public seminar will have a certain number of attendees before deciding to hold it. If I could do that I'll bet I could give a lot more seminars. I think it requires some kind of upside-down inversion-of-control thinking to solve the puzzle. Such as: "groups form around various ideas, and when they reach a certain number of committed members they can commission a seminar." A big problem is that it's not a casual commitment since it's a traveling-and-full-immersion experience, and people have date conflicts etc. But the upshot is that if there's a way that a group of people can form and say to me "we have this many people willing to pay this much for a seminar on one of these dates," we'd work something out. I would imagine that the early committers would get the benefit of lower prices, as incentive to commit, and those that came after the seminar was officially announced would have to pay more.
I think my fascination in the past few years has been in productivity and how (sometimes very subtle) things can increase and decrease productivity. Also the psychology behind this -- how we can often cling to things we are convinced are productivity enhancers which are actually reducing productivity.
And is there any way to awaken ourselves when we get stuck? Or is it like premature optimization -- regardless of how often we say "first make it work, then make it fast" to ourselves, we will always be inexorably drawn into the trap of thinking "well, I could do it that way but I know it would be slower."