New Blog!

1 PM July 30, 2004

My new blogging software, based on CherryPy, is now up and running. I’ll blog a bit about it tomorrow, when I’m a bit awake. Meanwhile, if you notice any breakages, please leave a comment, or email me – alan dot green at cardboard dot nu.

By alang | # | Comments (0)
(Posted to Python)

Friday's Disturbing Thought

2 AM July 30, 2004

I don’t normally quote Nazis, but this is rattling around my head today:

Of course the people don’t want war. But after all, it’s the leaders of the country who determine the policy, and it’s always a simple matter to drag the people along whether it’s a democracy, a fascist dictatorship, or a parliament, or a communist dictatorship. Voice or no voice, the people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked, and denounce the pacifists for lack of patriotism, and exposing the country to greater danger.

- Herman Goering at the Nuremberg trials

(The Urban Legends reference site says it’s genuine)

By alang | # | Comments (4)
(Posted to Stuff and Christian Life)

Not Blogging for Vanity's Sake

10 AM July 29, 2004

So I was going to write a rebuttal of the blog entry I just read. It was a standard piece of technical hyperbole, so beloved of us “big picture developers.” Beginning at a false assertion, this blog entry took us forward to a glorious future, where programming is simple and we are all safe and happy, because of the wonderous wonderfulness of Technology Foo. Not that I’ve ever written anything like that myself, every couple of months right here on this blog * cough *.

Like I said, I was going rebut this offensive article, but my darling wife happened to peer over my shoulder and read a paragraph. She said, “That doesn’t make sense. It’s just a lot of big words all strung together.” And of course she was right – it was merely a wierd, esoteric pontification, and my nit-picking counter-argument would have been pure vanity. So I’m not going to get involved with the futile and insignificant, not tonight anyway. I think I’ll go watch Law and Order intead.

By alang | # | Comments (3)
(Posted to Software Development and javablogs)

gmail

3 AM July 29, 2004

Gmail is working well for me. Provided that Google don’t suddenly turn evil, or go Chapter 11 and trash my email, it looks like I’ll be with them for the long term.

By alang | # | Comments (2)
(Posted to Software Development)

Embrace and Extend

1 AM July 29, 2004

Found this paragpraph in a Microsoft document (downloadable from the Microsoft website) which sets forth the embrace-and-extend strategy for the IEEE Internet Printing Protocol (IPP):

RPC Printer Connection through Web Browser — Preferred Method

[When printing over an intranet], Windows automatically creates an RPC true-connect printer connection. True-connect, or UNC, connections have many benefits over true IPP printer connections and should be used for intranet printing (local to the company) where the security setting in Internet Explorer can be set to medium-low safely. True-connect connections are supported through the Windows remote spooler, which is where the vast majority of Microsoft’s future innovation will be — in the RPC printer connection rather than the IPP printer connection state.

Microsoft technically support the IEEE standard, but – through recommendation and program default – direct their users to a proprietary interface that is rather similar to the standard interface. They plan to extend this proprietary interface in future, moving customers even further from the standard. I particularly admire the plausible muddling of “true-connect printer connections”, with “true IPP printer connections.”

By alang | # | Comments (1)
(Posted to Software Development)

Java Inheritance Wrinkle

5 AM July 28, 2004

I discovered something about Java's type system today.

Suppose there are three Java classes, A, B and C. C extends B and B extends A. A is in package p1. B and C are in package p2. A and C are normal public classes, but B is package private. From package p3, can I see that C is a subclass of A?

In other words, given the following classes:


package p1;



public class A {

    public void sayHi() {

        System.out.println("hi");

    }

}


package p2;



class B extends p1.A {

}


package p2;



public class C extends B {

}

Will this code compile (and run)?


package p3;



public class Run {

    public static void main(String[] args) {

        p1.A c = new p2.C();

        c.sayHi();

    }

}

Answer in blue on blue text here: Yes, and I wonder what evil tricks I can pull in my public APIs as a result.

By alang | # | Comments (7)
(Posted to javablogs and Java)

DCOM Apps are Automatically Secure

1 AM July 26, 2004

From http://www.eucybervote.org/Reports/MSI-WP2-D6V2-v1.0–11.htm:

DCOM can also make distributed applications secure without any security-specific coding or design in either the client or the component.

Sure, sure. And anything written with DCOM also automatically becomes well-designed, easy to maintain, cost effective, magnificently scalable, and the key component of your customer’s order fulfillment experience.

By alang | # | Comments (1)
(Posted to Stuff)

gmail

12 AM July 26, 2004

I am so thoroughly sick of spam, I’ve decided that if I can beg a gmail invite, I’ll move all my email over there and see if the Google spam filters are as good as people say. So…

Has anyone out there got a spare gmail invite? Please mail to alan dot green at cardboard dot nu. I’ll be your best friend. (Or not, your choice :)

Update Got one! Big thanks to Mike Utech!

By alang | # | Comments (1)
(Posted to Stuff)

Friday's Peculiar Thought

12 AM July 23, 2004

I may be dumb, but I am stupid.

I’m not sure why, but Fridays are my rich mine of gems of anti-wisdom. Maybe I should call it “Fool’s Wisdom.”

By alang | # | Comments (0)
(Posted to Stuff)

What I do want in an editor/IDE

6 AM July 22, 2004

Hans lists some features that he does and doesn’t find useful in a Python IDE.

Here are four more features I’d like to see in a Python IDE:

  1. Manage import statements. When I move code around, the imports it uses should follow. Unused imports should be removed automagically.
  1. Find and run unit test suites at the press of a button.
  1. Quick sanity check tools. For example: for every self.x, check that x is defined as a function, as a class variable, in the init method or somewhere in a superclass.
  1. Support for common refactorings – turning expressions into variables and vice-versa, turning local variables into instance variables, moving a class between modules, and moving a module in the hierarchy.
By alang | # | Comments (3)
(Posted to Python)

What is an Enterprise Application?

10 PM July 21, 2004

You can tell an Enterprise application, because it was written by developers wearing ties and white shirts. Of course, for the very best scalability a three-piece suit is a must.

By alang | # | Comments (0)
(Posted to Software Development and javablogs)

Running Test Cases in WSAD

11 PM July 18, 2004

Here’s how to run JUnit over every test in a folder in WebSphere Application Developer 5.1:

  1. Select the folder in the package explorer.
  1. From the Run menu choose“Run As… > JUnit Test”.

WSAD checks through the directory and subdirectories for test case classes, and runs them as one big suite.

I suppose it works in Eclipse 2.1 too.

By alang | # | Comments (1)
(Posted to javablogs and Java)

Adams on Astrology

6 AM July 15, 2004

A Douglas Adams quote for Charles, who recently found himself hip-deep in an aggressively astrological conversation:

I know that astrology isn’t a science… of course it isn’t. It’s just an arbitrary set of rules like chess or tennis… The rules just kind of got there. They don’t make any kind of sense except in terms of themselves. But when you start to exercise those rules, all sorts of processes start to happen and you start to find out all sorts of stuff about people. In astrology the rules happen to be about stars and planets, but they could be about ducks and drakes for all the difference it would make. It’s just a way of thinking about a problem which lets the shape of that problem begin to emerge. The more rules, the tinier the rules, the more arbitrary they are, the better. It’s like throwing a handful of fine graphite dust on a piece of paper to see where the hidden indentations are. It lets you see the words that were written on the piece of paper above it that’s now been taken away and hidden. The graphite’s not important. It’s just the means of revealing the indentations. So you see, astrology’s nothing to do with astronomy. It’s just to do with people thinking about people.

(Found on the Amazon.com page for Adam’s book Mostly Harmless.)

I see Mr. Adam’s point, but isn’t that like saying that having your arm in a plaster cast is good way to find new hobbies?

By alang | # | Comments (1)
(Posted to Stuff and Christian Life)

The commons-lang Experience

6 AM July 15, 2004

Apache commons-lang saves me a lot of work. It turns out that commons-lang has a rather good Enum class. Much better than anything most developers could justify implementing for a single project, and therefore much better than the one I cobbled together an hour ago.

Rats. Rats. Rats.

By alang | # | Comments (0)
(Posted to javablogs and Java)

Anonymous Opinion is No Opinion

2 PM July 7, 2004

Anonymous opinion has zero information content.

Let me clarify that. The bulk of anonymous opinion has zero useful information content. Some anonymous opinion may contain useful thoughts, but it requires just too much effort to properly understand and judge.

In a perfect world, any statement by any person would be evaluated purely on the merit of the statement. In the real world, though, the identity of the speaker does matter. Here’s why.

Humans Communicate in Context

A simple statement such as “I took the bus to work” only communicates as much as we share context about what a “bus” is, what “work” is, what it means to “take” a bus, and who “I” am. For example, if I were to say “I took the bus to work”, I would have meant this:

I arrived at the bus stop early so I could wait in the cold bracing winter morn for five tons of clunking boneshaker that was probably going to be late anyway, then resented paying $1.80 for the trip to the train station, where I caught the train into the city.

The more you know me, the more of that you would have caught from the simple, “I took the bus to work” statement. If I had said it anonymously, it would have been completely without meaning to anybody.

Context is also important when we communicate across the Internet about professional matters. If Mr Anonymous were to write, “I am excited about Microsoft Longhorn,” I honestly would have no idea what he meant. If Robert Scoble wrote “I am excited about Microsoft Longhorn,” I would know right away.

Context is required in order for communication to occur. Identity helps establish context. Anonymous opinions are more difficult to understand because more work is required to establish the context.

Humans Trust Expertise

I read lonita’s links log. Every time I click on one of her links and enjoy it, I mentally deposit a few cents in her trustworthiness account. On the rare occasions that she has spun a dud, it was easy to forgive. It has now got to the stage where I just go to every page that she recommends, because it is probably worthwhile. Even though I have never met Lonita, I have come to the conclusion that she is an expert link hound, and I trust her judgement.

Similarly, when I read the opinion of somebody that I trust, who has some expertise in a field, I give their opinion more weight than I otherwise would. It’s not the only factor I judge by, but it is an important one.

An anonymous opinion precludes any possibility of being able to judge the expertise of the speaker. This makes evaluating the opinion more difficult.

Humans Protect Reputation

When asked my opinion on a matter I know little about, I am faced with a choice. On one hand, I could make something up, presenting half-remembered snippets as university researched world’s best practice. However, since I’d rather develop a reputation for honesty, my answer is, “I’m sorry, I don’t know much about that.”

Anonymous pundits don’t incur any penalty for dishonesty, so they may feel free to say things that are untrue, or not well thought out.

Because of this, it is harder for me to give anonymous opinion credence. I have to work harder to verify the statement’s truth before it crosses the threshold of believability.

Humans Converse

I find the to and fro of ideas that is engendered by a conversation stimulating. A typical blog “conversation” might stretch over ten people, three posts and twenty five comments and a few days.

A conversation is much more than the sum of the ideas expressed and it’s difficult to include someone when they are so rude that won’t even give a real name.

Conclusions

If you have something intelligent to say, saying it anonymously does not help your case. On top of finding your anonymity impolite, people will have trouble accepting your ideas because they don’t know your background, they cannot evaluate your expertise and they suspect your motives.

All this because you won’t leave your real name.

I recently gave up trying to evaluate anonymous opinions. It’s too hard, so I don’t bother. Because I don’t bother, they have zero information content. If you wrote an anonymous comment in order to communicate something to me, you may as well not have written it.

By alang | # | Comments (10)
(Posted to Rants and javablogs)

Things I Can't Say

5 AM July 2, 2004

In the middle of projects, I sometimes find myself in despair over the quality of the code that surrounds me. Obviously, the right response is not to have a whinge, so I don’t always ennunciate my frustrations.

Right now, though, I’m working on a project with just one other developer – a developer who thinks before he codes, and understands the implications of the code he writes. Everything is just peachy, so it’s a good time to share some of the things I’ve wanted to say previously, but couldn’t…

  • Just because you found it in a pattern book, doesn’t mean that it is good, or appropriate. I’ve yet to see a proper use of the Visitor pattern that wasn’t coded by an evil genius, the majority of Singleton implementations are broken, and the Factory has been irredeemably overused. All things considered, it’s better to come up with your own design, recognise the patterns within it, and only then consult your favourite pattern reference.
  • Just because it is a standard, doesn’t mean that it is good. Shucks, even Sun have turned their back on EJB1.0 and 2.0.
  • JNDI is not always better than a properties file. And even if it was, from where do you get the address of the LDAP server? A properties file, no?
  • If changing a configuration parameter would likely necessitate a change in the code, then that parameter should be compiled into the code. It should not be in a properties file. Duh.
  • Good API design is like good UI design. Most programmers think they’re great at both, and they’re wrong twice over. The “I“s in API and UI stands for “Interface” – not “Internals” – so don’t expose your users to the internals. Understand what your users need to do with your component and give them an interface that lets them do that with as little fuss as possible.
  • RDBMSs are not to be treated as a directory of flat files. In particular, selecting a large portion of a database table and throwing away what you don’t want is stupid. Use SQL WHERE and ORDER BY clauses.
  • Not every application needs a database. Flat files can be as ‘secure’ and and as ‘fast’ as an RDBMS.
  • I cannot think of a single system where the additional deployment and architectural complexity of EJBs is paid back by a reduction in coding time, additional integration friendliness or an increase in performance. Not to say that such a system does not exist, just that it must be rare. Oh, and transparent distribution only works when performance is not an issue.
  • Sometimes cutting and pasting is good. Throw-away code does not need to be an elegant masterpiece.
  • In most situations though, elegance is good. Elegant code is code that can be both understood and modified with a minimum of effort. DRY is a good heuristic, if not taken to extremes.
  • Bad code without bugs beats good code with bugs.
  • Shipping code with bugs beats non-shipping code without bugs.
  • Write code for clarity rather than speed. Please. More problems are caused by complicated code and than “inefficient” code.
  • Choose a design that fits the budget. Better a sub-optimal design that is fully implemented and tested than a beautiful design that is incompletely tested and not properly debugged.

That is all. Thankyou for listening.

By alang | # | Comments (6)
(Posted to javablogs, Java and Rants)

Office Dress Standard

11 PM July 1, 2004

I used to worry that I my sneakers-jeans-and-polo-shirt get up was too casual for the office. I don’t any more because David comes dressed only in shorts and an old T-shirt!

By alang | # | Comments (3)
(Posted to Tall Tales and Stuff)
© 2003-2006 Alan Green