Metacircular thoughts

February 21, 2007

Exercises in bad web design: IBM developerWorks tutorials

Filed under: Web development — metacircular @ 9:38 am

IBM has quite an investment in Java; they are a driving force behind Eclipse and have a wide suite of Java-related products. Thus, the more people doing Java business applications there are, the better for them.

So, why, then, do you have to register to view tutorials such as this one about using iBATIS with Apache Derby? So that they can get my email address in the hopes of sending email about their products? That’s not a real permission relationship that they’ve established. They have my email address, but they twisted my arm to get it, and I’ll resent them if they send me anything, and most developers are likely to do the same.

It makes no sense. And then, when you sign up, they have the gall to make you fill out or look at tons of useless fields. You don’t need my name (much less my address or any other crap), you need a working email address, at most. See how that works? You give them an inch and they think they can take a mile. And then even after that you have to read through pointless legalese-laden license agreements to download the source for the examples.

This is retarded.

I think I know what happened. They’re using an inflexible CMS that they have to use for everything so it’s equally frustrating for all content accessed. They want one One CMS to Rule Them [i.e., the users] All. They probably copy-and-pasted a standard user input form that asks for your name, social security number, bank account numbers, and mother’s maiden name. We’re pragmatic, we’re IBM developers, we can’t possibly screw up.

My default reaction when presented with such a situation is not to endure their insolence, but instead to hop over to Google and type in:

intitle:"Index of" ibatis in action +(pdf|chm|zip|rar) -inurl:html -inurl:htm -inurl:jsp -inurl:asp -inurl:php and be on my way. How you like them apples? How does it feel to be a rolling stone, bitch? You pissed me off so much I’m typing an angry blog entry about you, such is the degree of my discontent. Word.

February 20, 2007

So, what’s going on with Scala?

Filed under: Scala — metacircular @ 5:47 pm

I haven’t written about Scala in a while. Here are some updates.

  • I’m working on an RSS aggregator designed for browsing thousands of feeds. I’m implementing it as a desktop application using SWT and JFace. I plan on releasing several components of it independently for use in other applications.
  • Phillip Haller is continuing to work on the actors library, adding a notion of futures, which I don’t really understand, but it’s probably pretty useful if you do. The actors library is kind of a wild frontier and I don’t get how to use it. Supposedly a tutorial is in the works but knowing how the LAMP people document things they’ll probably spend 90% of it talking about how it was implemented rather than how to use it.
  • A web framework is in the works and will be released quite soon. Many other people have bits of Scala web programming code they intend to polish off in a releasable form, including code that has been used for real, heavy client work for over a year (not bad considering Scala was only an idea for a new language 5 years ago). When the unreleased web code becomes available I will be on it like stink on poop: screencasts and tutorials lie ahead. I will raise hell if things get too design-y/enterprisey in any Scala web code.
  • Steady incremental releases of both the main Scala distribution and the Eclipse plugin continue.
  • The Scala mailing list is sufficiently active that Martin Odersky has considered splitting it off into a low-volume mailing list for announcements only (which I suppose is what the Scala list initially basically was) and a higher-volume list for the kind of chatter that occurs normally (e.g., me struggling to figure out code using asynchronous message passing).

Thought leaders like Martin Fowler, Bruce Eckel, and Dave Thomas who tend to be early adopters of new agile technologies continue to not really notice Scala (although Eckel wrote a brief blog entry mentioning it). If we can get a good web toolchain in place, improve the Eclipse plugin, and add mock objects to SUnit/Rehersal, I don’t think they’ll have a good reason to continue ignoring it as an option for Java developers looking for something more expressive but don’t want to leave the JVM behind.

Afterthought: We also have an IRC channel, #scala on Freenode (irc.freenode.net). There’s currently 13 people in there, so it’s definitely growing.

Afterthought 2: I ran some crude tests for benchmarking event-based actors as per Joe Armstrong’s concurrency challenge where you set up a ring of n processes and send a simple message around the ring m times, and basically event-based actors in Scala scale like a motherfucking demon. Details here.

OMG WordPress supports math!

Filed under: Uncategorized — metacircular @ 4:05 am

You can now use \LaTeX for math typesetting in WordPress!

Here is the classic proof of the infinitude of the primes.

Claim. Let P = \{n \in \mathbb{Z}\textrm{ }|\textrm{ }n\textrm{ is prime}\}. Then we have |P| = \infty.

Proof. Suppose P were finite; that is, P = \{p_1, p_2, \ldots, p_n\}. Let k=p_1p_2{\cdots}p_n+1. Then since k > p_i for all i, k is not prime. Thus, there exists some p_i such that p_i | k. But surely p_i | p_1{\cdots}p_n. But then p_i | (k-p_1{\cdots}p_n)=1, a contradiction. Therefore |P| = \infty.

I will now proceed to rave to everyone I know (Kevin!) about this.

Microsoft’s bullshit “Shared source” license

Filed under: The Dark Side — metacircular @ 1:03 am

Microsoft’s Shared Source license is proof that you can give away access to source code and still not have free software.

Here are some choice excerpts from the License for F#.

You may not use or distribute this Software or any derivative works in any form for commercial purposes, except as follows: [bullshit exceptions follow]

In return, we simply require that you agree:
That if any of the Software is in binary format, you will not attempt to modify such portions of the Software, or to reverse engineer or decompile them, except and only to the extent authorized by applicable law. … That Microsoft is granted back, without any restrictions or limitations, a non-exclusive, perpetual, irrevocable, royalty-free, assignable and sub-licensable license, to reproduce, publicly perform or display, install, use, modify, distribute, make and have made, sell and transfer your modifications to and/or derivative works of the Software source code or data, for any purpose.

Emphasis is mine. So basically you only have access to the source but can’t really use it for commercial purposes as you see fit (e.g., you couldn’t fork off a language and then do commercial stuff with that). And no matter what you do, Microsoft automatically has the right to a slice of your action.

Fuck Microsoft.

Here’s the biggest reason to use Scala rather than F#: Scala isn’t distributed under a fascist asshole corporate-greed license.

February 19, 2007

A funny code snippet from the ThoughtWorkers

Filed under: Java, The Dark Side — metacircular @ 12:32 am

This is from a unit test in the source to CruiseControl.NET:

public void WhenTheConfigurationDoesNotContainDirectivesRelatingToShowingBalloonsItDefaultsToTrue()
...
public void CanProvideASetOfProjectStatusMonitors()
...
public void CreatesAnEmptySettingsFileIfTheConfigFileIsNotFound()

That’s auto-completion for you, I guess.

February 18, 2007

Why the Unix way rules

Filed under: Uncategorized — metacircular @ 1:22 am

Suppose you have a text file of comma-separated values that are data about blogs: the title, the URL for the site, and the URL for the feed, like:

URL 1,Title 1,Feed URL 1
URL 2,Title 2,Feed URL 2
...
URL 25000,Title 25000, Feed URL 25000

Problem is, there are many duplicated sites. As in, all the fields are the same. Many others are for the same URL but different feeds: e.g., you have both the URL for the RSS feed and the Atom feed. How do you get rid of this superfluous information?

Well, in Windows you might import it into Excel, sort by a likely duplicated field and then delete any duplicates. That doesn’t scale to large files, but it would work.

In Linux or a Windows machine with Cygwin installed, you open up a terminal, type the following:

cat blogdata | sort | uniq -w 30 > nodups

And you’re done. In the unlikely event two completely different sites have the same information up to 30 characters, you lose them, but you saved yourself a helluva lot of time and that’s worth losing a few Blogger blogs that are probably splogs anyway.

February 17, 2007

Joe Gregorio’s clever alternative to CAPTCHAs

Filed under: Uncategorized — metacircular @ 4:00 pm

You’ve probably read some articles talking about how overzealous websites make CAPTCHAs with distorted text that are really hard to read; e.g., #12 on Guy Kawasaki’s list of ways websites hinder their own market adoption. Some people have thought of alternatives to this: in Dean Allen’s Textpattern CMS, you have to review what you’ve typed at an intermediate screen which will defeat the basic automatic form parsing that spam bots are often programmed to do.

Without making you do mental arithmetic, he just asks you to put your name in a certain format:

You must enter your name followed by something in parentheses, either an email address or the URI of your web site. For example: joe (http://bitworking.org)

If you don’t enter it correctly then your comment won’t be accepted. (Hey, it’s better than making you squint at a stupid little captcha image trying to figure out the numbers and letters.)

It requires you to stop and think for a moment, but you really should stop and think for a moment if you’re going to comment on a blog entry anyway.

The essential idea of a CAPTCHA is to ask a user to carry out a hard AI task, and it need not only be visual pattern recognition; I think natural language parsing is a good candidate because we really can’t do a good job of things like machine translation and so on. The hard AI problem here is having you understand how to format data from plain text, and yet a textual task will still be compatible with people using screen readers. It would also be easier to implement for the web developer; many frameworks have basic support for input validation. Gregorio’s format would only require a straightforward regex, rather than a call to a special image generation library. And he is correct in pointing out that visual CAPTCHAs discriminate against people who have poor eyesight.

February 16, 2007

Some guy from Microsoft gave a talk about IronPython today

Filed under: The Dark Side — metacircular @ 5:18 pm

Today a Microsoft employee, Mahesh Prakriya (you can see him in a Channel 9 video here) gave a talk at my university about IronPython and other .NET scripting languages. Being a .Net language, with IronPython you get Python along with all the .Net libraries, which is even larger than I had thought. If you already knew .Net/COM stuff I guess you could be super-productive. The IronPython REPL is nicer than the default one from CPython and the integration with Visual Studio is nice if you’re willing to suffer Visual Studio.

The biggest weakness appears to be unit testing.

Basically all the good stuff in IronPython is proprietary Microsoft, Windows-only stuff that seems like it could be arbitrarily obsoleted by MS at any time. IronPython is substantially faster than CPython.

He avoided my questions about Microsoft’s lame “shared source” licenses and DRM in Vista. He politely told me that Microsoft doesn’t care about small emerging markets. They didn’t care about web applications or the Internet in general and they’ve been playing catchup against J2EE and LAMP ever since, so I don’t see why they’d still have that hubris.

I got tons of free pizza and soda, though.

Dare Obasanjo has the courage to say “WTF is this nonsense?”

Filed under: Uncategorized — metacircular @ 12:52 pm

It’s a safe bet that if an experienced developer with a considerable online presence has no idea what you’re talking about when you describe something on the Internet, you’re probably not really saying anything.

Dare Obasanjo wonders what in God’s name the Internet echo chamber term “social media” means and I for one am equally stupefied.

Has there ever been a useful Internet-related term that was invented by a non-technologist? I can’t think of any, which suggests a rule of thumb: if someone is talking about something on the Internet but they have never hacked or been a hacker in their lives, they’re full of shit and you can safely ignore the nonsense oozing out of their mouths.

There’s something subtlely Orwellian or reminiscent of the idea of truthiness about this bullshit Internet newspeak: if you’re not really saying anything, no one can rebut what you say and objective truth is destroyed, so all claims are equally valid. It’s like wrestling with 200 lbs of Jell-O. All you can do is point out that the terms of the discussion are meaningless and invalid to begin with.

Internet marketing people rattle on about “creating passionate users” and “finding mojo”, always obsessed with helping users and keeping them from feeling confused. This means shielding them from all the technical complexities of online products. And yet the marketers do not bring this concern for comprehension to people who can write code in a dozen different programming languages. It’s OK to bullshit hackers to death, I guess.

The most amazing YouTube video I have ever seen

Filed under: Uncategorized — metacircular @ 12:43 am

No hyperbole. See for yourself. It’s a video of a rocket detaching from the Space Shuttle and entering back into the atmosphere.

So that this post isn’t devoid of meaningful content, here’s a quote from Bill Hicks the video brought to mind.

The world is like a ride at an amusement park. And when you choose to go on it, you think it’s real because that’s how powerful our minds are. And the ride goes up and down and round and round. It has thrills and chills and it’s very brightly coloured and it’s very loud and it’s fun, for a while. Some people have been on the ride for a long time, and they begin to question: Is this real, or is this just a ride? And other people have remembered, and they come back to us, they say, “Hey – don’t worry, don’t be afraid ever, because this is just a ride.” And we … kill those people. “Shut him up. We have a lot invested in this ride. Shut him up. Look at my furrows of worry. Look at my big bank account and my family. This just has to be real.” It’s just a ride. But we always kill those good guys who try and tell us that, you ever notice that? And let the demons run amok. But it doesn’t matter, because – it’s just a ride. And we can change it anytime we want. It’s only a choice. No effort, no work, no job, no savings and money. A choice, right now, between fear and love. The eyes of fear want you to put bigger locks on your doors, buy guns, close yourself off. The eyes of love instead see all of us as one. Here’s what we can do to change the world, right now, to a better ride. Take all that money we spend on weapons and defenses each year and instead spend it feeding and clothing and educating the poor of the world, which it would pay for many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace.

Next Page »

Blog at WordPress.com.