Efectos EspecialesRamblings, rants, musings, ideas and observations. Topics include (but are not limited to): programming (especially Python), books, games (especially CCGs and board games), astrology, design, writing, painting, etc.
Wow, I just got my first comment spam. Only two comments so far, but it's a sign that civilization is reaching even my blog now. Soon I will have to tinker with blacklists or even disable comments directly, just like the big boys of blogging! Yay! ^_^
When Latin names are rendered in English, they sometimes change, and sometimes keep their original form. The rules, if any, that affect this process, are quite mystifying, especially for names originally ending in -us or -ius.
I thought of this when looking at planet names in English vs in Dutch. Saturnus loses its -us ending, becoming Saturn. However, for Neptunus -us becomes -e, Neptune. And Mercurius becomes Mercury. To make matters even more confusing, Venus keeps its original form. So does Uranus, making it the butt of jokes.
This phenomenon is not restricted to the names of planets, of course. Any Latin name may or may not be subject to seemingly arbitrary change. Consider: Livius becomes Livy, Plinius becomes Pliny, but Ovidius doesn't become Ovidy, nor do we speak about "July" Caesar. Augustus becomes August, Pompeius becomes Pompey, Hadrianus becomes Hadrian... but Brutus doesn't become Brut, nor does Titus become Tit.
Why is that? Is there any method to this madness?
Wax 0.2.23 is out. It has a few changes that aren't spectacular technically, but an improvement when it comes to ease of use.
expand parameter in
container.AddComponent() can now take string values. The first letter of the string is significant; it can be "h" (horizontal), "v" (vertical) or "b" (both), and indicates in what direction the widget expands. (I mentioned this idea earlier, but now it's actually implemented.)
Old code using expand=number and stretch=number still works. Presuming the new way is without bugs, the old method is deprecated, but I won't remove it for a while (if at all).
Also, I added four "new" controls: HorizontalPanel, VerticalPanel, HorizontalFrame and VerticalFrame. These aren't really new, they're just plain old Panels and Frames with the
direction attribute pre-set. I often found myself writing code like this, and didn't like it:
class SomeFrame(Frame): def Body(self): p = Panel(self, direction='h') p.AddComponent(something) app = Application(SomeFrame, direction='v')
The setting of the
direction argument almost seems like an afterthought. The direction of
SomeFrame, for example, can be set to either horizontal or vertical, independent from the actual code in Body(). Of course it isn't really independent from it; the layout is done in a certain way, and I think it's a good idea to specify the layout direction of a frame/panel together with its other code. So, in Wax 0.2.23, we can write:
class SomeFrame(VerticalFrame): def Body(self): p = HorizontalPanel(self) p.AddComponent(something) app = Application(SomeFrame)
Again, the old way still works. The new controls are just shortcuts that make things a little bit clearer.
Some example code to illustrate the new way:
# expand-parameters-1.py from wax import * class MainFrame(VerticalFrame): def Body(self): b1 = Button(self, "expands horizontally") self.AddComponent(b1, expand='h') b2 = Button(self, "expands vertically") self.AddComponent(b2, expand='v') b3 = Button(self, "expands in both ways") self.AddComponent(b3, expand='b') b4 = Button(self, "does not expand") self.AddComponent(b4) self.Pack() app = Application(MainFrame, title='expand-parameters-1') app.Run()
Downloads are in the usual place. Enjoy!
[Update #1] Those PSF grants look mighty fine. Wax 1.0, anyone?
Wai wai! Niffler is so kawaii! ^_^
Apparently, not all cats are skeptics by nature...
Modern IDEs are not simply editors... they offer a plethora of functions that go way beyond editing code. While this makes for a rich programming environment, my experience is that I personally don't need many of the features in e.g. Eclipse or Komodo, at least not when programming in Python.
The presence of gratuitous features wouldn't be so bad, if they didn't take up space on the screen and/or hog resources. Basically, all I want to see is the text of the file I'm editing. A column with line numbers is fine, and maybe a class browser so it's easy to find functions and classes in a (large) file. But I sure as !@$#% do NOT want to see little windows above, below, left and right, forcing the actual editor screen to occupy a tiny 200x200 or so somewhere in the middle. Also, I definitely don't want to wait 5-10 seconds whenever I type ".", waiting for the editor to load code completion data.
Some of the features that I don't need are:
- Code completion. A good idea in a statically typed language, like Java or Delphi; not such a good idea in Python. There are many situations where it doesn't work well. Consider the following function:
def blah(x, y, z):(The _ indicates the position of the cursor.) How can the editor look up methods for
x? It has no way of determining what
xis. Heck, at this point I might not even be sure what it is myself. IMHO, if a feature doesn't always work, it might as well be absent.
- Debugger. I very rarely use a debugger, simply because I don't think they're necessary or even useful. Instead, unit testing gets me a long way, and for some informal diagnostics, you can always stick a
- Projects. Can be nice in other environments, but I think it only complicates things, often giving you yet another little window to manage. Python has no notion of a "project" like Delphi's
.dprfiles, and I don't miss it.
- Version control. A good programming principle is that one program (class, module, etc) should do one thing, and do it well. So, we leave editing to the editor, and version control to
cvs, WinCVS, subversion or whatever. I want to use my editor for editing, not for juggling different versions of things.
- GUI designer. Ditto. Of course, my Cunning Plan is that with Wax, you don't *need* a GUI designer. (Although I worked a bit with Delphi today, and I must admit, a decent GUI builder can be very useful. It has a number of problems, however...)
Features that I do find useful include:
- syntax highlighting, if only to visually separate comments from code
- invoke pydoc, for quickly looking up documentation
- quickly view a standard library module's source (read-only)
- invoke PyChecker
- tabbed "browsing", so I don't have to open 20 instances of the editor at the same time
Of course, when programming in a different language than Python, all those crutches may turn out to be quite useful...
Talking about astrology in a blog mainly read by programmers (or so I assume) is apparently a sure-fire way to get heated discussion. Although so far the discussion has been polite and to the point. I've seen much worse, like the astrology newsgroups. I don't know how the situation is now, but back in 1997 the discussion there was a bit, shall we say, unprofessional. I never went back.
To fan the flames, let's add some historal attempts to (dis)prove astrology into the mix. Any discussion about such attempts will inevitably bring up the work of Michael Gauquelin, a French psychologist and statistician. 
The way I understand it, Gauquelin tried to find statistical proof (or the lack of it) for the influence of planets in certain signs. (E.g. Sun in an Air sign should make someone a thinker, or more inclined to thinking, according to traditional astrological teachings. Sun in an Earth sign would make someone more practical, etc.) He failed to find any significant correlations. 
At some point he decided to check if there was anything significant in the planet positions in horoscopes of *successful* people. (Planet position in the houses, as opposed to the signs.) For example, one would expect that Mars (associated with action, sports, strength, among other things) would have a predominant position in the horoscopes of successful athletes. Much to everyone's surprise, there was indeed such a correlation. Mars was (much) more likely to appears at the "edges" of the horoscope, i.e. at the Ascendant (eastern horizon) and the Midheaven (zenith, more or less). This is often called "The Mars Effect". Later tests proved a similar significance for other combinations of professions and planets, e.g. scientists and Saturn. 
Several attempts have been made to discredit the Mars effect, sometimes by claiming that the samples were biased. So far, the results still stand, though (but see this article).
Since these reports came out, many have claimed that this was proof that at least certain astrological concepts were true. However, there's a catch. Yes, Mars appeared significantly more than expected near the Ascendant and the Midheaven. However, these positions don't correspond to the 1st and 10th house, as astrologers would expect... they correspond to the 12th and 9th house, whose meanings have nothing to do with success or profession whatsover.
You'd think that astrologers who really value the outcome of these tests, would scratch their heads and seriously wonder if the traditional system of astrological houses isn't wrong. Maybe the 1st house is really *above* the horizon (where the 12th is now), and the 10th house is really where we traditionally assume the 9th. Or maybe the meaning of houses needs a tune-up. I wonder if there are any astrologers who actually did this and questioned the current system(s). I'll have to look that up.
More on Gauquelin and the Mars effect in this FAQ. 
Enough of astrology vs science now... in followup posts, I want to talk about some misconceptions about astrology, and maybe discuss a few of its principles. Don't worry, I am also preparing a Python-related post.
 And tennis player. This Wikipedia article on Gauquelin isn't entirely impartial, IMHO...
 I'm paraphrasing most of this from the book Het Astrologisch Argument, by Jan Gerhard Toonder, 1971.
 Note that this is only true for people who excel at their profession and/or are well-known. The correlation doesn't appear for people who don't excel.
 Such articles are usually either on astrology sites (trying to argue that there's proof for astrology) or on skeptical sites (trying to argue the opposite). It's too bad that, by the very nature of this discussion, you won't find many such articles from sources that are really independent.
Hmm, this reminds me of a game on the C64 called Deflektor, that was quite similar. Get it here.
More on that astrological thing... I should really write my Wax article today, but there you go. :-)
In spite of what many people think, astrology is not about prediction.
Well, let me rephrase that a little. Serious astrology is usually not about prediction. Note that this disqualifies the so-called pop-astrology, the horoscopes found in newspapers and magazines.
Now that that is out of the way... Yes, there are techniques that can be, and are, used for predicting the future. Transits, for example (comparing a radix horoscope to the horoscope of a given time), or progressions. Personally, I have yet to see indications that these methods actually work, but admittedly I didn't study these areas very much.
Many "rebuttals" of astrology automatically assume that it's all about prediction, and of course claim that this doesn't work... some predictions may come true, but this is due to chance. Fair enough; I have yet to meet an astrologer who can make predictions of which a significant amount verifiably comes true. ...However, I also know that at that point I can stop reading the rebuttal, because the writer doesn't really have a clue what astrology is about. 
You see, most serious astrology is "personal"...  you take someone's horoscope and try to determine that person's character and personality. While there is of course no scientific proof for any correlation between planet positions and someone's personality, this is less shaky ground than you might expect, and I think this is what keeps many astrologers going... because they can verify themselves that planet-in-sign-X is associated with certain personality traits.
Of course, it's very difficult, if not impossible, to provide proof for such a correlation. I might "know" that person X is, say, impulsive, shy, talkative, or greedy, but how can you prove that in a way that is scientifically meaningful? Those qualifications are subjective. (Or are they? )
 Notorious enemies of astrology, like James Randi and Carl Sagan, are notoriously bad about this... they really don't know what they're talking about and obviously haven't studied astrology. Which appears to be a common ailment in people who are verbal in their loathing of astrology. You'd think that to make an informed claim about whether something cannot work, you'd have to know what it is about first.
 At least in the West, in modern times. It hasn't always been like this, as a reader pointed out. Also, other astrological systems, like Jyotish, apparently don't pay much attention to personality.
There is really a whole lot to say about this subject. A few points that I want to discuss in future posts:
- People have a ton of misconceptions about astrology.
- Can't really blame them, because everybody can call themselves astrologer, so there's a lot of incompetent ones out there, not to mention fakers. Also, everybody can just start their own "school" or "style".
- Just because the fundamentals of astrology have no roots in science (aside from the computations), doesn't mean that scientific methods should be thrown out when practicing it.
- Astrology can be abused, like everything else.
- I now think it's pointless to defend astrology in general, because this would include everybody's version of it, whether right or wrong.
- I cannot make people believe in astrology or even make them consider it, but maybe I can explain to them what attracts me to it.
- I feel no need to have a discussion about why astrology can't possibly work. Nor do I want to hear that there's no scientific proof for it... I know that. There's no scientific proof for many things that are still valuable.
When I talked about "not being allowed to believe in astrology", I didn't really mean "allowed" in the legal sense... Obviously, you don't get burned at the stake for practicing astrology, nor are you thrown in jail or are you forbidden to go in certain stores. Rather, it's more of a social thing. Freedom of speech guarantees that you can believe in astrology and are allowed to express this. The same freedom of speech allows others to ridicule your beliefs. I guess this is as good as it gets. :-)
Anyway, let's go back to that post. The "astrologer" in question is incompetent and obnoxious. Why?
1. Just because someone is born in December, doesn't necessarily mean they're a Sagittarius. Sure, there's about a 2/3 chance that they are... but there's also roughly a 1/3 chance that they're a Capricorn. The error margin is much too large to automatically assume one sign or another.
2. If someone "is a Sagittarius", that just means that the Sun was "in" Sagittarius during their time of birth.  The Sun is only one of many "planets" , and while it's a very important one, this bit of knowledge is not enough to make spurious assumptions about someone's personality. This would be akin to presuming to know someone just because they have blonde hair, or dark skin, or wear Birkenstocks, to name something.
Re #2: This is exactly what the "horoscopes" do that appears in newspaper and magazines. If there is any system behind it at all, then all they know is your Sun sign, and they don't even know where exactly it's located... just that it's "somewhere" in an area of 30° on the Ecliptic. Needless to say, trying to predict the future for 1/12 of the world's population cannot be very accurate. And needless to say, this practice doesn't exactly contribute to the image that astrology has in society.
 I know, expressions like "in Sagittarius" don't make any sense astronomically, but bear with me.
 The Sun is not a planet, of course, and neither is the Moon, but in astrology these are called planets for the sake of simplicity.
The person in question is Tim Berners-Lee, inventor of the WWW. The article claims that the WWW is the same as the internet. I don't even have to explain how wrong this is. Then again, would Telegraaf-readers care? :-)
Design and content © 2004 Electric Shock / Hans Nowak