Archive for the 'How the world should be' Category

Good mail client wanted

Saturday, August 1st, 2009

I’m looking for a mail client to use, that has a bare minimum of features;

  • The ability to retrieve mail from POP3 (while leaving the mail on the server) and IMAP.
  • Display of plain-text email, ability to save attachments.
  • The ability to enter the from-address in a text field (and not a drop-down from a list, even if that list is editable) when sending email.
  • The ability to display mail in a graphical table view, sortable on received date, sender, topic.
  • The ability to store mail client-side in a tree-like/directory structure, with rules to decide which mail goes to which node.
  • The ability to see, and filter on, the actual target email from the trusted Received: header (IE the email address used in the RCPT command to the trusted SMTP, not the envelope target) preferably without having to manually eyeball it out of the headers of the emails.
  • The ability to block/ HTML and images in incoming mail.

Please suggest to me mail clients that fulfil ALL of these requirements. Register and comment on this post, or send suggestions to

mailclients@w-wins.com

(or let me know on IRC or Facebook if you know me there).

Things that would be nice to have in addition:

  • Free and open source.

    • Written in Java
  • Listed with each mail: the server, protocol, and username used to download it.
  • Simple scripting interface.
  • RSS support
  • User-friendly encrypted and signed email support.

Gay rights, and rational debate

Wednesday, May 6th, 2009

I feel the need to address a couple of stupid irrational ideas that keep popping up when it comes to debates about gay marriage and gay rights. I use “gay” and “homosexual” as simplified terms for anyone with preferences outside plain heterosexuality, including bisexuals, transgenders, and so on.

First the idea gay rights depends on sexual preference being a determined trait and not a choice. “It’s not a choice” is sometimes used as a blanket defense against homosexuality being a sin, or being immoral. If you suggest that sexual preference might be a choice, or that the evidence isn’t compelling either way, you are often opposed by people that assume you are going to argue that since it might be a choice, we should try to decrease the number of homosexuals, or are told to not promote that line of thinking to give religious fundamentalists more fuel for their arguments. But this is dishonest thinking. Whether sexual preference is a choice or not doesn’t affect what rights homosexuals should have. So what if it is a choice? Homosexuality harms no one. It is not something to be fought or eliminated. I would rather Christian and Muslim fundamentalists thought I were doing wrong, and engaged me in rational debate to try to convince me, rather than think me ill or damaged, to be fixed, rather than reasoned with. Gay rights stands on its own merits, and homosexuality does not need excuses.

Next the slippery slope argument. And this goes both ways. There’s a lot of people saying that if we allow gay marriage, we must allow polygamy, and acts of bestiality, incest, pedophilia, and so on. That many of the arguments for gay rights are at their core arguments for sexual freedom of many kinds. On that last, they are right! But that in and of itself is not an argument against gay rights. If an argument seems to apply to both gay marriage and polygamy, that does not mean that all the arguments that might exist against polygamy are applicable to gay marriage. If you think polygamy is wrong and should be fought against, and someone makes an argument for gay marriage that might also apply to polygamy, you should not fight the argument on that basis, but find your arguments against polygamy, and see if they are applicable to gay marriage as well! But more importantly, gay rights proponents should not shy away from other sexual freedoms merely because they don’t want public opinion against themselves. Rational debate must come first, and using dishonest and irrational argumentation only hurts the cause in the long run. If someone says “if we allow gay marriage, why not pedophilia as well?” a good answer is “because children can’t consent, while homosexuals can”, not vague or misleading arguments like “there is no slippery slope” “those are two different things” or emotive arguments like “are you comparing me do a pedophile?!” At the same time we have to be open to the idea that if society is (or have been) wrong about homosexuality, it might be wrong about incest, or polygamy, as well. Each step has to be argued on its own, without conflating the various liberties into one.

And last one that is unique to gay rights opponents. Parenting, and a child’s rights. There’s a lot of arguments these days that a child needs both a mother and a father, and that just two parents of the same gender isn’t enough. Or that we don’t know enough about how same-gendered parents affect children, so we shouldn’t experiment. There are several problems with this kind of thinking. The first is that all these arguments apply equally to either single parents, be it divorced parents, an unknown father, or even a widow or widower; economically poor parents; or foster or adopting parents. There is no argument for allowing these kind of parents that does not equally argue for allowing same-sexed parents. The other is that all parenting is a gamble. There is never any guarantee that parents will raise their kid well. I bet every single parent feel the fear that they won’t be doing right by child, and an uncertainty of how their child will turn out despite their efforts. There is no deterministic “good parent” button, and especially not one that heterosexual couples have exclusive access to. Every single child raised is an experiment.

The chilling effects of copyleft

Sunday, May 18th, 2008

I’m a programmer. I enjoy writing code, especially reusable software components. I don’t believe in copyrights, certainly not on software. Code may be written by someone, but it can not, should not, be owned by anyone. Code is maths, and owning code is akin to owning pi, or e, and restricting what kind of thinking other people can do. I think we are way past the point where copyrights hinders innovation, rather than encourage it as originally intended.

Copyleft is an idea popularized by GNU and the Free Software Foundation, that claims to work towards ensuring certain freedoms when it comes to software, by publishing software under the GNU General Public License (GPL), that has as one of its main points that derivative works can only be distributed under the same or a compatible license.

The problem is that people might want to release their source code under a freer license, but also wish to not reinvent code already released under the GPL. The GPL thus cause extra work for the principled programmer, who will have to laboriously write new code to do exactly the same that the GPL code does, while being careful not to copy, or base the design of the new library, on the old one. In the worst case such a task is too much, and innovation that would otherwise happen fails to come about, and everyone is impoverished as a result.

Richard Stallman raves against “software hoarding”; companies that take some free product, adds in their own innovations, and releases the result with a more restrictive license, commercially. He writes that this makes software less free. Which is just plain wrong. Because if someone takes free software A, improves it, and releases unfree software B, the world has more freedom. Software A does not go away, everyone can still use and base their improvements on that piece, ignoring B, but in addition they also have the choice of using B. The company that makes B might not be very nice, they are accepting a gift, and not giving back in turn. But they are still doing some good, they are still innovating. Their ideas, if not their code, can be utilized in free software. (Granted that software patents, an even greater evil than copyrights, don’t apply.)

The GNU GPL works within current law. It strongly relies on copyrights. To enforce it, the laws and law enforcement mechanisms are utilized. If the copyright laws were weakened, the GPL would lose some of its power. The GPL thus gives programmers who have released under the license an incentive to work towards upholding copyright laws. But copyright laws are inherently dangerous; the law essentially dictates what Joe Hacker and Bob Hacker can do with their own personal property, their own computers. To enforce such a thing, law enforcement must be able to detect when Joe distributes some piece of information to Bob. The transfer might be encrypted for privacy, so now law enforcement has to have a way to force encryption keys from suspects, or encryption must be banned entirely. The transfer might be on a completely private network, so now law enforcement has to have a way to tell when any person is communicating with any other through privately owned equipment, or networks must be forced to register its traffic with authorities, and hidden networks banned. Giving law enforcement such powers, or banning such things, violates basic civil and human rights.

An ethical programmer will avoid assist in maintaining copyrights. He will release the code he writes on his own into the public domain. He will help write libraries that duplicate what GPL and proprietary libraries do, but this time, make them really free. And he will be free to lobby for weakening copyright laws and the enforcement thereof, free to acts of civil disobedience that undermines copyrights, and free to stand up for the basic rights of privacy and presumption of innocence.

Cargo cult prefixes

Monday, September 3rd, 2007

XML is neat. I like it very much, and get to use it quite a bit at work. I especially like JAXB, Java’s binding system, which has a very useful tool, XJC, the XML to Java Compiler. What it does is take an XSD, that is, a W3C XML Schema file, describing the structure and data types of an XML document format, and turns it into annotated Java classes. These classes can then be used by JAXB’s unmarshalling system to turn any XML file matching this document format, into a set of instance of these classes.

With some utility classes to wrap things up neatly, the code to read in, say, an XML configuration file, is as easy as this:


public void main(String[] args){
    Configuration config=new Unmarshaller<Configuration>("config.xsd",Config.class).unmarshall();
    Socket socket=new Socket(config.getHostname(),config.getPort());
    for(Configuration.User user:config.getUser()){
        // Do something with the user object....
    }
}

Anyway, Java was not what I was going to write about. It’s just that coding Java, and being reliant on XSD files, I get into contact with some of them written by others. Whether it’s people wanting help on IRC channels I frequent, or a partner system at work that my code has to interface with, I have to read the schema and try to understand it. To get to my point, let me show you two examples.

First example


<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">

<xs:element name="note">
    <xs:complexType>
      <xs:sequence>
	<xs:element name="to" type="xs:string"/>
	<xs:element name="from" type="xs:string"/>
	<xs:element name="heading" type="xs:string"/>
	<xs:element name="body" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
</xs:element>

</xs:schema>

Second example


<?xml version="1.0"?>
<schema xmlns             ="http://www.w3.org/2001/XMLSchema"
        targetNamespace   ="http://www.w3schools.com"
        elementFormDefault="qualified">
  <element name="note">
    <complexType>
      <sequence>
	<element name="to" type="string"/>
	<element name="from" type="string"/>
	<element name="heading" type="string"/>
	<element name="body" type="string"/>
      </sequence>
    </complexType>
  </element>
</schema>

The first example is from W3schools schema howto, the second is my improved version. Now, besides the better indentation, what was my main improvement? I removed the prefix for the XMLSchema namespace! This is something I see all over the place. Guides and tutorials all over the net do the same, and newbies mimic it.

XML has some attributes that start with xmlns; these have a special meaning. xmlns:something=”http://something.else/” defines a namespace prefix, “something” that is an alias for the namespace “http://something.else/”. This is a way to specify what namespace a tag belongs to. When you later write <something:a/> (given that that a is a descendant of the element where you defined the prefix), that declares that the a tag belongs to the “http://something.else/” namespace. But it is only a way to specify namespaces. Typing prefixes everywhere gets tiresome, and it makes the text harder to read. And having the text easy to read for a human is one of the key goals of XML, and a great benefit of it. So there’s an alternative method. You can just say xmlns=”http://something.else/” and that tag and every tag within it is of the namespace “http://something.else/”! Of course, if you need to mix namespaces, you typically use prefixes. But you can use xmlns for the most prevalent namespace, and the prefixes for the exceptions, or if one namespace set is nested wholly within another, just use the xmlns attribute twice.

So why do people keep asking for help with overly ugly schemas, with documents with a prefix on every single tag? Why do tutorials and guides do the same? I think the problems is merely a lack of understanding of namespaces. People are just doing what the people before them did, without an understanding of WHY those special attributes are what they are, or what those letters before the tag mean. Like the cults that have given cargo cult programming their name, they are merely copying the visible efforts that seem to give the right results, without an understanding of what makes them work.

Don’t be that way. Namespaces might be more complex than the simplicity of tags and attributes, but they aren’t that hard to use. Take the time to learn how they work, and how you declare them. Not only will your documents be much more readable and you’ll be typing less, but you will have learned an important part of what makes XML tick, gained a better understanding of it.

Not Our Problem

Monday, May 21st, 2007

It’s not our problem that…

  • you have a deadline and need help now. Help comes when those that can provide it want to, and mentioning deadlines, how urgent your question is, or similar, will only lessen the chance of getting timely help.
  • your professor gives you an assignment limiting what tools you can use to solve it. Don’t be upset when we recommend what you aren’t allowed to use. Chances are your professor wants you to think for yourself anyway; ask him, or your fellow students, for help instead. Unless the constraints of the problem are really interesting, no one on irc is going to help you solve it in an unrealistic way.
  • your boss or client thinks there is something wrong with the correct way to do things. We can help you with arguments you can use to convince your boss or client, but don’t push for alternate solutions. It’s your job to guide him to the correct solution, not to blindly give him what he says he wants.
  • you use sucky software X. We’ll suggest sane solutions, not hacks to work around deficiencies in obsolete products.
  • you don’t want to redesign your system from the bottom up, doing it the right way this time. You shouldn’t add features to a broken system.
  • the proper IRC channel where your question is on topic is dead or empty. No, we don’t know where you should go for help. Search the web or something, find a mailing list or a forum if an active IRC channel does not exist.