Martin Fowler has a neat little article on refactoring class statics using instance variables. Most languages can’t support polymorphism for static methods. e.g.
class A{
public void doInitStuff() { /*do stuff necessary for static init of B objects*/};
} ...
}
class B extends A{
public void doInitStuff() { /*do other stuff necessary for static init of B objects*/};
} ...
}
...
A a = new B();
A.doInitStuff(); /* but I'd quite like to polymorphically call B.doStuff(); Actually, could be trouble! */
Martin’s solution is very elegant.
Month: November 2004
Picked up a very interesting article from taint.org (thank you Justin) about “selves and others”, website which keeps track of the published articles of speakers, writers and journalists with leftish political views. Having followed the link to selves and others I was intrigued by another link to Stephen Zunes article on Arafat’s role in the Israeli-Palestinian peace process. Now that Arafat has died and the eulogies are flowing in, it’s useful to recap on his leadership of the PLO; his beliefs and policies. Well worth a read for anybody with a passing interest in middleeastern politics.
Eagle Lander 3d
Ever wondered what it would be like to pilot one NASA’s Apollo missions. Well thanks to Ron Monsen and his team you can find out using the eagle lander 3d flight simulator
Eagle Lander 3D (EL3D) is an authentic simulation of the Apollo lunar landings and includes accurate renditions of scenery, flight dynamics and the lunar module. EL3D has developed from a freeware first generation Apollo 11 simulator to one that will recreate every Apollo landing mission. Currently EL3D includes Apollo 11,12, 15, a LM racing course and an orbital module. Other missions will easily ‘plug-in’.
EL3D is designed to realistically render the physics and dynamics of the lunar module as well as the terrain of the lunar surface. EL3D uses the latest in graphical 3D technology to provide high resolution renditions of the LM, it’s instruments, and the lunar surface in the region of the current landing site. All primary flight instruments work like the originals with many operating control panel switches too. The Apollo Guidance Computer has been modeled and works just like the original including the famous 1201 Alarm Code on Apollo 11!
This project really is a labour of love and it’s one of the best flight-sim’s (and a bit more) that I’ve ever experienced..
As Ron says, if you have any recommendations for changes then just get on the forum and make them… “Try that with Microsoft”
Right to Bear Arms (or is there?)
We all know that the American consitution protects citizens rights to bear arms. Wrong! It’s a bit more subtle than that. The 2nd amendments actually reads: “A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.”. There is much debate about whether this amendment only applies to state sanctioned militias (whatever they might be in the event of civil-war?) However, we can all agree that there’s quite a difference when the 1st half of the amendment is included. So while organisations like the National Rifle Association (NRA) have done their best to popularise the myth that the 2nd amendment is an unlimited excuse to buy an automatic assault rifle for hunting deer or family protection their claims are actually quite tenuous. The US supreme court has deemed that this amendment applies to federal law only, doesn’t affect gun-control laws passed by individual states and actually “means no more than (the right to keep and bear arms) shall not be infringed by Congress”. For all you legal buffs out there, this ruling was passed almost 130 years ago in 1876 (United States v. Cruikshank). This was reaffirmed ten years later in Presser v. Illinois. Various state gun control laws have been upheld based on these decisions for years. In 1980 the Supreme Court again presented the opinion that “these legislative restrictions on the use of firearms do not trench upon any constitutionally protected liberties”. So American’s don’t have the right to bear arms? It’s a myth right? Unfortunately after over a hundred years of consistency in interpretation of this amendment the US supreme court executive branch (including former AG John Ashcroft) presented THEIR INTERPRETATION in 2002 that the 2nd amendment DOES in fact protect the US citizens right to own guns. This doesn’t necessarily obviate gun-control or personal responsibility in the choice of gun(s) owned. Indeed according to the most recent pre-election harris poll in 2004 a slim majority of 52% favour tougher gun control laws.
Up until 2002, however, this supposed “right to bear arms” was actually a bit of a myth and flew in the face of the Supreme Court’s interpretation of the 2nd amendment. It may be a moot point as 73% of american’s agreed (in 2002) with the sentiment of their “consitutional right to bear arms”. Big enough lie, often enough etc…
There are arguments against gun control aswell. Some of these seem plausible enough, others are downright paranoid and jefferson’s quote about using firearms as a last resort to protect themselves from the tyranny of the goverment is bogus and can be filed neatly in my drawer marked right-wing, gun toting, self-justifying propaganda. If only this was just a drawer… This file gets any bigger I’m gonna need a new house.
I can’t help feel that the 2002 reinterpretation of the 2nd amendment is commentary du-jour and will not stand the test of time. The text of the amendment hasn’t been amended 😉 and it’s fair to say that the 2002 interpretation doesn’t sit easy with many lawyers in the US. Check out the excellent overlawyered.com for information on this and other aspects of US legal practice. Stunning and shocking in equal measure.
Also check out the useful summary of gun control in the US here
Thanks to Kieran Colfer for the debate and the link. You’re as sharp as ever! Mind like that oughta be subject to some kind of state legislation to keep you from hurtin’ yourself, boy! 😉