Archive

Posts Tagged ‘Python’

Book Review: The Definitive Guide to Jython

March 24th, 2010 Mark Freeman No comments

The Definitive Guide to Jython
http://apress.com/book/view/1430225270

The authors describe this book as having the intended audience of a Java developer wishing to use a dynamic language other than Groovy orJRuby. This is a very accurate assessment.

The first section serves as a quick introduction to the Python language, however should not be completely skipped even by seasoned Python developers. As a Python and Java developer, it was good to see comparisons of similar features from both languages. In many cases, the authors took the time to show code examples from both languages, side by side.

The book then leads into practical application of Jython. In addition to sections on how to call Java code from within your Jython scripts, extremely detailed instructions are given for calling Jython code from within Java. Also, the reader is taken through instructions on setting up Jython with their IDE (a must for any Java developer) and using JDBC calls from within your scripts.

Next, the reader is taken on a journey through using Jython with JSP, Django, Pylons, Swing integration, and – very importantly – eployment to Java application servers such as JBoss and Glassfish. Readers are then exposed to testing techniques for Python/Jython,and details on Concurrency in Java and Jython.

The book ends with several Appendixes which should not be missed. Parsing XML with Jython? It’s there. Writing Ant task? Yep.

I give the book a 4 out of 5. The only thing that would have made the book better would have been to spend a little less time talking about Python syntax and explaining only the differences between the languages. My thought is that if someone buys this book, they have likely already read an introductory book on Python and will spend much of the first 160 pages reviewing what they already know. This could have been condensed to about 15 pages by showing only the differences between the languages. However, as I mentioned before, the comparisons of features, and the places where the integration points are mentioned, are worth reading that section.

I should warn Python developers looking to learn more about Java. This book is not for you. Many of the topics covered assume the reader has existing knowledge of Java, including application servers and GUI development with Swing.

If you are looking for a book on Jython, this is the only book I would consider buying. I highly recommend it for any developer looking to gain the speed and ease of Python within their projects. So, go out and buy the book. Support the authors for the obvious hard work they put into making such a great book.

stanton – recording musical practice sessions

February 7th, 2010 Mark Freeman No comments

I just started work on a new Django app to allow me to define my musical practice goals, then record my sessions and the progress I make. This will eventually find its way into the Out of the Darj website so that all of the students can use it as well. The plan is to include a profile of sorts where you can define your goals and show your progress toward making your goals a reality.

The project is named ’stanton’ after the great Stanton Moore. You can find the repo here: http://github.com/markfreeman/stanton

Categories: Programming Tags: , ,

Stepping out of your comfort zone and standing up for yourself

February 6th, 2010 Mark Freeman 1 comment

Looking back, I have generally been the type of person who lets people dictate to me what it is that I am going to do. I make my desires known, but don’t do anything to make it a point that my desires will be the outcome. Today I took a big step and stood up for myself. After a couple of years of being led to believe that I would finally move into a full time development position, and then being stuck in a designer/analyst position, I laid it all out on the table. I let my boss know that either we start making the move, or I would need to look at other opportunities.

I’m very happy to report that it actually went over well. As I understand, we will be developing a plan to train someone to start stepping into my position as I start stepping into a much more development focused role. It was the perfect time to make the move as I am currently needed and we are about to be in a position that we will be short on developers. I’ll continue to post and update on how things go over the next few weeks. I’m tired of getting stepped on and ready to take my destiny in my own hands.

Only two more weeks left until PyCon! I’m excited to get out and see the greater Python community.

Lesson learned: You don’t get anywhere without taking risk. It was really scary to make a play like I did today, but the outcome may be worth it.

Testing in Python – PyHam Presentation – Jan 2010

January 23rd, 2010 Mark Freeman No comments

This past Thursday was the first official meeting of the Birmingham Area Python Users Group (PyHam). I volunteered to do the first presentation, which was an overview of unit testing frameworks in Python. I thought the presentation went very well. I’m very interested in testing, and know that I should be, but getting started can be the hardest part. It was very interesting to hear the take others have on the subject and to hear most everyone else admit that they feel the same way I do. The biggest lesson I took away from the meeting is to always make sure you right your code to be tested, or you will never write the test.

PyHam meeting coming up soon

January 14th, 2010 Mark Freeman No comments

The last few weeks have been quite busy. I’ve been preparing for the first PyHam meeting, where I will be giving a presentation on common testing frameworks in Python. I have a tendency to volunteer to talk about subjects I’m interested in, but don’t know much about. This should be interesting. I’ve certainly learned quite a bit in the last couple of weeks. Our first official meeting will be next week (1/21) at Birmingham Southern College, at 6:30pm.

A new to do list app based on todo.txt.

December 26th, 2009 Mark Freeman No comments

I had some down time over Christmas and decided to use it learning the basics of sqlalchemy. Since I like using the command line to get around and I have been wanting to try my hand at a basic to do list program, I decided I would try to mimic Gina Trapani’s todo.txt.

The commands are slightly different than those used by todo.txt, mostly due to some limitations of using optparse. Currently, the program supports adding task, deleting task (completing them), updating task priority or description, and listing all task or searching the task for a keyword.

Running the program for the first time will create a database and settings file for you. This may be changed in the future to where only the db file is created and the settings file is already included. Additionally, there are some path issues that will be addressed in the near future. Once these issues are addressed, I plan on packaging the program up for listing on pypi.

You can see the source and download the program on github.

Announcing the formation of the PyHam, the Birmingham (AL) Python Users Group.

December 5th, 2009 Mark Freeman No comments

In an effort to better connect with other python developers I decided it would be a good idea to form a Python users group in Birmingham. There aren’t many of us, that I personally know, but hopefully this will bring everyone out. I’ve volunteered to discuss testing frameworks because I want to learn more about them. I’ve used Nose some, but no where near what I would like to know. I’ve also volunteered to discuss Django and demo the Out of the Darj website code. It’s pretty simple, but it shows how powerful and easy Django can be to use for building a simple, dynamic website. Below is the announcement for the new groups. If you are in the area and interested in attending, we would love to have you!

A new Python users group is forming in Birmingham, AL USA. We will be holding a planning meeting at Roque on December 10th at 5:30pm. See our group page (http://groups.google.com/group/pyham) for more details.. While you are there, join the group and say hello!

Categories: User Groups Tags: , ,

Initial version of pyLilyDTK is up and working

October 18th, 2009 Mark Freeman No comments

Quite a bit of work has gone into this over the weekend. The program will now read from an input file and generate a lilypond score. I’ve tested it on several 2/4 and 4/4 rhythms and it seems to do well. Special care must be taken for use of rest, ‘_’, to make it formats correctly in some rhythms. For anyone who is interested, check it out on github and leave a ticket or email me if you find bugs. Feature request are welcome!

PyLilyDTK

October 15th, 2009 Mark Freeman No comments

Tonight, I begin work on a new project, pyLilyDTK. I will be writing a python program to convert the typical d-t-k rhythm notation to LilyPond scores. Thanks to a friend who did a lot of legwork in understanding how LilyPond scores are laid out, I don’t believe this will be a terrible task. It will sure save some time when preparing for my percussion classes! The intended goal is that once it is done, it will be ported as a django app so it can be used directly from the outofthedarj.com website.

Categories: Programming Tags: ,

New web server set up and running Django

September 8th, 2009 Mark Freeman No comments

I spent much of the start of my holiday weekend learning to deploy Django. I didn’t have much luck deploying to my web host, even though I have a VPS. To avoid messing up any of my other hosted domains, I had decided using FastCGI was the best option. After several hours of trying, it just wasn’t working for me. I’m sure it is something little that I had set wrong, but the frustration led me to setting up an Ubuntu Server virtual machine on one of my computers I don’t use much. I got everything installed and had no trouble setting up Apache to run Django. I’m really glad I did this. I hope to learn a lot more about Apache and Linux security of the new few months, then buy a dedicated box to serve as a web server. For now, the VM is working fine and surprisingly fast. The site is going to be for my local Middle Eastern Percussion ensemble, Out of the Darj.

DjangoCon starts today. I have a local acquaintance who went. Hopefully I can pick his brain when he gets back. Thankfully, they tend to post all of the sessions online, so you can watch them later.

Lesson learned: Sometimes it is better to do things yourself. This is especially true when you are trying to learn and want to understand things from every angle.