How I manage to be a productive mother

I got my little boy about 14 months ago and only was about 2 months on maternity leave due to financial reasons. My friends that have little kids themselves always asked me how I managed being a mom of a newborn and working full time from at home. My answer always was that if you really want something, you can do it. And begin a productive mother was important for me.

I was fortunate enough to have a boss that let me work from at home for the first year. Also, I haven’t used up any holidays that year so I could take over 2 weeks as soon as my 2 months maternity leave were over. During those 2 and a half months, I found a routine with my little sweetheart that worked for us and which turned out to work perfectly for later on as well. W was a bad sleeper and used to only sleep during the day if I carried him while walking. Therefore, I started putting him frequently in my carrier, stepped onto the treadmill and walked. I then started placing my laptop on the treadmill and worked for as long as W slept. That way, I got about 4 hours of work done during the day.

The rest of the work hours I did in the evenings when W slept. The evenings used to be the hardest for the first 9 months or so. W tended to wake up a lot and cry. Usually, if he laid down at 8 pm and I stayed up till 2 am, I got about 3 1/2 hours of work done (on good days). The rest of the time I laid next to him and calmed/caressed him. Did I have weekends off? No, the only way to get my work hours done was by also working Saturdays and Sundays. Was it a fun time? You will have problems believing that but for the most part, yes. W made me and my husband laugh so much every day (and he still does), so that the hard times weren’t quite as bad. Furthermore, I love working and I enjoyed being able to still do some programming every day.

Did I get enough sleep? Nope, but which mother with a newborn does? And I’m lucky that I can fall asleep within minutes. I’d stop working at around 2 am and fall asleep 1-2 minutes later. I’d say in average I still got about 5 hours of sleep daily. Don’t take me wrong, I used to sleep 9 hours and more, but I found out that I still function properly with about 5 hours. Anything below for more than a few days and I’m a wreck.

One thing I’ve learned is that it’s important to not stress yourself with work, especially when you have to look after a newborn which can be quite exhausting at times. You still want to enjoy the time with your baby. On days, where I needed a break, I took it (just took a spontaneous holiday from work). Therefore, even if you have a big todo list (work or home related), don’t force yourself to fulfill it up to exhaustion. There are days/weeks that are just really hard (baby hardly sleeps, is maybe sick, cries a lot for no obvious reason, etc.) and the more you feel stressed, the less patience you have with your loved ones (and patience is extremely important with little as well as with older kids). If possible, ask your partner for help. Maybe you have relatives/friends that can help you out here and there.

Another thing that comes to my mind that helped me was to be flexible. I now have my office in the bedroom and work next to my sleeping baby at night. That way, I can react right away when he needs me and I get some work done. I also put my baby in the carrier and wipe the kitchen floor and do other chores around the house during the day. My little one enjoys it since he is close to me and gets to watch close up what I’m doing. Don’t set yourself timeframes. You might be like me a morning person, but if your little one wakes up early and wants to be held and played with for hours, then don’t stress yourself with an unrealistic morning todo list. Having a detailed day schedule might be very helpful when you don’t have to look after kids, but with kids, the best schedule is a very flexible one.

I can honestly say that I’ve never been as productive as now. You wonder why? I used to waste a lot of time in front of the TV. After a hard work day, I would flop onto the couch and stare for hours at the big screen. As you might guess, I haven’t seen a single movie/episode for, hmm, I don’t know how long. I just don’t have time for it and honestly, I don’t even miss it. Of course, I still need some relax time here and there. In the evenings, before and after work, I read the news, eat a snack or just simply watch my little one sleeping (while trying to stay awake myself). It’s important to have some off time but the danger with TV is that the off time tends to extend to hours at a time (at least for me).

You don’t get to read magazines/books anymore? Listen to audiobooks and podcasts instead. You can do that while playing on the floor with your sweetheart.

I’m not saying that it is easy to be super productive while watching your baby, but if you really want to, you will find ways without sacrificing time with your newborn nor your own sanity. Consider what’s important for you and what makes you happy. Don’t stop everything you’ve enjoyed doing now that you have a baby. Be creative! But don’t have unrealistic expectations either. Your life will change (there is no doubt) and you hopefully will love the change with your newborn. In my case, I’m as busy as I’ve never been in my life and I love it. I love being able to spend so much time with my son, but I also enjoy getting back working/reading when he is sleeping.

Jobs I surprisingly enjoyed

A while ago, I got asked what my worst job ever was. Most people then think of jobs they did while they were young to make some extra money.

I’ve worked for 4 months at McDonalds back in Vienna during Senior High. But as a matter of fact, that was not my worst job. Actually, I think it was the funniest job I’ve ever had. I had a bunch of really friendly and funny work colleagues and I actually enjoyed working there a lot. We joked a lot while serving burgers and fries to customers. I trained in making the fastest fries ever (though my technique was against the books and not well looked upon) and tried to make my customers smile (which can be challenging when you have to deal with mostly serious Austrians). I wasn’t really fond of the wardrobe, but at least I didn’t worry about spilling anything on it (nothing could make the cloth look worse anyhow).

The funny part of me having that job was that I hate fast food. I don’t eat burgers (though I don’t mind fries – I mean seriously, who does?). I also wasn’t fond of the salads there (though the advantage of working there is that you make your salad yourself, which means you don’t find crappy leaves on the bottom of the bowl while eating).

Surprisingly, I’ve also learned quite a bit while working at the fast food chain. For example, if you smile for no reason at a complete stranger, he most likely will smile back and feel shortly better (kind of weird how a smile can change your mood). Smiling at your customers not only causes them to give the favor back to you but also makes work so much more enjoyable. I also was surprised to meet so many very intelligent people at the restaurant. A bunch of them came from poor countries with university degrees.

Next to McDonalds, I’ve also been employed at a coffee shop for 9 months (nope, not Starbucks) while working on my thesis. Again, it was definitely not my worst job. My boss and one of my colleagues were awesome and we had lots of fun. We also had a bit of a competition running: Who could find out and remember the most amount of customer names. I sucked though since I don’t have the best memory when it comes to names. Nevertheless, I think people started enjoying coming for a coffee since they would encounter a great team behind the counter that made fun of each other. Seeing some friendly faces during your work break can make a huge difference.

What I’ve learned from these jobs is that a good working environment can make a basically boring job fun and enjoyable. Of course, I prefer being challenged with programming tasks instead of having to serve burgers and coffee to people. Nevertheless, a good working climate is essential for having happy employees.

SQL features

I’m currently going through ‘SQL Cookbook’ by Anthony Molinaro to fresh up my SQL knowledge. I’ve read about 1/6th of the book so far and love it. It’s not meant for newbies, but I’d say for everybody else. It contains tonnes of examples and in detail explanations. I really like that it explains solutions for the most common databases (SQL Server, MySQL, Oracle, PostgreSQL, DB2).

Before I start going into details of what all I’ve learned so far, I quickly explain how I even got to buy the book. I’m using MySQL and MSSQL databases for about 2 years now and all the databases I’ve worked so far were fairly straight forward, small, and the queries simple. I’ve had database courses at university and thought I remembered still most of what I’ve learned (about 10 years ago – what was I thinking?).

One of my current projects is atypical with respect to my previous databases: It still doesn’t consist of too many tables, but the required SQL queries are a whole lot more complicated. I hit a road block. I tried to solve way too many issues on the application side (which resulted in performance costs) and finally decided to step back and do it right in the first place (hmm, that line sounds familiar. Guess I’ve watched too many Mike Holmes episodes years ago).

Pattern matching in search conditions

Let’s assume you want to show all rows that start with the characters ‘Star’ in a certain column.
Furthermore, we have the following table named movie:

Star Wars
Star Trek
Despicable Me

The sql statement would be:

SELECT title FROM movie WHERE title LIKE 'Star%';

Real easy, isn’t it? Yeah, as long as you remember what wildcard stands for ‘any sequence of characters’.

List of wildcards that can be used:

%      any sequence of characters
_      any single character
[]     any single character within range/set (e.g. [s-z]/[stuvwxyz]
[^]    any single character not within range/set (e.g. [^s-z]/[^stuvwxyz]


To combine the result of several SELECT queries you use UNION. Nothing knew here, but there is a slight difference between UNION and UNION ALL. UNION ALL will result in duplicates if they exist. UNION, on the other hand side, will filter duplicates.

NOT IN statement in the WHERE clause

Ok, that one was completely new to me, but important to know. Let’s look at the following query:

SELECT title FROM move WHERE title NOT IN ('Despicable Me','Startdust');

As you guessed, the result will contain all columns but ‘Despicable Me’ and ‘Startdust’. Let’s quickly create a second table named ‘wishlist’ with following entries:

id    | title
1     | Despicable Me
2     | Startdust

Now change the SELECT query a bit and you get the same result:

SELECT title FROM movie WHERE title NOT IN (SELECT title FROM wishlist);

But what if the wishlist contained one entry with id 3 and title NULL? Ok, in this example, a title with NULL doesn’t quite make sense, but let’s just go with it. You still expect the same 4 movie titles as result with the above statement or? If you do, you’re mistaken. The result will be empty. What I didn’t know is that IN and NOT IN are essentially OR operations. So above select statement would be equivalent to following:

SELECT title FROM movie WHERE title NOT IN ('Despicable Me','Startdust',NULL);

So let’s look at the comparison for ‘Star Wars’:

'Star Wars'='Despicable Me' || 'Star Wars'='Startdust' || 'Star Wars'=NULL
==> (FALSE || FALSE || NULL)
==> NULL

The part to remember is that (FALSE or NULL) results in NULL and (TRUE or NULL) results in TRUE. That means if there is a chance that the column will contain a NULL value, use the following statement instead:

SELECT title FROM movie m WHERE NOT EXISTS (SELECT 1 FROM wishlist w WHERE m.title=w.title);

My first blog post (kinda)

Two years ago, I planned to start a blog, but since I was aware of my everything but perfect English I test wrote a bunch of blogs offline just for my hubby to read.

Yeah, that didn’t go too well. He criticized about 95% of my writing which (ah duh) demotivated me from actually publishing any of them online. Especially since he didn’t even come up with improvements for half of what he criticised (not that I blame him, he is no editor).

So this time, I don’t worry about my mistakes and just publish the posts. After all, I can only improve by practicing or? Of course, I could hire an editor, but I don’t really feel like that makes sense here. First of all, how many people are actually ending up reading my first posts and second (and more important), I have no intention on ever making income with this blog (even if I had enough subscribers one day), so why should I spent income for it?

I already have a small list of what I’m going to write about. For example, I want to write about my experiences with Codejock’s Toolkit Pro, Trello, and TeamViewer. I love emacs and use it daily, so I think it makes sense to write about it and why I use it in the first place.

Furthermore, I currently feel like I’m stuck with my SQL knowledge. I’m working with MySQL and MSSQL for quite a while now and I always found solutions to my problems (mostly via StackExchange – don’t we developers love it?), but my latest project is quite complex (and also the database) and my program seems fairly slow due to the amount of database requests. I feel like I should be able to put more logic into stored procedures and less in my application code. Therefore, I have started reading ‘SQL Cookbook’ and I’m planning to post what I’m learning.

Last but not least, I’m going to post about important experiences/events in my life.