Our First Hackathon

Axant codes for food
Axant codes for food

We are coders, and we love to code. Our job is coding, and we have fun to.

Hence we decided to have fun, just by having a 24h non-stop coding experiment in our preferred and beloved Italian restaurant (well actually a taverna)!

We will have a mini-hackathon tomorrow at 3pm our time, to celebrate together the past 2011 working year, that was great! Free Food, free alcohol and a couple of cots is our necessaire for brainstorm and actuate our plan to take over the world!

Actually this “coding marathon” it has a subject, all the projects and ideas that will be developed should be related to “Food / Dining”!

The products result of the day, if useful, will be developed on field and used by a restaurant and a couple of bars, free of charge. Hence if there are good result could be a first step for a new free-software project.

In fact probably tomorrow we’ll not have just software projects cause the team is heterogeneous, built of lawyers, designers, creative people, musicians… and obviously coders!

The plan includes a couple of hours to study the problematics of a restaurant and in particular of our host. The owner will illustrate to us his business processes and we will try to understand were we could help them with our notions.

The next step is to actuate the thoughts into reality in the next 20hrs (: that’s it, nothing easier huh?

In the next post I’ll update the outcomes and the people behind it!

TurboGears2 DebugBar

Recently some work has been done to extend the hooks support in TurboGears, to play a little with the new hooks I decided to try creating the famous and envied Django Debug Toolbar. I’m quite happy of the result and most of the features are there. In a few days I’ll be able to place it on a public repository and I’ll release it concurrently with the 2.1.4 release of TurboGears.

Debug Toolbar
Debug Toolbar
Timings
Timings
Request and Headers
Request and Headers
SQLAlchemy Queries
SQLAlchemy Queries
Mounted Controllers
Mounted Controllers

The code has been heavily inspired by the Pyramid Debug Toolbar and have to thank the Pyramid team for the good job they did at making the Toolbar code clean and simple.

TurboGears2 Performance Improvements

As recently some effort has been involved in improving the performances of TurboGears2, I was curious to see how much things improved. As usually, the test isn’t really reliable in any way and was just for fun.

All the graphs report the request/sec the application has been able to perform on my computer with only 1 concurrent client. So higher is better.

Here is the comparison between TG2.0 and TG2dev (will be 2.1.4)

I also compared various setups with different template engines on TG2dev

The comparison happened on an application similar to the quickstarted one.
Actually as there is no database involved in this application the template engine impacts a lot and so was a good benchmark for the template engines themselves.

ACRcms 0.3.5 released with libacr 0.7

New features introduced are:

  • Assets manager, Upload your videos and images using the Asset manager instead of the RDisk if you want to create slices from them. Assets manager will also create thumbnails for everything and will convert the videos to support HTML5
  • BlogPost view (an HTML view with a title)
  • Attributes for Pages and Slices
  • Hide Pages from menu with hidden=1 attribute
  • Reorder Pages in menu menu-weight attribute
  • Add metatag description to pages with description attribute
  • Automatic Database migrations, never care about changes to the schema when you upgrade acr again, it will be automatically upgraded by acr itself on first visit
  • Hide edit bars in edit mode to view the slice as a standard visitor
  • Abstraction layer for encoding data, now each view encodes using EncodedView, so that it will be possible to switch to any key/value encoding or store in the future

TurboGears 2.1.1 released!

After a reflection moment caused by the need to think what will follow after the pylons and repoze.bfg merge in pyramid the TurboGears2 team has decide to gather up all its forces and give to TurboGears2 its own independent life.

The first steps have been oriented to improve the framework reliability and brought to life the TurboGears continuous integrations system and a standard project release process.

After a few months of work 2.1.1 has been released and it brings many fixes and improvements, 2.1.2 is under its way and a 2.2 release with major improvements is already planned!

TG2 Core:
* Fixed dependencies for Python 2.4. Now any packages that are
needed are automatically installed.
* Updated package requirements as high as possible.
* Verified nested RestControllers work as expected
* Added/fixed Kajiki support
* Ignore repoze.who_testutil when running nosetests
* Fixed import order for pylons.middleware
* Fixed crash when PYTHONOPTIMIZE is enabled
* Report a warning about ErrorMiddleware is disabled
* Fixed concurrency issues with use_custom_format
* Fixed 404 errors if a controller uses only custom formats
* Verified that user object is available inside of the error controller/template
* Fixed expansion of arguments on before/after calls
* Fixed wrong header response for 405 error
* Fixed WebOb version requirment. Newer version required
* Added test case to check for replace_header when called from WSGIApp
* Fixed issues with Content-Type header appearing multiples times on 204/205 responses
* Removed redundant hasattr checks on override_template
* Improved support for pylons 1.0 strict_c
* Fixed post traceback, now reports to Pylons correctly
* Added test case to check for spurious content type removal on empty content
* Fixed crash when content type header is missing
* Fixed crash when response Content-Type is set to None
* Fixed support for etags. Pylons 1.0 changes slightly, we support the correct version now
* Added dependency_links and setup.cfg allow_hosts: easy_install TurboGears2 now works
* Fixed DecoratedController. should not call super(), 2.6 revealed a problem
* Fixed Genshi output method. Use XHTML if none specified, instead of XML

TG2 Devtools:
* Fixed Python 2.4 compatibility issues. Dependencies are now automatically specified
* Updated package version requirements as high as possible
* Fixed about.html instructions about where the logo is found
* Set “zip_safe=False” by default in the templates now
* Tests fixed, now pass
* Added support for sqlalchemy-migrate
* Added option to choose config file
* Added archive_tw_resources command for projects
* Fixed deprecated redirect calls
* Set Genshi templating method by default to XHTML
* Adding dependency_links: easy_install tg.devtools now works

Asynchronous and Background Tasks with TurboGears2

Want to handle long operations in your web application without having your users wait for minutes?

If you are using turbogears2 you might find tgext.asyncjob useful. Asyncjob extension provides background method calls and helpers to manage your database queries in the asynchronous functions. Makes also easy to implement an AJAX progress bar for your long running operations.

Mobile devices detection with TurboGears2

We just released tgext.mobilemiddleware for turbogears2 to make easier to handle templates for mobile devices and detect mobile devices requests.

Indeed it is quite simple to use as it makes possible just to register a different template by using @expoe_mobile decorator which will be used for mobile devices, making possible to create mobile version of web page by using for example jquery mobile

ACRCms web page renew

Spent some time renewing the ACRCms web page, I was a bit tired of the old style and wanted something more structured, so here is the new look and feel. Hope everyone enjoys it 😀

Redis Remote Procedure Calls (RPC)

While I’m not sure if it is a good or really stupid idea I decided to start trying to implement a RPC library on the redis database.

In theory it should be a good idea as you can have a very fast and persistent multi-consumer queue of tasks (like rabbit-mq or other AMQP) which can be worked out to also give answers back. Also using redis permits to quickly distribute work over multiple servers by simply running another server without any change to the code itself.

If you want to check REPC (yes, this is the only name I have been able to think of…), you can take a look at https://github.com/amol-/repc

Serialization format for data is JSON just because it was something quick to have. Currently my main target is trying to have something with a very small code footprint and reliable enough to be used.

Stroller goes open source

Stroller
Stroller

Stroller it is our way to do e-commerce! We have already some clients that we fit on this module written in python and easily importable to have a fully e-commerce section to work with.

Just after testing it in production for some customers and already in a stable shaped we decided to deliver it as a community edition in free software.

In fact you can now download it from pypi:

http://pypi.python.org/pypi/stroller

or just checkout the sources over our repositories:

hg clone http://repo.axant.it/hg/stroller

For now stroller does not have a site and a home ;( but fortunately all of our projects are listed in a fancy “temp house” on project.axantlabs.com as it has stroller, just checkout http://projects.axantlabs.com/Stroller

You’ll see there the main features of this art of software and enjoy the sweetness!

Updates are coming for it we have just in mind some strategic moves to make it a ‘first choice’ product.