Regarding window.location
I ran across something new (at least, new to me) today. Using window.location.hash, if the same value is being assigned to the hash, the browser looks at it as a non-operation. The value needs to be reset first before reassigning the same value (e.g. for the purpose of resetting the view to the top of a dynamic list). I’ve noticed this behavior in Firefox 3 and Safari 3+.
I rarely write about coding issues, but it might be a good way to catalog my findings for my own reference. My apologies to everyone else.
Update: I thought this could use an example.
var hashVar = 'content-top';
// ASSERT: hashVar contains the same value as window.location.hash
window.location.hash = hashVar;
// Expected behavior: Window scrolls back to the 'content-top' id
// Demonstrated behavior: Window does nothing
The way that I solved this was to reset the window.location.hash value to an empty string before the reassignment.
var hashVar = 'content-top';
window.location.hash = 'adkcj';
window.location.hash = hashVar;
// Expected behavior: Window scrolls back to the 'content-top' id
// Demonstrated behavior: Window scrolls back to the 'content-top' id
Update 2: Apparently, Firefox, in the latest update, changed the behavior of the hash property. If the value is “zero-ed out”—if you will—the entire page refreshes. I’ve amended the script above so that hash is given a (hopefully) non-id value. Feel free to use a real word, but I didn’t want to take the off-chance of hitting an id I’m using.
2 commentsSuppression on Facebook
These two Facebook pages (here and here), the former of which has–ironically, perhaps–declared war on the latter, ignited quite a debate. Here’s a list of my initial thoughts before I start analyzing this:
- I don’t consider soldiers hired thugs.
- I am aware that some soldiers commit atrocities, which is a reality few people admit. Given the conditioning soldiers endure, coupled with varying levels of power over peers, subordinates, and/or civilians, situations (read: Abu Ghraib) similar to the Stanford Prison Experiment appear inevitable.
- I consider war an atrocity (though sometimes a necessary evil), but smaller governing bodies shoulder the blame for initiating it, not the soldiers.
- I am a firm believer in freedom of speech, almost without exception.
The Iraq war is a cauldron of controversy. It started with a retaliation in Afghanistan for the events of 9/11 and, under false pretense, spilled over into Iraq. Though history has yet to ascertain the damage, it may prove to be one of the most costly and unpopular wars, ever. The Iraq war sparked a ideological issue between those that whole-heartedly support the troops versus those who disapprove of supporting the greater cause and preceding events. The “Soldiers are not heroes” profile picture is a silhouette of Satar Jabar, perched on his box, alluding to one of the most politically disastrous events for the military.
The charge against “Soldiers are not heroes” (SANH) by “Petition to REMOVE “Soldiers are not heroes” from Facebook” (PTRS) is they are using “Hate Speech and Defamatory Comments towards Allied Service Members.” Hate speech, even if meant to result in physical harm, is still–with a few exceptions–protected by the First Amendment. Interestingly enough, PTRS mentions that they “[are] not against “Freedom of Speech.” In order to argue their case, PTRS needs to prove SANH’s comments are, either, defamatory or against Facebook conduct guidelines (which I haven’t read as of this post).
SAHN’s page states (discounting wall posts and links since the source may or may not be the views of the creators):
Does the thought of hero worshiping our armed forces make you want to vomit your spleen out?
Are you fed up of being told that soldiers deserve constant gushing praise?
Stand up and show members of the armed forces what you really think of them and their participation in needless bloodshed.
Though meant to be offensive, the above contains nothing that could be interpreted as hate speech. The group requests that its members wear t-shirts with extremely controversial slogans (e.g. ”Proud not to murder civilians for a living,” ”I was raped by soldiers and all I got was this lousy t-shirt,” etc.). Unfortunately, because of the satirical nature and debatable validity of these statements, it, again, would be difficult to prove any of these as defamatory. To clarify the group’s purpose, SANH’s page posted this in its “Recent News” section:
This group is a parody of the group ’support your soldiers in uniform!!!’
http://www.facebook.com/group.php?gid=11911667121&ref=shareThis group is intended to point out the absurdity of the many groups on facebook that portray all soldiers to be heroes and shower the armed forces with unconditional praise.
Putting on a soldiers uniform and becoming part of a murderous organisation does not make you a hero.
Supporters of the group generally agree that the wars that our armed forces are participating in at the present time and in recent years are unecessary and unjust. Therefore we don’t feel that we should be pressured into offering ’support’ to people fighting and killing innocent people for causes that we don’t believe in.
We recognise that the government are mainly to blame but also think that members of the forces need to take responsiblity for their own actions in choosing to support these causes. Soldiers have free will and the opportunity to not sign/re-sign up if they feel they are being asked to participate in an unjust war, so they also deserve a proportion of the blame if they choose to stay.
We also find it amusing how so many of those who claim to ‘protect our freedoms of speech’ tell us to shut up, or be duffed up.
“Soldiers are not heroes. They can be heroes, they can act heroically, they can do heroic things – but the act of putting on a uniform and agreeing to put your conscience in a lockbox for the next so many years does not make your life more important than others, it does not make your opinions and insights more worthy of respect than others, it does not exempt you from moral judgment. It does not make you a hero.
And we should not fall prey to hero-worship.”
http://whoviating.blogspot.com/2008/06/heroics.htmlLet’s protest against these group protesting against the protests against the forces ffs!!!
THIS GROUP ISN’T A SOLDIER HATRED GROUP, JUST A GROUP AGAINST THE HERO WORSHIP OF SOLDIERS.
After checking out the “Support your soldiers in uniform!!” (SYSIU) group, I have to agree that it’s a close parody, even down to a quip about the font and color on the t-shirts to keep them “uniform.” The debates on this news piece, especially regarding the soldiers’ free-will, post-enlisting, are fully open.
After a great deal of time and review, I believe PTRS is mistaken in their goal, especially if they believe their own claim to be pro-freedom-of-speech. SANH’s latest claim to be a parody and not a “soldier hatred group” seems believable. Hopefully, this Facebook skirmish stays confined within the Facebook realm and avoids the judicial system, which is always my fear when it comes to matters of freedom–or suppression–of speech.
No commentsAnother 5 AM
I don’t want to sleep.
OK…that’s not entirely true. At 5 AM, I wish I could sleep, but my mind’s too active and, seemingly, uncontrollable: I think about shows, past/current relationships (intimate and platonic), work, mistakes, random scenarios (real and imagined), etc, etc, ad infinitum…
Maybe “life’s too complicated,” “I make life complicated,” or some other unoriginal thought. I want the reality of an Iron & Wine song:
One more drink tonight as your gray stallion rests
Where he lays in the reins
For all of the speed and the strength he gaveOne more kiss tonight from some tall stable girl
She’s like grace from the earth
When you’re all tuckered out and tameOne more tired thing the gray moon on the rise
When your want from the day
Makes you to curse in your sleep at nightOne more gift to bring we may well find you laid
Like your steed in his reins
Tangled too tight and too long to fight
The warmth of Sam Bean’s voice and the beautiful simplicity of his lyrics entices me into an idyllic life of horses and stable girls.
Realistically, I need to be able to afford the stable, horses, and tall, female employees. Besides, could I really leave the comfort, the connectivity, and the knowledge behind? I don’t require much, though I think I need more. Love, food, and horses might be all that’s needed.
…and sleep.
3 commentsAnother Great Post
This is just another brilliant post by The Undecided Blogger. As usual, it’s thoughtful, accessible, and pertinent to both the coming election and the education system.
Check it out.
No commentsI Thought His Name Was Lower Case
Some poems stick with me. I’ve thought of this poem by E. E. Cummings since high school: anyone lived in a pretty how town. Though I don’t entirely understand the imagery (you can take that statement from the school of thought that says the author has a distinct message to convey), I like the poem for the same reasons I love Mike Doughty; there’s a rhythm and a resonance in the word choice.
when by now and tree by leaf
she laughed his joy she cried his grief
bird by snow and stir by still
anyone’s any was all to hersomeones married their everyones
laughed their cryings and did their dance
(sleep wake hope and then)they
said their nevers they slept their dream
I enjoy it based on how it feels when I hear the words and not because of a deeper understanding. Why do other people enjoy it? Or why don’t they?
2 commentsA Philosopher Asks Buddha
No commentsA philosopher asked the Buddha: “Can you tell me the truth without word and without wordlessness?” The Buddha answered with silence. The philosopher thanked him for his loving kindness, thanks to which he had entered the Tao. After he left, Ananda asked what he had learned. “A good horse runs even when seeing only the shadow of the whip.”
~ Zen Flesh, Zen Bones
A Little Food For Though
For those of us still reeling from the Sarah Palin Interview, check this out.
No commentsThe Dark Knight
I just came back from seeing The Dark Knight. For some odd reason, I feel disturbed and slightly unsettled. I thought the movie was great, a real tribute to the comic, but something about the movie left me feeling . . . off.
Maybe it was the characters? The Joker felt almost too real, unexplained and the embodiment of anarchistic mayhem, but I realize he’s a caricature. They all are.
Next guess?
The lack of a happy ending? I lamented earlier this evening that I need happy endings. The hopeless romantic in me wants to see love . . . somewhere. This movie exhibited love as an offering to be sacrificed, but I don’t think that’s it.
I’ll have to think about it, but the more I do the less I want to.
No commentsDeath of Another Hero
Like Bill Hicks before him, we’ve lost another hero. I want to take the time to write some appropriate thoughts on him later, but I’ll leave you with a clip in the interim:
No commentsI want one of these
This is the coolest instrument that I’ve seen in a while. I think I need one. Check it:
1 comment