March 2006 Archives

AddThis Social Bookmark Button

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the fifth of a six-part series exploring the future of programming languages (read The World’s Most Maintainable Programming Language: Part 1, The World’s Most Maintainable Programming Language: Part 2, The World’s Most Maintainable Programming Language: Part 3, The World’s Most Maintainable Programming Language: Part 4, and The World’s Mode Maintainable Programing Language: Conclusion).

AddThis Social Bookmark Button

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the fourth of a six-part series exploring the future of programming languages (read The World’s Most Maintainable Programming Language: Part 1, The World’s Most Maintainable Programming Language: Part 2, The World’s Most Maintainable Programming Language: Part 3, The World’s Most Maintainable Programming Language: Part 5, and The World’s Mode Maintainable Programing Language: Conclusion).

Sid Steward

AddThis Social Bookmark Button

WebDAV seems so web 2.0, but somehow the buzz has passed it by.

Wikipedia says:

“The WebDAV protocol’s aim is to make the World Wide Web a readable and writable medium”

Isn’t that part of the Web 2.0 anthem? Well, depending on who you talk to.

Maybe it’s too mature? Too ubiquitous? Lacks a catchy acronym?

I thought it was cool that Office supports WebDAV, but then learned:

“In Windows XP, everything in the OS can publish to a WebDAV enabled web server. … In XP, you can map a drive to a web server so that when you save a file to drive X:, for example, it is published directly to a web server.

You can also select file, open and type http://servername/folder as a pathname just as you can a drive letter or UNC pathname.”

I mean, geez. It’s like ajax before people knew it was ajax.

Or maybe I’m the only one so excited about internet-enabled client software? Break me outta this browser, baby!

Jeremy Jones

AddThis Social Bookmark Button

The announcement is here and the release notes are here.

AddThis Social Bookmark Button

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the third of a six-part series exploring the future of programming languages (read The World’s Most Maintainable Programming Language: Part 1, The World’s Most Maintainable Programming Language: Part 2, The World’s Most Maintainable Programming Language: Part 4, The World’s Most Maintainable Programming Language: Part 5, and The World’s Mode Maintainable Programing Language: Conclusion).

AddThis Social Bookmark Button

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the second of a six-part series exploring the future of programming languages (read The World’s Most Maintainable Programming Language: Part 1, The World’s Most Maintainable Programming Language: Part 3, The World’s Most Maintainable Programming Language: Part 4, The World’s Most Maintainable Programming Language: Part 5, and The World’s Most Maintainable Programing Language: Conclusion).

Jeremy Jones

AddThis Social Bookmark Button

TurboGears 0.9a2 has been released.

AddThis Social Bookmark Button

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the first of a six-part series exploring the future of programming languages (read The World’s Most Maintainable Programming Language: Part 2, The World’s Most Maintainable Programming Language: Part 3, The World’s Most Maintainable Programming Language: Part 4, The World’s Most Maintainable Programming Language: Part 5, and The World’s Mode Maintainable Programing Language: Conclusion).

Jeremy Jones

AddThis Social Bookmark Button

I’ve been noticing that my CPU utilization has been higher than I had been used to with Breezy. Running “top“ only showed me that a lot of CPU was being used, but not a process that was using it. I suspected beagle was doing something funky, so I killed it. That didn’t help. I really didn’t think that was it, but it didn’t hurt to try. It felt like something lower down that beagle out to be running. I stumbled across a bug report mentioning the same problem. The problem is in the 686 kernel and can be resolved (hopefully only temporarily) by reverting to a 386 kernel. This appears to have resolved my problem.

Now I’ve started beagle back up and he’s happily sniffing through my system, taking all the CPU time and has my CPU at a temperature that I’d be comfortable if my chicken were cooked to. Hopefully he’s just re-indexing some stuff.

Jeremy Jones

AddThis Social Bookmark Button

I just ran across this blog post about getting NetworkManager to work under Dapper. This post mentions a couple of problems. The first has to do with an icon cache which prevents NetworkManager from even starting. I wasn’t having that problem. I was getting nm-applet in my “systray”. The next problem mentioned is that /etc/network/interfaces should only contain references to the lo interface. Oops. Guess that was modified somehow during the upgrade process. I guess this problems should only occur to people upgrading to Dapper from a previous Ubuntu. I would hope that a new install of NetworkManager would fix /etc/network/interfaces.

Derek Sivers

AddThis Social Bookmark Button

Even before installing Solaris, I heard that Blastwave is the best. So I followed this perfect tutorial:

http://www.blastwave.org/howto.html

Wonderful. Like Debian apt-get, it installs everything and its dependencies from binaries. Incredibly fast.

But… it puts things in unexpected places. FreeBSD has spoiled me with EVERYTHING going in /usr/local/

Most things installed with pkg-get seem to install into /opt/csw/bin/

All of MySQL’s many subdirectories went into /opt/csw/mysql5/. All of PostgreSQL’s went into /opt/csw/postgresql/

*Do I really have to add ALL of those directories into my PATH?* (System-wide for all users, too, I guess?) What’s the typical way you Solaris fans manage these?

When installing MySQL I got this message:

Configuring service in SMF.
MySQL 5 is using Service Management Facility. The FMRI is svc:/network/cswmysql5:default

I guess my.cnf is kept at /opt/csw/mysql5/my.cnf. Data directory is /opt/csw/mysql5/var.

You can start the MySQL daemon with:
cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe &

So far this Solaris PDF called “System Administration Guide: Basic Administration” has been incredibly helpful. But man, this Service Management Facility stuff is kinda complicated.

Derek Sivers

AddThis Social Bookmark Button

I installed Solaris Express from 5 CD-Roms (downloaded & burned from opensolaris.org) on to my dual-core AMD64 box, pretty much as described, here:
http://docs.sun.com/app/docs/doc/817-0544

I installed the “Common Desktop” because I was curious about it, but I’ve decided I’m probably never going to use this as a desktop or laptop, so instead I stuck the PC in the closet, and I’m only accessing it via SSH.

Since that’s how it’s going to be : just servers in our cabinet : that’s how I want to learn to access it. Everything on the command-line. For future installs, I’ll make sure to not even install any of the GUI/X11 stuff.

First thing I noticed:
No users created. Only root.
Root doesn’t have a home (/root/) directory, either, it just uses /. Since sshd doesn’t allow root login by default, this would have to be done at the console (with keyboard+monitor attached) before turning it into SSH-only access.

For my testing, I changed /etc/ssh/sshd_config to allow root access, and kill -HUP `cat /var/run/sshd.pid`. Now I can log in as root. (I wouldn’t do this for a public/production server. I’d just add user accounts immediately.)

When I go to add user accounts, I notice two strange things:

1. no “walk-through” script, that prompts you for users’ groups, passwords, and all that.

2. even though /home/$username is the default, it won’t let you create anything there. You have to create home directories in /export/home/$username, though I don’t know why, yet. Apparently it’s going to be mounted later

I have to create my own user, like this:

groupadd derek

useradd -g derek -d /export/home/derek -s /bin/bash -c “Derek Sivers” -m -k /etc/skel derek

passwd derek

Then I have to rename local.profile and local.chshrc to .profile and .cshrc.

I make a .ssh dir && chmod 700 .ssh then copy my ssh2 keys into its authorized_keys.

Now I’m in at a familiar shell.

SURPRISINGLY MISSING:
* top
* whoami

Derek Sivers

AddThis Social Bookmark Button

Over the next couple weeks, I’m going to be learning a lot about Solaris.

Though I started with Linux in 1998, and swore by OpenBSD for two years, I’ve been using FreeBSD exclusively since 2001 for EVERYTHING, including my day-to-day laptop.

But since HostBaby is growing, I went asking the advice of people running webhosting companies much larger than mine, and Jason from TextDrive spent a couple hours raving to me about Solaris. I heard enough that made me consider switching.

I had always considered Solaris to be one of those big million-dollar things like Oracle, so I never even looked its direction. But now it’s free, and worth considering.

So - now I’ve got just a few days to try to learn enough about Solaris to get a public webserver, database-server, and NFS server up and running on it.

Along the way, discovering things I had also previously ignored, like LDAP.

I’m going to use Solaris 11 (still known as Solaris Express or OpenSolaris in March 2006, but soon to be Solaris 11.)

I’ll share my Solaris discovery process here, and I’d appreciate any advice that anyone can give.

Jeremy Jones

AddThis Social Bookmark Button

Since the release date for Ubuntu Dapper was set back 6 weeks, I decided to not wait until June to update my system. Until very recently, I had been running Ubuntu Breezy. You can read about my experiences with installing Ubuntu on my laptop in this article. On Friday, I updated my /etc/apt/sources.list to point to “dapper” rather than “breezy”. I then executed

sudo apt-get dist-upgrade

and let the upgrade process begin. Downloading and installing the packages took about two hours.

When I rebooted, everything seemed pretty normal. The bootup sequence looked a little different. It didn’t hang on “setting up network devices”, which it typically does when I’m not physically jacked into an ethernet port. It lost my previously selected GDM login screen. No big deal. I’ll reset that so I don’t have to look at the Ubuntu standard dirt colored one. Logging in worked just fine and I was pleased that at least my desktop background and window borders had survived the upgrade. But NetworkManager couldn’t find my wireless network card. Weird. This still isn’t a huge deal as gtkwifi does a great job managing my wireless connection. I’m sure NetworkManager will just need a little tweeking to get back to its previous splendor.

One thing that I really am disappointed with is that suspend to RAM is now broken. After an ongoing battle with Breezy, I finally got suspend working. In Dapper, neither my custom suspend script nor the builtin suspend functionality work properly. When I come out of suspend, my screen displays purpleish noise. Guess I’ll be hacking on that over the next few days.

Other than those two negatives, everything is running great. Everything feels a little more responsive. And it seems that my system is using a little less RAM than it was before. I blogged a week or so back about my previously non-good experience with beagle search. I am glad to say that so far, beagle has been behaving itself with regard to memory consumption. And I’m pleased with how it works.

When Dapper final is released, I plan on doing a full reinstall. Maybe it’s my experience with Windows that makes me even consider it. Or maybe I think things will run better if I give the installer a chance to find and configure my hardware. Regardless, in June, I’ll have a clean system.

Kevin Shockey

AddThis Social Bookmark Button

During the upcoming LinuxWorld Boston, TUX Magazine, Nicholas Petreley and I will present the The ABCs of Desktop Linux: Everything you Need to Start Using Linux Today. Nicholas is the Editor in Chief of Linux Journal, and ever since December 2005, I am the new Editor in Chief of TUX Magazine.

Our objective with this activity is to provide new Linux users an opportunity to see what Linux is all about. By providing high level demonstrations about Linux and Linux-based applications we hope to eliminate the fear, uncertainty, and doubt associated with a permanent switch to a Linux desktop. This free mini-seminar will run from April 4, 2006 through April 6, 2006; it will give participants a chance to meet Nicholas and myself and hear our stories about getting started with Linux.

AddThis Social Bookmark Button

My home office network connection went out for a while yesterday. Instead of taking the day off to rest and relax, I asked fellow Perl 6 and Parrot hacker Allison Randal to walk me through building a compiler for a little language with Parrot’s compiler tools.

Though we didn’t finish the project before the fairly useless telephone company fixed the problem, I learned a lot about how the compiler tools work. Here’s what I know now.

AddThis Social Bookmark Button

Dave Cross has posted a short series of slides entitled What’s Wrong with ORM. Though they’re slightly Perl-centric, they discuss weaknesses of many ORM systems of other languages too — especially not taking advantage of the power of the database.

Dave Cross

AddThis Social Bookmark Button

I’m constantly amazed by the lack of knowledge shown by some “experts” in various fields. A good example recently appeared on a mailing list for freelance consultants that I read. Someone posted a question how they could update all data in database table to ensure that all the values were in upper case. One (seriously!) suggested solution was:

Export to CSV, open in excel, make them uppercase & import back

Although, this expert did go on to admit:

I’m not sure if excel has that functionality, but I guess it does

Luckily, other people had already pointed out the obvious SQL solution before this got to the list.

It scares me that people are charging money for work that is obviously so completely outside their area of expertise.

brian d foy

AddThis Social Bookmark Button

The next issue of The Perl
Review
came out March 1, but in the switch-over to MovableType I forgot
to mention it here. The Spring 2006 issue works even for non-Perlers because it’s
full of Sudoku puzzles. If that’s not enough for you, there are articles to create more
of them, solve them, and just about anything else you want to do with them.

In this issue, along with links to the first page (and first page only!) of each article:

brian d foy

AddThis Social Bookmark Button

Several O’Reilly Perl authors will be at Powell’s Technical Books (the one at 33 NW Park Avenue) in Portland, Oregon this Saturday for a book signing and Q & A session.

Come meet:

  • Allison Randall (Perl 6 and Parrot Essentials)
  • Randal Schwartz (Learning Perl, Intermediate Perl, Perls of Wisdom, Effective Perl Programming)
  • Tom Phoenix (Learning Perl, Intermediate Perl)
  • brian d foy (Learning Perl, Intermediate Perl)
  • chromatic (Perl Testing: A Developer’s Notebook, Extreme Programming Pocket Guide)
  • Curtis Poe (Perl Hacks, out May 1)

If you don’t have these books already, you can buy them at Powell’s!

AddThis Social Bookmark Button

Jifty::DBI is yet another database abstraction layer, with object-relational mapping and (more importantly to me) schema generation. It’s part of Jifty, the new web development toolkit from Best Practical (creators of RT) and it’s a re-imagining of DBIx::SearchBuilder.

Despite its history, the public distribution is fairly new and has some rough patches, mostly related to documentation and understanding. I experimented with the latest stable release (0.16) for a couple of afternoons. Here’s what I learned.

Jeremy Jones

AddThis Social Bookmark Button

Gnome 2.14 was released within the past couple of days. I’m currently on Gnome 2.12 running under Ubuntu Breezy. Hopefully, Dapper will include 2.14.

Here’s what I’m excited about in 2.14 from what I’ve read from the release notes:

  1. Multiple Monitor Handling - they claim that multiple monitor handling is improved in this version of Gnome. Right now, I have to go through a painful ritual involving ceremonial knives and hacking my xorg.conf file in order to get into dual-head mode.
  2. Performance improvements - they benchmarked Gnome terminal printing a list of all English words in 1 second as opposed to about 3 in Gnome 2.12.
  3. The Deskbar - they don’t go into detail on the release notes page, but it looks like a task automation/facilitation utility which is pluggable with Python. I usually don’t use stuff like this, but I’m going to have to give it a spin.
  4. Image Viewer - I have yet to find an image viewer I’m absolutely in love with. The new one included in Gnome looks like it has some potential. Definitely worth a look.

2.14 contains other improvements such as enhanced searching, which I’m +0 on. I’m glad it’s there, but I don’t think I’ll use it much. The release notes mentioned that the search system would integrate with beagle. I’ll likely give beagle another try, but the last time I tried it, memory usage was unreasonably high, even on a machine with 1.25GB of RAM.

Another cool feature that they mention that I have very little use for is fast user switching. All of my desktops are pretty much single-user, but this is still a cool feature. Again, not many details were spelled out on the release notes page, but I hope it will be like Windows user switching where it preserves the desktop session when you switch.

They also mentioned that it would include GStreamer 0.10. I have not had great success with GStreamer. xine has been really easy to configure with every media format I’m interested in viewing. Any media player I use that has a GStreamer backend seems to have problems with some media types. Maybe I just need to buckle down and try to get it working with various codecs.

Altogether, I’m looking forward to it. I’m downloading the Dapper Flight 5 live CD now (which contains Gnome 2.13.92) in hopes that I can get a little closer preview into what will be in Gnome 2.14.

Jeremy Jones

AddThis Social Bookmark Button

I’ve been working quite a bit with Django lately. One of the things I really love about Django is its URL mapping and how that ties into the request handling layer (which Django refers to as the “view”). Basically, you define a regex for a URL and associate it with a function to handle matching requests. When a request comes in that matches a URL regex, the request is passed off to the corresponding function in the URL mapping. Notice that I said “function” and not “method”. The “view” (as Django refers to it, but what MVC frameworks would probably refer to as the “controller” layer) in Django is basically an event handler. It makes absolute sense for it to be a function rather than a method on some object.

As I’ve been enjoying the pragmatic design of Django’s request mapping and handling, I started thinking back to my experience with CherryPy. In CherryPy, you define a class and certain methods of that class handle requests as they come in. The URL mapping is determined by attributes of an instance of that class, so it’s really more implicit than Django’s URL mappings are. I guess the two reasons CherryPy uses an OO approach in regard to its “controller” layer (which, CherryPy isn’t a full MVC framework, but the term somewhat applies) is 1) this is probably the best way to accomplish URL mapping without having an explicit URL->handler map, and 2) it provides a way to logically structure your code.

After having worked with both URL mapping techniques, I definitely prefer Django. The whole OO approach in this regard just feels wrong to me. Static state for the application as a whole should really be in a config file. Dynamic state for the application should be in a database. And state for each specific user should really be kept in session memory. I’m sure there are legitimate uses for it, but attaching state to the handler object seems really wrong and when you’re working with an object, sometimes the temptation is to do just that (self.foo_attribute = some_funky_variable). I’m sure this probably isn’t a widespread problem among CherryPy users, I’m just mentioning that the temptation is there. Regarding separation of code, it’s really easy to structure modules of functions for logical structuring of code.

I’m not saying that CherryPy is wrong or bad for the decision that it made to use OO for its URL mapping and request handling. I’m just saying that it feels less natural to me than the approach that Django has taken. But I’m also saying that Django feels more natural to me. And this aspect of Django feels more in line with the Zen of Python than the same aspect of CherryPy, specifically “Explicit is better than implicit” and, to a lesser degree, “Flat is better than nested”.

I’m sure plenty of you will think I’m dead wrong about this. I welcome the feedback and the dialog.

Dave Cross

AddThis Social Bookmark Button

Perl has a concept called “DWIM” (do what I mean). Greg McCarroll has prototyped a idea that he calls “SWIM” (search what I mean) where he monitors the speed that you type words in a Google search box and automatically quotes words that seem to have been typed together.

There’s a fuller explanation in his blog and you can also play with the prototype.

Now we just need someone to turn it into a Greasemonkey script.

Jonathan Wellons

AddThis Social Bookmark Button

Thanks for coming to today’s steering meeting. I appreciate having all my senior staff here with me.

We’re here to discuss a difficult infrastructure direction for our business logic and data which we’re forced to make for budget reasons.

That’s right, as a young company in today’s market, we simply don’t have the cash to not backup.

I wish as much as you that we could choose to not backup, but at this point, it’s simply not feasible as a matter of money and resources. The time it takes to not backup won’t fit into our timelines — critical A-priorities would have to take resource hits and slip their schedules while we went about not backing up.

No matter how much we might like to do it, there’s no way we could fit not backing up into this year’s budget.

I hope as much as any of you that this is a temporary measure — and that sales will pick up and we’ll start to have the option again.

brian d foy

AddThis Social Bookmark Button

Intermediate Perl, the renamed Learning Perl Objects, References, and Modules (the “Alpaca” book), is off the presses and on its way to bookstores. You can now order it on Amazon (although other online retailers still list it as “pre-order”). I got my author’s copy last week (although I neglected to check my mail for a week, so I really just got it).

This edition expands and updates the previous edition. We added more chapters on Perl testing, which has become a hot topic since the first Alpaca, as well as chapters on using CPAN modules as well as creating Perl distributions using the latest tools. We updated everything for perl 5.8.

The three authors, Randal L. Schwartz, Tom Phoenix, and myself, will be at Powell’s Technical Books in Portland, Oregon on Saturday, March 25 at 1 pm for a book launch party and book signing. Since Portland is a nexus of Perl development and authorship, we’ve also invited chromatic (Perl.com editor and co-author of Perl Testing: A Developer’s Notebook) and Allison Randal (O’Reilly editor and author of Perl 6 and Parrot Essentials).

Sam Griffith

AddThis Social Bookmark Button

Related link: http://blogs.tedneward.com/2006/03/12/My+Kingdom+For+A+Good+Macro+Language.aspx

First off let me say it’s great to be on the O’Reilly site as a blogger and I hope this first entry is thought provoking. Welcome and I hope you’ll subscribe as I plan on being prolific in this blog. I’ve been doing OO development for almost 20 years now and hopefully I can share an opinion that has value to you. And with introductions over, lets get on with our first entry!

Ted Neward yesterday mentioned in his blog entry My kingdom for a good macro language! some points around the idea of us needing more features for Java, specifically:


  1. A MOP

  2. A better language for generating byte-code for the platform

  3. Macros for Java - Not preprocessor macros, but fully language level aware macros

His points led me to these questions: What do you get if you add a MOP to Java? What will allowing Lisp style Macros do to Java? Is there a better language to generate byte-code?

What do you get if you add a MOP?

Today we have some level of meta capabilities thru the reflection abilities in Java and the several Aspect-Oriented tools out there. (AspectJ, JBoss AOP, Spring AOP and others) But those clearly aren’t a MOP. A MOP is about fully exposing the languages core concepts and implementation thus allowing the language to be extended at well defined places and allowing us to provide new capabilities and extensions previously not thought of. All of that while still maintaining the same basic syntax of the language. Meta-objects and Meta-object Protocols. Aspect-Oriented programming tools give us some capabilities to reposition our behavior and to cause it to be called in the correct situations, but fall short of a true MOP. Java itself has class objects (they don’t do much, but we have them), we have Dynamic Proxies and we have XDoclet and byte-code modifiers. All this to give us the ability to work with the code and meta-system.

What will allowing Lisp Style Macros allow?

Ted mentions OpenJava as a tool that allowed macros of similar power to Lisp macros to be added to Java. This is very interesting work and you should read the papers on that site for a good understanding of what they were working towards. There is a point in the paper OpenJava: A Class-Based Macro System for Java, that I disagree with concerning the power of the Lisp macros to be customized for specific types, but lets just say that you can get that same effect using a combination of macro system with and on the Lisp MOP. As for other macro systems for Java, I don’t think we’ll see one worth working with without a MOP of some kind. If you read this paper, they basically describes a simple MOP that is able to manipulate a program at compile time and then save that meta-data in a separate set of byte-code as the JVM doesn’t need that extra info to run. But notice, that they have to separate that description and also that they save some of that data in little strings in the classes. Ted doesn’t mention whether he wants the MOP data around at run-time. But for us suffice to say macros are about allowing us to have code that manipulates code that we have and either modifies it or creates new code.

Is there a better language to generate byte-code?

On the better language for generating byte-code he doesn’t really reference anything besides the work Microsoft is doing on the CLR and CLI stuff for .NET. He does mention them as more language friendly but does mention that it mostly has the same drawbacks as the Java platform. I conjecture that the byte-codes lack of full power is part of the issue. This is why SUN is going to add a new byte-code to support scripting languages.

There was a push both internally and externally early on in Java’s history before 1.0 was even out, to extend the byte-code in concert with Parc-Place Systems (an old Smalltalk vendor - some of who’s employees went to SUN to work on Java) to support more of this dynamic capability including MOPs, but choose not too.

So what do we get really if we add all that?

I conjecture one step “Back to the Future!”. Ted mentions one of the single most powerful languages ever invented right at the start. Lisp. He then mentions one of it’s most powerful features. The code as data - data as code idea. Lisp almost from the start had this idea that you can manipulate the program. It’s 40 years old in the Lisp incarnation. Lisp 1.5 was based on S-expressions (denoted in Lisp by those parentheses you may hate). The big idea being that the language itself was self describing. The compile parser and run-time parser deal with the same representation, as do you! Love the S-expression! That’s part of it’s power. The MOP of Lisp really is only for CLOS, not for the Lisp language, because the Lisp language already has a great meta-level capability in it’s READER and it’s macro system which Ted alludes too. But can we get as much power and simplicity and expressiveness by adding a MOP and macro system to Java?

I dare say we can not! But we may get closer…

Lets look at Ruby as he mentions it in his blog. He shows how Ruby using it’s meta-level features allows what appear to be new keywords to be added to the language. These are attr_reader and attr_writter. But he then calls them terse. You can’t have it both ways.

If you want full MOPs and macros, then calling the Ruby terse is negating your own request. All macros will be terse in that situation. This is akin to the argument we saw a few months ago about minimal API’s versus humane API’s. People have no problem creating all kinds of utility helper classes and methods, but doing it thru some meta-level operation is somehow terse. The point clearly defeats itself. I guess something that looks like a function call is “OK”, but something that looks like a language extension is not. Well, put your minds at ease because the Ruby that is mentioned is exactly that! The Ruby is just some method calls that are standard, but are implemented via the meta-level layer in Ruby and provided via that meta layer.

Ruby is not typed, making code generation easier. The thing to notice though is that in the Ruby code (you’ll have to follow the link to the Person class he mentions to see the full code), method calls can happen anywhere! Those attr_* methods are called right at the top. There’s really no special place for them. In Java things are not so simple! Lisp has the same thing going for it. Function calls can be done anywhere! This has to do with the fact that the language definitions for Ruby and Lisp are simpler than the one for Java. The fact is they have less syntax and less syntax actually provides more power!

While Ruby and Lisp have less syntax they can both appear to add new capabilities to the language itself, not just a new library. Today people are doing that with the tools mentioned above and are now starting to do it with the new Annotations added in Java 5. Aren’t those terse too? They certainly added new syntax and more special rules about when and how they work, etc. Compare that to just a simple method call. Seems the method call is easier to understand, debug, put in to the system in the first place, more pure, etc.

Why is that it seems more pure for Ruby and Lisp? Because the languages were built with the idea that a rich meta system was important. Java’s concerns were different and coming back and adding something as intrinsic as a MOP and macros is going to be difficult to do. And adding more syntax creates more special cases and rules etc. that makes your MOP much harder and the macro system more complicated. Not only that, but the code manipulator will me more complicated too! But does that matter to us if we get the MOP and the macros? I think it does and here’s why: If we expect to use that same MOP and macro system, then we want it to be nice and clean and easy to use and understand and without all kinds of exceptions and special cases. Think Java Generics. Lots os special syntax, special cases, etc. Java is now much harder to read. Terse if you will!

So the Java world is now going in lots of directions it seems to me. 1) We have new features being added to the language at a glacial speed. 2) We have new wants and desires being expressed for more power at the language level itself for programmers. 3) We have the want for simplicity, readability, etc. 4) We have the people who want only one way to do something and the people who want more than one way to do some things (minimal vs. humane).

Underlying all that is a language that was created for remote controls, set-top boxes and interactive television! A language with a syntax to appeal to C and C++ coders, networking and security being the prime concerns. A language whose least concern was a meta-level self description!

Instead of adding a MOP etc, we’ve seen Java add what the C++ community added. Java has taken a similar track to that community and it’s not surprising. Most of the converts were old C++ people. Not people who used and programmed highly meta-level systems. But now we as programmers have been influenced by the more dynamic meta-level systems community and the power of those systems that we lust for.

We’ve used all the patterns to try and get close to what we really want, we’ve added Aspects, we’ve used refection and dynamic proxies and byte-code manipulation….. but what do we really want….? No really, what is it we really want?

What do we want?

To me its as clear as the nose on my face… we want a totally new language that we don’t have to learn, that gives us all the power we already have, can use our current libraries and provides us all the power of yester-year and still is flexible enough to add new features at any time!!!

And no I’m not kidding! To add a MOP and macro system and a different code generator, we are basically talking about a new language. Maybe a familiar syntax will still be kept, but it will be a new language. Much as Java 5 really is a new language. Once you start using it’s features, you program differently, you solve your problems differently…. it is a new language. It’s changes are that significant. No set of Java features before I would say that about, but Java 5 was. And it’s all due to the Annotations and Generics. Terse is being kind here.

So if we’re going for a new language why don’t we start with the meta-level stuff being in from the beginning along with security, networking, multiple language friendliness, a better byte-code set, a MOP, macros, and all the other stuff we’re hearing people want now!

Or maybe we’re not going to have a new language…. because we don’t want to leave behind our frameworks!… How sad a choice that would be. A new language would empower us to make much better frameworks with out the limitations and the code bloat we see today to just so that we can simulate those powerful features we want.

I’d also suggest that we also add optional typing to the mix. We have a perfect example of how to do it. Again it’s Lisp. Lisp itself lets you specify the type of a variable or object optionally, it also lets you specify a safety level and a optimization level allowing you full control over both type safety, runtime safety as well as how much it will try and optimize around that variable to gain speed/safety. Lets use that so that we can have a language that is both a fully generalize language good for full systems development as well as for scripting. And let that safety be linked in to the secure environment, etc.

We have as programmers and developers a great example of the things we seem to be clamoring for Java to add and it is Lisp. Code is Data/Data is code, full macro system, fully controllable typing system, customizable parser (the reader), a MOP, self aware system, highly efficient code generation, able to operate in compiled or interpreted mode, simple syntax, etc. (You’ll find all these in Smalltalk as well)

Ruby is a nice partitioning of some of those features, and you can see how hot that community has gotten over it. Java caused the same stir in it’s day with garbage collection, networking libraries standard, threads standard. But no language right now has all that we seem to want. Not even the .NET CLR/CLI set of tools and languages.

We need a new language….. or we need to “Go Back to the Future”. I myself, think going back to the future by building on Lisp or Smalltalk is the shorter path, but I know that the syntax is a big issue. Lisp has always been a ball of mud in that it could take on anything and still look like Lisp even though it now had all kinds of new capabilities. CLOS being a perfect example. But because I’m enlightened and experienced and I’ve seen history over these almost 20 years I’ve been programming, I know that the majority is what makes a new language stick and for that we will need a “New Language”!

In closing, any time you want to dump on Lisp or Smalltalk or some of those “other” languages, look closely at them again. Then create “Hello, World” in Java and Swing (9 Meg just to print “hello”) and then the other language. Then look at what all you need to run a J2EE app server vs. something similar in one of those other languages, look at there web frameworks, etc. Then compare how humane there libraries are verses Java’s. Finally, think that some of them can do all the same stuff we do in Java in about 1/8th the RAM and code size and for the most part they are just as stable and scale just as well as the Java tools do. Then think why? Can we get to that point with a “New Language” You bet we can!

Having said all that, Java isn’t really bad… We are as programmers growing to want more power than ever before and it’s leading us the same place it lead those researchers all those years ago. Kinda nice to know that isn’t it? It’s also kinda nice to know that we have a community that is pushing the envelope and pushing the language vendor to add new power all the time.

Here’s hoping I’ve stirred the pot a bit….

Till next time - Thanks for reading….

Please let me know what you thought and your viewpoint on MOPS, macros and whether you think we need a new language.

Derek Sivers

AddThis Social Bookmark Button

I’m creating a CONSTANT value that I want my whole Rails app to see.

I put it in config/environment.rb, down at the bottom, just like it tells me to.
(”# Include your application configuration below”)

But - I wanted to access that CONSTANT from config/routes.rb

No luck. Wouldn’t see it. Very confused.

I moved the definition of that CONSTANT up at the top - before the Rails::Initializer.run line

Now it works.

Duh!

Brian K. Jones

AddThis Social Bookmark Button

There’s a rule of thumb that’s been passed down to me from earlier generations of systems administrators that I will occasionally forget. I’m always sorry when I do. Not only that, but I’m also often sorry when another administrator forgets it, because it makes helping them very hard (and I like helping other admins where I can). Here’s the scoop:

Let’s say an employee has just left your firm. Let’s say, for giggles, that he was a webmaster who maintained several LAMP-driven applications. Well, you’ll need to change a few passwords on a few databases, in a few files for the applications, maybe change a pg_hba.conf file here, a slapd.conf there, etc., etc. Well, don’t do any of this until you perform this essential step: without making ANY CHANGES to the configuration or anything else, simply shut down and then restart the service.

In a perfect world, this is a waste of time. It is not a perfect world. Suppose the ex-employee made a last minute change and figured it would be reflected after the next downtime - a downtime they will now not be present to see. Suppose the employee was disgruntled and planted a present there for you. The point isn’t to determine whether malice was involved or not, the point is that you, as an administrator, need to get to a place where you’re confident that the service is still healthy.

If you DO NOT restart the service before making the requisite changes, and the service doesn’t restart properly, well, how can you be sure the service wasn’t borked before you made your changes? And so how are you going to determine where to start troubleshooting? Looking at your own changes may or may not be a waste of time. Who knows?

Well, I hope this has helped someone. Share your war stories about a time when this bit you!

AddThis Social Bookmark Button

KinoSearch is a CPAN distribution that’s a Perlish port of the powerful Apache Lucene search engine. (In one sense, it’s a competitor to the earlier Plucene project.) Here’s what I learned from playing with it one afternoon.

Jeremy Jones

AddThis Social Bookmark Button

Cherrypy is a web development framework written in and for the Python language.

Jeremy Jones

AddThis Social Bookmark Button

Beta 4 of IronPython has been released. The release details are here.

Iron Python in Microsoft’s implementation of the Python language for the DotNet f framework/runtime.

Jeremy Jones

AddThis Social Bookmark Button

The lead developers of the Django Project, Adrian and Jacob, are authoring a book about Django. The announcement is here. Apress will be publishing the book. Interestingly, the book will be released under an open source license. This is reminiscent of another exellent Python book, Text Processing in Python. I really look forward to getting my hands on a copy of this book.

Jeremy Jones

AddThis Social Bookmark Button

How do open source projects sustain themselves? In the financial sense, I mean. Sometimes, a large corporation will offer a project funding. Or perhaps they will hire the primary developer and allow him to continue working on the project, as Microsoft has done with IronPython. But what about projects who aren’t fortunate enough to gain that class of corporate funding? Or who aren’t actively seeking it?

Most open source authors that I know of aren’t writing their software for the money they hope to make with it. They work on it because they love it and would do it even if there is no hope of gaining funding of any sort. They work on their projects in their spare moments before and after the job that pays the bills and when they aren’t enjoying time spent with their families.

Sometimes, a project gains a large enough of a user base that the project’s author is able to offer his services around the project on a paid basis. Recently, Kevin Dangoor, the creator of TurboGears, announced that he would be offering consulting services around TurboGears, primarily development of TurboGears features, coaching, and training.

I love seeing open source authors take the initiative to help fund their project by finding a way to charge for their time on it. This is a win-win-win situation. It’s an obvious win for the project author since they get paid for doing something they love. It’s a win for the person or company who is paying for the author’s time since the author is an expert on the subject. And it’s a win for the community because the primary author is able to devote more time to the project. Kevin, I’m sure you’ll get plenty of business. I wish you much success in this endeavor.

Derek Sivers

AddThis Social Bookmark Button

Related link: http://radar.oreilly.com/archives/2006/03/entrepreneurial_proverbs.html

Entrepreneurial Proverbs. Awesome.

Derek Sivers

AddThis Social Bookmark Button

Related link: http://www.jbrowse.com/text/unij.html

For those interested in internationalization - or those who have heard Japanese-natives say they don’t like Unicode, check out Unicode in Japan - Guide to a technical and psychological struggle. A wonderful and thorough attempt to explain why Unicode gets a bad rap in Japan.

If you have something to say about it, please tell the author at ben@jbrowse.com instead of telling me, here.

AddThis Social Bookmark Button

One of the big myths that advocates of static typing like to wave around is the idea that having the compiler catch certain types of errors reduces the likelihood of errors in your program.

One of the big arguments of dynamic typing advocates is that you still have to write tests for your code and those types of errors don’t often come up anyway.

Now no one ought to take the arguments of C, C++, or Java programmers seriously when they start talking about the strength of their typing systems, but when certain Haskell advocates claim that “If it compiles, it’s likely correct!” then things get a little ridiculous.

Derek Sivers

AddThis Social Bookmark Button

My little webhosting company is growing faster than expected, and I’m still using the same approach to hardware as I was in 2000 when I started it. Started asking for advice from experienced sysadmins, and here are some notes from my first conversation with a guy that ran a huge webhosting center for a few years.

(Note: I’m not going to clean up these notes too much. Mostly just posting here for my own reference, and maybe it’s helpful to someone else out there, as-is.)

Where you run into problems:
Not so much the storage. It’s the TCP/IP stack.
Building up and tearing down connections for 400 domains.
Lots of contact-switching and overhead. Even adding more RAM won’t help.

Huge companies (Yahoo) end up moving to hardware-based TCP/IP off of kernel into hardware. Redbank is one vendor of that kinda thing. But those are extremely expensive.

I would say SATA drives are the way to go.
Instead of slapping them into one box & doing RAID there, look into doing ISCSI - SCSI-over-ethernet. Like Fibre Channel but that’s too expensive. ISCSI is the answer to that : doing the same as Fibre Channel with a little less performance.

Files dished-up by webserver are read-only. When writing, don’t need performance,
Commerically, look at VMWARE. Virtualizes your box, run on
Open-source version of VMWARE is XEN.
Boxes with 2-4 CPU and 32G of RAM : 16-20 instances of FreeBSD/Linux on it.
The advantage is the TCP/IP stack.
Also lets you virtualize your storage.

If you were to do something like ISCSI : not a fileserver. You can add things like new disks without rebooting FreeBSD.

Myself, I’ve only used VMWARE the commercial version. ($6000 or something for 2CPU version)

Example: if you have a 2CPU box and you update to a 4CPU box, you won’t see that much improvement, since it comes down to the TCP/IP stack.

Don’t think centralized file serving, think centralized disk serving.

If you have 12 SATA disks in a RAID. You can chop that up into many. /dev/wda0 /dev/wda1 /dev/wda2 into 500 megs each.

One client says they want to use all 2 gigs for his website, so we publish another virtual disk that’s 2 gigs, map it to web-1, carve it up how you like. Now you can easily publish up more pieces of our array.

There are performance reasons to not just have those SATA disks be a big partition. I can take my SATA array and stripe it : RAID cards in server.

Do something totally external : a different device sitting in the rack with a bunch of disks.

We may end up with 12 disks sitting in a server. But a server right next to it has more disk space that we wish we could use.

Coming up with centralized disk space. Biggest bang-per-buck for flexibility.

Dell Blade server : 8 blades : each blade had 8 VMware instannces. This one blade box had 32 servers.
VMWARE - makes it easier to publishing disks to different instances.

One of the things you’d do with VMWARE/XEN : you make your vanilla build : a snapshot of your O.S. install, You copy that file and call it FreeBSD-gold1 or whatever, change a couple things in the startup file, clone it.

Boxes that do external storage : I haven’t myself done something with ISCSI : “Left Hand Network”.

SAN didn’t exist when he was doing this. SAN exists in two forms (1) fibre channel (2) iSCSI.

First place to look is to centralize your disks.

AddThis Social Bookmark Button

It was a very quiet February.

Coming soon from the (UK) Guardian:

From New York City BSD UG

Worth reading:

Misc

NetBSD

OpenBSD

AddThis Social Bookmark Button

XML::XPathEngine is a Perl distribution that allows you to use XPath expressions to navigate tree-like data structures. Here’s what I learned from experimenting with it.

AddThis Social Bookmark Button

Microsoft’s new ASP.NET 2.0 training center has something additional — a PHP Cross-training site. Of course, the site really wants to convince PHP developers that learning ASP.NET in addition to PHP will make them more employable… but it looks like the site runs normal PHP articles as well without the “Hey, use something else!” evangelism, so it could be useful.

Besides that, like Chad Fowler points out in My Job Went to India, learning something new almost never hurts.

(Disclaimer: the O’Reilly Network helps CMP run the site. ONLamp has no other connection to it though.)

Jeremy Jones

AddThis Social Bookmark Button

I keep hearing people say that they don’t see a common thread in everything that Google is doing. What does a website building application (and hosting) have to do with an online store? And what does email have to do with free wifi? I may be way off base, but the answer is pretty clear to me. It’s all about your information. They want to know where you are surfing, what you are reading in your email, what things you are purchasing. They’d like to know what brand of toilet paper you use, too, but I guess they’ll just have to settle for what they can glean off of your use of their services. So, the more offerings they provide, the more of your information they can harvest. (And, by the way, the cost of all of these “free” offerings” is worth it to Google because they are able to index more of your information about you.) The more of your information they can harvest, the better they are going to be able to target you with pertinent ads. And that’s how they make their money. Google is not a search company. Google is not an ISP. They are an advertising company that sells targeted ads to its customers. And to do that, they need to collect every piece of information about you that you let them. I don’t think this is necessarily a bad thing. Sure, if you twist it a little bit, you could make it into a great movie. But I think the risk of real privacy invasion is pretty minimal.

Dave Cross

AddThis Social Bookmark Button

A fun Thunderbird extension that I installed a couple of days ago is the Display Mail User Agent Extension. This extension looks at the X-Mailer header in mail and displays the icon for the email program that was used to create the email. So now I can easily see which mail programs are used by people who write to me. Which is interesting, but hardly useful.

Of course it only knows about a certain set of programs. But I’m impressed by its breadth of coverage. Today I saw the Perl camel symbol appear next to an email. On further investigation I discovered that the email was created by someone using the Perl MIME-Tools package. So there’s a nice subtle piece of Perl advocacy.

Advertisement