<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
         xmlns="http://purl.org/rss/1.0/">




    



<channel rdf:about="http://www.martinaspeli.net/blog-posts/RSS">
  <title>Martin Aspeli</title>
  <link>http://www.martinaspeli.net</link>
  
  <description>
    
       A blog and personal website
       
  </description>
  
  
  
            <syn:updatePeriod>daily</syn:updatePeriod>
            <syn:updateFrequency>1</syn:updateFrequency>
            <syn:updateBase>2009-01-07T00:59:00Z</syn:updateBase>
        
  
  <image rdf:resource="http://www.martinaspeli.net/logo.gif"/>

  <items>
    <rdf:Seq>
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/to-parents-of-twins"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/plone-the-generous-community"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/book-review-play-framework-cookbook"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/professional-plone-4-development-now-available"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/about-the-plone-foundation-board"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/sublime-text-2-for-zope-and-plone"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/plone-conference-2011-training-plone-development-environment-and-deployment-masterclass"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/buildout-hard-reset"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/tools-for-a-successful-plone-project"/>
        
        
            <rdf:li rdf:resource="http://www.martinaspeli.net/articles/developer-centric-version-control-considered-harmful"/>
        
    </rdf:Seq>
  </items>

</channel>

    <item rdf:about="http://www.martinaspeli.net/articles/to-parents-of-twins">        <title>To parents of twins</title>        <link>http://www.martinaspeli.net/articles/to-parents-of-twins</link>        <description>A brief guide</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>A brief guide</p>
<p class="p1"><span class="s1">My wife and I became parents of identical twin girls just over five months ago. We did not have IVF or another form of assisted reproduction, and twins do not run in either of our families. From pregnancy to birth to today, it's been a huge thrill. Below, I'll recount some of the experiences and tips we've picked up along the way.</span></p>
<p class="p2"><span class="s1"></span></p>
<h2><span class="s1"><strong>Pregnancy</strong></span></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">When you first find out you are having twins, the experience can be quite overwhelming. Becoming a parent – especially if for the first time – can be daunting and exciting enough. With the prospect of two babies, doubly so.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The first thing you will need to find out, is what type of twins you are having, and, if you want, their genders. The two main types are MCDA (mono-chronionic, di-amniotic), also known as identical twins, and DCDA (di-chronionic, di-amniotic), also known as fraternal twins. The former means that a single egg was fertilised and then split. The embryos will grow in separate amniotic sacs, separated by a membrane, but share a single placenta. The latter means two eggs were fertilised separately, which means two sacs and two placentas.&nbsp;</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Fraternal twins, as the name suggests, are really "just" siblings that happen to have the same birth date, and fraternal twins can be as different as any two siblings (although they'll be the same age, obviously). Identical twins share virtually all their DNA and should hence grow at the same rate, are (nearly) always the same sex, and look physically similar, although there will be small differences, and they will likely have different personalities (ours do). One of the strangest things about our (identical) twins is that, save from a birth mark, they look remarkably similar, yet everyone says Hanna looks like my wife and Skye looks like me. I can't really explain that.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">With MCDA twins, the hospital will want to monitor the pregnancy every couple of weeks. The big worry is Twin-Twin Transfusion Syndrome (TTTS), a condition where one twin takes a disproportionate amount of the nourishment provided through the placenta, which can lead to a miscarriage. It is thankfully very rare, and can be treated if caught early. Hence, lots of follow-up.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There is also MCMA twins, who share a placenta and an amniotic sac. This is very, very rare, but also very dangerous, and the mother will likely be hospitalised for a long time and constantly monitored.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Once you start telling people (generally after about three months), prepare for two questions:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Are they identical?</span></li>
<li class="li1"><span class="s1">Do twins run in the family?</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The question everyone will be thinking, though is:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Did you have IVF?</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">As far as I know, identical twins are accidents of nature (although there are some statistical links to things like the mother's age). Fraternal twins occur when the mother ovulates two eggs at the same time and both happen to be fertilised (by different sperm). This can happen naturally (and is possibly something you can be genetically predisposed to, though again age can be a factor), or through assisted reproduction (not just IVF but also things like ovulation booster shots).</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">At this point, you'll probably be reading lots about pregnancy. All the usual rules apply: No drinking, smoking, falling over, excessive physical strain, etc. However, with twins, there is one thing you need to get very clear:</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1"><strong>Your body is going through something that is was not really designed to do.</strong></span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You'll have friends who are pregnant with one baby, who'll breeze through pregnancy with a bit of morning sickness in the first trimester and have an altogether great time. You'll have a great time too – pregnancy is a magical experience and something to savour – but the strain on mum's body is immense. You need to plan to take it easy. There is a very real risk of premature delivery or other complications if you don't.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Your second trimester will generally be the easiest. If you plan to do something major like move to a bigger house, do it then. If you plan a 'baby-moon' (you should: you won't have a holiday for a while), do it then too. Some airlines won't even let you fly in the third trimester. But plan a relaxing holiday, not a city trek or something with lots of uncomfortable travel. We opted to travel by train, which was a lot less hassle than flying.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">By the third trimester, you should plan to spend most of your time doing not very much. Your body will hurt, and walking will start to become more difficult. Think about how you can avoid a stressful commute if you work (peak hour tube travel is not a great idea), and wear a 'baby on board' button so people know you're pregnant (you can get them from Transport for London, I believe). Others should stand for you. If they don't (on London tubes they often pretend not to see you), give them a kick. You should also expect to be huge. Take lots of pictures. You'll miss the bump when it's gone.</span></p>
<p class="p2"><span class="s1"></span></p>
<h2><span class="s1"><strong>Preparing</strong></span></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">With twins, there is a lot of preparation to be done. Some parents of single babies just figure it out as they go. With twins, that's not a realistic option. Moreover, after the birth, you will be too exhausted to read, organise, shop, or even think very much. Figure out how you're going to cope now and get everything ready in good time to cover you at least the first three months from birth. Do this early, because twins tend to arrive between 36 and 38&nbsp; weeks, not 40 weeks as with other babies (more on that below), and sometimes arrive even earlier than that.</span></p>
<p class="p2"><span class="s1"></span></p>
<h3><span class="s1"><strong>Help</strong></span></h3>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">This is probably the hardest thing to sort out, but make no mistake:</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1"><strong>You will need help once the babies are born</strong></span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">One baby: one pair of hands. Two babies: two pair of hands. It is possible to cope for short stretches of time as one parent, and at different ages, the babies will be easier or harder to deal with. But as a general rule, you should try to have help most of the time for the first month or two, then not be alone with the babies for more than 8-10 hours ever until they are at least 5-6 months.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There are a few reasons for this. One is that feeding two screaming babies at the same time is difficult and takes practice. The other is that calming a fractious baby requires you to lift and cuddle him or her, which again takes two hands. The physical strain in general is big, especially if you've had a c-section. There is a lot of lifting, moving, and rushing around. Also watch out for how you lift and hold the babies, as there is a very real risk of repetitive strain injury and carpal tunnel syndrome in your hands and wrists, which will not help the slightest.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Help can take many forms. Your parents are the cheapest and often the best. Neighbours, friends, other family also work.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Nannies are expensive, but often the only realistic long term option. They come in a few flavours:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Maternity nurses (also known as night nurses or night nannies), who charge about £150 per night or £10-12 per hour during the day. These are highly qualified and will help you a lot, not just in the time they are there, but also by providing tips and helping to establish the babies on a routine (more on those below). Many parents of twins choose to have a full time (6 nights a week) night nanny for the first 2-6 weeks. This obviously costs a lot of money. However, if you can afford it, it is worth seriously considering. You can find night nurses through agencies or websites like <a href="http://childcare.co.uk"><span class="s2">childcare.co.uk</span></a>. Personal recommendations count for a lot too.</span></li>
<li class="li1"><span class="s1">Daytime nannies. Again, websites like <a href="http://childcare.co.uk"><span class="s2">childcare.co.uk</span></a>, an advert on Gumtree or agencies can find you nannies. Depending on experience, they cost around £8-12 per hour, but you need to withhold and pay income tax on their behalf, too: you effectively become an employer (unless the nanny is self-employed or the agency handles it; see <a href="http://nannytax.co.uk"><span class="s2">nannytax.co.uk</span></a> for more details). Even a part time nanny can be a big help, so consider this. Nannies can either live with you or live out. A "sole charge" nanny is one you leave to take care of the babies alone. This will probably not be so relevant in the first few weeks, but if you can build up the trust, it can be great for a nanny to take the babies out in their buggy for a walk (most babies sleep really well in their buggy) to let you sleep as well.</span></li>
<li class="li1"><span class="s1">Mother's helpers. There is a lot of overlap between this and a nanny, but broadly speaking a mother's helper will help mum around the house more, allowing her to focus on the babies.</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Other roles like childminders and babysitters don't really apply to very young babies.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">In all cases, you need to conduct a search and interview. It is better to do this before birth if you can. Expect to spend some time finding the right candidate, and make sure you check references. It is not very common to find people with twin experience, but this is perhaps not such a big deal: instead, insist on someone with a lot of experience with young babies. You do not want someone who will need to be told in great detail what to do. Finally, if you do get a nanny, make sure you find a person you like. You'll be spending a lot of time with her.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You also need to start planning how dad will help out. In most cases, he will go back to work after a woefully short 2-week paternity leave (there's no double leave for twins). This will be hard for him and for mum. It'll be even more difficult to wake up four or five times a night to feed and then go to work the next day. You should expect this to place a strain on your relationship. Plan ahead now, even though you'll likely throw the plan out after the first week. Also make sure expectations are set appropriately at work. Luckily, most bosses are also parents and will be quite sympathetic. A somewhat more flexible work schedule, no/reduced travel and no expectation of working at home in the evenings (forget about it!) are good places to start.</span></p>
<p class="p2"><span class="s1"></span></p>
<h3><span class="s1"><strong>Stuff</strong></span></h3>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There's no two ways about it. Having twins is <em>expensive</em>. Accept hand-me-downs and buy second hand where you can. We bought a lot of very high quality clothes, toys and nursery items from second hand markets organised by Mum-to-Mum Net, for example, and found many second-hand items on eBay.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Here are some of the major things you'll need to consider:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Cots. You want two separate cots from 3 months or so. For the first 2-3 months they can sleep together. Moses baskets can also work, though again they only last a few months and then you have to buy real cots. Even tiny babies sleep well in baby cots (just put the at the foot of the bed with the right amount of blankets/clothes and on their back to reduce the risk of cot death). Get ones with slatted open sides so the babies can see each other once you separate them. You'll also need cot sheets, blankets and sleeping bags (from 3 months). IKEA make good, cheap cots, though you have a lot of choice. Also check out Mothercare, John Lewis and Mamas and Papas. We were kindly given Stokke Sleepi cots that expand from Moses-basket like size up to baby size and later to a "junior" bed. The advantage of these (apart from the fact that they are very pretty) is that they are on wheels and are small enough to cart in and out of rooms. They spent a lot of time moving between our bedroom and living room in the early weeks.</span></li>
<li class="li1"><span class="s1">Buggy. This is a major purchase. Expect to spend between £600 and £1,200. You have to choose between side-by-side (like the Bugaboo Donkey that we have, or the cheaper Maclaren option, although I'm not convinced that's suitable from birth), front-and-back or over-and-under type arrangements. All twin buggies are too big, really, so you just have to choose whether you want to get stuck sideways or lengthwise. Measure your door. Think about how you will get in and out without leaving one baby outside alone. Make sure your car boot is big enough (or get a bigger car...). Then go and try all the buggies available, several times. Think about whether you need carry cots or not, but remember that infants need to sleep flat for the first three months or so. John Lewis, Mothercare and Mamas and Papas are good places to start.</span></li>
<li class="li1"><span class="s1">Car seats. You'll need two. In fact, the hospital won't let you go home without showing them that you have them. Most people buy Maxi-Cosi – either the Cabriofix or the newer Pebble – which are compatible with a lot of buggies. Consider getting the FamilyFix base which makes it much easier to take it in and out of the car, and see if your buggy has an adapter to let you use it as a frame whilst leaving the babies in their car seats – useful for shopping, say, though not for longer walks in the first few months as they do not lie flat in carseats.</span></li>
<li class="li1"><span class="s1">Bouncers. From about six weeks, you'll be able to put the babies in bouncers (also known as baby chairs). This is a great variation from spending all day on a mat on the floor, and can help free up your hands to do other things. For instance, we tend to bring babies and bouncers to the kitchen when preparing dinner – they are entertained and we have two hands free each. We went for the Baby Björn Babysitter variety which are comfortable, portable and adjustable to various angles. I would highly recommend them.</span></li>
<li class="li1"><span class="s1">Muslin cloth. Baby rule #1: You may think you have enough muslin cloth. You don't. We stopped buying after we amassed about 100 cloths in various sizes. Use for cleaning up all kinds of spills, burping, drying, covering lights to dim them, etc.</span></li>
<li class="li1"><span class="s1">Clothes. You'll need a lot, and they'll grow out of them very quickly. We started with 'tiny baby' size clothes, which lasted about a month. Go for the basics: vests and bodysuits and avoid the temptation to buy expensive cute clothes until they are a bit older.</span></li>
<li class="li1"><span class="s1">Toys. Young babies don't really need a lot of toys, though one or two play gyms (where the baby lies underneath on a mat and looks up at various hanging toys) are a good investment for 2-3 months in. One of the toys we have had the most benefit out of is a set of newborn baby books with high-contrast pattern images and soft crinkly pages. Our girls just love them.</span></li>
<li class="li1"><span class="s1">Bottles and steriliser. More on this in the section on feeding below.</span></li>
<li class="li1"><span class="s1">Bath tubs. We used a foldable "Puj Tub" that goes in the sink for the first month or two, and then bought two small chairs that sit in the bottom of the bathtub and hold the babies secure thereafter. You don't need to bathe newborns very much at all, but from about 6-8 weeks you probably want to start trying to bathe them as part of a bedtime routine.</span></li>
<li class="li1"><span class="s1">Nappies. You will change upwards of 100 nappies a week in the first week weeks. Buy bulk, but not too much as they grow out of these too. We started with Pamper's New Baby range. When changing in the first few months, use lukewarm water and cotton balls only (you'll need a lot of cotton balls). You can move to scent-free wipes after 6-8 weeks.</span></li>
<li class="li1"><span class="s1">Formula. Even if you intend to exclusively breastfeed (more on that below), I think it is wise to have a Plan B. Two babies screaming in hunger that don't latch on the breast creates a lot of tension. We started with SMA and moved onto Aptamil which our babies seem to digest better. We have a lot of friends who prefer Cow &amp; Gate. Whichever brand you go with (they all have the right nutrients and contents, but taste different and seem to digest differently), don't buy too much immediately, as the babies may not like your first attempt. If it's purely for backup purposes, buy the pre made cartons. They're a more expensive, but a lot easier to prepare. Only move to powder if you're going to formula-feed regularly (see below).</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">One thing to consider is that people will give you a lot of clothes and sometimes toys. Leave the tags on anything you get or buy until you use it – that way you can exchange when they invariably grow out of them before you've used them.</span></p>
<p class="p2"><span class="s1"></span></p>
<h3><span class="s1"><strong>Your house</strong></span></h3>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There is no need for baby proofing until the babies start to crawl (which hasn't happened to us yet, though I am terrified of when it does). However, you need to think about your house: where will the babies sleep? where will they play? where will you change them? how will you bathe them? Convenience is a big factor here. You want to avoid having to carry them up and down stairs if you can, for example. Expect your babies to just take over everything (our living room is now 80% play area, our bedroom was an obstacle course of cots and changing table for a long time). It's OK. You won't be doing much that's not baby related for a while anyway.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">In the first 2-3 months, you probably want them to sleep in your room, but not in your bed, so you'll need space for at least one cot, ideally two (for when you separate them) in your bedroom. After that, you should put them in a separate room, but use a baby monitor at all times. Twins can generally sleep in the same room, though it's helpful to have the option to separate them (even if one sleeps in the living room, say), if one is unwell and keeps waking the other. That said, twins can often sleep through each other's cries, even if no-one else can.</span></p>
<p class="p2"><span class="s1"></span></p>
<h3><span class="s1"><strong>Reading and learning</strong></span></h3>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You should take a pre-natal class. Your hospital will offer them, but look out for the NCT (National Childcare Trust) ones in your area, which are often considered to be friendlier. We went to a special NCT class for twins, run by a local mum who had five kids, four of which were twins (i.e. two pairs), so she was certainly qualified. To be honest, the contents of the course are secondary to the fact that you'll get to build relationships with several other couples who are having babies at the same time as you. This is really important, as even 1-2 months of difference in baby age can make it difficult to relate or be able to organise things at the same time, and you'll really value the informal support network this provides.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You should be aware, though, that the NCT, like the NHS, has an agenda. They want you to have a natural birth, and they want you to breastfeed. In fact, much of what you read and hear is quite dogmatic and can sometimes feel a bit pushy. Everyone has an opinion on birth and childcare, and they will let you know what it is.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You should also read. Some of the books we read which were helpful were:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Pregnancy Day by Day. General book about how pregnancy progresses with lots of pictures.</span></li>
<li class="li1"><span class="s1">Pregnancy for Dads. Self-evident content. Funny and quite useful.</span></li>
<li class="li1"><span class="s1">Double Duty. A general book about parenting twins. A bit US-centric, but helpful.</span></li>
<li class="li1"><span class="s1">A Happy House with Contented Twins. Gina Ford for twins. More on this below.</span></li>
<li class="li1"><span class="s1">Healthy Sleep Habits, Happy Twins by Marc Weissbluth. Refreshingly non-dogmatic book about sleep.</span></li>
<li class="li1"><span class="s1">Your Baby Week by Week. Excellent book that can be read after birth (though pre-read the first month or so worth of content). There is also a six-months-to-toddler version.</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Finally, speak to your doctor and midwives. You should be seeing them more frequently than other expectant mothers, and they have lots information about the process and about what is happening to your body.</span></p>
<p class="p2"><span class="s1"></span></p>
<h3><span class="s1"><strong>Naming</strong></span></h3>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">I found this to be one of the most difficult things. You don't strictly need to settle on names until you register the birth (about six weeks after birth), but it becomes a bit impractical to keep referring to them as Twin 1 and Twin 2.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">I believe it is important that twins get to develop their own identify. I would pick names that have no obvious theme (like April and June or Holly and Ivy) that will forever make other people think of them and treat them as a pair rather than as individuals. For practical purposes, I'd also avoid having the same first initial.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">We used of baby name books, apps and websites, and created a shortlist. We didn't really test them on friends or family, though I know others who have done that and found it useful. I would suggest you don't fully settle on the names until you see the babies in the flesh, though. The names should feel right from the start.</span></p>
<p class="p2"><span class="s1"></span></p>
<h2><span class="s1"><strong>Birth</strong></span></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Twins are generally born early. 36 weeks is considered full term for identical twins and 38 weeks is considered full term for fraternal twins. Luckily, the body speeds up the maturation process, and there is generally no problem with delivery around these dates.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">That said, many twins arrive even earlier. Of the five couples in our NCT class, only we and one other couple delivered on the planned date, and two of the parents had very traumatic experiences. There is probably nothing you can do to fully prevent premature delivery, but taking it easy during pregnancy is probably a good idea.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The big decision you have to make is whether you want a natural birth or a caesarian section. If you go to the NCT classes, they will push you towards a natural birth. Your doctor may push you towards a c-section. Most twin parents we know have had c-sections. With DCDA twins you'll have a choice provided both babies end up head-down. With MCDA twins you still have a choice, but the hospital's advocacy a c-section will be a lot stronger as the risks are greater.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The reason your hospital wants you to have a planned c-section is that twin births are inherently more risky than a single birth (twice as risky, if you think about it). A planned c-section gives the hospital much more control, and you'll give birth surrounded by multiple doctors and midwives. The timing of this is important, however. You want to wait as long as possible to give your babies the greatest chance of maturing, but not so late that any complications arise or that you go into labour. At this point, you'll have what is (somewhat alarmingly) called an emergency c-section, which is the same thing, just rushed and under more stress (although it may not really be an emergency - it often takes a few hours or even a full day from when the need for one is identified to when it is performed).</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You will hear a lot about how natural birth is better: establishing breastfeeding is supposedly easier, some theorise that you'll bond with your baby better after going through the pain of natural birth, and your body will recover quicker. The latter is certainly true - a c-section is major surgery under partial anaesthetic and takes its toll on you. Expect to be mostly bed-bound for a week or so, and to stay in hospital for several nights after the birth.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Whether the other benefits really matter, I don't know. We had a c-section and it was the right choice for us. Speak to your doctor and listen to your instincts. Try not to over-dramatise the impact of the babies coming out a day or two earlier than they would have naturally or play the statistics game. And above all, don't for a second feel any guilt, regardless of your method of delivery. Birth is a big deal, but it's only the first fraction of their lives: it's what comes after that matters.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">If you do have a planned c-section, it<em> is</em> a little odd to wake up really early one morning, going to the hospital, and being able to count down the minutes until you will become a parent of two (more?) children. Quite surreal, in fact. The procedure itself is also very strange to be part of. To you, this is the biggest day of your lives so far. To the seemingly hundreds of people who are there (two surgeons, an anaesthetist, five or six nurses and midwives, and probably a paediatrician), this is routine. Everything is very procedural.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">You may make a birth plan (a written guide to how you want the birth to take place). For a c-section, this is less relevant. You may ask for things like immediate skin-to-skin contact and for the umbilical chords to be left to pulsate for a while to supply a burst of antibodies, both of which supposedly good for the babies. You should discuss this with the surgeon, who will come see you prior to delivery. However, the only thing that really matters is the safe delivery of your babies, and you will probably find the hospital reluctant to deviate too much from their well-rehearsed procedures. That's probably best.&nbsp;</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Once you have given birth, plan to stay in the hospital for a while. There is no rush to go home, and you'll come to appreciate the midwives (who'll appreciate you – twins are special even to them) giving you tips, reassurance and helping with the practicalities of taking care of two babies. We stayed for three or four nights, partly because the babies were slightly jaundiced and needed monitoring, partly because we were overwhelmed and needed the support. Note that dad can't stay overnight and whilst visiting hours are quite generous, they never quite seem enough. The nights can be quite lonely and exhausting for mum, especially when the babies need feeding every hour. My tip: Befriend the midwife on duty.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">After the birth, you need to go home. This is logistically quite nerve-wracking. I don't think I've ever driven so carefully in my life, or been so scared. Make sure everything at home is ready. You'll miss the support of the midwives once you're there.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">After the birth, there are two support systems in place: You'll be visited by a community midwife a few times to check on the babies and mum. After about a week, the health visitors will take over. They'll come to visit sometimes, and you will take your babies to their clinic to get weighed every couple of weeks. The health visitors are a fountain of information and you can call them if you have any questions. We probably called or saw them once a week if not more in the early weeks.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Finally, a tip: If your twins look very similar, leave the little tags they get on their ankles in the hospital on for a week or so until you are comfortable telling them apart. I don't think you'll ever truly mix them up, but the fear of doing so made me paranoid for the first week. It's not as if they'd ever be able to set the record straight if we got them wrong and never realised.</span></p>
<p class="p2"><span class="s1"></span></p>
<h2><span class="s1"><strong>Sleeping</strong></span></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">When you tell people with children that you are expecting twins, they will tell you, rather smugly, to get all the sleep you can get now, because you won't get it later. Irritating as this will be to hear, it is true. Sortof. I actually think you should do as much of what you enjoy doing (so long as it is not too strenuous) whilst you have fewer responsibilities.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Sleep will become a big issue in your day to day life. You will not have enough of it. It is quite incredible how much we need sleep and how we are affected by sleep deprivation. Mum will run on hormones for the first 3-4 months, which will help, but not enough. I think my wife Googled the question "when will babies sleep through the night" (which means, you put them to bed at 7pm, wake them at 10pm or so for a quick feed, and then they sleep until 7am) every night for about six weeks. "Do they sleep through the night yet" will be the first question you ask other parents (even if they have only one baby – baby in the singular will not make much sense to you).</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There are two philosophies of baby sleep: baby-led and routine-led. The former means you feed and put to bed the baby when he or she gives sign (baby signs are hard to read initially, of course) and never wake a sleeping baby. The latter means you try to structure their day by putting them to sleep and feeding at regular times.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">For twins, I maintain that being entirely baby-led is suicide. I have heard of parents being hospitalised from sleep deprivation.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Consider this: In the first few weeks, a feed can take an hour and each baby needs a feed roughly every three hours. If you have twins and you're breastfeeding, and your twins are out of sync by 90 minutes, mum will have no more than 30 minutes rest. Ever. Twenty-four hours a day. This is no way to live.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Secondly, sleep and self-setting are skills and something babies need to be taught, as is the difference between night and day. Good quality sleep is very important for infant development.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Finally, if you're so sleep deprived you make mistakes (e.g. feed one baby twice and not the other), you're no good to them.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">To some (and the NHS) being routine-led is akin to baby torture. The problem is that most of the routine literature is incredibly prescriptive. The main proponent is Gina Ford (who, famously, has no children of her own, though she worked as a maternity nurse for many years), and her books have schedules in them down to 15-minute intervals. Babies are nowhere near that predictable, and it can be quite daunting to figure out what to do when the routine goes wrong.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">That said, I recommend reading Gina Ford and the book by Marc Weissbluth. You should try to understand the principles behind the routines, and apply them in your own way. It will not work well in the first few weeks, but it will pay off and it will give you something to hang your day on. A map, even if an imperfect one, to help you structure your day will be very useful. The point is not to let your babies go hungry (never do that!) or to keep them awake so they become over-tired (a recipe for disaster), but rather to teach them how to eat and sleep well by giving some consistency and encouraging sensible habits.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The first 1-2 weeks are actually quite easy, as the babies will generally just sleep and wake for feedings. They'll also sleep through virtually anything, so you can put their cot in the living room and have people around to visit. However, the next few weeks are much harder, because they'll be very unpredictable and give you no other sign than a cry that something is wrong.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">When babies cry and there's no obvious physical discomfort, it's usually hunger. If it's not, check their nappies. If they're dry, make sure they're not too hot or cold. Very young babies don't get lonely or scared, though in time that may be a reason too. The Week by Week book is a great guide to when you will start seeing changes in behaviour like this.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Finally, with twins, there is one golden rule: Synchronise. If one baby wakes up and can't be settled down again, wake the other. If one goes to bed, put the other down too. Keeping them in sync is the only way you'll manage to properly look after both and still function. Start early and be consistent is my advice.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">We started with routines for real about 4-6 weeks. They started working for us from 8-10 weeks, probably.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">A few more tips:</span></p>
<p class="p2"><span class="s1"></span></p>
<ul>
<li class="li1"><span class="s1">Sleep when they sleep. You need to take care of yourself as well, which means you need to eat properly (particularly important if breastfeeding) and rest. You do not need to vacuum the house.</span></li>
<li class="li1"><span class="s1">Get help with the basic domestics and try to find healthy food that you can prepare quickly and easily.</span></li>
<li class="li1"><span class="s1">Learn how to swaddle your babies. For the first month or two, this can greatly help their sleep. There is a video (and book) called The Happiest Baby on the Block, which describes a too-good-to-be-true (but still useful) technique for calming babies under three months.</span></li>
<li class="li1"><span class="s1">Install blackout curtains in their room. Between two and six months, they will sleep better when it is pitch black. Try to avoid too much light for night time feedings as well, as this may stimulate them too much.</span></li>
<li class="li1"><span class="s1">Learn their sleep signs (the Weissbluth book is very good for this). The last thing you want is two overtired babies.</span></li>
<li class="li1"><span class="s1">Take them out for a walk in the afternoon. This helps you and them get fresh air, and they not only nap well in in the buggy, but sleep better if they've had some air and natural light prior to going to bed.</span></li></ul>
<p class="p2"><span class="s1"></span></p>
<h2><span class="s1"><strong>Feeding</strong></span></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">If sleep is your number one concern, feeding will be second. The big choice is whether you&nbsp; breastfeed, whether you do so exclusively, and for how long.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The ideal is to exclusively breastfeed for six months before you start weaning onto solids. Breastfeeding is free (formula costs about £10 per tin, which nowadays lasts us less than a week), easier (no bottles to sterilise or water to boil and cool down), and healthier (babies get lots of useful antibodies).</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">However: for many mothers <strong>breastfeeding is incredibly hard</strong>.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">It always struck me how strange it is that something so vital to the survival of our species is so difficult. But it is. For babies to latch onto the breast correctly and eat properly without falling asleep requires a complex dance between mother and child. It takes time a lot of frustration to get right.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">If you intend to exclusively breastfeed, you need to do so right from the start. We always gave a formula top-up (on hospital advice). Gradually, the top-up became bigger than the breastfeed and the babies stopped taking the breast altogether (bottles are easier to eat from). We expressed for a while and did a mixture of breast milk and formula, and now do formula exclusively. I think this is similar to most twin parents we know.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">The breastfeeding brigade will make you feel guilty for doing this. Don't. As with many things baby-related, it's easy to get hung up on things that in the grand scheme of things are not so important. Are your babies healthy? Do they put on weight regularly? Good. Move on.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Breastfeeding twins brings particular challenges. First, mum's breasts <em>will</em> be able to produce enough milk (note: cup size has no bearing on milk production, though some women seem to produce milk more easily than others), as her body responds to the demands of the babies. The more they suck, the more she makes. However, it's a gradual process, and you may need to see your babies hungry or frustrated for a few feeds before production goes up enough in the early weeks. Expect to do very little other than breastfeeding in the first week or so to really get started, and expect some discomfort.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Second, you will probably want to parallelise the feeding so that it takes half as long, helps to synchronise the babies, and is more equitable. Give one breast to each baby and switch between feedings (but not during, as both babies need to reach the richer hind milk that only comes after a while, but not necessarily at the same time in each breast). The biggest challenge is how to hold them. We used a twin breastfeeding pillow – a monstrosity made in China called My Brest Friend – which was pretty good, coupled with a raft of other pillows and devices. Sitting in bed seemed to work best. Getting a baby with no neck control to lie correctly and latch on properly is hard, though, and you'll find it easier to start by doing them one by one across the body. Take off their clothes so their skin touches yours to make it easier. And practice. Lots. We got help in the hospital before we left to get the basic technique, and then spent a lot of frustrated days and nights trying to make it all work.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">If and when you bottle feed, there are some advantages to that too. It is often easier and faster to feed from a bottle, and dad and others can help out more easily. It is also less straining on mum's body. For bottle feeding you have two choices: expressed breast milk or formula.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">If you choose to express, buy an electric breast pump (one of the weirder things I have ever owned for sure). We know a mother who basically fed exclusive expressed breast milk for three months. She had one baby. The time it takes to express and then feed probably makes this unrealistic for most twin parents, but one or two expressions a day for mixed feeding can be viable.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Formula can be made from powder or served from pre-made cartons. Cartons are not economically viable in the long run, but great for emergencies or travel. You should always have some. Powder milk has to be prepared by boiling and then cooling down water to the right temperature. This can take a while (up to 30 minutes if air cooling, though you can pour the water into a bottle and stand the bottle in some cold water to speed up the process; ditto in hot water to heat if the milk is too cold – we found this easier and less fiddly than an electric bottle heater).</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">Bottles also need to be washed and sterilised before each use. This can take a lot of time and is not something you want to do whilst the babies are hungry. We decided to buy enough bottles to cover a full day's feedings, which meant we ended up with 16 (we now do only 5 feeds a day, thankfully, but at that time we did 8). Also, buy a tabletop steriliser, not a microwave one (too small and fiddly). Finally, make sure you have the right teats: teats have different flow rates and too fast a flow causes excess leakage and sputtering, unhappy babies. Too slow flow causes frustration and may mean they fall asleep before finishing the feed. Start with "newborn flow" (1 hole) and move to "slow flow" (2 holes) after about 4-6 weeks. We have gone with the Philips Avent range bottles and steriliser.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">To be able to make up bottles quickly, we keep a clean, sterile jar of cooled, boiled water that we make twice per day. We also have a set of Tommy Tippie milk powder dispensers that we pre-fill with the right amount of formula for each feeding every night, at the same time that we wash and sterilise the next day's bottles. Making a bottle then becomes a matter of pouring the right amount of water into a bottle and pouring in the powder. We prepare the water part for two or three feeds at a time, and tip the powder in at the last minute. Once the milk has been prepared, it will last about 2 hours before it has to be thrown out.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">With bottles made, you then need to feed. Again, you want to parallelise. With two pairs of hands, this is relatively easy. Hold the baby, put on a bib or place muslin cloth under his or her chin (there will be spillage), and encourage him or her to eat. This does sometimes take a bit of coaxing and timing is important, but you will learn your babies' signs soon enough. You tend to become adept at anything you do 8 times a day.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">With one pair of hands, you can prop the babies up on on pillows, put them in their bouncers (tip: we use the lowest angle on the Baby Björn bouncers and use the toy attachment as an arm rest), or lie them flat on a play mat. The latter is surprisingly efficient. You then have one hand for each bottle. This does take some getting used to. Timing is important: the babies should be hungry, but not yet so hungry they become fractious. You may need to start with them one by one to take the edge off, and then parallelise for the remainder of the feed.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">This can be quite hard, because you will in effect need to choose which baby is most needy of your attention to tackle first, and you may have to accept that the other baby will cry for a while. This sounds sensible in theory, but in practice is is incredibly difficult to listen to your own baby crying. Strength of conviction that you are doing the right thing is very important (the same thing applies when you are sleep training using "controlled crying" – again see the Weissbluth book). You also need to stay calm and positive. Babies sense your nervousness and get very nervous in return, which just doesn't help. The thing to remember is that even if a feeding goes a bit wrong, there won't be any lasting damage. The only time you need to start worrying is if, after a week or so, you go for a weighing and they are not putting on weight. If in doubt, call the health visitors.</span></p>
<h2><strong>Finally</strong></h2>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">It is difficult to give advice to other parents without sounding negative. There are a myriad of pitfalls and challenges. With twins even more so. Whenever I received this kind of advice before our girls were born, I always suspected other parents were trying to tell me they regretted having kids, but were too afraid to admit it to themselves.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">However, what they were doing – and what I am doing – was to try to prepare me so that I could better enjoy what is probably the most profound thing that will ever happen to anyone. It is at once so common and so special that it is hard to describe. The challenges are many and specific, so I can enumerate them and try to prepare you. The upside is really only one: they are your babies. Having twins is also incredibly special, and is something not many people will get to experience.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">These days, if I wake them from a nap, they slowly rub their eyes and stretch. Then they open their eyes and see me above their cots. And they show me the most amazing, unadulterated and unconstrained smiles. Both of their faces literally glow with pure joy. They are so happy to see me – me. They love me so unconditionally they start to giggle. They love being alive. Even the tiniest things excite them.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">There's just no way to prepare you for how good that feels. I've literally shed tears when they achieve something that, really, is not all that impressive, like rolling over after having tried for three days. My wife puts them to bed, exhausted and sick of baby duty, only to spend the next hour looking at baby pictures on her phone.</span></p>
<p class="p2"><span class="s1"></span></p>
<p class="p1"><span class="s1">In fact, if there is one final piece of advice I can give you, take lots and lots of pictures every single day. They grow so fast you won't even know what hit you. You'll miss their tiny, fragile bodies when they are plump and active. If you're ever without them for more than a day, you'll literally see the difference. It's a magical experience, and I wouldn't change it for the world.</span></p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2012-05-12T20:08:30Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/plone-the-generous-community">        <title>Plone, the generous community</title>        <link>http://www.martinaspeli.net/articles/plone-the-generous-community</link>        <description>A lesson in selfish alturism</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>A lesson in selfish alturism</p>
<p>A few days ago, Franco Pellegrini posted a <a class="external-link" href="http://lists.plone.org/pipermail/plone-product-developers/2011-October/010787.html">short message</a>&nbsp;to the Plone mailing lists about a project he'd been working on in his spare time: an <a class="external-link" href="http://code.google.com/p/ploneide/">IDE for Plone</a>.</p>
<p>It's impressive.</p>
<p>Check out <a class="external-link" href="http://vimeo.com/30446168">the video</a>, especially the bits towards the end.</p>
<p>I don't think I've met Franco or seen his contributions before, so this came out of the blue. It's like an early open source Christmas present, one of those moments where you suddenly feel excited just to have realised what others are working on.</p>
<p>The immediate reaction of many in the community was one of astonishment. Where did this guy come from? Many of us wanted to meet Franco, connect him with others who are working on similar things, and encourage his project to reach maturity. There's no better place for that than the <a class="external-link" href="http://ploneconf.org/">Plone Conference</a>, which starts November 3rd.</p>
<p>Unfortunately, Franco was unable to come, as he could not afford the plane ticket, accommodation and conference ticket. Within a couple of hours, he'd had an offer of a free ticket from someone who had bought one, but couldn't come, and a room-share for free. We then suggested he set up a ChipIn to raise funds for the travel.</p>
<p>He did. Within 24 hours, it had reached 50% of his stated goal of $1,500. You can <a class="external-link" href="http://frapell.chipin.com/go-to-ploneconf">check the progress here</a> and perhaps chip in yourself.</p>
<p>It's stuff like this that makes me love the Plone community.</p>
<p>P.S.</p>
<p>Shameless plug: If you're going to the conference and you're interested in learning how the professionals work with Plone, check out my training course <a class="external-link" href="http://www.eventbrite.com/event/1913604643">Plone Development Environment and Deployment Masterclass</a>.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-10-15T09:39:50Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/book-review-play-framework-cookbook">        <title>Book Review: Play Framework Cookbook</title>        <link>http://www.martinaspeli.net/articles/book-review-play-framework-cookbook</link>        <description></description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p></p>
<p>At work, we've been playing (literally) with <a class="external-link" href="http://www.playframework.org/">Play!</a> framework, a rapid-development Java (and Scala) web stack. Play! feels a bit like it was written by a Python developer who was forced to use Java. It breaks a whole bunch rules of the Java orthodoxy (through sly tricks like bytecode manipulation), thereby addressing the fact that Java was never really designed to deal with the fluid, verb-oriented world of HTTP, a mismatch that users of Java web frameworks have been paying for over many years. (Java is very good for the unique business logic part of applications in enterprise environments, for middleware, scalable architecture and a whole bunch of other things, just not the web, at least not until Play! came along). I like Play! a lot, in fact, as do several of my colleagues.</p>
<p>One of the signs of a maturing open source community is the emergence of books. Hence, I was excited to hear about <a class="external-link" href="http://link.packtpub.com/P7sEOg">Play Framework Cookbook</a>&nbsp;by Alexander Reelsen, published by Packt (who also publish <a title="Plone book" class="internal-link" href="../plone-book">my book</a>;&nbsp;Packt gave me a free e-book copy to review, on the understanding that I'd publish a review here.)</p>
<p><strong>In summary</strong>: Great content; mediocre writing. Worth buying, but not the first thing you should read on Play.</p>
<p>In many ways, my criticisms are more to do with the editing than the author. Clearly, English is not his first language, and there are a number of grammatical mistakes and awkward turns of phrase that could have been caught in editing. There are also some silly mistakes, such as syntax errors in the code introduced by whitespace or other formatting issues (I can empathise - the layout process of my book was quite painful, since Python is whitespace sensitive) or version details being inconsistent between example and text (something else I can empathise with - I suspect Play 1.2 was released as the book was written; keeping on the bleeding edge can be a lot of work).</p>
<p>The second problem in my eyes is the fact that this has been commissioned as a "cookbook" by Packt. This is a very particular style that I imagine is quite hard to write for. Each chapter consists (only) of a set of "recipes", all of which have exactly the same headings: "Getting ready", "How to do it...", "How it works...", "There's more..." and "See also". Not only does this break the flow at times, it also feels in places like the author wanted to go into more depth or provide more linkages between the different sections, but was restricted by the format. The way the recipes are grouped into chapters also feels a bit arbitrary.</p>
<p>In other words, this is not a book you read cover-to-cover, and it's not the book you read to get started with Play! framework. I tried to put myself in the shoes of someone who didn't know how the big pieces fit together, and imagined being very confused.</p>
<p>However, that's not actually the point. There is well-written beginner <a class="external-link" href="http://www.playframework.org/documentation">documentation</a> available on the Play! website and elsewhere. This book does a great job of collecting a great many interesting, exciting examples. I found myself flipping through the index, virtually 'dog-earing' recipes that could be useful in a future project. I can imagine this book lying well-worn on the desks of my developers, who would use it as a reference. It's the kind of book you buy once you have some confidence you'll know what to look for.</p>
<p>With better editing/reviewing and some light restructuring, this could be a great book. As it stands, you'll probably buy it because it covers some specific topics you are genuinely interested in learning more about, not because it's going to be an enjoyable read or a great introduction to Play! But with that in mind, I think it would be a useful investment.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-09-03T21:19:31Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/professional-plone-4-development-now-available">        <title>Professional Plone 4 Development Now Available</title>        <link>http://www.martinaspeli.net/articles/professional-plone-4-development-now-available</link>        <description>The first book for Plone 4 is now for sale!</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>The first book for Plone 4 is now for sale!</p>
<p>Four years ago, I wrote what was then the first book covering the newly released Plone 3, called <em>Professional Plone Development</em>. One of the most popular books about Plone, it has sold around 5,000 copies.</p>
<p>A little more than a year ago, I started work on the second edition, intended to cover Plone 4, which was then nearing beta. I initially expected to spend 4-6 months updating the book. How wrong that turned out to be!</p>
<p><a class="external-link" href="http://www.packtpub.com/professional-plone-4-development/book">Professional Plone 4 Development</a> is now finally available for sale, in paper and eBook variants. It is much more than just an update of the first edition. Whilst it retains the structure, case study and style of the Plone 3 book, I estimate that more than half the content has been completely rewritten, and most of the rest has been at least partially revised.</p>
<p>In part, this is just a reflection of how far Plone has come since version 3. Plone 4 is a major improvement, and the book has been revised significantly to cover the latest best practice. It is fully up to date with Plone 4.1 and even covers some of what will be in Plone 4.2 (in a way that is compatible with 4.1).</p>
<p>The book is also better simply because I have learned a lot about real-world Plone deployments since 2007. The final part of the book, which covers server configuration and optimisation, is significantly better in this regard, as is the content covering the development environment.</p>
<p>Finally, the new book has benefited enormously from a fantastic review team consisting of Plone rockstars and sages, who have read every line and provided not just corrections and feedback, but also suggestions on new topics to cover. They are:</p>
<ul><li>Andrew Burkhalter</li><li>David Glick</li><li>Israel Saeta Pérez</li><li>Hanno Schlichting</li><li>Jon Stahl</li><li>Eric Steele (who also kindly wrote the foreword)</li><li>Matthew Wilkes</li></ul>
<p>Specific chapters were also reviewed by Laurence Rowe and Steve McMahon. I am extremely grateful to the entire review team, and to my editors at Packt, Maitreya Bhakal and Stephen Wilding.</p>
<p>You can read more about the book on <a class="external-link" href="http://www.packtpub.com/professional-plone-4-development/book">Packt's book page</a>, but I'll summarise a few reasons why you may want to buy it, whether or not you have read the first edition:</p>
<ul>
<li>Weighing in at over 500 pages, it is probably the most comprehensive Plone book on the market, and definitely the most up-to-date, at least for now.</li><li>It covers cutting edge technologies, including:</li>
<ul><li><em>Buildout</em>, a configuration management tool, with <em>mr.developer</em>, a code repository management tool</li><li><em>GenericSetup</em>, a site configuration mechanism</li><li><em>Diazo</em>, an innovative theming engine</li><li><em>Dexterity</em>, a content type framework</li><li><em>z3c.form</em>, a forms library</li><li><em>z3c.jbot</em>, a tool to override template easily</li><li><em>five.grok</em>, a convention-over-configuration toolkit for Zope 2</li><li><em>plone.app.registry</em>, a configuration storage solution</li><li><em>jQuery/jQuery Tools</em>, JavaScript frameworks</li><li><em>PAS</em>, Zope's authentication and security abstraction (including integration with Facebook over OAuth)</li><li><em>SQLAlchemy</em>, an Object Relational Mapper for Python and <em>z3c.saconfig</em>, a Zope integration layer for SQLAlchemy</li><li><em>plone.app.caching</em>, an HTTP caching tool</li><li><em>RelStorage</em>, a ZODB database integration solution</li></ul>
<li>You will learn how to set up a powerful, productive development environment</li><li>There is in-depth coverage of deployment and optimisation, including web caching, SSL, LDAP integration, load balancing and database integration</li><li>The whole book is underpinned by a realistic case study with full source code. You can see the application, a cinema website and booking system, taking shape chapter by chapter. (My Git Fu is now significantly up, having rebased my way through a large number of chapter revisions and bug fixes,). The source code is properly formatted, has good test coverage and generally aims to illustrate good practice without taking didactic shortcuts.</li><li>There is a significantly improved index. The lack of a good index was one of the strongest pieces of 'constructive' feedback I received for the first edition.</li></ul>
<p>You can buy the book from <a class="external-link" href="http://www.packtpub.com/professional-plone-4-development/book">Packt directly</a>, or (at least for the paper edition) from your local Amazon and many other book retails. I can also attest that the eBook renders well in iBooks on the iPad (you'll need to download it as a PDF and install it yourself). I'm not sure about the Kindle yet, but the first edition is available in the Kindle Store, so I assume this edition will be too in due course.</p>
<p>There will be sample chapter and two free chapters that did not make it into the print edition, covering KSS and Archetypes, available on <a class="external-link" href="http://www.packtpub.com/professional-plone-4-development/book">Packt's website</a> in due course.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-08-27T20:46:16Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/about-the-plone-foundation-board">        <title>About the Plone Foundation Board</title>        <link>http://www.martinaspeli.net/articles/about-the-plone-foundation-board</link>        <description>Some personal thoughts</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>Some personal thoughts</p>
<p><em>Disclaimer: These are my personal opinions. I've neither discussed them with nor run them past anyone else from the Plone Foundation.</em></p>
<p>Plone has some amazingly mature institutions. Right from the beginning, intellectual property rights have been managed responsibly, and are now owned by the non-profit Plone Foundation. Community members can apply to become Foundation Members, and their case is assessed on the merits of their contributions to Plone. An annually elected Plone Foundation Board represents the Foundation in legal and practical matters, and administers its (limited) funds for things like exhibiting Plone at major events and helping developers afford travel to key sprints.</p>
<p>Recently, however, there seems in some quarters to have developed an "us and them" attitude towards the Board, in particular. This is deeply discouraging.</p>
<p>It is worth remembering that the members of the Board are elected from and by the membership annually. I haven't done any formal polling, but anecdotally, it is the best-respected and most accomplished members of the community who are elected. They then put many hours a week into Board duties for no pay or other reward, simply because they believe the work they do is important to drive Plone forward. We owe them a debt of gratitude for that.</p>
<p>Certainly, the Board is not always perfect. As a youngish organisation, the Plone Foundation is still evolving and learning. But I have no doubt whatsoever that the members of the Board are doing their very best and have only the best intentions. They are not corrupt officials bent on increasing their power. They are not corporate miscreants trying to use the Board to their employers' avantage. They are members of our community, making a contribution that is every bit as important as someone committing code or writing documentation - perhaps more so.</p>
<p>It may be easy to lose perspective and undermine the enthusiasm and determination of the Board members. This can range from "stop energy" to downright poisonous behaviour.&nbsp;Examples may include trying to poke procedural holes in minor points to "catch out" individuals on the Board, demanding action that is excessively time-consuming, implying the Board is corrupt, attempting to extract money or personal benefit from Board's or simply assuming the worst about the Board and any of its actions.</p>
<p>The Board are more open and transparent now that it has ever been, and very recently, they announced further initiatives to be even more open. It is good for the membership to join the discourse and query the Board, but we have to remember that this is not state government: these are not opaquely elected officials with lots of power and money to disburse, nor are they elected from an ideologically divided electorate fighting to shape the future of our community.</p>
<p>Rather, the Board members are people that we have elected to carry out boring, but important work for us, the Plone community, for free. We should treat them with the respect and gratitude they deserve, knowing that we have another chance to vote on the make-up of the Board at the next Plone Conference.</p>
<p>For this is what scares me: If we make Board members subject to personal or general attack, or if they feel that their work is not appreciated, they may simply not stand for election next time. I firmly believe that some of the best, most mature and experienced people in the community as presently on the Board, and that they are doing a fantastic job. We should encourage more people to stand, but not discourage existing members from standing again. If we do, we'll have only ourselves to blame.</p>
<p>So, please:</p>
<ul><li>Give the Board members the benefit of the doubt</li><li>Be courteous and respectful when replying to Board minutes</li><li>If you email the Board requesting something, ask yourself whether you are asking for something constructive, and something that is within the Board's powers to address</li><li>Remembers that the Board members are volunteers with limited time, so try to use it wisely</li><li>Be careful about feeling entitled to action from members of the Board the same way you may feel entitled to action from your&nbsp;democratically&nbsp;elected representative or government. You voted no who you felt would best be able to carry out the Board's duties, not someone who has assumed a great deal of power or influence for which they are indebted to you</li><li>If you are worried about the performance of a particular member of the Board, the annual election is the right place to address that</li><li>If you think you could do better, please stand for election yourself. More diverse elections would be a boon to the Plone Foundation's future</li></ul>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-08-14T16:08:51Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/sublime-text-2-for-zope-and-plone">        <title>Sublime Text 2 for Zope and Plone</title>        <link>http://www.martinaspeli.net/articles/sublime-text-2-for-zope-and-plone</link>        <description>A few tips</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>A few tips</p>
<p>Few things are as precious to a developer as his text editor. I've sworn by <a class="external-link" href="http://macromates.com">TextMate</a> for many years, but recently there's been a lot of rage about <a class="external-link" href="http://sublimetext.com">Sublime Text 2</a>.</p>
<p>I am currently trialling it, for a few reasons:</p>
<ul><li>TextMate development seems to have run aground. This smells like the classic over-ambitious "version 2" rewrite syndrome, as TextMate 2 has been promised and not materialised for <em>years</em>.</li><li>Sublime Text uses Python for its plugins. I've written/tweaked a few plugins, and it's quite fun.</li><li>Sublime Text 2 is fast, even when opening very large folders, such as a fully built-out Plone buildout directory.</li><li>It's very keyboard-friendly, and the "goto anything" (Cmd+P) feature is really nice.</li><li>It can natively read TextMate bundles for things like colour schemes and syntax highlighting.</li><li>There are builds for Windows and Linux as well as OS X. I use both those operating systems at work, and a single license will work for multiple machines (i.e. it's per-user).</li></ul>
<p>I won't say I'm 100% sure yet, but on balance, Sublime Text 2 (beta) feels very solid and is clearly actively developed. I've bought a license and will be using it full time for a while.</p>
<p>So far, there is a lot to like, though also a few things not to like:</p>
<ul><li>The sidebar/projects feature has some UI problems. I listed them <a class="external-link" href="http://www.sublimetext.com/forum/viewtopic.php?f=2&amp;t=2700">here</a>.</li><li>The "find-in-files" feature just runs grep and displays the results as the terminal would. I much prefer Text Mate's version.</li><li>There's no multi-file search-and-replace yet.</li><li>The documentation is a bit patchy, but with the forums and Google, I've been able to find out must things.</li></ul>
<p>I've spent a good amount of time customising and installing plugins to make it work better for me. I'll provide a run-down below, in case others are interested.</p>
<ul><li>I don't much like the default "dark" theme. Far too depressing. Luckily, there's a really nice theme called <a class="external-link" href="https://github.com/buymeasoda/soda-theme/">Soda</a>. I use it with the suggested <a class="external-link" href="https://github.com/mkhl/espresso-tutti-colori.tmtheme">Espresso Tutti Colori</a> colour scheme originally for TextMate and the <a class="external-link" href="https://github.com/andreberg/Meslo-Font">Meslo font</a> (11pt). You can see how these are configured <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/">here</a>.</li><li>I created a keyboard history plugin that works a lot like TextMate's Cmd+Shift+V/Cmd+Alt+Ctrl+V based on the code in <a class="external-link" href="http://www.sublimetext.com/forum/viewtopic.php?f=5&amp;t=2260&amp;start=0">this</a> forum thread. You can find my version <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/clipboardHistory.py">here</a>.</li><li>I found a really nice in-line Pyflakes checker plugin <a class="external-link" href="https://github.com/vorushin/sublimetext_python_checker">here</a>.</li><li>I use <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/highlight.py">this plugin</a> (originally found in the forums, sorry I've lost the link) to highlight all occurrences of the word currently under the caret, a feature I've missed from Eclipe that's useful for seeing how variables and methods are being used at-a-glance.</li><li>I use a pretty advanced import auto-complete and jump-to-definition plugin <a class="external-link" href="https://github.com/Kronuz/SublimeCodeIntel">found here</a>&nbsp;(note that right now there's a problem with the current head, which will probably be fixed imminently, but see <a class="external-link" href="http://www.sublimetext.com/forum/viewtopic.php?f=5&amp;t=2202&amp;p=12630#p12630">this forum thread</a> for updates). In buildout-based projects, I use collective.recipe.omelette to generate a parts/omelette directory that can serve as a Python path, and use <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/mkcodeintel">this script</a>&nbsp;to generate a suitable config file in a local buildout (just run <em>mkcodeintel</em>&nbsp;from the root of the buildout)</li><li>For following along a Python debugging session in Sublime Text, I'm using <a class="external-link" href="http://pypi.python.org/pypi/PdbSublimeTextSupport">PdbSublimeTextSupport</a>, a shameless ripoff of PdbTextMateSupport from Andi Zeidler and others.</li><li>I use <a class="external-link" href="http://pypi.python.org/pypi/mr.igor">mr.igor</a> quite a bit to save me having to remember import locations. <a class="external-link" href="https://github.com/optilude/SublimeTextIgorPlugin">This plugin</a>&nbsp;makes it work in Sublime Text.</li><li>The Zope and Buildout TextMate bundles work pretty much unchanged in Sublime Text 2 to get syntax highlighting and snippets for Zope and Buildout files. I made a few minor tweaks and uploaded them <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/tree/master/Packages">here</a>.</li><li>UPDATE #1: I've created build systems for running a <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/Buildout.sublime-build">Buildout in the project directory</a>, <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/Buildout%20-%20Current%20file.sublime-build">running the current .cfg file as a buildout</a>, and <a class="external-link" href="https://github.com/optilude/SublimeTextMisc/blob/master/mr.developer%20rebuild.sublime-build">re-running the last used buildout with mr.developer</a>.</li><li>UPDATE #2: I've written a plugin for browser-like back/forward navigation as the selection is moved. See <a class="external-link" href="http://www.sublimetext.com/forum/viewtopic.php?f=5&amp;t=2738">this thread</a>.&nbsp;</li></ul>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-08-13T19:53:12Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/plone-conference-2011-training-plone-development-environment-and-deployment-masterclass">        <title>Plone Conference 2011 Training: Plone Development Environment and Deployment Masterclass</title>        <link>http://www.martinaspeli.net/articles/plone-conference-2011-training-plone-development-environment-and-deployment-masterclass</link>        <description>Tickets now on sale</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>Tickets now on sale</p>
<p>This year, I'm giving a training course in the two days before the <a class="external-link" href="http://ploneconf.org">Plone Conference</a> in San Francisco, on November 1st and 2nd, called <strong><a class="external-link" href="http://www.eventbrite.com/event/1913604643">Plone Development Environment and Deployment Masterclass</a></strong>.</p>
<p>You can read more about it on <a class="external-link" href="http://www.eventbrite.com/event/1913604643">the Eventbrite page</a>, where you can also reserve your place. There is a strictly limited number of discounted "early bird" tickets available until August 31st available for $350. However, even at full price the course is a pretty reasonable $395 per person, in keeping with the tradition of offering low-cost, high-quality training before the Plone Conference.</p>
<p>A full description of the course is available on the <a class="external-link" href="http://www.eventbrite.com/event/1913604643">aforementioned page</a>, but I wanted to use this post to talk a bit about why I wanted to offer the course.</p>
<p>Over the past several years, I've taught a number of people Plone development, both directly through projects at work - often with bright people who are pretty new to Python and Plone - and indirectly, through my book Professional Plone Development (of which a Plone 4 edition is imminent!) and various documentation efforts on <a class="external-link" href="http://plone.org">plone.org</a>. Through this process, I've come to realise one thing:</p>
<p>Plone development is not hard if you have the right starting point. If your environment and tools are set up correctly, and you know where to look, it's pretty easy to figure out how you should attack a given problem, even if it's something you haven't seen before.</p>
<p>The converse is also true: if you dive into Plone development haphazardly and you don't know how to set up your environments, you will pay the price later. It can be very hard to unpick where you've strayed from accepted best practice and come up with a half-working solution that, in some cases, will be worse than no solution at all because it simply can't be turned into something production-ready. You end up with a soup of code and configuration that you only half-understand, perhaps having copied large chunks from other places.</p>
<p>This course, therefore, is all about setting new and not-so-new Plone developers on the right path. It's about understanding the development and deployment environments your project operates in, installing the right tools - and knowing how and when to use them - and knowing how to help yourself when you get stuck.</p>
<p>The course will be roughly split into two parts: the first day will focus on the local development environment; the second day will focus on the server and deployment. Along the way, we'll discuss common pitfalls, not just those you hit the first time you try something, but also those harder-to-predict problems that only occur when your site has been live for a few months and something goes wrong. Knowing how to diagnose and debug problems becomes essential, especially when a site is live. We'll also discuss performance optimisation, caching and deployment options to make your site not just fast, but flying.</p>
<p>Finally, I want to make sure there is plenty of time for Q&amp;A. The more discussion and experiences shared among the class, the better. I'll do my best to come prepared to answer them. I'll also encourage submission of requests in advance for that reason.</p>
<p>If this course sounds interesting to you, please help us reach the break-even point in time to confirm the venue by <a class="external-link" href="http://www.eventbrite.com/event/1913604643">signing up as early as possible</a>, not at least to take advantage of the "early-bird" price of $350.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-08-09T15:23:19Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/buildout-hard-reset">        <title>Buildout hard reset</title>        <link>http://www.martinaspeli.net/articles/buildout-hard-reset</link>        <description>How to get back to square one with a Plone buildout</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>How to get back to square one with a Plone buildout</p>
<p>If all else fails, reboot. Or, in the base of a buildout, delete any generated files and start again.</p>
<p>The commands below should remove everything and allow you to run a fresh buildout. Run this from the root of the buildout directory, and don't worry if you get a few "file not found" warnings.</p>
<pre>$ rm -rf .installed.cfg .mr.developer.cfg parts/ eggs/ develop-eggs/
$ find . -name '*.pyc' -or -name '*.egg-info' | xargs rm -rf
$ bin/buildout -n</pre>
<p>Finally, if you are using a shared buildout directory and a previous buildout had network trouble, it's possible that you'll have a partially downloaded <em>.zip</em> or <em>.tar.gz</em> or <em>.egg</em> file that is corrupt and confuses buildout. If so, you can remove the offending file from the <em>dist/</em>&nbsp;directory in your download cache, e.g.:</p>
<pre>$ rm ~/.buildout/downloads/dist/foo.bar.zip</pre>
<p>or, if you want to clean up all downloaded source archives:</p>
<pre>$ rm ~/.buildout/downloads/dist/*</pre>
<p>This should be safe, since any egg that's actually used will have been turned into a <em>.egg </em>file/directory anyway.</p>
<p>Check your <em>~/.buildout/default.cfg</em>&nbsp;file if you've forgotten where your download cache is located.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-06-12T10:22:40Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/tools-for-a-successful-plone-project">        <title>Tools for a successful Plone project</title>        <link>http://www.martinaspeli.net/articles/tools-for-a-successful-plone-project</link>        <description>From the book writing procrastination dep't</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>From the book writing procrastination dep't</p>
<p>I've recently had to step away from a great project – it was difficult to continue after having to leave the country. :-) The project goes live in a few months, but (hopefully) we managed to finished most of the development work.</p>
<p>I can't talk too much about the project itself, except to say that when it launches, it will probably be one of the highest-traffic Plone 4 sites in existence. Moreover, it's a site with long lulls followed by huge spikes in traffic, that needs to cater for both logged-in members of the public and anonymous users, with different load profiles.</p>
<p>I do want to talk a bit about the tools and technologies we used, in the hopes that others will find it interesting. This is easily the most sophisticated stack I've ever used in a real-world project. And on the whole, it's worked extremely well so far.</p>
<h2>The team</h2>
<p>Beyond myself, the team consisted of two very capable developers with experience of Plone 2.5 and through-the-web development, but limited Plone "filesystem" experience, on a full-time basis. In addition, we had the help of a network engineer and a tester, as well as a peripheral team of testers, trainers and others.</p>
<p>A side-goal of the project was to leave behind tools and working practices that could be applied to future development projects. As such, a lot of thought went into how the development environment was set up and how it could be reused.</p>
<h2>Development environment</h2>
<p>We used an agile development process centered around Scrum. To support this, we used <a class="external-link" href="http://pivotaltracker.com"><strong>Pivotal Tracker</strong></a> to manage stories and defects. This is my third attempt at using Pivotal in anger, and I'm pretty happy with it. Whilst certainly not perfect, it's simple and user friendly enough to fit into my preferred workflow, and it helps the release planning and story estimation process. That, and the price is right.</p>
<p>For source control, we used an internal <strong>Subversion</strong> server. This was a step up from CVS. I'm pretty confident that Subversion was the right choice: a DVCS would have been far too complicated and confusion-prone for this project.</p>
<p>We installed <a class="external-link" href="http://trac.edgewall.org/"><strong>Trac</strong></a> on our development server as well. We didn't actually use its issue tracking capabilities (since we kept all features and defects in Pivotal), but made use of its wiki and the Subversion browser. I find a project wiki useful for keeping track of "tips and tricks", build instructions, third party contact details and other transient information. I'm not sure Trac was the only (or even the best) choice here, but it did the job. My biggest gripe with it is probably that the wiki syntax is a bit awkward.</p>
<p>Naturally, our development process insisted on having tests for everything. We used <a class="external-link" href="http://hudson-ci.org/"><strong>Hudson</strong></a> to run the tests regularly and alert us of any regressions. Continuous Integration is hugely important. If you don't have it in your project, get it now. Hudson is easy to set up and flexible enough for all your CI needs.</p>
<p>The last thing to go on our development server was an <strong>Apache</strong> instance serving a static directory to which selected users had write access over <strong>scp</strong>. We used this as the release target for <strong><a class="external-link" href="http://pypi.python.org/pypi/jarn.mkrelease">jarn.mkrelease</a></strong> when making internal releases of our own packages: The rule was that no production release could contain Subversion checkouts of packages. Instead, we made internal releases to this directory, which was listed in the <em>find-links</em>&nbsp;option in our buildout.</p>
<p>All of our environments were managed with <a class="external-link" href="http://www.buildout.org/"><strong>Buildout</strong></a>, of course. To make the buildouts more re-usable and robust, we kept a number of buildout files in a directory called <em>buildout.d</em>. Each file was responsible for building or configuring one aspect of the system. For example, <em>prod-nginx.cfg</em>&nbsp;would configure nginx for the production server, and <em>dev-beaker.cfg</em> would configure <a class="external-link" href="http://beaker.groovie.org/">Beaker</a> (which we used for session management via <a class="external-link" href="http://pypi.python.org/pypi/collective.beaker">collective.beaker</a>) for the development environment. In addition, <em>buildout.d/templates</em> contained templates for configuration files, which were set up using <a class="external-link" href="http://pypi.python.org/pypi/collective.recipe.template">collective.recipe.template</a>.</p>
<p>At the top level, we had the following files:</p>
<ul><li><em>packages.cfg</em>, listing known good sets for packages we used, specifying checkout locations and packages for checkout by <strong><a class="external-link" href="http://pypi.python.org/pypi/mr.developer">mr.developer</a>&nbsp;</strong>(an indispensable development package management tool), and defining egg working sets for deployment and testing. The <strong><a class="external-link" href="http://pypi.python.org/pypi/buildout.dumppickedversions">buildout.dumppickedversions</a></strong> extension was used to notify of unpinned dependencies.</li><li><em>versions.cfg</em>, containing our own known good set for our own released packages, as well as third party dependencies not covered by other known good set. This file was included from <em>packages.cfg</em>.</li><li>One top level file for each environment. The default <em>buildout.cfg</em> was used for the development environment. The other files had names corresponding to servers, e.g. <em>prod-app-master.cfg</em>&nbsp;for the main application server and <em>prod-web-1.cfg</em>&nbsp;for the first of two web servers.</li></ul>
<p>The top level "environment" files were only allowed to include <em>extends</em>&nbsp;lines to bring in the required components, and settings for host names, ports, users, etc. For example:</p>
<pre>[buildout]
extends = 
    buildout.d/base.cfg
    buildout.d/prod-base.cfg

    packages.cfg

    buildout.d/prod-lxml.cfg

    buildout.d/postgres.cfg
    buildout.d/postgres-relstorage.cfg

    buildout.d/prod-beaker.cfg
    buildout.d/prod-instance.cfg

# Hostnames to use for various services
[hosts]
public     = www.example.org
master     = server-1
slave      = server-2
postgres   = server-1

# Ports to use for various services
[ports]
instance1  = 8801
instance2  = 8802
instance3  = 8803
instance4  = 8804
postgres   = 5432

# Users to run as
[users]
zope             = nobody
postgres         = nobody</pre>
<p>Each file in <em>buildout.d</em>&nbsp;used the the same pattern. Here is an example to build HAProxy:</p>
<pre>##############################################################################
# Production HAProxy - load balancer
##############################################################################

[buildout]
parts += haproxy-build haproxy-config

# Configuration
# *************

[hosts]
haproxy = localhost

[ports]
haproxy = 8200

[users]
haproxy = nobody

[downloads]
haproxy = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.8.tar.gz

[haproxy-build]
target = generic
cpu = generic

# Recipes
# *******

[haproxy-build]
recipe = plone.recipe.haproxy
url = ${downloads:haproxy}


[haproxy-config]
recipe = collective.recipe.template
input = ${buildout:directory}/buildout.d/templates/haproxy.conf.in
output = ${buildout:directory}/etc/haproxy.conf</pre>
<p>The settings under <em>[hosts]</em> and [ports] are expected to be overridden in the top-level buildout file.</p>
<p>In the development buildout, we installed a number of tools:</p>
<ul><li>An "omelette" of all installed eggs for easier debugging, using <a class="external-link" href="http://pypi.python.org/pypi/collective.recipe.omelette"><strong>collective.recipe.omelette</strong></a>.</li><li>A <a class="external-link" href="http://pypi.python.org/pypi/zc.recipe.testrunner">test runner</a> and <a class="external-link" href="http://pypi.python.org/pypi/z3c.coverage">coverage reporting tool</a>.</li><li>A <a class="external-link" href="http://pypi.python.org/pypi/z3c.checkversions">script</a> to help check for new versions of pinned packages.</li><li><a class="external-link" href="http://pypi.python.org/pypi/ZopeSkel"><strong>ZopeSkel</strong></a>, for making new packages.</li><li><a class="external-link" href="http://pypi.python.org/pypi/jarn.mkrelease"><strong>jarn.mkrelease</strong></a>, for making internal releases easily.</li></ul>
<p>We also installed the following eggs into the main development Zope instance:</p>
<ul><li><a class="external-link" href="http://bpython-interpreter.org/"><strong>BPython</strong></a>, for a nice interactive shell</li><li><strong><a class="external-link" href="http://pypi.python.org/pypi/plone.reload">plone.reload</a></strong> - absolutely indispensable</li><li><strong><a class="external-link" href="http://pypi.python.org/pypi/Products.PDBDebugMode">Products.PDBDebugMode</a></strong>, for instant debugging</li><li><strong><a class="external-link" href="http://pypi.python.org/pypi/Products.PrintingMailHost">Products.PrintingMailHost</a></strong>, to help debug code that sends mail</li></ul>
<p>Finally, we installed <strong><a class="external-link" href="http://sphinx.pocoo.org/">Sphinx</a><span class="Apple-style-span">, which we used to build documentation from reStructuredText files under source control in the <em>docs</em> directory in the build.&nbsp;</span></strong>This is probably the thing I'm most pleased about. We had a rule that no story could be completed without documentation being added to Sphinx. We then set up Hudson to automatically build and deploy the documentation after a successful build. The result is the best-documented project I've ever worked on. Design decisions, maintenance tasks, critical go-live activities and "how the hell did that work again" type documentation all found its way into the Sphinx documentation. Instead of leaving all the docs to the end, we had a continually expanding body of knowledge, and a process to ensure that it was not neglected during busy times of the project.</p>
<p>Each developer's machine ran Mac OS X with <strong><a class="external-link" href="http://macromates.com/">TextMate</a></strong>, Terminal and Firefox as the main "IDE". <a class="external-link" href="http://getfirebug.com"><span class="Apple-style-span">Firebug</span></a><span class="Apple-style-span"><span class="Apple-style-span"> was of course installed. We used the Zope bundle for TextMate, which includes "</span><a class="external-link" href="http://pypi.python.org/pypi/pyflakes"><span class="Apple-style-span">pyflakes</span></a><span class="Apple-style-span">-on-save" functionally - a big time saver and code quality improver. We also used David Glick's </span><a class="external-link" href="http://pypi.python.org/pypi/mr.igor">mr.igor</a><span class="Apple-style-span"> to help remember Python imports.</span></span></p>
<p><span class="Apple-style-span">During deployment, we used <a class="external-link" href="http://pypi.python.org/pypi/funkload"><strong>FunkLoad</strong></a> for extensive load testing. At one point, we had two 8-way/32Gb machines generating load. To facilitate that, we wrote some scripts since released as </span><a class="external-link" href="http://pypi.python.org/pypi/benchmaster"><strong>BenchMaster</strong></a><span class="Apple-style-span">. If you have never worked with FunkLoad or done proper load testing of your solutions, you're missing out. It's hugely important, and helped us identify a number of bottlenecks and optimisations that would almost certainly have brought the site to its knees in its first week after launch.</span></p>
<h2>Production deployment</h2>
<p>We used a number of technologies in the production deployment. Each deserves a blog post in its own right, but here is a quick run-down:</p>
<ul><li>We had two identical, redundant servers running <a class="external-link" href="http://wiki.nginx.org/"><strong>nginx</strong></a> and <a class="external-link" href="http://varnish-cache.org/"><strong>Varnish</strong></a>.</li><li>nginx was used to accept SSL traffic, perform Zope virtual host monster URL rewriting, and force the user into and out of SSL as necessary. We also used nginx to add certain request headers used to optimise caching and load balancing, and to serve a "panic page" - a static HTML file to which HAProxy would redirect if no Zope backends were available.</li><li>Varnish did what Varnish does: Make the site fast. We used the Varnish configuration bundled with <a class="external-link" href="http://pypi.python.org/pypi/plone.app.caching">plone.app.caching</a> as a starting point, and tweaked it for our fairly unique load profile.</li><li>Behind these servers, we had two application servers: One running <strong><a class="external-link" href="http://haproxy.1wt.eu/">HAProxy</a></strong>, Zope, <strong><a class="external-link" href="http://memcached.org/">Memcached</a></strong> and PostgreSQL, and one running additional Zope instances.</li><li>HAProxy was configured to distribute load across the back-end Zope instances. It used headers set by nginx to route content authors, other logged-in users and anonymous users to appropriate back end Zope instances. We kept a pool of "shared" instances, with some instances ring-fenced for certain types of traffic. If no instances could be found, HAProxy would redirect the user to a "panic page" served directly by nginx.</li><li>Zope was used to run Plone, obviously. In total, we had 16 Zope instances on each of the two 8-way back-end machines. These were configured to use <a class="external-link" href="http://pypi.python.org/pypi/RelStorage"><strong>RelStorage</strong></a> against a Postgres database. Additional relational database access was provided via <strong><a class="external-link" href="http://pypi.python.org/pypi/SQLAlchemy">SQLAlchemy</a></strong>. Session management and shared caching used <strong><a class="external-link" href="http://pypi.python.org/pypi/Beaker">Beaker</a>&nbsp;</strong>(via <strong><a class="external-link" href="http://pypi.python.org/pypi/collective.beaker">collective.beaker</a></strong>), which was configured to store its data in Memached, allowing sessions to be non-sticky. Theming was provided by <a class="external-link" href="http://pypi.python.org/pypi/xdv"><strong>XDV</strong></a>, via <strong><a class="external-link" href="http://pypi.python.org/pypi/collective.xdv">collective.xdv</a></strong> (in our tests, we got better performance out of this than deploying the theme to a separate nginx instance). Cache control was provided by <strong><a class="external-link" href="http://pypi.python.org/pypi/plone.app.caching">plone.app.caching</a></strong>. All custom content types were built using <strong><a class="external-link" href="http://plone.org/products/dexterity">Dexterity</a></strong>. We used <strong><a class="external-link" href="http://pypi.python.org/pypi/collective.tinymcetemplates">collective.tinymcetemplates</a></strong>&nbsp;for content templating, and <a class="external-link" href="http://pypi.python.org/pypi/collective.transmogrifier"><strong>collective.transmogrifier</strong></a> for migration from the previous site.</li><li>Memcached was used by RelStorage and Beaker.</li><li>Additionally, each build contained a specific <strong><a class="external-link" href="http://supervisord.org/">Supervisord</a></strong> configuration to start and stop all relevant services with a single command.</li><li>We configured a central Syslog server using <strong><a class="external-link" href="http://www.rsyslog.com/">rsyslog</a></strong>, collecting logs from all relevant services on all production servers. This was configured to insert log entries into a separate Postgres database. We created views for common log queries (e.g. "all errors in the last 24 hours"), and exposed these via <strong><a class="external-link" href="http://phppgadmin.sourceforge.net/">phpPgAdmin</a></strong>, a simple, but effective solution for centralised log analysis.</li><li>The logging server also acted as a <a class="external-link" href="http://munin-monitoring.org/"><strong>Munin</strong></a>&nbsp;server, with each production server acting as nodes.</li></ul>
<p>Overall, this project started to "feel right" pretty soon. The development environment and infrastructure held up very well, and was able to accommodate changes both in the requirements and our understanding of the problem domain. Some highlights for me were:</p>
<ul><li>We managed to build documentation with the code, by incorporating Sphinx into our workflow.</li><li>We avoided deploying code from Subversion by using internal releases. jarn.mkrelease was a big help here.</li><li>Varnish is just such an awesome piece of software.</li><li>And nginx is not much worse. :-)</li><li>HAProxy could handle everything we threw at it, and then some. I will definitely use it again. For very simple scenarios, the built-in nginx or Varnish load balancers may suffice, but for complex setups like this, HAProxy is awesome.</li><li>FunkLoad was a revelation. Not only did we find bottlenecks we wouldn't have found otherwise: thinking through the load test scenarios and the load test results helped us understand how our site would need to be built to perform acceptably under load.</li><li>Plone 4 is a fantastic release. We started around beta 2, and it's been virtually flawless since, save for a few minor hiccups.</li><li>XDV is clearly the future of theming - perhaps not just Plone theming, but theming in general. We ended up espousing several improvements that Laurence kindly put in for us. With the 0.4 release, I think it's reaching maturity. It quickly became an integral part of our workflow, and a favourite of one of our team members who's got considerable experience theming Plone and other CMS's.</li><li>Having taught people Archetypes development in the past, I have no doubt that I prefer teaching Dexterity (and Grok-like views). It's quicker to learn, more intuitive and more consistent with "modern" Zope and Plone.</li></ul>
<p>For me personally, this project was a very positive experience. If nothing else, it has taught me a lot of things I intend to put in the book I should be writing an update for right now...</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2011-02-09T07:40:35Z</dc:date>        <dc:type>News Item</dc:type>    </item>
    <item rdf:about="http://www.martinaspeli.net/articles/developer-centric-version-control-considered-harmful">        <title>Developer-centric version control considered harmful</title>        <link>http://www.martinaspeli.net/articles/developer-centric-version-control-considered-harmful</link>        <description>Why you shouldn't host things under your own name if you care about others using it</description>     <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/">    <![CDATA[<p>Why you shouldn't host things under your own name if you care about others using it</p>
<p>Git is definitely the flavour of the month when it comes to version control systems. In a relatively short space of time, it's attained quite substantial mindshare. I think this has a lot to do with GitHub. And I think GitHub's success has a lot to do with its friendly, inviting user interface. It's a great service, and it's managed to become a de-facto home for Git repositories for a lot of people.</p>
<p>The great strength of Git - enhanced by GitHub - is that it allows people to put up their own repositories very easily. As a developer, I have a natural home for all manner of personal projects, and a great tool chain around them, including a Wiki and an issue tracker.</p>
<p>So what's the problem? Consider this URL:</p>
<blockquote class="webkit-indent-blockquote">
<p><em>http://github.com/optilude/some-project</em></p>
</blockquote>
<p>Notice that my (user)name is in the URL.</p>
<p>Once the project outgrows my own tinkering, I may have some contributors, who want to tinker on their own. Git and GitHub encourage this kind of thing. They can fork my project with just one click. But now there are multiple versions of the repository (and the wiki and the issue tracker), and no-one can really be too sure which one to use.</p>
<p>There are lots of potential problems with this, with lots of potential solutions. Let's think about a few scenarios.</p>
<ul><li>Someone else forks my repository and tinkers a bit. They then email me to ask me to pull their changes into my repository. If I have the time and inclination (and read my email), that may bring us back to one canonical version. However, in time, there is a single point of failure on me as the maintainer. At some point, I may stop caring or get too busy to follow up.</li><li>Here, Git has an answer: anyone can fork my repository and take over ownership. This is powerful and adds fault tolerance to the "single maintainer" model. But socially, it is dubious. Who really controls development? Who has a right to publish a new release? What if I come back after a few months and decide I wanted to own the project all along? We now need to reconcile the two forks. This may be tricky. Perhaps we don't do it. People now have to figure out which one of two versions of the software to "bet" on. This is onerous, and likely to deter other contributors.</li><li>Let's say we bring the main line of development back to "my" repository. Once again, I have to commit a lot of time to reviewing and pulling in changes. Maybe I fall behind. So another user comes around and wants to work a bit. Which one of the two trees does he fork? Which ones does he pull in updates for?</li><li>Perhaps I decide to relinquish control to another developer. I let my GitHub fork die, and expect people to use another one. But how do I manage this? How do I hand over ownership to someone else's account without confusing people who've been using my repository? Or people who stumble upon it in the future?</li></ul>
<p>Sooner or later, some order has to be imposed on this model. Here, unfortunately, Git and GitHub offer only a handwave. There are a multitude of models that we could adopt. Perhaps we move the project to a more "project-centric" hosting service such as Google Code or Launchpad. Perhaps we set up an "organisation" user on GitHub (but what organisation would that be? for a small project, there may not be an obvious one) with shared ownership, and move our code there. Perhaps we continue with a highly decentralised model, where pulling changes is always an ad-hoc task, and no-one has a stronger claim to ownership than anyone else. There are pros and cons to all of these options, of course, but none seem especially good for a project that has a few users, a well-populated wiki and a bunch of issues in its tracker.</p>
<p>Here's a cautionary tale that happened to me today: I've been using Soaplib, a Python library for building SOAP servers. There was a release on PyPI, but it had a bug that meant I had to get a checkout. The PyPI page listed a GitHub URL, so I used that to clone the repository. A few weeks later, all our builds suddenly broke. The remote repository was gone, deleted from GitHub. Turns out, the original maintainer had given owner responsibility to another person, who has his own GitHub repository. Development had gone on there for months, unbeknownst to me. One day, the original maintainer decided to delete his repository to not confuse people. Noble, but rather inconvenient.</p>
<p>Again, there are lots of solutions to this problem. However, I think that fundamentally, as a user and potential contributor to a library, I want to find "the" repository and commit my changes there. A personal fork is a good idea until I can get access, but there has to be a path for me to get repository access and become a recognised, trusted contributor. Open source projects have used this model for years, as a way to encourage, recognise and empower contributors and build a shared sense of ownership around the project. I expect the project to be bigger than any one contributor or owner, and I expect the infrastructure to be able to outlive their involvement.</p>
<p>This is why, for things that are a bit bigger than one person, and a bit smaller than a major open source project, I've got mixed feelings about GitHub, and even mixed feelings about Git itself. They are great tools. I find myself wanting to use them. But I also worry that they are too flexible for their own good, and that the most obvious way of using GitHub is not a good one for open source projects.</p>
<p>I think Hanno Schlichting put it well: With Subversion, you get a development model, which, whilst not perfect, is easy to understand and has worked out very well in practice for numerous projects. With Git, you're expected to make up your own model. I don't think people are very good at that, and rarely plan ahead for when their code outgrows them.</p>
<p>I know it's possible to use Git like Subversion, with a central repository. But I'm also not seeing a great many people doing that. We have to remember that Git was first built for the Linux kernel, which has a development model unlike most other projects, where it really is up to a set of core maintainers to review every patch and selectively pull it in. They need the kind of flexibility and power that Git offers. For many other projects, I'm not sure this flexibility is always a good thing.</p>
<p>Flame away.</p>
]]>  </content:encoded>
     <dc:publisher>No publisher</dc:publisher>        <dc:creator>optilude</dc:creator>        <dc:rights></dc:rights>                <dc:date>2010-07-27T13:16:39Z</dc:date>        <dc:type>News Item</dc:type>    </item>




</rdf:RDF>
