Get started exploring Google Analytics data with Python Pandas

The latest release of Pandas (v0.17.1) has brought the deprecation of the Google Analytics data reader submodule (pandas.io.ga). This deprecation decision is actually good news since this submodule had dependencies on packages that are not currently python 3 compatible and was, even under python 2.7, hard to get up and running.

After updating my system to the newest versions of pandas, I had to find a new connector to fetch Google Analytics data, and found an advantageous replacement in the google2pandas module from Panalysis.

This blogpost walks you through the setup of Pandas and google2pandas, and breifly introduces you to fetching and getting Google Analytics data into Pandas dataframes, for further exploration with Pandas.

Continue reading about Get started exploring Google Analytics data with Python Pandas

Tags: , ,

3 recommendations to men who are going to be dads

… and that don’t want to fall into the traditional trap 

Liip will have many babies this year! And I mean real, human babies. Two expectant male Liipers asked me*: “How shall I prepare for it? Do I have to watch out for something in particular?”

Well, yes, I think there are three often unconscious developments to watch out for and I describe those below. But: These three are only important to those future dads who want
a. a profound relationship with their children
b. an intellectually satisfied woman at their side.

In short: if you do not want to live by the “traditional” model – meaning: having little bonding to the child, working 100% and your wife staying at home, responsible for kids and household – then the following recommendations are for you. For those readers who cannot say yes to a. and b., you rather stop reading as then this is not for you.

So many developments

Becoming a parent is full of surprises. Some are loud and fun, others might rather appear on tiptoes and are not so cool. The following recommendations are all based on three surprises – or let’s call them developments – that are not obvious, but can turn the wheel towards the traditional model. I want to make them a little bit more obvious to you so that you see them and can make your adjustments at the point given.

The hunter is misleading

At the times of hunters and collectors, a newborn in the family meant an insurance for the elderly, but also that more food had to be organized. Accordingly, the men had to go out more to hunt more, pretty immediately after birth.
Many of our intuitions of these times still are within us. And so it is that most men even today intuitively feel that – almost immediately after birth – they have to go out and work to ensure the survival of the family. They start to work a lot, try to get more bonus or even start an own business for ensuring independence. Accordingly they spend more hours in the office.

STOP —— This is the first development to watch out for!

As dad you behave like a Neanderthaler; you feel as if you were a hunter again without realizing it.
Don’t fall into this “hunter’s trap”. It is misleading in today’s world. As a male of today, you do NOT need to work more. Your wife is financially independent, you have great medical care and people who help you, you are insured, and you may even have some money on the side. We have an abundance of food and security. So there is no need to panic. You don’t have to go out and work more. On the contrary, my recommendation is: Stay close from the very start. In concrete this means:

  • In the hospital: A birth is physically tough to the mother and to the baby. They need you as a dad to take care of stuff like: receiving the guests and kicking them out again, getting hospital paper work done, going to shop the last things, etc. But most importantly, make sure you stay at the hospital as much time as possible (most hospitals offer extra beds for the fathers). Because your child needs to get to know your smell and heartbeat. And your wife will need your psychological support.
  • The first few weeks at home: Still don’t go to work. Because this is the time when you as a family get installed in your new life. And that is something you would want to build up with them, right? You have to be there for the baby – as the mother still is not a 100% attentive (remember, she often only sleeps partly). Many women have an after-birth depression. You do not want her to feel lonely at this point. And, yeah, a new mother has absolutely no capacity to make any kind of household work. Even being the two of you: This is the time for food delivery or microwave food. You will have so much other stuff to run after and you will always be sooooo tired. Sharing these tough moments builds the family.
  • The first few months: In Switzerland the woman can stay at home with paid leave for 14 weeks and some companies allow a little more. Most men go back to business as usual after 2 – 3 weeks at home. I recommend you NOT to go back into your work life just as it was before. It is an illusion to think that you are still the same. You are not. So, what to change? Make sure the moment the pregnancy is confirmed that you ask for a reduced work load from birth onwards; go down to 80% at least. This will give you a full day at home with your child AND wife. It is a wonderful time; time you will want to use to build that family bond. You not being there at all from Monday to Friday also means less bonding to the child which revenges itself later on – see below.

For those men who reply now: “At my company they will never agree to 80%”, I say:
1. Have you asked or is it just an assumption?
2. If you have not asked, are you really sure you want to have a profound relation to your child? If you are sure, go ask!
3. Most companies today agree to 80%. You just need to ask.

Nope, she is not cleverer or closer

Often men assume that the woman knows more about parenthood because she is closer to the child in the first few months than the man. They assume that, since she feels the baby grow in her belly, she is already connected to that child.

STOP —- This is the second development to watch out for!

Don’t make this assumption. Just because she is a woman and is the one that gives birth, does not mean that she knows anything more than you or that the bonding to the child is automatically there.

A woman – just as any man – has no idea about having babies until the baby is really here. And then she learns. Both, women and men, read or get information about having babies. But neither can understand the real impact of it.

Don’t assume that your wife knows more about having the child than you at the moment of birth. She doesn’t. It is a totally new situation to everybody, including her. If you do assume that she knows more, this puts pressure on her and you marginalize yourself. You are both in a totally new situation; best is to learn together. And to agree that you learn together.

Now, you probably tell me: “But women already have the pregnancy to get used to it and then they breastfeed. They’re already a step ahead.”

Well, no. Pregnancy is something very particular and in no comparison to what happens afterwards. It cannot teach anything about the future. It is a state on its own. It is not making any woman more knowledgable on how to handle a newborn.
And breastfeeding? I would say neither. Many women don’t breastfeed. And those who do breastfeed, believe me, it is a hell of a lesson. It is not something naturally given. The mother and the child have to go through very tough lessons until it works.

So, women do not know more than men. The knowledge has to be built together. The more time you spend together with your wife learning and each one with the child, the more you will get to know the child.

Women neither have an advantage in bonding. The physical bonding happens during pregnancy, true, but it is cut with the separation of the umbilical cord. Then starts the psychological and emotional bonding – much more important in a child’s life. The woman, just as the man, has no connection to that child yet. It is to be built from scratch, for both partners. So, again, women and men are at the same starting line. Bonding can be done by both parents equally.
So what is my recommendation here?
1. Be aware of the fact that you both learn a lot and that a woman does not know more than you. Request your right to learning by doing, just as she does.
2. The true bonding starts with the first breath of air of your child. That moment you are there. So get active, be there as much as you can and actively work on the bonding. The child wants you as much as it wants his mother, but it can only count on you if you are actually there.

Endurance pays off

Many men fall into the traditional trap because – quite soon after birth – they feel that there is some special mother-child relation with which they could not compete. Well, this is a self-fulfilling prophecy. By thinking so, men actually foster the traditional model. They put the whole responsibility of child-care onto the woman and sneak out to do the work in the “external” world.

STOP —- That is the third development to watch out for!

The traditional model sneaks in without the couple realizing it. It shows in two circumstances:

Roles:

Because she is home the first few months, it seems to be natural that she also is now fully responsible for the household. Really? Why? Was it like that before birth? In most cases not. Each part of the couple did its contribution to the household. Who said this should change? Having a child does not mean that all roles change. Both parents have a role more, that of the care taker. But their already existing roles do not really have to change.

The recommendation here is: Awareness. Make sure between you and your partner that changing of roles is conscious and that if you actually do not want it, work constantly against it

Happy feeling:

The first few hours and days the new family is very happy. But soon disappointments will come about. I think the biggest disappointment for a father is that the child relates a lot to the mother in the first few months, maybe even first two years. Well, hey, that is just logical due to how child care of the first few months is organized in Switzerland. It is the mother who can stay home for 14 weeks. And a child relates most to the person who gives food and love. If that is the woman, the bonding is slightly stronger to her than to the father. But: Don’t give in to your disappointment! Don’t give up! Just as at work where you also have to be patient about a project taking shape and continuously get engaged, do so at home. It will come around.

My husband once told me very clearly when my girl was about 15 months old, was hurt and ran towards him to get comforted: “Now that girl saying ‘Papa, it hurts’ I feel that all the work that I have done starts to pay off.”

So, my recommendation here is: Show endurance. Be persistent in being engaged; don’t let loose. Your child is a life long project. To be persistent with your engagement in the very first 12 – 24 months is tough and often disappointing, but it is worth its weight in gold. It will come around.

A happier wife, a happier child, a happier you

There is a saying amongst moms: If the mom is happy, the child is happy. It means that women have to make sure that they themselves feel great in order to make everybody around happy and this then reverberates onto themselves. The toughest part of it is that a woman continuously has to ask herself: Is this development ok with me? How do I feel about it? Can I let it go or do I have to interfere? And to take the consequences of the answers. Women, who want to have children and work at the same time, have learnt to manage that in the last few years.

And I think this is what new dads should do as well. Dare to ask yourself continuously how you feel. And if you don’t feel right, make your voice heard. There are no pre-given definitions of what a dad should be or not; or of what a mother should be. Forget about the social conventions. It is on you to decide what you want to be for your child, for your wife and for your family. But you need to have the balls (excuse my language, but here it really fits well) to say it out loud and to fight for it. There is no such thing as a perfect mother – they are not born this way. There is no such thing as a prefect father either. It is all a question of how you define and fulfill these roles together.

 

 

 


Notes:

The best book I read about babies was “Babyjahre” from Remo H. Largo. It is so good because it does not give any recommendations. It only explains the scientific findings about the developments of babies. It calmed me down in many cases because I understood from that book that scientifically my child is in a certain stage of development and that my influence on it is only limited.

*My husband and I are happy not to live according to the “traditional” model. We both work 80%, love our jobs, are making careers; we have two children (8 and 10 yrs); we split all tasks of kids care, education and household. We both always knew that we did not want to fall into the trap of the traditional model. Me because of a gratifying job despite children, him because of a close relationship to the children despite of a career. We both looked for companies that do share these ideas.

Les Rencontres Hivernales du Libre, deuxième édition

Winter Libre meetup, second edition.

As Swisslinux.org member, I again had the opportunity to take part to the Rencontres Hivernales du Libre (roughly translated as ‘Winter Libre meetup’), up in the jura, in St-Cergue. This week-end-long meetup, organized for the second time this year, aims at gathering all libre-related actors. This article, originally written in french, tells you the story of what happened there, who attended and did what.

Les Rencontres Hivernales du Libre, deuxième édition

Dans le cadre de l’association Swisslinux.org dont je suis membre, j’ai à nouveau eu le plaisir de participer aux Rencontres Hivernales du Libre, du 8 au 10 janvier passés. Ces rencontres, organisées pour la deuxième fois en 2016, ont pour but de rassembler les acteurs romands du Libre, dans sa définition la plus large.

30 geeks à St-Cergue

Dès la première édition, l’idée a été de profiter d’une période et d’un cadre moins usuel, en allant chercher la neige là où elle est. Viser une expérience de “conférence” plus large; entre informatique et loisirs extérieurs. Lors de l’édition 2015, le beau temps avait permis à plusieurs participants de profiter de chacun de ces deux aspects, entre ski et surf.

Le lieu choisi cette année a de nouveau été le Centre du Vallon, à St-Cergue, pour son bon compromis entre proximité aux transports publics, enneigement et coûts.

Malheureusement, les conditions météorologiques de l’édition 2016 ont été moins profitables, avec un faible manteau neigeux, arrosé de pluie durant tout le week-end. Bonne surprise cependant, avec l’incinération des sapins de Noël de la commune, organisée devant le local par les pompiers, qui a amené une grande bouffée de chaleur à ce week-end maussade.

Il s’y est passé quoi ?

Répondant à l’appel de Swisslinux.org, plusieurs associations et organismes étaient présents, favorisant ainsi les échanges inter-disciplinaires et les discussions animées. Petit tour de présentations.

Map of DPMB contributions

Les bricoleurs du Post Tenebras Lab(le hackerspace genevois) ont profité d’une salle d’atelier pour travailler sur un système de paiement sans fil entièrement libre (matériel et logicel). ATICOM, association orientée vers l’enseignement et la pédagogie, a présenté ses activités lors d’une conférence. Doxel.org a présenté ses dernières avancées en photo-grammétrie avec des senseurs optiques non-calibrés: impressionnante combinaison de technologies pour la reconstitution de scènes tri-dimensionnelles à l’aide de photos prises par des téléphones portables. L’IAPC a amené et mis en place tout le matériel nécessaire pour l’implantation d’une station radio-amateur: entre l’antenne d’un mètre cinquante et les équipements électroniques, l’ensemble en a impressioné plus d’un. Axel & Frank, venus de loin, ont présenté leur projet collaboratif de livre sur les techniques d’empaquetage pour Debian (en allemand). La présentation a abordé les défis éditoriaux (trouver, puis convaincre un éditeur de la viabilité et de l’intérêt d’un livre libre) et les défis techniques (collaboration à deux personnes géographiquement distantes sur un même ouvrage, ouverture de la rédaction aux contributeurs externes, assurer la construction et la distribution du livre dans différents formats, etc.).

Défis et Organisation

Fondue aux RHL16

20 personnes étaient déjà présentes vendredi soir, pour un souper en commun “à la bonne franquette“. Le lendemain soir, 8 caquelons de fondue ont été servis aux 35 participants. Ensuite, si d’aucuns restaient sur leurs laptops, d’autres ont laissé leurs claviers de côté pour des discussions ou des jeux de société. Autant dire que la soirée ne s’est pas terminée tôt!

L’organisation d’une telle conférence, bien que modeste en nombre de participants, est tout de même une suite de défis à relever. Au niveau des repas, la décision a été prise de prendre une équipe professionnelle pour la cuisine: ce fut une bénédiction culinaire! Si mettre en place et maintenir une infrastructure sans fil pour 30 participants n’est pas si compliqué en théorie, en pratique, ce n’est pas le WiFi qui a failli, mais l’uplink Swisscom. La conférence s’est donc terminée en accédant à l’Internet par la 4G.

Swisslinux.org remercie les différents parrains qui ont permis la tenue de cet événement: le GULL et ATICOM pour les soutiens financiers et Liip pour avoir assuré la logistique et le financement du café pour tout le monde.

À l’année prochaine, pour une nouvelle édition, qu’on espère enneigée!

Tags: , , , , ,

Kanbasu: meet the bare CSS framework

Speaking of CSS frameworks today, the first thing coming to people’s mind is usually Bootstrap. It’s not surprising, Bootstrap is a great toolbox removing most of the interface pain for developers that are not really into, you know, front-end stuff. It comes with useful and flexible JavaScript plugins, many components but especially and essentially a lot of styling. Probably the reason of its popularity, it’s also the reason why I prefer avoiding it.

When you have to implement a custom design for a website, the default styling of the framework doesn’t really matter. Even worse, you would have to override it and adding an extra declaration to your CSS is never good. I’m not saying it’s always bad though; if you have to quickly build a private admin interface or a prototype, it can be very useful. Sadly that’s rarely the case for our clients projects.

Continue reading about Kanbasu: meet the bare CSS framework

Tags: , , , ,

A first try at LeSS (Large Scale Scrum)

Team Lego is one of the five teams currently working at Liip Zurich. All team members work together on one, long standing project. Over the last year the team has grown and changed. In the end, we were 10 people working together as one single Scrum team. It worked really well – until it didn’t.

Very slowly over time things stopped going as smoothly as they used to. The team couldn’t finish their sprints and the velocity was going down. The sentence most often heard at the Daily Scrum was: “I don’t know what’s up with this ticket, person X is working on it” – a sign of “Gärtlidenken” as it is called in Switzerland. Information wasn’t flowing as it should, even though we used the ‘Walk the Board’ approach to keep Daily Standup meetings short and focused. Other Scrum meetings were long and inefficient and any further growth of the team was entirely out of the question.

This interesting blog entry about the numbers behind Jeff Bezos’ two pizza rule for team sizes suggests that the problems the team were facing were possibly due to its size. Communication between all the people involved was complicated and it’s impossible to know what’s going on everywhere all the time. People focussing solely on the one task they picked is a logical move to push this problem out of sight. Yet, it is counterproductive for self-organising Scrum teams. It decomposes a team back to a group of people which happen to work next to each other on similar tasks rather than working together at achieving a shared goal.

Even though team Lego cannot be considered a very large team, problems were just around the corner. At 10 people, we were probably only beginning to see the problems that a larger team could bring. However, it’s always better to act before the horizon’s problems arrive at your door.

Continue reading about A first try at LeSS (Large Scale Scrum)

Tags: ,

Property Based testing : QuickCheck and co

Around the same time last year, I made a presentation of php-quickcheck to my colleagues. This nifty library allows you to quickly test your functions with thousands of generated inputs to easily find bugs in your software by using a technique called property based testing.

The main advantage is that you don’t have to think of test values anymore, just write a generator and let the library do all the work. This way you can concentrate on describing the features of your application instead of loosing time writing tests. It is also a great tool to find edge cases you’ve never even dreamed off.

Continue reading about Property Based testing : QuickCheck and co

Tags: , , , , ,

IP anonymizing and its impact on city and country dimensions in Google Analytics

IP anonymization is blurring part of an IP, in general to protect its owner’s anonimity. One way to do it is to zero the last octet of an IPv4, last 80 bits of an IPv6. That’s actually how Google Analytics does it.

Now anonymizing IPs might have some impact on the attribution of an IP to some country and city. How much? I often read it did not impact geolocalization “too much”, yet I never found studies about it.

A few months ago, I launched a small experiment: I tracked traffic to this very blog twice: once with IP anonmyzation enabled, once without.

I then recently started analyzing this data. Here are the early findings of this experiment.

Continue reading about IP anonymizing and its impact on city and country dimensions in Google Analytics

Tags:

Git : Tips & Tricks

Git is a really powerful tool but it can sometimes be hard to grasp some concepts and the way of doing some things is convoluted.

In the following post, I’ll try to list a few tips and tricks to make your life easier.

Continue reading about Git : Tips & Tricks

Tags: , ,

PHP 7.0.0 for OS X and CloudFoundry

Update: Since 7.0.0 is officially out, we updated our binaries as well with the final release.

PHP 7.0 is very very near, if no showstoppers show up during the current Release Candidate #8. And I finally managed to update the package on php-osx.liip.ch, so that you can test and start writing applications on your local OS X machine easily, as well. The installer also automatically does the right thing in the apache configuration with regards to “mod_php7” and “mod_php5”.

Furthermore, since we are using CloudFoundry in one of our bigger projects, I also extended the official PHP buildpack to include PHP 7.0 (and some other things like varnish, but that’s not relevant for this). This way we can easily see, if our apps still work with PHP 7 and do some benchmarks (the initial ones looked promising). To use the buildpack, add the following line to your manifest.yml

and adjust .bp-config/options.json to include (and maybe also change your composer.json to use PHP 7)

Be aware, that I didn’t port many of the extensions the official buildpack includes, so your milage may vary. And if you want to be sure it’s thoroughly tested, maybe better wait for official PHP 7.0 support in the CloudFoundry buildpack. I’m sure, they won’t wait long once it’s is released.

There’s now no excuse anymore to not test your apps against PHP 7.0

Tags: , , ,

Apple TV app – or how to continuously innovate

Continuous Innovation at Liip

Doing Agile at Liip does not always mean we live in a continuous flow of sprints, endlessly. Sometimes the comfortable stream of sprints breaks for a while, usually between two projects. This is often a good opportunity to hack on new technologies or try something new. We recently had one of these break and it was the perfect time to try once again our innovation process.

In fact, this process starts before we have one of those breaks. First of all, the whole team lists any innovation idea – could be anything – and anyone is invited to contribute (at the moment we have a dozen projects listed). We try to groom this list as often as possible to keep it relevant. Then, when time comes we can just go to this list and grab a project we want to work on.

Doing innovation keeps us close to new technologies.

Continue reading about Apple TV app – or how to continuously innovate