Mako Highlighter for Komodo Edit

I have been using Komodo Edit for my web development at work. I’m really beginning to like it. The JavaScript and HTML code completion and linter help me a lot, and the python support is very nice. Plus it has VI key bindings that actually work decently! I’ve also been playing around with Pylons and Mako more and more but, unfortunately, there is no Mako highlighter for Komodo.

So I sat down Sunday night and started hacking, and a few hours later I had a working Mako highlighter. At first it was a bit daunting, but a blog post by Eric Primislow, from Active State, made things a bit easier. If you are interested in making a code highlighter for Komodo, I highly recommend his post.

I figured that someone else might be able to use this, so I have posted the initial release here (v 0.1.1). All of the highlighting seems to work in my templates, and basic code folding works for most of the template items, except for the Python blocks.

There are still a few areas that could use some improvement. I hope to have better folding soon. I have figured out how to add HTML and CSS auto completion for the templates, but I haven’t figured out how to have it automatically installed yet. It would also be nice to add some templates and code snippets as well.

If you use it, please leave me a comment, and please let me know if you find any problems or have any suggestions.

PyCon 2007 Day 3

Day 3 has now come and gone, and after some rest my brain has recovered from information overload. I would like to give a big shout out to the Pycon organizers. They have done a wonderful job!

Keynote: Robert Lefkowitz – The Importance of Programming Literacy

r0ml getting ready for the keynote
r0ml gets ready for the keynote

The last day of pycon began with a very strong keynote for Mr. Lefkowitz. Not only was the talk very engaging, but thought provoking as well. The talk weaved through lingustics, history and computer science. His basic premise is that he wants to change how we define Computer Literacy. Today’s idea of computer literacy is teaching children how to using Powerpoint. His desire is to redefine that to include computer programming as well. If this were to come true, it begins to bring up some interesting thoughts and questions. For example, most kids can’t get through high school with out studying one of Shakespeare’s works. Are there any works of code that would be worth having students study in school? This idea also makes you want to think a little differently how you write your code. There’s way too much that I could get into in this blog post, but I highly recommend checking out the video and audio of the presentation when it is available.

Testing Talks Galore

The last day was jammed pack full of testing talks. The highlight for me was finding out more about twill, scotch, and figleaf. At a very basic level, twill is a scriptable interface to the web that you can use to test web interfaces. Mix in a little wsgi, and you get a very easy to write unit testing for your web interfaces. Scotch is a web transaction recorder that will record all of the actions going through the web, so that you can play them back at a later time. Figleaf is a more powerful code coverage tool for python that will report how much of your code has been tested.

On a bit of a related note the trac talk included showing off a new plug-in called Bitten. Bitten is a continuous integration tool that fits very nicely in trac. As code is checked in, it will build, and test everything, and provide nice reports showing how many tests passed or failed, code coverage, etc. If you are using trac, you should be using this plug in :)

Every good thing comes to an end

If you haven’t been to Pycon yet, I highly recommend it. I found out a lot about new technologies, and made a lot of friends. I hope to see you there next year!

PyCon 2007 Day 2

Day 2 at pycon came and went faster than day 1. Another exciting day, with lots of stuff to talk about.

Keynote: Adele Goldberg – eLearning Does Not Belong in Public Schools

Keynote with Adele Goldberg

While I highly respect Adele for the contributions she has made to Computer Science, I was very disappointed with this keynote speech. She gave a very impassioned diatribe which basically said that eLearning is why public education is as bad as it is today. This is one of those subjects that’s much like trying to argue politics, or religion, or vi/emacs :) I have thought about all the things that I would like to say about this, but then I would basically be no different, so I will leave it at that. Though I will add that I found it highly entertaining that after this long invigorating speech, she then demoed the “new” eLearning software that she is developing.

soaplib: an easy-to use SOAP library

I am very excited about this project. Python has needed a good, pythonic, easy to use SOAP library for a long time. If you have ever used soappy or ZSI in a large production environment, you will know what I mean :) soaplib makes it super easy to expose SOAP web services in python. And guess what! No writing WSDL!!!!!!! :) It was also nice to see that out of the box, it will support integration with Oracle SOA Suite, Axis 2, .NET, and Java 1.6. While it is still a bit young, they are heavily using it at their company Optio, and it seems to have a growing community coming around it as well.

The Star Schema in Python

This was a highly entertaining talk about how he used python to implement the star schema pattern. He showed how there are times you can do things efficiently directly in python without the overhead of a database. I think that unfortunately several people got lost trying to figure out what a star schema is.

Scaling Python for High Load websites

I was disappointed in this talk as well. I’m very involved at work with improving the performance of our web applications, and was hoping to learn some nuggets that might be able to help. Unfortunately, they brought up some of the first things that you look at. The one thing that they were way off on though, was suggesting to cache static content (javascript, css, images, etc.) with memcached!!!! Please!!!! Don’t do that!!!! Use a squid cache or a separate media server instead to serve the static content.

UPDATE — Please read Jamie’s comment below as he clarifies what they were presenting. Thanks Jamie!

Extracurricular Activities

Hanging out with some of the Pylons and SQLAlchemy guys was a lot of fun. Dinner was great, and I really enjoyed getting to know them better. I also got to hang out while some of the TurboGears and Pylons people had some amazing discussions. Before I knew it, it was 12:30! Sometimes I feel like a fly on the wall when history is being made, and a big thank you to those guys for letting some random geek hang out.

PyCon 2007 Day 1

Pycon is here! (And to all of Angie’s friends: Yes I am a geek, you will just have to suffer through it :) )

The first day has been very exciting. Some of the highlights included:

Opening Keynote: Ivan Krstic – One Laptop Per Child

I wasn’t sure what to expect from this talk, but it became very intriguing very quickly. Many of us are aware of the goals of the project — change how kids learn, which is cool by itself, but it got really cool when he got into the nitty gritty details. I also knew that they were using python, but I didn’t realize how much. They even have a view source button! At any point while a kid is using the laptop, they can hit the button, and it will show the source of whatever piece they are looking at. How cool is that?!!! Python is used in the GUI, communications, security, cryptography, file system (yes… filesystem!), and most user space code. Pretty much anything that can be done in Python is. All of that on a 366MHz AMD Geode processor with 128MB of RAM and 512MB NAND flash drive. I’ve watched this project from afar for a while, but after this talk I have been much more impressed by this project, not only in a humanitarian way but from a technological stand point as well.

Lucky OLPC Winner
This lucky guy won an OLPC

WSGI

This talk gave me a much better understanding of WSGI. It’s a thing I have been wrestling with for a while, and Ian simplified it quite a bit. In reality WSGI is such a simple concept. As Ian put it, wsgi is basically HTTP serialized as a function call. Not only does this allow you to easily hook WSGI based apps to multiple servers, or have this idea of WSGI middlware where you can intercept the HTTP stream and do some really cool stuff. But you can also link together several WSGI based apps into a single application. I really hope that the momentum behind WSGI continues, and we seem more integration in to the plethora of Python web frameworks.

Various other talks

There was a talk about unicode and internationalization which wasn’t quite what I had hoped for. Basically I learned that unicode and internationalization is really hard :)

While web panel was fun, not much was said that I’m sure most people would know already if they lurk much around any of the web frameworks presented. Hopefully, at the very least, it introduced many to the plethora of options that are available. A transcript of the events can be found here.

I did get a chance to talk with someone with Enthought, and was excited to find out that there is some interest with integrating their Traits project with an ORM, and building a web front end for that. I’m really excited about the possibilites that could result from that, and hope to talk with them some more about that.

Meeting new friends

I got to meet many people that I had only talked to virtually. It was really great to meet some of the faces from some of my favorite projects, and I look to meeting more tomorrow.

I’m looking forward to see what tomorrow has in store. And in a closing note, I know that anyone at Pycon reading this will roll their eyes, but the company that I work for is hiring python programmers. If you are interested and happen to see me, let me know, or leave a comment — at least I didn’t do it in a lighting talk ;)

And a last special thanks to all those behind the scenes putting this event togther. Each year it gets better, and better!

PyCon 2006 – Day 3

We have made it home now and my brain has had a chance to catch up now. PyCon was a blast this year, and I look forward to going next year. Here’s some summaries of what happened the last day.

Keynote: A Conversation with Bram Cohen of BitTorrent

I wasn’t sure what to expect of this keynote. It was very interesting, but the best tibits were from when Bram got totally of track and talked about things that were unrelated. One of the first rabbits that he chased was talking about version control and how difficult merging is. Evidently he has been working on some version control problems. He seemed pretty proud of it as he continued to talk about it throughout the interview. When asked about developing the first version of BitTorrent, he started into this long story about being out of a job, and living on savings. He soon ran out of savings, and figured out how to rotate through 0% intrest credit cards. He then figured that he couldn’t keep applying for more credit cards so he let all the credit card offers stack up and applied for them all at once (kids, don’t try this at home). Overall it was a very enjoyable talk.

The Rest Of The Web Stack

Ian Bicking gave a great talk about all the things that we tend to not want to think about when developing web applications. He showed tools that he has been working on to make things like project creation/management, deployment, configuration, handling multiple installs of applications for multiple clients, testing, etc much easier. He is focusing all those administration type things that we as programmers tend to overlook and get us in trouble. His tools are begginning to show up in frameworks like Pylons to help in these areas. I commend Ian for doing the work that most of us either overlook or just have a hard time getting ourselves to do.

Effective AJAX with TurboGears

This was a pleasant introduction to AJAX. He covered a lot of the things that you can do in AJAX to improve the end users’ experience, and some good use cases for using it. Some of the pitfalls of Ajax development were also covered such as the back button and bookmarking (both of which Dojo is supposed to have libraries to handle), and creating user interfaces that the end users don’t expect. Though TurboGears wasn’t heavily emphasized he showed some nice exmples of how each of the use cases could be implemented.

Django How-To

Jacob gave a pretty cool demo of implementing a Sudoku puzzle in Django. It could even walk you through the steps to solve the puzzle. He had planned to demo actually deploying the app to the live Lawrence.com web site, but the network connection wasn’t good enough to facilitate it. I was still hoping to hear some about the new upcoming changes to Django like AJAX, but was still very effective at showing how simple it can be developing web apps with Djano.

Lightning Talks Round 2

A second round of lightning talks was scheduled today due to the overwhelming demand. While not quite as exciting as the first talks, there were several interesting things talked about.

Ian Bicking introduced his ideas for the new SQL-API library. The emphasis is to make DB-API simpler and will include things like handling database connections, logging, database abstraction/portability, and a SQL abstraction library similar to sqlbuilder

A guy demoed Testosterone. At first I was like “Oh no! Not another testing framework!”. It seems we are about to have more tesitng frameworks than we do web frameworks. It did have an interesting UI for interactive unit testing. I hope that it can integrate with other testing frameworks such as Nose, and py.test.

Matt Croyden showed off some of the other batteries included stuff that you get with Django such as additional Admin functionality, generic views, incredibly easy RSS framework, and user extensible filters and tags to be used in the templates

There was a cool demo of the REST mode for emacs. Too bad I don’t use either :( But it was almost cool enough to make me want to play with both.

Beyond Scripting: Using Python to Create a Medical Information System with Graphical Template and Database Schema Design

These were the guys that hosted the wxPython BOF. The first part of the presentation was a bit dry, but the demo was killer. The coolest part is their implementation of a dynamic form generator that is created for the end users. The idea is to take the form generation away from the programmers, and let the users handle it as they understand the domain better. It seemed to get several people excited about wxPython development.

Closing Remarks

This being my first Pycon experience was one that I will not forget. I felt like such a small fish wondering around the Pycon area. Everyone was super nice. I was able to meet many of the people who I read online or author the tools that I work with. The Python community must be one of the best, and I’m looking forward to going next year.

« Older entries