Reviews Archives

chromatic

AddThis Social Bookmark Button

I rarely use a word processor: if I can’t write plain text in a text editor (strangely optimized for editing text), something’s gone weird in my world.

I can’t always avoid word processors, however. Occasionally I really need to read (or even edit) text saved from a word processor in something other than plain text. Usually my first task is to extract the relevant text from that format into something I might actually want to use.

AbiWord is my underappreciated aid. Not only is it quick and fast (especially in startup time), but it has one stunningly useful command line option: --to=format. That’s right. From the command line, you can convert a document in whatever evil, proprietary format AbiWord supports into something useful, without splash screens or menu popups or even taking your hand off of the keyboard to move a mouse.

As a word processor, it’s fairly nice too–doing exactly what I need to do on those rare occasions when I really really need a word processor.

Thanks to the AbiWord developers and everyone who’s contributed to the project!

Spencer Critchley

AddThis Social Bookmark Button

Drupal, one of the leading open source content management systems, is amazing. The more I learn about it the more impressed I am by the depth of thought (and amount of work) that’s gone into making it so powerful and flexible.

But, thanks to its complexity and to the large gaps and flaws in its documentation (poor documentation being a common problem with open source projects), Drupal can also be a huge time sink, frustration generator and spawner of traffic on the drupal.org forums. Now, though, comes relief: “Pro Drupal Development“, by John K. VanDyk and Matt Westgate, both of whom are key contributors to the Drupal project. If you’re thinking about doing anything beyond just installing Drupal and using its admin interface, get this book. It could quite likely save you weeks of trial and error.

Jeremy Jones

AddThis Social Bookmark Button

I noticed a link to loggrok (which is a simple log parsing library/framework) the other day on the CheeseShop updates page. I brought the link up in Firefox and decided to look at it later. Later happened this morning since I was at Walt Disney World the better part of last week.

The install for loggrok was as simple as `easy_install loggrok`. The only snag I ran into was that I needed to install the libxml2-dev and libxslt1-dev packages (under Ubuntu Edgy) for a dependency on lxml.

After I installed it, I was able to run the example program on a logfile containing the following lines:


2007-02-05 08:55:33,123 WARN THIS IS A WARNING
2007-02-05 08:55:33,123 ERROR THIS IS AN ERROR
2007-02-05 08:55:33,123 WARN THIS IS A WARNING

This seems like a nice little log parsing library. But the more interesting part of the library is that the code is quite pretty. Both the loggrok and the supporting xix library (both written by Drew Smathers) are well documented (by way of docstrings) and very clean to look through. If you don’t have use for a log parsing library/framework, I’d still recommend downloading loggrok just to look through the code to give you ideas for how to document and lay out your code. This openness which often leads to fruitful cross-pollination is one of the many reasons I love open source. Thanks, Drew!

Ming Chow

AddThis Social Bookmark Button

I will close 2006 with a summary of my game development course I taught at Tufts University earlier in the year. You may be wondering why I taught the course considering my background is primarily in computer security and privacy. As I wrote in the beginning of the year, students in my previous computer security, privacy, and politics course expressed interest in more technical content including programming. Moreover, the Tufts Experimental College asked students what courses they would like to see in the future, and many said a course on game development. What better way to expose students to computer programming and the different facets of Computer Science than game development.

I taught the class using Java. I had a little over twenty students in my class. A number of students had strong computer programming background, while others never did any programming before. I lectured on a number of standard game development topics including user interfaces, 2D graphics, game testing, texture mapping, animation, sound, and 3D graphics. Teaching the course in Java had its strengths and drawbacks. In short:

Strengths:

  • Rich 2D graphics and UI widgets (e.g. Swing) all part of the standard development kit
  • The “write once, run everywhere” paradigm worked well

Weaknesses:

  • The bugs in Java 3D and Java sound
  • Extremely deep library with obsolete and deprecated classes

Students and I didn’t observe any glaring performance issues in Java, contrary to popular belief. I also didn’t find the notion that Java “is too high-level” to be necessarily true, considering depth of the Java Sound API and support for input devices including joysticks.

The most important aspect of my course was creating games, and did that. I created five teams, each creating a different 2D game. Each team had technical and non-technical students. It would not be right if there was a team of all programmers and another team of students with no programming experience. I asked each team to submit a proposal for a game, and once approved, a design document for the game. For your pleasure, several of the games are available for download:

BattleBlocks - An arcade style game somewhere between breakout and space invaders. Available for download on SourceForge.net (JAR file).

BattleBlocks screenshot

Flauncy Space Cows - Presented by Maniacally Obese Penguins, a nifty Asteroids clone. Design document for the game is also available. Build and run the game from source.

Flauncy Space Cows screenshot

Startrain Chronicles - Based on, and extensive modifications, to Professor Andrew Davison’s “JumpingJack” (a sidescroller), presented in his book Killer Game Programming in Java. Build and run the game from source.

Startrain Chronicles screenshot

The production of games was a major accomplishment in my class. The accomplishment was reflected on my course evaluations: students were pleased that they had the opportunity to implement a 2D game, and the skills that they learned (the design, programming, and teamwork skills) were valuable. Some students wished that there was more programming involved in the course, while others wished that there was less programming in the course. In addition, several students wished that there were more discussions on the gaming business and on game engines. I enjoyed teaching the course, but it was no walk-in-the-park. Is Java relevant for game development? I think it is a great language for implementing 2D games. Several students even told me to just focus on 2D games if I do teach this course again in Java. Students and I struggled with Java 3D. For 3D games and using game engines, I feel that C++ is by far more suitable.

I cannot thank and commend my students enough for their incredible work, and for a tremendous course. So I close 2006. Back to teaching computer security and privacy in 2007.

Jeremy Jones

AddThis Social Bookmark Button

I recently promised my son, Justus, that I would set up a laptop for his exclusive use. I have an old Compaq Presario 1200 whose sole purpose is to prevent dust from gathering on a particular shelf in my bedroom. This Presario has about 192MB of RAM, a 10GB hard drive, and an 800Mhz Celeron processor. Sounds like a perfect candidate for Linux to me. I burned the Ubuntu 6.10 (Edgy) desktop CD and booted the laptop with it. It was surprisingly responsive. I ran into a little glitch when attempting to install from the desktop CD. As I blogged the other day, this method of installation stopped at 64%.

So I burned the alternate CD and tried again. At this point, let me stress the importance of checking the md5sums on both the ISO image you download and the CD itself. I burned at least one CD from an ISO which checked OK, but the CD itself turned out bad. That may have been my 64% problem mentioned above. After burning, checking, and booting into the alternate CD, the old Presario became “the little engine that could” and chugged (slowly) through until it completed successfully.

When I rebooted the Presario for the first time into Edgy, gdm came right up with a nice graphical logon. I typed in Justus’ username and password. The first thing that I noticed was that sound worked; the Ubuntu drums greeted us as we logged in. The Gnome desktop came up in what appeared to be the proper resolution, so that was one less thing I would have to worry about.

This particular laptop doesn’t have a built in network card, and it especially does not have a built-in wireless card. When I was using that exact same laptop over a year ago, I purchased a Linksys WUSB-11 wireless USB adapter. At that time (I think I ran it under Hoary and Warty), I had to compile kernel modules to get networking going. Not so with Edgy. I plugged in that same adapter, rebooted and was able to configure it. Funny thing, though; networkmanager won’t see it. It’s recognized as wlan0 rather than eth[somenumber]. So networking is another thing I don’t really have to worry about.

So far, with the exception of install media and the desktop installer, this has been a surprisingly easy experience. (Much easier, in fact, than upgrading my own laptop from Dapper to Edgy.) I doubt we’ll be able to play TuxRacer or anything with 3D requirements. I further doubt we’ll be able to play any video. But at least Compiz and Childsplay work. And that’s really why I set it up in the first place. If we can get TuxRacer working, so much the better

Ming Chow

AddThis Social Bookmark Button

When a new OS distribution is released, it is often best to do a clean install and start from scratch, right? Well, apparently not.

This past weekend, I shredded my hard drive (via shred). It literally took a day.

I downloaded the DVD ISO of Fedora Core 6 the morning of the release at work without much trouble, and burned it on a DVD. When I went home, I popped the DVD onto my machine, and to my dismay, it could not be read! So now what do I do?

I went to my half-broken iBook to download the CD ISOs for FC6. It took about 45 minutes to download the ISO of the first disc. Another 10 minutes to burn it onto a CD. I put in the first disc onto my desktop and the followed the steps. To install the general and developer workstation stuff required only the first three CDs. Okay, better than I thought.

About two hours later, I made the second and third FC6 CDs, and finished installing FC6 onto my desktop. On first boot, I saw a cpuspeed error. Worst of all, I had no networking! I rebooted my machine with an Ubuntu live CD, and there was no problem with networking. Rebooted with FC6, no networking at all. I turned off a number of services including iptables and SELinux, and still no networking.

Alas, I decided to reinstall FC5 (overwriting FC6), which I still had the DVD for. After successful installation of FC5, I turned off all the services I deemed unnecessary, including cpuspeed. Then, I ran yum, and there were problems with the repositories due to the release of FC6.

The next morning (yesterday), I re-burned the FC6 CDs. I put in the first CD and chose the upgrade option. What surprised me was that although only the first three CDs were necessary for a clean install, all five CDs were necessary for the upgrade.

The upgrade took a long time: over an hour-and-a-half. It took 30 minutes to just check the dependencies.

This time around, everything works. No cpuspeed error at startup (because I turned off the service in FC5). Most importantly, networking worked. But that annoying system beep! Quickly, I turned off system beep under Preferences > Sound.

I noticed a slight performance improvement. Sizewize with the install, not too much of a difference with FC5 (3 - 5 GB required for installation of general and developer workstation stuff).

But I do have to say, this is absolutely the prettiest Fedora Core: look-and-feel.

Despite the one day delay in getting hands-on with FC6, the good thing was that I didn’t have to go through yum hell like a lot of people were chattering about.

I performed an update of the system via yum without any problems.

Next, I used yum to install all the additional packages I needed:

  • Firestarter
  • MonoDevelop
  • privoxy
  • nmap
  • snort
  • tor
  • Wireshark

All the packages were installed successfully.

Then I downloaded and installed the following packages:

  • chkrootkit
  • John the Ripper
  • Metasploit
  • TrueCrypt
  • VMware Workstation

All the packages were installed successfully with the exception of VMware Workstation. /usr/bin/vmware-config.pl failed. Using vmware-any-any (http://ftp.cvut.cz/vmware/) didn’t help. I read that config.h is not in the kernel-devel package. Apparently, touching config.h in /usr/src/kernels/2.6.18-1.2798.fc6-i686/include/linux/ solves the problem (see http://www.vmware.com/community/thread.jspa?threadID=59513&tstart=0), but it didn’t work for me.

Finally, the goodies, namely Java and Flash. Here is a great post: http://www.linux-noob.com/forums/index.php?showtopic=2533. I decided to be adventurous and installed the media packages as well (e.g. mplayer). That document worked very well, and everything installed with a snap (many thanks).

It was surely a run-around to get Fedora Core 6 installed, but other than that, a lot of things that I have been accustomed to, work. Again, this is absolutely the prettiest Fedora Core.

Chris Tyler

AddThis Social Bookmark Button

Fedora Core 6 extends the use of the yum package manager which was also used in Core 4 and 5. In Fedora Core 6, yum has been further integrated into the Anaconda installer, the automated update service has been rewritten, and the speed has been significantly improved.

The most visible change in the installer’s use of yum is that it now permits additional repositories to be specified at installation time. This permits updates and extra packages to be incorporated into the initial installation rather than processed as a separate, later step.

Automated yum updates are now handled by the yum-updatesd service, which can be configured to simply provide notification of available updates (through dbus, which is picked up by a desktop applet, or through e-mail), to download new packages (and, optionally, their dependencies), or to install new updates as they become available. This replaces and extends the previous yum service, making it easier and more convenient to stay on top of updates. The graphical tools pup (package updater) and pirut (a graphical front-end to yum for installing and removing packages) further extend this convenience.

And finally, some parts of yum were rewritten in C, yielding a significant speed-up. Overall, package management in Fedora Core 6 is head-and-shoulders above previous releases and I think it has (finally!) become one of the distribution’s strongest points.

Chris Tyler

AddThis Social Bookmark Button

Fedora Core 6 was released today! Congratulations to all of the Fedora and upstream developers. The step to Core 6 is smaller than the step to Core 5 last spring, and the distinguishing qualities of this release are generally those of refinement and polish.

Fedora Core is one of the few Linux distributions that is hardened out-of-the-box: SELinux uses the Linux Security Module (LSM) interface to enforce system-wide policy that restricts the actions of individual processes. For the past few releases, Fedora Core has shipped with a targeted policy that is designed to protect the services and processes most likely to be attacked while leaving the rest of the system relatively unhampered. Fedora Core 6 refines and extends the targeted policy to provide better protection and less interference with untargeted applications. An improved range of policy option switches (booleans) permit the policy to be adjusted without rewriting.

SELinux works well, but since applications are not aware that SELinux is restricting them, error messages can be a bit bewildering. For example, Apache may record in its error log that a particular file does not exist, when it plainly does exist and has the correct permissions; what is happening is that SELinux is blocking Apache’s access to the file. The SELinux activity is recorded in the form of access vector cache (AVC) denial entries in the system log, but these can be time-consuming to interpret.

FC6 includes the first version of a diagnostic tool, setroubleshoot, which watches for AVC denials, notifies the desktop user of their occurrence, and optionally translates the messages into plain language with recommendations for conflict resolution. This is a fantastic tool that will go a long way toward relieving the frustration of administrators and users who are unfamiliar with SELinux (and ultimately, reduce the temptation to turn SELinux off altogether).

Chris Tyler

AddThis Social Bookmark Button

Fedora Core 6 Test 2 is out (it’s on the mirrors as test/5.91, even if not yet officially announced), revealing the feature set that is expected in the final Fedora Core 6 release in about two months’ time.

chromatic

AddThis Social Bookmark Button

Object-oriented design has faltered somewhat on the overuse of inheritance and class hierarchies at the expense of polymorphism and true typed genericity. Traits and roles form one great approach to solving those problems in an efficient, resuable, and powerful way. They’re available in Perl 6, of course — but they’re also available in Perl 5.

Curtis Poe’s and Stevan Little’s Class::Trait is the most complete implementation of traits (or roles in Perl 6) available on the CPAN today. I recently explored it for an afternoon. Here’s what I found.

Tara McGoldrick Walsh, ORN Editor

AddThis Social Bookmark Button

To keep track of my work life, I’ve been using one of those GIANT 2′ by 2′ calendar pads–you know, the kind you can order from Staples that takes up pretty much half of your existing desk space. About as low-tech as you can get, and not exactly portable. And for me, since I often split work time between O’Reilly and my home office, not exactly the best way to keep track of meetings and appointments.

(I guess I could set up a webcam pointed at my calendar at the office so I could view it when I am working from home…. Nah. Though that might be a good way to pinpoint when the folks from janitorial swipe the
bacteria-ridden water bottle off my office desk to send to the recycling bin. I think they’re trying to tell me something there. OK, I’ll admit this: to thwart their efforts, I’ve taken to putting a yellow sticky-note on my water bottle that says “Please do not throw this away!”. I figure I should have the right to decide when I’ve consumed enough bacteria.)

Serious digression aside, it’s long been time for me to get a better calendar system. I tried Outlook’s version once, played around on my partner’s Palm (there’s an interesting sentence) to see if I should get one, and way, way, way back, when it was stylish, I carried a Franklin (because they were cheaper than Day-TImers). But everything just seemed like too much work, so somehow I settled into this simpler calendar pad system. Yet when I work from home these days, I always have this uneasy feeling I am forgetting something that I’ve written down on that giant calendar pad at work.

So, when I read Giles Turnbull’s Your Life in Web Apps, I was intrigued by what he had to say about using Google Calendar. When you work in online publishing, you pretty much are always on–a necessary thing for using any of the many web apps Giles covers exhaustively in the PDF–so trying Google Calendar on for size sounded like a good idea for me. Long story, longer, here’s what I found out.

Jeremy Jones

AddThis Social Bookmark Button

I have looked at several podcast grabber applications and have been unhappy with each one of them in one way or another. So I decided to roll my own. I’ve been storing the configuration in XML, but decided to use a different format that 1) looks more human readable, and 2) provides a good method of serialization and deserialization. I decided to look at Yaml. Yes, I know that I can serialize and deserialize XML and even do pretty XML, but that kind of violates intention number 1 above.

According to the Yaml website, Yaml is a “straightforward machine parsable data serialization format designed for human readability and interaction with scripting languages such as Perl and Python.” I found a Python library for dealing with Yaml called PyYaml. It installed easily with “easy_install” and appears pretty easy to work with.

If I have a Yaml file that looks like this:

-
db_file: /home/jmjones/podcasts/oreilly.db
description: OReilly Future
download_dir: /home/jmjones/podcasts/oreillyfuture/
mode: OK
-
db_file: /home/jmjones/podcasts/change.db
description: Accelerating Change
download_dir: /home/jmjones/podcasts/change/
mode: OK

Here’s all it takes to deserialize it:

In [1]: import yaml

In [2]: yaml.load(open("podcasts.yaml", "r"))
Out[2]:
[{'db_file': '/home/jmjones/podcasts/oreilly.db',
'description': 'OReilly Future',
'download_dir': '/home/jmjones/podcasts/oreillyfuture/',
'mode': 'OK'},
{'db_file': '/home/jmjones/podcasts/change.db',
'description': 'Accelerating Change',
'download_dir': '/home/jmjones/podcasts/change/',
'mode': 'OK'}]

And given the exact data structure we took in, here’s all that’s required to get it back out to Yaml:

In [5]: y = yaml.load(open("podcasts.yaml", "r"))

In [6]: print yaml.dump(y, default_flow_style=False)
- db_file: /home/jmjones/podcasts/oreilly.db
download_dir: /home/jmjones/podcasts/oreillyfuture/
mode: OK
description: OReilly Future
- db_file: /home/jmjones/podcasts/change.db
mode: OK
download_dir: /home/jmjones/podcasts/change/
description: Accelerating Change

If you don’t give it the “default_flow_style=False” keyword argument, the output is not as pretty as otherwise:

In [4]: print yaml.dump(y)
- {db_file: /home/jmjones/podcasts/oreilly.db, download_dir: /home/jmjones/podcasts/oreillyfuture/,
description: OReilly Future, mode: OK}
- {description: Accelerating Change, db_file: /home/jmjones/podcasts/change.db, mode: OK,
download_dir: /home/jmjones/podcasts/change/}

It looks more like a plain Python dictionary. When I get a chance, I’m going to rework my podgrabber to incorporate Yaml.

Ming Chow

AddThis Social Bookmark Button

I was fortunate to receive an invitation to test Google Spreadsheets. So how does it stack up against a desktop spreadsheet application –can I do everything that I can do in Microsoft Excel or OpenOffice? I am particularly interested in:

1. Formatting cells
2. Creating and editing formulas
3. Loading and saving
4. Importing an Excel spreadsheets
5. Creating multiple sheets
6. Reference cells from multiple sheets
7. Cutting, dragging, and pasting
8. Advanced stuff (e.g. pivot tables, macros)

So here are some screenshots in action (click on thumbs to enlarge):

1b_thumb.png

Above: Renaming a spreadsheet

2a_thumb.png

Above: Selecting a column

3a_thumb.png

Above: Formatting cells

4a_thumb.png

Above: Reference cells from another sheet

5a_thumb.png

Above: Simple formula editing

6b_thumb.png

Above: Saving the spreadsheet

7a_thumb.png

Above: Opening an existing spreadsheet (saved from Google Spreadsheets)

8a_thumb.png

Above: Exporting the spreadsheet to Microsoft Excel

9a_thumb.png

Above: Importing an Excel spreadsheet from my hard disk

10a_thumb.png

Above: The imported Excel spreadsheet from my hard disk

11a_thumb.png

Above: Uh oh… Trying to open a complicated spreadsheet with macros and pivot tables

Note: tested on Windows XP w./ Firefox.

Overall, it is great. It should suit most computational needs. Most of the common actions, such as keystroke commands in Excel/OpenOffice, are applicable in Google Spreadsheets. The only things that I see are missing are support for macros (ugh!), pivot tables, and of course, charts.

Jeremy Jones

AddThis Social Bookmark Button

I’ve been all but gushing about Ubuntu since my first experience with it over a year ago and I believe my praise has been well deserved. I just installed Dapper final yesterday and I have a less gushing report. I’ll just give a quick summary here.

  • I installed from the “Desktop CD”. This started a “live CD” session and gave me an “install” icon on the desktop. That was a little disappointing. I’m sure there is a more efficient way to get to the GUI installer than starting up Gnome.
  • I wanted to look on my hard drive before I began the install and the live Gnome instance refused to mount it. It also refused to mount a USB drive I plugged in before I began the install.
  • The “install interview” process was quick and painless. There was a total of six screens to go through and not one of them required much detailed information. I count this a plus for ease of use and a minus for functionality.
  • grub just automatically installed itself to the master boot record, found my existing Windows XP install and put it in the grub configuration. That’s what I wanted to happen, but I’m not happy it just did it.
  • Pretty much everything was working after rebooting: sound, networking, synaptic touchpad including vertical scrolling.
  • NetworkManager (after I installed it) was not working appropriately after resuming from suspend. I had to do a little bit of work in the /etc/acpi scripts to get it working right. At least, I hope it is working right.
Steve Mallett

AddThis Social Bookmark Button

I reformatted my MacBook today after finding out the default installation took up a whopping 18Gigs of space.

That doesn’t sound too bad, if you’re a windows users and are watching Vista news, but to me that was just waaaayy too much HD space to give up. Consider: 80G harddrives aren’t really 80Gs. Mine was ~74 (-6). Then the install (-18), then if you load up a standard(?) 20Gs of music (-20)… thats 44Gs used up and you’re not doing anything new. Oh, and that’s less than half your drive if you got the black MacBook with the default 80G drive vs white with 60G.

Anyhoo, here’s the saga, but in short you want to do a reinstall from scratch when you get the machine and customize the install with a fine toothed comb.

Jeremy Jones

AddThis Social Bookmark Button

As I’ve mentioned here before, I’m a father of two children, aged 2 and 4. We, primarily my wife, have begun the process of homeschooling our oldest. She knows all of her letters and numbers, knows the sounds that most of the letters make, and is starting to phoenetically read simple words. I keep an eye out for educational things that I might be able to use to help teach the kids. In addition to the more traditional ABCs and 123s, my daughter is quite proficient with GCompris and ChildsPlay (as well as a number of Strawberry Shortcake-styled games). So, you can imagine that I was quite interested by this post on Ned Batchelder’s excellent blog. Ned referenced an entertaining post from David Bau’s site.

This post stirred my recollection of Guido van Robot (hereafter referred to as GvR), an education program written in Python and designed to teach programming. I installed it on my laptop from the Ubuntu repository and brought it up. It isn’t at all intuitive what to do with it once you bring it up, so I found an online tutorial. Here is an image of the main screen:

gvr_main.png

I’ll leave reading the tutorial to the reader, but the two main concepts in GvR seem to be your world and your actions. After going through the tutorial for a couple of minutes, I created a world that looks like this:

gvr_world.png

And after loading the world into the main GvR program, my world looks like this:

gvr_main_loaded_world.png

Next, I created a program to kind of traverse the new world:

gvr_program.png

Initially, I created a square set of walls and a program to walk the robot to a wall, turn right, walk until he came to another wall, turn right, and so on. I decided it would be interesting to create a “jut” in the walls and make GvR navigate around it properly. If you run my program, you’ll notice that he winds up going to a wall, turning right, then going back and forth across the top wall. If I wanted him to really navigate the “jut” properly, I’d have to modify the logic for what to do when he comes out of a jut.

I thought this was a really clever little application that can gently teach kids (and adults!) the basics of programming. The syntax is pythonish, but doesn’t have access to the full Python language. If there is a drawback, this is it. I understand the benefit of creating a stripped down language for educational purposes, so maybe this isn’t a drawback at all. Regardless, this is a nice little piece of work and if my daughter is as curious as David Bau’s son, I’ll be introducing GvR to my daughter within a couple of years.

Jeremy Jones

AddThis Social Bookmark Button

I just happened across a mesage in the IPython mailing list where a user was trying to get IPython working with PyDev. This message sparked my interest again in PyDev. (For anyone who doesn’t know, PyDev is an extension to the Eclipse IDE which focuses on Python coding.) I’ve tried Eclipse several times over the past few years and have never been impressed with it. I’ve also tried PyDev a couple of times and never felt that it would benefit me much. However, in the spirit of openness and discovery, I’m giving it another go.

I checked my system (Ubuntu Dapper) and found that I had Eclipse 3.1.2 and PyDev 1.0.3 installed, so I fired it up. I had apparently created a workspace and project some time back since the project and workspace appeared when Eclipse came up. The first thing I was interested in was how well the code completion worked. (Maybe I’ve been brainwashed with my recent exposure to Visual Studio.) I imported the “os” module and tried to complete on “os.lis”. Ugghh. Why isn’t this working?? I went to the PyDev site and noticed that the most recent version was 1.0.6, so I updated my PyDev to that version. (Side note: Eclipse’s extension system is really slick, especially how easy it is to install and keep extensions updated.) That update certainly didn’t help at all. Then I noticed that I was trying to edit Python files in a Java project. User error! I quickly created a PyDev project and a Python source file. My “import os”, “os.lis”<CTRL><SPACE> came back with the exact results I was looking for. I found completion worked for global variables, functions, and classes as well as “self.” for attributes and methods. Very nice.

I then tried some of the items under the “Source” menu, such as commenting and uncommenting code blocks. Commenting code blocks with <CTRL>3 works great. Uncomenting with <CTRL><SHIFT>3 doesn’t seem to work for me, though. Auto-indenting works great. The refactoring seems to work pretty well. I tested it by writing a little piece of code and telling it to refactor out a method and it seemed to do so pretty cleanly. The “code collapse”ing works pretty nicely as well. You can (un)collapse with keyboard shortcuts or by clicking on the +/- in the gutter next to the appropriate pieces of code. There are a number of other utilities under the “Source” menu that I haven’t yet touched. There also appear to be some capabilities to script things with Jython. I’m also trying to get the debugger working. PyDev doesn’t appear to have a shortage of features.

I’m definitely going to have to install the SVN plugin for Eclipse and play around a little more with this. When I first tried out Eclipse, I remember it being sluggish and bloated feeling. The version I have installed is actually quite responsive. It’s hogging down a good bit more memory than I’d like, but I pretty much expect that with a tool like this. Overall, I’m really impressed with what I see with PyDev. I’m not sure I’ll be switching away from my beloved vim, but I’m sure some folks will find PyDev and Eclipse an excellent development environment. Good work, Fabio!

chromatic

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.

Advertisement