Archive for March, 2006

Perl, Regex’s and Linguistics

Posted in Uncategorized on March 27th, 2006 by Bergo

I had heard that larry wall had a background in linguistics. I guess that all programmers are dealing with linguistics issues of syntax and semantics everyday.

But now I have some proof. In my Grammar and Discourse Subject we were talking grammatical rules such as

(NP)*

Means that the pattern, Noun Phrase, occurs “0 or more times”.

Just like in Perl Regular expressions where (Pattern)* means this patter occurs 0 or more times.

Similarly, (Pattern)+ means that the pattern occurs 1 or more time.

So the correlation between language, parsing and syntax now makes a little more sense. I have been coding in perl for 8 years, and this is the first time I knew about this. A quick discussion with my colleagues who have used regex’s revealed they didn’t know that either.

I guess this mean you don’t need to know somethings origins to use it. It just makes more sense now …

The future is unevenly distributed

Posted in Uncategorized on March 17th, 2006 by Bergo

“The future is already here it’s just unevenly distributed” - William Gibson

My Cyberpunk broodings of late are inspired by the above quote. Love him or hate him, William Gibson is often hailed as the father of Cyberpunk. His books are some of my favourites.

I remember reading about Arthur C Clark (or maybe Isaac Asimov?) saying they had the idea of geosynchronous telecomunications satellites and wrote about it decades before people actually did it.

In the book “The Shockwave Rider” we have the first mention of Computer Worm, written by a guy to hide and cover up his identity in the network. This was written in 1976 ! Even pre-cyberpunk by most reckoning, and before people had the concept of a global computer network.

I guess what I call Cyberpunk, is what would have been considered Cyberpunk in the 1980’s. Just nowadays people would call it high-tech progress. The fiction focused more on the grit, the dystopia in the extreme, but the parallels exist. Just think that 80’s cyberpunk was about:

  • Big multi-national corporates
  • Global network (call it the ‘net, cyberspace, whatever)
  • Focus on massive data repositories (Google as the index?)
  • Implants (Pacemakers now the norm, joint replacements, stem cells)
  • Hackers

I think that’s what the “Unevenly Distributed” is about. Many technologies, information and organisations exist, but it takes some critical mass for the common people to get a grip.

WikiWords are an Ugly Hack

Posted in Uncategorized on March 8th, 2006 by Bergo

I have come to think that WikiWords are an Ugly hack because they:

  1. are not intuitive (especially to non programmers who haven’t used camel case)
  2. are hard to read ( what’s better, “BasicEnglishLessons” or “Basic English Lessons” )
  3. force weird behaviour when things don’t fit (CeeLanguage for “C Language” or acronym hacking)

By the time you’ve shoehorned your words into an unreadable WikiWord, you could have marked it another way. In the early days, when Ward created Wiki this seemed like a logical simple way to do things. Nowadays I think most wikis support some form of marked up naming
e.g. [[My Long Example]] resulting visually with ‘My Long Example’
instead of
MyLongExample
Which I think is much more readable. Whitespace exists for a reason, breaking up words into readable chunks of information.

At work, we use DokuWiki for some internal documentation. It has the facility to use WikiWords, but we use the annotated form e.g. [[Secret Project]]. This seems to be acceptable for most people, and even when we were supporting WikiWords (a different wiki), people started using the non camel case linking syntax anyway. Which suggested to me people wanted something easier to read.

I guess it comes down to personal preference, some programmers may like the CamelCase WikiWords, and maybe it doesn’t bother other users once they’ve learnt it. In my upcoming “will I ever release it wiki engine” Evolution, I haven’t bothered to implement WikiWords, but that is my preference. We’ll see if that feature makes it in .. it’s an ugly hack, but quick.