måndag 3 maj 2010

Plone dev on Snow Leopard, the real McCoy

I've got it down now. This is the way to set up your Snow Leopard for some serious Plone (>3.2) development. I work on Plone 3.3.5.

First, Get Xcode and MacPorts. Not entirely sure whether you need it with the instruction below, but it won't hurt unless you're really tight on disk space.

Now, don't even try to use any boiler plate Python-distributions for Mac OS X. The one that ships with Snow Leopard [SL] is of the wrong minor version, you need 2.4 and it's 2.6. The one that comes with Mac Ports doesn't work either because of some missing compiler directives, even though it's of the correct version. No, you have trust Florian to provide you with the Python-distro. Thus, in your directory of choice;

> svn co http://svn.plone.org/svn/collective/buildout/python/
> cd python

Next, you need easy_install for the native Python environment. You get it from http://peak.telecommunity.com/dist/ez_setup.py, and run;

> /usr/bin/python ez_setup.py

Now, use the SL native python interpreter (/usr/bin/python) to

> /usr/bin/python bootstrap.py

Next you build the python environment, but before you do that, take a look in buildout.cfg. Comment out or remove the lines with python25 and python26 if you don't explicitly want those. You don't need them for the purposes here.

> ./bin/buildout

After this step you have a Python distribution that will work for Plone. This is the Python that you'll have to use henceforth. You could set up your system path $PATH to point to this Python to not have to specifically point to it all the time.

> export MY_PYTHON=[the source directory]/python/python2.4
> export PATH=$MY_PYTHON/bin;$PATH

Next, get ZopeSkel;

> python-2.4/bin/easy_install -U ZopeSkel

And you're ready to go! The "paster" tool should be installed (try running "python-2.4/bin/paster create --list-templates"), which is the template engine for creating Plone things. From this point on, you have a working Python environment for working with Plone buildouts for your projects, which is currently the preferred way to do things. Feel free to dig into the tutorials at plone.org, e.g.

Creating a buildout for your project

Setting up Mac OS X Snow Leopard for Plone development Part 2

Ok, so I think I'll do the development as a buildout (as recommended from Plone 3.2 and on). That makes things a bit more exciting, as a bit more preparation is needed. These are the steps I've taken to date.

Given that I've done EVERY step in Part 1 of this tutorial, I continue as follows. My project is called sofitel, for undisclosed reasons. Therefor a create a buildout called sofitel in my source code directory (~/development/buildouts). BTW, I'm following this tutorial on plone.org.

> paster create -t plone3_buildout sofitel
> cd sofitel
> python2.4 bootstrap.py

The next step is checking your buildout.cfg and running ./bin/buildout, and this is where I ran into trouble. What happened for me was that the simplejson v2.0.9 egg did not install properly, resulting in the buildout ending with an error. After searching for help on the internet for several seconds, I concluded that the best way forward was to install simplejson the non-egg way. Hence,

> wget http://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.9.tar.gz#md5=af5e67a39ca3408563411d357e6d5e47
> tar xzf simplejson-2.0.9.tar.gz
> cd simplejson-2.0.9
> sudo python2.4 setup.py install
> sudo python2.4 setup.py clean

I realize that the setup.py steps above perhaps are not all necessary, but anyway they worked for me. What comes after this is;

> ./bin/buildout

Given that you're still in your /sofitel directory. Hope it works for you! =)

tisdag 20 april 2010

Setting up Mac OS X Snow Leopard for Plone development Part 1

Note to self; don't run around the internet for several days next time you need to setup a workstation for Plone development. So, here are the steps I've taken.


First, as always, do a selfupdate of the macports.
> sudo port selfupdate && sudo port upgrade outdated

!!! The section below is not correct! Please see the post that is Part 3 of my instruction before going any further!!!

Get Python 2.4
> sudo port install python24 python_select
> sudo python_select python24

!!! From here and on, the steps are correct !!!

Get wget
> sudo port install wget

Get easy_install
> wget http://peak.telecommunity.com/dist/ez_setup.py

Install easy_install.
> sudo python2.4 ez_setup.py

To reinstall setuptools (which shouldn't be necessary in most cases), remove the installed package and reinstall it. Thus;
> sudo rm -rf /opt/local/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg
> sudo python2.4 ez_setup.py -U setuptools

Now, install ZopeSkel
> sudo easy_install -U ZopeSkel

And you're ready to go! The "paster" tool should be installed (try running "paster create --list-templates"), which is the template engine for creating Plone things.

fredag 29 januari 2010

Setting up Mac OS X Snow Leopard for Django/Couchdb RESTful development

For starters, get Xcode and MacPorts if you don't have it. This step will take you a while if don't already have this installed.

http://developer.apple.com/tools/xcode/
http://www.macports.org/install.php

Second, as a rule of thumb, do a selfupdate of mac ports before you start dabbling with it.

>sudo port selfupdate
>sudo port upgrade outdated

Then, get the following ports; couchdb, mod_python26 (if python -V says you're using 2.6, which it currently should). This could take some time, because there are quite a few dependencies.

>sudo port install couchdb mod_python26

While you do this. Consider what other kind of development tools you like, like code editor and so forth. I'm trying Espresso for the moment, a nice looking animal that I got through the last MacHeist. I'm leaving it to you to find your own way.

Next, load the python-module in you apache installation. After you installed the port, the install script says how to do it.

Here comes a manual scary step. Install Django. Do it like they tell it...

http://www.djangoproject.com/download/

More to come soon when I have had time to go further myself... =)

fredag 27 mars 2009

Intellectual Property Rights

A quick guide for reference with regards to how you could label your works. Let's start with the most common symbol, the ©. Thats Copyright, and as such can be used as an unregistered right. That means you don't have to register anything to any sort of patent office or similar, to be able to slap it onto every other thing you do. It's also the case that the symbol it self is rather useless, unless you actually in a legal situation have rights in an issue. Then, the use of a © can make the party who used the property in bad will may actually be punished harder than if you had not used the symbol. It can be noted that in the U.S. you can register a Copyright, which is why you sometimes can se a reference number beside the ©. There's no real legal difference to doing this though, besides that it's a bit easier to support your Copyright in a legal situation if it's registered.

Secondly, the ™ and ®. You should only use the ® if you actually have registered the trade mark. If you haven't, but intend to register it, use the ™, that means it's a mark of your trade, but you don't want to spend any money protecting it.

måndag 1 december 2008

Strategic Map of the IT consulting industry

I have identified two main profit drivers for IT consulting, which should be the basis for developing business strategies. On the one hand, your strategy is based on your ability solve valuable problems for your customers. On the other hand, your profits are based on your ability to capitalize on the problems you are solving or have solved in an economies of scale setting.

E.g. if you add significant value to your customer, but don't have the corporate structure to use that knowledge to solve a similar problem at lower cost "the next time", you have potential for improvement on the CAPACITY axis in the map.

tisdag 28 oktober 2008

Evolution of IT consulting

In the rear view mirror, the IT consultant industry started out by supplying knowledge about computers. This was followed by a degree of specialization where it was necessary to deepen that knowledge, and firms started supplying role-specific competencies such as IT architects, testers or developers. Today we see further specialization that is widespread in the industry, and that is market specific roles, e.g. IT architect for financial systems, or test engineers for the telecommunications industry. The natural evolution for the IT consultants is to continue closing the gap between the IT solutions and the business models of the customers.