Das ist mein Rücken

Für den Hauke habe ich ein kleines Lied gedichtet, was ich der Weltöffentlichkeit nicht vorenthalten möchte:

Die Bewegungen dazu sind einfach - den benannten Körperteil zeigen oder langstreichen, und bei “Hände” klatsche ich zweimal, bei “Füße” klatsche ich auf gerade erreichbare Füße. Hauke macht beim Bauch oder Kopf auch manchmal mit… :)

2010/07/01 10:18 · 0 Comments

Nutrition, Diet and Emotional Eating

After I got "The Female Body Breakthrough", I tweaked the program. It motivated me to get started with fitness and seriously check out my eating habits, but I haven't followed the workout plan much - I got into kettlebells, it's just way easier to practice at home! I got "Get in the best shape of your life" by Lisa Shaffer and have been doing workouts based on that book 5 days a week, if possible, for the past couple of weeks now. I have lost weight, not much, but got back to weight I've always had trouble getting to before (60.x right now), but what's more important - I feel really strong, my arms are getting definition, and I hope my tummy and legs too :). It will probably take some more months for me to really see muscles, but I love the kettlebells and the fact that workouts take no longer than 20 minutes.

I had thought that with eating clean most of the time (several cheat meals on weekends excluded) and doing exercise so often, I would have no more trouble with food. Having stumbled upon Skwigg's blog, the journal of a very fit and healthy lady who's now an intuitive eater after having tried what seems like every weird diet and fitness program on the planet, and researching intermittent fasting, which ranges from skipping one or two meals up to 24 hours without food, and managing to skip breakfast a couple of times, I thought that I had found the silver bullet for weight loss. However, when my little boy got sick and had some really bad days where he only wanted to be held and I had very little time for myself, I found out that I couldn't deal with a craving for ice cream and chocolate and other unhealthy stuff. Emotional eating is something I haven't mastered yet, apparently :). So I'm now turning to The Beck diet solution to equip myself with the tools to stick to a diet and not end up face down in a tub of ice cream whenever I have stress. Let's hope that works out!

2010/05/29 15:24 · 0 Comments

freshen: Behavior Driven Development and testing for python (and django)

Having stumbled upon freshen recently and not finding much about it on the web apart from the (entirely sufficient) documentation, I decided to use my seldom-updated blog to help remedy that situation.

Apparently, behavior driven development is the new buzzword (and it sounds good, too: define the new behaviors you want and then develop them), and cukes is a testing framework for ruby which everyone wants in their language. There is another bdd testing framework for python which required selenium and had a snazzy web page, but some broad gaps in their documentation when I was looking at it first. freshen, on the other hand, just plugs into nose, uses the cukes syntax and otherwise just works pretty well out of the box.

Here's how I used it: after plugging nose into your django tests, you can just run it with manage.py test –with-freshen. Obviously, you want to have some tests defined first. Here are some of mine for babytimeline:

Scenario: delete a baby
Given I am logged in
When I enter the url /baby/delete/2
And I enter the data {}
Then I see the template timeline/baby_confirm_delete.html but not the data id="baby_">

Scenario: create a milestone with free text
Given I am logged in
When I enter the url /baby/addmilestone/2/
And I enter the data {'date': '2013-04-01', 'baby': '2', 'note': 'hallolulila'}
Then I see the template timeline/milestone_form.html and the data hallolulila

In order to test this properly with the django test client, we need to load some data into the test database (unlike the normal django tests, that's not automatic), set up the client and empty the test mailbox (if you want to test email stuff, like for django-registration). Here's some of that code:

steps.py
import re
 
from freshen import *
from django.test.client import Client
from django.core import management
from django.core import mail
 
@Before
def before(scenario):
    mail.outbox = []
    scc.client = Client()
    management.call_command('loaddata', 'test_data.json', verbosity=0)
 
@Given("I am logged in")
def login():
    scc.client.login(username="notauser", password="nottherealpasswordobviuosly")
 
@When("I enter the url (/.*)")
def press_button(button):
    scc.button = button
    scc.response_get = scc.client.get(button, follow=True)
 
@And("I enter the data (.*)")
def enter_data(data):
    dict = eval(data)
    scc.response_post = scc.client.post(scc.button, dict, follow=True)
 
@Then("I see the template ([^.]+.html) and the data (.*)")
def check_response_find(template_name, regex):
    assert scc.response_get.template[0].name == template_name
    assert scc.response_post.status_code == 200
    assert re.search(regex, scc.response_post.content)
 
@Then("I see the template ([^.]+.html) but not the data (.*)")
def check_response_not_find(template_name, regex):
    assert scc.response_get.template[0].name == template_name
    assert scc.response_post.status_code == 200
    assert not re.search(regex, scc.response_post.content)

In one evening, I managed to add acceptance tests for nearly all my user interactions on babytimeline (granted, it's a small application, with about 15 of these tests), and together with my unit tests (yeah, you still need those, even with bdd testing), I went from 74 % code coverage to 86% (and I think the nose code coverage plugin is a bit buggy anyway :). In short - I really like freshen, it makes bdd in python easy and elegant (apart from the clunky global variables…)!

2010/05/16 10:32 · 0 Comments

Hebammen für Deutschland

Eigentlich bin ich ja nicht für jede Kampagne zu haben, aber seit Haukes Geburt bin ich ein großer Fan von Hebammen. Ich hatte zwar keine Hausgeburt mit Hebamme, aber der Geburtsvorbereitungskurs und vor allem die Nachbetreuung durch meine Hebamme waren super. Das Stillen war wegen großer Schmerzen für mich am Anfang echt schwierig, und meine Hebamme hat sich viel Zeit genommen für mich und auch ganz viel versucht, um es mir einfacher zu machen. Wenn Magdalena nicht gewesen wäre, vielleicht wäre der Hauke ein Flaschenkind geworden.

Ich wiess nicht genau, ob die Erhöhung der Haftpflichtversicherung auch die Hebammen betrifft, die nur in Nachsorge tätig sind. Aber generell finde ich den Berufsstand der Hebamme wichtig und möchte Euch alle bitten, diese Petition, wenn sie denn online ist, zu unterstützen! Hebammen für Deutschland.

2010/04/29 09:02 · 0 Comments

Female Body Breakthrough

Zu Weihnachten habe ich mir dieses Buch geleistet und fand es sehr inspirierend. Es handelt sich um ein 4-monatiges Krafttrainingsprogramm mit Ernährungsempfehlungen und ein paar Motivationstricks, besonders auf Frauen bezogen (mit Tipps zu PMS etc.) Sobald wir in Düsseldorf heimisch geworden sind, möchte ich das Programm auch in die Tat umsetzen - ich habe zwar aktuell mein Vor-Schwangerschaftgewicht wieder, bin aber sehr viel schlabbriger als vorher. Und wann sonst werde ich die Zeit haben, mir die meisten Mahlzeiten einfach selber zuzubereiten und 2 Mal die Woche ins Fitnessstudio zu gehen (man kann es wohl auch mit 2 Mal schaffen, und ich muss ja nicht hinterher aussehen wie Jennifer Garner :).

Dies soll aber keine Rezension werden, sondern eher eine Liste der Sachen, die ich noch machen oder besorgen muss, bevor ich das Programm machen kann. Und ich mache sie öffentlich, weil es entweder eh keiner liest, oder wenn doch, dann kann diejenige mich noch motivieren :D

→ Read more...

2010/01/13 12:50 · 0 Comments

Huhu, willkommen!

Na, seid Ihr alle da? :) Meine Webseite ist ganz neu und hat jetzt auch ein Blog, nicht nur, damit ich noch einfacher Albernheiten im Netz verbreiten kann, sondern auch, damit alle Fans von Hauke, der ja jetzt endlich da ist, über seine neusten Streiche informiert werden können :). Fotos gibts schon, auf seiner eigenen Webseite, unter hauke.rogowski.de

2009/08/13 11:34 · 0 Comments

First post!

Finally, after about 10 years, this is the 4th incarnation of my website, and it has a blog now! (It's also editable online, at least for me :). The site is powered by dokuwiki and locked down as mentioned in the CMS pages. I also added the blog plugin and (for prettier syntax) the Creole plugin. Finally, I tweaked the Arctic theme (yay sidebars) to look more silvery and show way less of the wiki behind everything.

→ Read more...

2009/08/13 11:34 · 2 Comments

Babyspielzeug

Der Hauke hat ja schon ein bisschen Spielzeug bekommen, bevor er überhaupt geboren war: den Paule und die Rassel.

→ Read more...

2009/07/08 13:52 · 2 Comments

Older entries >>

RSS feed

Older entries can be found in the blog archive.

Trendy tag cloud:

blog.txt · Last modified: 2009/03/26 20:07 by lilith
© 1999-2009 Britta Rogowski (brit...@gmail.com). See the imprint for legal stuff. All content licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
Design based on Nonzero by NodeThirtyThree Design. Favicon from Stardock. Powered by Dokuwiki. Theme based on Arctic by Michael Klier.
A great thanx to all those mentioned for inspiration, you're awesome!