The Web Design Absolutist Revolution

April 29, 2009

For too long, web designers have been subject to an infinite number of variables. Browser, operating system, mobiles, screen size, toolbars. Now, I’m all about semantic markup to make sure things are readable anywhere. But when it comes to the point that we can’t even decide how big a screen might be, we’ve gone too far.

So I’ve decided upon a revisionist view of the web. Say hello to absolutes. As of today, every user has exactly the same configuration:

  • Windows XP
  • IE6
  • 1024×768
  • One-row taskbar
  • Showing menubar, standard buttons, address bar, and status bar.

As a result, the user has exactly 593 pixels of screen height:

(Ssh, don’t tell anyone, but there is one subset of users who also has one additional toolbar, like Google or Yahoo. Those users have 566 pixels of height.)

Okay, okay, so obviously this isn’t unrealistic. But this is by far the most common configuration on the web. So if you’re concerned about screen height (or “the fold,” as I despise the fact that it’s called), 593 pixels should be the starting point of the conversation, or 566 if you absolutely need to have everything display. Start from there, and then if you need to have conversations about variables, go for it.

Advertisements

Fallout 3 – Get All Achievements in One Playthrough

April 18, 2009

I just finished Fallout 3, and I’m starting a second playthrough in order to get some achievements I couldn’t get the first time. If you want to get them all in one playthrough, here are a few tips:

  • Disarm the megaton bomb, so that you have a house right away to store stuff in
  • Look up the list of custom weapons, and as you find components, store enough of them in your house to make all the weapons. Don’t make any of the weapons yet, as it can be hard to keep track of which you make and which you find. Wait until you have the all the components and all the schematics.
  • Look up the list of bobbleheads, and make sure you get them all as you go. Note that two of them are irretrievable after a certain point in the game, so it’s best to get them ASAP: medicine and energy weapons.
  • Keep your karma neutral. Each time you reach one of the level milestones that gets you an achievement, save before you get the level, then level up. Then load the save, get a positive karma, and level up again. Do the same with negative karma. This will get you all three achievements, one for each karma level. Keeping a neutral karma shouldn’t be too difficult: the butler in your megaton house will give you purified water, which you can give to the beggar outside to gain karma. And you can always steal things to lose karma.

Obama, Piper, and Allegorical Interpretation

April 17, 2009

John Piper highlights how President Obama exegetes and applies the Sermon on the Mount:

We cannot rebuild this economy on the same pile of sand. We must build our house upon a rock. We must lay a new foundation for growth and prosperity — a foundation that will move us from an era of borrow and spend to one where we save and invest; where we consume less at home and send more exports abroad.

It’s clear how this interpretation misses the point Jesus makes of the parable: the rock is Jesus’ words.

What’s not so clear is that the same error is made by conservative pastors who use allegorical interpretation. The classic example is Origen saying that every detail in the parable of the Good Samaritan refers to something in Christian theology. No: as Jesus interprets it, the point of the parable is to love others in need.

Common allegorical errors today: the Song of Songs refers to Jesus (not, as it would seem, romantic love), many OT prophecies refer to Jesus (not, as it would seem, the land of Israel).


HttpServletRequest Demystified

April 17, 2009

Today is about the tenth time I’ve needed to redirect to a slightly modified version of the current URL. So, I have to piece together a URL from pieces in an HttpServletRequest. And I can never remember which piece is which. I know, I know, the difference between “servletPath” and “pathInfo” should be intuitively obvious to me. So now, for the last time, here is what the pieces mean, for an example URL: http://www.myserver.com:8080/appname/servletname/my/path?name=value

  • protocol – “HTTP/1.1” (you’ll have to convert this back to http or https, for example)
  • serverName – “www.myserver.com”
  • serverPort – 8080
  • contextPath – “/appname”
  • servletPath – “/servletname”
  • pathInfo – “/my/path”
  • queryString – “name=value”

Not looking at all of these values now, so some might be slightly off – please post a comment to correct me.


Submit Buttons and Ajax

April 10, 2009

We’re writing an Ajax webapp with progressive enhancement. In other words, if JavaScript is disabled, it should work – but if JavaScript is enabled, it should work better. As a general pattern, then, all of the buttons in our app are submit buttons that execute server-side behavior. When the page loads, we attach click event listeners to the buttons, to call the appropriate JavaScript methods.

By default, though, the submit buttons still try to submit the form. But we need to disable that, so that only the Ajax call happens. The first solution I tried was:

document.getElementById("myform").onsubmit=function(){return false;};

This disabled form submission altogether, which worked just fine.

The problem arose when we had a form that had to have some submit buttons work, but not all. It’s a shopping cart page, and we want “Checkout” to still submit the form and go to the checkout page; but we want the “Remove” buttons to execute Ajax calls to remove elements. They’re all in the same form, because, for example, if the user updates a quantity for one product, then removes another product, they expect the quantity change to be saved as well. So one big form.

The best solution I found for this was to actually create a new button-button, and use it to replace the submit button. At first, this seemed a bit clunky. But the problem is that the submit button wants to submit the form, and I was having trouble finding a way to prevent it from submitting. Rather than messing with its internals, it’s cleaner to create a button-button, that doesn’t want to submit.


Mark Driscoll’s Marriage Sermon: The Flip Side

April 4, 2009

I just finished listening to Mark Driscoll’s sermon on marriage for men, from 1 Peter. I did find it quite powerful and helpful: it described ways of failing to be a man that I hadn’t considered before.

But I’m a bit concerned by Driscoll’s injunction not to criticize him, but, instead, to direct that energy toward changing myself. It’s true that God will hold me accountable for my life – but he will also hold Driscoll accountable for his teaching. And any applications I do in my life on the basis of incorrect teaching will fail to be what God desires. Yes, I need to change my life; but no, I must not refrain from correcting theological errors in the meantime.

When someone teaches on a hot moral topic like domestic abuse, it’s tempting to think that you can’t criticize their message, because that would be endorsing domestic abuse. That’s a logical fallacy. Yes, Driscoll was correct that domestic abuse is a huge problem that isn’t talked about enough; but no, he was not correct about other emphases. So here are my concerns:

First and foremost, Driscoll asserted that some men mistreating their wives may not be Christians (the idea of fruit-as-evidence-of-salvation has significant problems, but I won’t address those here). Assuming, then, that they are not Christians, what is the gospel they hear?

  1. You’re acting wickedly.
  2. You should feel shame.
  3. Jesus died for you – how could you act like this?
  4. In response, you should start acting better, right now.

I don’t remember anything being mentioned about Christ’s offering his righteous and life-transforming power to anyone who believes in him. The call-to-action is simply to change your life right now. It’s difficult for me to see how this isn’t works-righteousness. I know that Driscoll believes and teaches justification by faith – but the message any nonbelievers would have received from him in this message is quite the opposite.

If you add Calvinism into the mix, the problem gets worse. Just last week, Mars Hill Church was highlighted in the press as a stronghold of “the New Calvinism.” But where is the reference to the Holy Spirit’s enabling work? Where are the prayers for enabling power, in order to be able to change one’s life? It’s not that Calvinists shouldn’t tell Christians to change their lives, but it’s that such a strong teaching of your responsibility, with so little mention of God’s sovereignty and enabling power, is not what you’d expect from the New Calvinism.

Humility. I believer Driscoll probably is a great dad, so there’s no need for him to pretend to be a poor one. But even just one statement of humility would have gone a long way. He said to the husbands in the audience who considered themselves great, that they might not be, and certainly have something to work on. But I don’t remember any instance of him acknowledging his own needs to grow. Paul considered himself the worst of all sinners, who constantly did what he did not want to do – and Driscoll is able to preach angrily about poor dads without any admission of his own wrongdoing?

Finally, swearing. I’m not here to judge – I have a swearing problem, especially when I’m alone, and it’s sin, and I hate it. But I’m not helped in this when pastors swear on the most popular Christianity podcast on iTunes. It’s now a common rhetorical device for pastors to swear, and then say to the congregation “you’re more concerned with my swearing than with the injustice I’m talking about” – a great rhetorical device, but horrible theology. On those grounds, I could preach about murder, steal someone’s wallet, then say “you’re more concerned about me stealing that wallet than about murder!” It doesn’t work. Murder is a sin, and theft is a sin. Don’t use your preaching about one sin to excuse another.

As always, if any of the details I’ve written about above are incorrect, please comment and I’ll correct them.