Wednesday, December 31, 2014

Challenges for 2015


So, after an awesome year 2014, filled with interesting challenges, I have learned a lot.

  • I did not know that I enjoy hot drinks that much.
  • I did not know that you might get used to almost anything
  • I did not know that drinking water each day was really good
  • I did not know that not drinking alcohol was not really a problem
  • I did not know that I am so incredibly lazy
  • Sleep deprivation is an experience I do not seek again.

Nevertheless, I decided to take a new approach:

Instead of monthly challenges, I will have just some goals to be fulfilled this year.

These will be:

  1. Learn seven new programming languages
  2. Learn at least seven frameworks, libraries, whatever. This will be mainly web frontend related stuff
  3. Finish seven projects and put them on GitHub. (some of them are already existent in my GitHub account, but no commits yet.)
  4. Cook a new meal for my family once a month
Let's bring it on!

One Month Without an Smartphone


This month was sometimes weird, sometimes it just sucked and sometimes I did not miss a thing.

The Good
  • Its easier to focus on conversations with the other person when you're not constantly distracted by some notifications and habit-shaping glances on your phone.
  • It's easier to realize what's happening around you
The Bad
  • I did miss an appointment because I did not take a look at my calendar that day. So I disappointed one person, who did need my help.
  • My online communication via WhatsApp was nonexistent this month. So I might miss something urgent. But I think, if it might be something important (not to be confused with urgent), The people had plenty of other ways to contact me.
  • I forgot my phone way more often at home than before. One time it resulted in a awful misunderstanding between me and my wife. This sucked so much.
The Ugly
  • My wife uses Pintrest since yesterday. It did suck up about one hour on my life to stare on her screen.
  • Writing text messages with T9 sucks so much, I will never miss it any more. I have to admit, I really hated it.
  • I still wasted some time with playing a silly game (coded in Java for Embedded Systems, good old times).
  • I tend to adopt an "better-than-thou"-attitude. "Hey, you still use a smartphone? You social outcast instant-gratification monkey!". That is a attitude I really had to watch out for and capture it, not letting any room to breathe.

Sunday, November 30, 2014

Today I learned: Avoiding My Smartphone for One Months Seems Pretty Scary


I have decided, to set my smartphone aside for December.
This seemed pretty easy at first sight, but now it seems kinda frightening: I think, that some things will be more cumbersome.

I used to plan my day the night before on a smartphone. I wrote some articles for this blog on my smartphone. I used to make note on my smartphone. Almost all my appointments are made on my smartphone. Almost all of my ideas are captures on my smartphone. Much of my communication is run via WhatsApp, so almost exclusively on my smartphone. Much of distractions are also from smartphone: Reddit, messages, notifications. Sometime silly, but also fun games.

So, my smartphone is something I use everyday. More than I realized before.
And this step is now something frightening.

I will have to rely on my computer to plan my day (I need notifications for my tasks). I will have to take my notebook (not the computer, I mean the thing you write on) to make notes. I will have to rely on email (on my computer), and SMS for async communication. Feels a little bit like 2004.

Anyway, I'm glad not having to write anymore articles everyday. But somehow, I liked it. It forced me to reflect every day on what happened, what I have learned. It kinda rocked.

Saturday, November 29, 2014

Today I Learned: Psalm 22 ist a prophecy fulfilled


In John 19 it is written, that the soldiers cut Jesus clothes into four parts and gambled for his tunic. This scene is explained with these words:

"They said therefore among themselves, "Let us not tear it, but cast lots for it, whose it shall be," that the Scripture might be fulfilled which says: "They divided My garments among them, And for My clothing they cast lots." Therefore the soldiers did these things."

A wonderful example of explaining the scripture with the scripture. But where does this stand, what is fulfilled? You guess right: Psalm 22.

In my opinion (and luckily, not only mine alone) this Psalm explains how the Cruscofication of Jesus felt. From Jesus' point of view.
Just read some verses:

Verse 8: "He trusted in the Lord, let Him rescue Him; Let Him deliver Him, since He delights in Him!"
-- That's what some people shout at him when he is at the cross.



Verse 15: "My strength is dried up like a potsherd, And My tongue clings to My jaws; You have brought Me to the dust of death."
-- That's how you feel, hanging on a tree


"For dogs have surrounded Me; The congregation of the wicked has enclosed Me. They pierced My hands and My feet;"
-- Guess what happened to Jesus' feet and hands


"They divide My garments among them, And for My clothing they cast lots."
-- Guess why this is quoted in John.



Jesus himself quotes Psalm 22, when dying:
"My God, My God, why have You forsaken Me?"



And last, and maybe least, but nonetheless interesting fact: These verses were written by David, who was King of the Jews. Jesus has been hung because the Sanherin said, that Jesus was King of the Jews.
Thing like these explanations are one point why I love the bible.

Friday, November 28, 2014

Today I learned: It's more important how you do it than what you do.

Today, I was pissed off. I kinda saw no point in what I was doing. Every thing I moved, annoyed me. I groaned. I was in really bad temper.

Later that day my wife told me, that she was disappointed in me. It used to be fun doing that kind of work, but today my bad mood created bad mood in her. This sucks. I was an idiot, once again.

So, I experienced today first hand, that what you say or do does not matter as much as how you say or do it.

If I communicated my feelings and my expectations better, without all that annoyances, without groaning, but with seeking of understanding for the other person.

If I would handle that situation in this way, it would have been a way better to spend the afternoon.

So, instead of being annoyed, think about what it could mean. I bet in most cases you are angry, because your standards or your expectations are not met. If this is the case, either reflect whether your expectations are adequate and if not, correct them. If you think, they are adequate, communicate them as soon as possible, immediately at best.

I think, that could work wonders.

Thursday, November 27, 2014

Today I learned: JavaScript's continue is only allowed in loops


Reading through the basics of JavaScript, I wondered whether you could simulate a while statement with a switch statement. You might ask yourself: Wait, what?

Let me explain: I thought some crazy thoughts. If you could combine labels, a dynamic case statement, and the continue statement, you could fake the while loop. Let's look at an example:

Let's compute some Fibonacci numbers, the classical way.

var a = [0, 1],
    num = 10,
    i = a.length,
    result;

while (i < num) {
   a.push(a[i - 1] + a[i - 2]);
   i += 1;
}

And so I thought to myself, maybe you could do something like that instead of the while loop.

loopMe:
switch (i) {
  case i < num:
    a.push(a[i - 1] + a[i - 2]);
    i += 1;
    continue loopMe;
  default:
    break;
}

I was an idiot, and JavaScript told me so:

 Uncaught SyntaxError: Undefined label 'loopMe'

When I removed the label after continue, I still was an idiot, and JavaScript told me so:

Uncaught SyntaxError: Illegal continue statement.

So there was no way to get this to work. continue statements are only allowed in loops, as I remembered.
The only funny thing was, that JavaScript bitched about unfound labels at first. And then about the misplaced continue statement.

Glad, I used two hours of my life on that one. But at least, I have learned something.
And that is what it's all about, isn't it?

Wednesday, November 26, 2014

Today I learned: Gratitude is the antidote to fear


This saying is something I heard today.

If I think about the things I fear, then there are many things that may come to my mind: Being expelled from the company I work for, losing my job, not finishing the the love projects I have, not being accepted. But there may be even more drastic things, like losing my health, losing my family, being ignored by the ones I love, etc. The longer I think about this, the more frightening it becomes. Finally, my mind would come up with some super weird, super sick fantasy about something, that will never happen.

So why is gratitude the antidote to this? Because it helps you to focus on the good parts.
If I focus on what I am thankful for, not much comes to mind. One trick for me, that works is to focus on what I might be thankful for. Then events, that were fascinating, where I participated, come to my mind. My wonderful sons, as well as my beautiful wife. But also the little things, like that coffee this morning or being able to come home in a relaxed way (train riding rocks). Being able to breathe and being able to pray.

Out of this focus, it's impossible to focus on the possible negative outcomes in life.
What if I would really lose my job? Don't know. I would be sad probably. But I would find another one. Maybe that new one would be even better.

What if I would lose my family? Don't know. I would horribly sad, for sure. But after a time, I would get over it and go on with life. And who knows, probably I would value life even more than I do today.

Don't get me wrong: I do not wish any of those bad things to happen to anybody. But bad things will happen, inevitably, to everybody. The question I want to ask myself then: "What good can I get out of this? What can I be thankful for because of this?". I know, that's no a single magic button, that you press and everything will be fine, but a shift in thinking.

The bible says, that "We know, that all things work together for good to those who love God". This is an incredibly powerful statement. If you can believe this, there is nothing not to be thankful for and hence nothing to fear.

Tuesday, November 25, 2014

Today, I learned: Progress make you happy

Today, after some days of being sick, slacking, being lazy (hey, but sometimes, I enjoyed being lazy), I got a little bit back on track.

One hack, which works pretty well for me: Plan your day the night before.
When I wake up and think about what I should do today, it feels arbitrary. It feels not like a must an hence, not compelling at all. But when I take some minutes the night before to schedule my activities (not focusing on results but on work itself), it feels mandatory. I have to work on these items for that specific amount of time. And when I get to finish some of the items on my to-do list, it feels great.

And this feeling of accomplishment is incredibly motivating. I believe, that you should improve not only in one area of your life, but in every area of your life. This is challenging, but necessary.

If you focus on your relationship with your spouse, and do nothing else, everything else with go to the dogs. If your work life sucks and you focus on improving it, and you do not improve in your relationships as well, after a not too long time, your rest of your life will suck, too.

To keep it short, as Tony Robbins stated:

If you aren’t growing, you are dying.

Monday, November 24, 2014

Today I learned: There are still people in this world, who do not take JavaScript seriously.

I'm not sure on this one:
On one hand, it's sad. On the other hand, it's funny.

I watched a professional tutorial called "Advanced JavaScript". It's actually a couple of hours long course about advanced JavaScript techniques.

The first thing I noticed was, that the speaker compared JavaScript's lack of namespaces to "professional programming languages". Yeah, sure.

C#, Java are professional programming languages. JavaScript, the most used programming language in the world is not professional. Sure.

And further down the line, the speaker explains JavaScript's prototype mechanism to "real OOP". This is also great. In my opinion, JavaScripts OOP is superior to the classical OOP we all grew up with. Just because it's familiar, does not mean, it's actually better.

So, I ask myself why, even in 2014 there are some people, who teach other people JavaScript and apparently never saw Doug's "JavaScript - The Good Parts", which he semi-ironically calls the "most important discovery in the early 21st century".

On the other hand, I have to realize, that I, being as nit-picky as I can sometimes be, have to admit, that I can still learn a lot from this speaker.

So a small rant might be OK, sometimes, perhaps. Being a pedantic jerk is never OK.

Sunday, November 23, 2014

Today I learned: I gain so much on lazy sundays.

So, today, I went to church.
That's nearly all I did accomplish up to 17:00. After that made some photos for my ebay sellings.

Neither my wife nor I did cook today. We just bought some french fries and some gyros and were enjoying our laziness.
At noon, my wife and me were laying on the sofa, sleeping, while two of my sons (the youngest one was sleeping) were taking cushions from the sofa, took blankets from upstairs and moved some of the chairs to build a "robbers' den".

After shooting some photos and taking some notes for ebay sellings, I read Winnie-the-Pooh to them and played with them. It was awesome. In all honesty, this was one of the best sundays for a quite long time. No phone calls. No visits. No appointments. No events. No obligations.

Just me and my family. A great wife and great kids.

Wonderful.

Okay, I did some ebay today. And, as usual, it took way more time than expected. This is the main reason I do not like ebay. But it's a great place to sink time and not gain much money from it. But it still feels a little bit better than just putting all the junk you want to sell into the trash bin.

So, I learned: Lazy days are not useless at all.

Saturday, November 22, 2014

Today I learned: Give Up Your Goal For Something Better

Today, I originally planned to write something extremely boring about some stuff almost nobody cares about.

During a conversation, a friend said to me, that it's shortly before midnight. I should have written my article by now, but I haven't. My first thought, in the middle of something, that just got pretty interesting, was to rush to my notebook and scribble something down, just to get my article finished.

But then, I realized that this would be stupid. So I participated in this wonderful conversation. We discussed about thankfulness, how it affects your mind, why it helps you through the day, why it helps you in your communication with others. We discussed about thinking, how seeking the positive in everything, even in the negative.

It was a great discussion with wonderful people.

Something, I would have missed if stayed straight on my not-so-important self-chosen challenges.

So, in doubt, I would like to choose the action with people talking about important things involved.

Friday, November 21, 2014

Today I learned: My unsatisfaction feelings are because of unfulfilled expectations

When you asked me about how I feel in the last weeks, I would say: I am discontent. I often was angry about myself, about the world, about crappy programming languages, about computer equipment, just about everything, no matter whether it makes sense or not.

Today, I thought a little bit about myself and how my sadness, angriness comes. I think, a major source of my no-good feelings are: a way too high, way too many expectations.
So I have to change my strategy in approaching my tasks.

Instead of dealing with failures, that some things take longer than expected, hence not being able to check off each and every item on my personal to-do list each day, I will simply choose to for an amount of a fixed time on a specific issue.

Instead of "making that super new feature work", I note: "Work for one hour on super new feature"

Tomorrow, I will report how it worked out for me.

Thursday, November 20, 2014

First Steps With Foundation

Today, I played a little bit with ZURB Foundation.
Although it's way too early to have a qualified opinion, I already recognized that I've made a major mistake: I've not used Sass.

My small hobby project is nowhere near completion (in fact, it's closer to not having started than to having something that's comparable to an mockup), so I think I'll start over.

What I like about Foundation so far:


  • The Off-Canvas flyout menu. In my opinion, the bootstrap responsive menu is ugly as hell. Whenever I can avoid using it, I avoid it. Foundation's Off-Canvas Navigation is sexy. Heck, it even provides multiple levels of indentation. That's a great reason to love it.
  • Another item I like is the integration of Joyride. You need something like that for your app, if your app is somewhat more complex than "Yo!". And I love if a framework makes something easy.
  • And I like the fact, that it makes customizing easier than Bootstrap does. I look forward where I can deliver my wonderfully styled app to the world with foundation.


What I don't like so far:

  • I have to learn it. ;)
  • And I missed some classes like pull-left, pull-right or text-center.

Maybe I just oversaw them.

Nevertheless, Foundation is the way to go for the next projects.
And having to learn Sass.

Wednesday, November 19, 2014

Today I learned: Sometimes it's better to focus on work, not outcome

So today I tried out how it would work out for me, if I  would not focus on outcomes but one the work I do.

So I set up my calendar to the time I wanted to worked on those specific items.
And although I did not accomplish everything I wanted to, I feel way better than yesterday.

Why is that?
I simply did decide, that I don't want to focus on a specific outcome. I often entered some stuff like "Finish xyz" or "Get xyz to work".

And this resulted often in an emotional mess. Most days, I failed. Even on days, where I did accomplish much, I did not fully succeed, because there was still somewhere a item list, which has not been checked.

And today, I just decided: I don't care how far I go come with xyz, whether I finish it or not. I just don't care. I will work for one hour on that item. If I finish it: great! If not, no problem. There is still something left for tomorrow.

Realizing, that my to-do list will not be empty when I die, I can see my to-do list now in a more relaxed way. And the more relaxed I am viewing at my to-do list, the happier I can go to work. And the happier I go to work, the better the results I produce.

So, this small hack seems to work for me.

Tuesday, November 18, 2014

Today I learned: I expect too much.

When you asked me about how I feel in the last weeks, I would say: I am discontent. I often was angry about myself, about the world, about crappy programming languages, about computer equipment, just about everything, no matter whether it makes sense or not.

Today, I thought a little bit about myself and how my sadness, and anger comes. I think, a major source of my no-good feelings are: a way too high, way too many expectations.

So I have to change my strategy in approaching my tasks.

Instead of dealing with failures, that some things take longer than expected, hence not being able to check off each and every item on my personal to-do list each day, I will simply choose to for an amount of a fixed time on a specific issue.

Instead of "making that super new feature work", I note: "Work for one hour on super new feature"

Tomorrow, I will report how it worked out for me.

Monday, November 17, 2014

Today I learned: Code Quality depends on Reviews.


My Code will be better if I know, it will be reviewed. Here I said it.

If you compared my code I wrote today, for basically myself only, to the code I wrote some months ago for someone else, you will find great differences.

I don't think that I'm either much smarter or dumber than this summer, but if you saw my code, it would be a huge quality difference.

In one code nearly comments every line, what it does and why it does this and how the result of each statement will be used in future, what's the meaning of each variable and so forth, the other code was just hacked to get it to work. It has wonderful statements like

var parentElement = jQuery(this).parent().parent().parent().parent();

Code like this makes me cringe. It shows me, that I write horrible code, at times.

On the other hand, the code I wrote for someone else some months ago, I knew he would be dependent on understanding every detail of my code. And I knew, that he is no profound coder himself. So I made the code as simple and documenting as possible. No little, dirty hacks that are kinda clever, run 2% faster than normal implementations, but are a mess to debug. Everything was well explained and well documented. That was maybe the best code I have ever written, yet.

So, from now on, knowing that someone might read my code will help me to write better code.

One more reason for me, to write more open source code.

Sunday, November 16, 2014

Today, I learned to live without Internet

Waking up this morning was weird. I grabbed my phone, wanted to check for some news on Twitter, WhatsApp, you name it. Full Wi-Fi. No internet connection.

Several retries later, still same result. After I went downstairs to check the Internet router. No Internet. Checking the splitter resulted in: No Internet.

Do I called my provider. Deutsche Telekom actually has a good reputation in customer service. At least they 're not as bad as the other internet providers. After spending some minutes in the waiting line and some more minutes, the first free available slot for a technician to come by is: next Friday. One week without internet. Hooray.

Okay, not really. It sucks. But on the other hand: I am kinda happy about the possibility to explore life without internet. I am forced to do so, yes. I did not choose it, yes. But I'm still a little bit thrilled about this possibility.

Instead of mindless surfing shopping websites, you would to do something else. Instead of watching YouTube, you would have to do something else. Instead of being absent minded with fluff, you would have to find a way to be absent minded with fluff you can touch, like books.

Frankly, this is just a mere fantasy. Instead of lonely surfing the Internet, I fantasize about being Super Dad, having the deepest relationship with my wife ever possible, my understanding of my career material exploding, learning to play the guitar and become fluent in Russian and Japanese within this week, just because of the lack of the internet. Reality will be different. But reality will be great, nevertheless. I just have to take it as it is.

So, now, after having spent my first internet-free afternoon for weeks, I'll create myself an awesome, super delicious Cappuccino and will continue reading a book of my choice.

You need less than you think to be happy. And you need less than you think to be thankful.

Saturday, November 15, 2014

Today I learned: I should choose my challenges wisely



I enjoyed this year. My monthly challenges helped me to get insights about myself. Challenges like not drinking alcohol or working out helped me to get to know myself. Challenges like spending time with kids showed me how hard it can be to set time for important things in life, when it's filled with clutter.

I think I enjoyed none of these challenges. And neither I enjoy writing this article. I would prefer watching that movie next to my wife than watching that movie next to my wife writing this article on my smartphone.

I know some of my friends think my self-chosen challenges are stupid. Day, I think so, too. Tomorrow, I'll maybe think differently.

So, I know that my challenges were not enjoyable. But I enjoyed the outcome. And next year, I will find new challenges. Probably I won't enjoy them. But I will enjoy the outcomes.

TIL: Plowing through the basics of JS actually helps

Today, I read through some pages of "JavaScript, the definitive Guide". I knew most of the stuff. And once again, like in almost every language, I read trough the seemingly boring bitwise operators. You know, stuff like |, &, ~, ^ and bit shift operators >>, << and >>>.

So I asked myself, why should I use them? Being and not-too-young developer and not having used them in any real-world-application yet, this shows me: Either those bit operators are a little bit outdated or I am a little bit ignorant, that means that I could miss out simpler solutions than I usually provide.

So I decided that I have to learn some bit operation magic.

So beside bit shift operations as an alternative to multiplying or dividing by powers of 2, I learned, that | 0 converts nearly everything to an integer.

Longer description can be found here:
http://stackoverflow.com/questions/654057/where-would-i-use-a-bitwise-operator-in-javascript

So, if you have some handy trickt with bitwise operators in JavaScript, let me know.

The other thing I heave learned: labels in Javascript. You can label stuff. Most likely, you will label loops, so that you can break free from them with with the break label; statement.

I have to say, that Mozilla discourages you from using labels.

Friday, November 14, 2014

Today I learned: Choose your battles wisely.

Currently, I read the neat book "Don't sweat the small stuff ...and it's all small stuff"

One chapter is called "Choose your battles wisely". In this chapter the author argues that winning each and every argument is a bad bad strategy for every relationship.
Not only I would burn out if you want to correct each and every misbehavior of your kids, but I would be a really, annoying wisenheimer if I got into battle for every mistake my wife makes.
Frankly, sometimes I am a wisenheimer. I loose myself in arguments about small stuff nobody gives a dump about. I sometimes still search for arguments when others say to me: "You're right and I have my peace" -- meaning they still think they're right, just leaving me with my arguments alone.

So, instead of trying to be right all the time, I found it's better to be kind most times. And to debate in important stuff only.

My son notoriously mixes his right and left shoe up. So he put his right shoe on his left foot and vice-versa. Do I want my son to get his shoes in his right feet? Surely, I do. Do I correct him every time I see he makes an mistake? No. Why not? Because it's not important. Usually he walks only some meters with his shoe setup before he has to take them off again. It's just not worth it. Someday he'll be old enough to recognize it by himself.

My wife sometimes tells stories a little bit differently than I have them in my memory. Do I corrected her every time? Sadly: yes. Way too often. This is something I have to work on.

My colleagues do want to implement something differently than I wanted it to be. I think my solution is the better one. Shall I fight for my solution? In my (current) opinion: Only if it's worth it for me.
I might piss people, even close and loved ones, off with my statements. I might hurt someone.

So it's better worth fighting for. Being right for the sake of being right is not worth it.

Thursday, November 13, 2014

Today I learned: There is a use for void

Today, I learned two use cases for the Operator void
For the sake of Repetition: void is an operator which evaluates the given expression and returns undefined.

So, I asked myself, what could be modern day use cases for this operator?

I think there is no reason to be paranoid about undefined hijacking (i.e. setting the property undefined to something else than the value undefined.) Since ES 5, this is not allowed. And modern browser won't throw an Error in your face, when you do something like undefined = 5; but silently ignore your crappy code.

The other use, using it in the href attribute of a tags, is heavily discouraged today. In my questions on Google Plus and reddit, where I asked what sense people made out of the void operator, giving and old example of setting it into the href attribute, there were comments, begging not to do this.

So, finally, here the solution: first of all, you could use bookmarklets. What is a bookmarklet? Type javascript:3+7; in your browser's URL bar. Make sure, you use Firefox or IE (have it tested only in FF) to see the result. Congrats! You have executed your first bookmarklet. You can save this ingenious script to your bookmarks. What did it do? It evaluated 3+4 and changed your current page to that value. That's why you saw 7 in your browser. Webkit browsers don't do that, by the way. Never.

So void to the rescue: just type javascript:void(3+4) and nothing will be redirected. So you can implement a word counter bookmarklet.


Another use are minifiers.
Just like Yury Trabanko replied to me on Google+:



Minifiers use void operator. For example
function() {
    if(isA()) {
        return doB();
    }
    doC();
}


will become
function(){
    return isA()?doB():void doC();
}

Happy coding to you all!

Wednesday, November 12, 2014

Today I learned: void in JavaScript

Reading stuff about the JavaScript Module Pattern, about self-invoking anonymous functions (Tweet by Paul Irish , by the way, this tweet made me sign up to Twitter once again), I stumbled about undefined.

I knew that undefined was different. I knew that it was not a keyword. So what is it?
It's an variable. And a value.

It's a global variable, a property of the the global object, in the browser window.undefined.

I stumbled upon the the Mozilla documentation about undefined. As an alternative to
if (typeof lorenz === 'undefined')
they presented
if (lorenz === void 0)

I wondered. What's this void operator?
As the documentation succinctly explains:

The void operator evaluates the given expression and then returns undefined.
That's all. And then I remembered where I saw this weird little friend last time. It was about 1999 and it was about here:

<a href="javascript:void(0)" onclick="mouseOver()"><img src="earth_rotating.gif" /></a>

We've come a long way, baby. I'm glad we don't have to code this way any longer.

Anyway, now I think about a proper use case for this operator.

Tuesday, November 11, 2014

Today I learned: I'm fine with not having learning anything today.

Today, still feeling sick, after short day at work, I stepped outside in my garden.
Not that I wanted to, I kinda had to. My youngest son wanted to get outside. My wife and the other two kids were away.

So I did some garden work and thought what I have learned today. And nothing came to my mind.
I did watch a tech talk. But my focus was somewhere else.
I did accomplish something at work today, but there was nothing new to me. Just applying known stuff.

So I was outside, thinking about the passing day, having an eye on my son and raking up the leaves in the garden. And fumbling with the leaves between the stones. There was nothing to be written about.

I heard the sound of a bunch of migrant birds up in the and invested some time of my short life to glaze at them while they were flying southwards. I guess, those were some geese. I love that sound. I love that formation flight. And yet, for the first time, their flight seemed not only elegant and wonderful, but also incredibly laborious. Laborious, yet elegant.

I returned to my work, making sure, my son is still playing in the sandbox.

Then it became clear to me:
Sometimes, it's just OK to be.

Monday, November 10, 2014

Today I learned: It's OK to tell your kids to fight for themselves.

My son didn't want to go to kindergarten today. Why, I asked. He replied, that there was a boy, who hits him.
I looked him deep in the eyes and said to him: "If that boy hits you again, go tell the teacher. After that, if he hits you again, hit him back as hard as you can."

Then he was willing to put on his clothes and go to the kindergarten. I gave him a tool how to handle his situation.

As I wrote yesterday, we had a series of talks about relationships. The referee, a pastor, told a story about being harassed in a shower and being told, that he may not defense himself, because he is an pastor and that he must turn the other cheek. He replied, that Jesus said that to people, who were really far in their spiritual life. And that he is not sure, whether he is that far in his spiritual life. But that he is sure, that it will be not his blood, that will run the shower drain.

I believe, that having told my son to turn the other cheek would have caused big harm.
On one hand, the self-value, something I believe God himself has put in everybody, so also in my son, would have been damaged. This would be very sad.
On the other hand, the other boy, God knows which hurts his little soul has experienced, that he treats others this awful way, would not learn, that it's not good to beat other kids. And that would be very sad as well.

Sunday, November 9, 2014

Today I learned: You can have joy with kids even when you're sick.

We had a series of talks at our church. It was about relationships. It was about the fundamentals of relationships, about the relationship between a man and a woman and between children and parents.

Todays talk was about enjoying family life.

Many people talk negatively about their family. I am guilty of this one, too. On friday, I said to a schoolfellow, whom I haven't seen in years, (Larissa and I were without kids that day) that doing the shopping without kids is great. What an idiot I was. It's not great. Maybe it's faster. Maybe it's a less nerve-racking experience some of the time. But it's not great.

Family life is great. Or I should say: Can be great.
Today, being still a little bit sick, I would have preferred to lay in bed the whole day.
I did sleep a little bit today, but not much. Quite a lot of the time I spend reading two stories from "Lustige Taschenbüber". And although I was sleepy, I loved cuddling with my kids while reading silly stories about Donald Duck trying to steal an old locomotive for Scrooge McDuck because of some super-secret-and-super-advanced-metal in that old locomotive.

Then I started to fight with my kids. Or better, to wrestle with them. I hold them and they had to figure out how to get free by themselves. I wanted to show them, that they can do something by themselves to change things. We played bulls, pushing each others head with one owns head as strong as possible. We played tortoises. One is an old tortoise (lying facedown on ones knees) and the other tortoises have to turn that old tortoise around without using hands.

They loved it.
And I did, too.

Besides learning "cool" new stuff about programming, about server, clients, frontend, frameworks, and much much much much more, I have to become an expert about my family. And the latter one is much more important. And make more fun, in general. :)

Saturday, November 8, 2014

Today I learned: My kids want to spend time with me.

I feel sick today. Not that much sick, that I would stay at home all day, but although I've got plenty of time today, I did not accomplish much.

But, given that hint by a good old friend, I asked my 5yo son, whether he thinks that I worked too much. He replied: "Yes, you work much. But there is something I considered: I want to help you with your work." I asked, how he thinks he could help me, he answered: "I would help you. I would help you changing the tires on our car."

Yesterday, I changed the tires on my car. The younger one helped me, tightening the screws. It was great.

Today, after that short conversation with my oldest son, he said to me, knowing that I feel sick, that I should lay down a little bit and that he will lay next to me an cuddle a little bit.

Right now, after about one hour of lying next to me, listening to some book I read to him, he stood up and went away to playing with some toys.

Kids, the older the less, do not need your attention full 24/7. They want to spend time with you. They want to feel loved, to be taken serious, to connect with the most important people up to now. And this is great. This means, that I can, even if I work much, even if I do not spend as much time with my kids as I liked to, I kinda can make up for this by having time dedicated only to them.

I did not accomplish much. But today, I accomplished some important things. And this is great.

Friday, November 7, 2014

You can become a victim of social engineering, too.

Today something extraordinary happened to my friend. But "extraordinary" in the negative sense of this meaning. He would be glad if he could undo it.

He got a call from Microsoft. At least, the guy on the other side of the line said, he came from Microsoft. That guy babbled something about that my friend's computer got hacked and is sending malicious requests all over the internet. It sounded dramatic. Like being a criminal. So that guy asked my friend to type in some commandos into Window's command prompt, which my friend kindly did. I don't know which command that was, but it listed all sorts of warnings and errors. I presume, it was some command line clone of windows event viewer. So that guy asked, if my friend was able to see all those errors and warnings. My friend confirmed. Then he asked to type "inf hidden trojan" into the command prompt, explaining, that this command would list all hidden Trojans, which were present on the system. So my friend got a list of .pnf  files listed in that small black box. Then that guy asked my friend, if he could open them. He could not. Next, that so-called Microsoft employee said: "This is a sure sign, that those are viruses."

This is where the real evil begins:
He tricked my friend to install a remote control on his computer, allowing him to fully control his friends computer, explaining that he just wanted to get rid of those viruses on my friends computer. Her explained, that Microsoft was absolutely interested in having clean computers, so that they would offer him a brand new feature: For just 15 EUR per year, my friend would become virus free, supported by Microsoft. My friend thought: Hey, that bad of a deal. And accepted.

So that guy wanted the informations of my friends bank account, (yes, even the password), the credit card number, and he did some things, my friends could not even see, because that guy blacked out the entire screen (for security reasons, because he's now operating on the microsoft server, he said).

So that guy got everything. Full bank account information. Full credit card informations. Full access to my friends computer.

Now, my friends computer will be offline. Until we save the data and either remove that rootkit, that was installed or even set up a completely new operating system.

My friend is not dumb. He know some stuff about computers. He told me: "If you ever told me before, that this would happen to me, I would not believe you."

Working with surprise, shocks, a very polite tone, even some compliments, and - most of all - rushing my friends with call to actions, that guy was successful.

And I think, most of us would be. Perhaps not specific to this special kind of attack (any more), but maybe to something slightly different. Somewhere, where you fear something, you don't understand. Somewhere, where this stranger is friendly and show you how deep in misery you truly are. And somewhere, where this unknown caller convinces you, that all he wants is to help.

You are not as smart as you think. Neither am I.

Thursday, November 6, 2014

Today I learned: My most painfully learned, hard to write blog post is the one, that help most people.

I did not write much so far in this. About one article per month or so. Mostly boring stuff, stuff, that does not even interest me any longer. (Who cares about my web projects some two years ago? I do. But only me does.)

But there are some articles, which took long work. Which meant a great amount of work and learning. And one of the most painful and hard-to-grasp article, which took me even quite a long to write (oh boy, I remember hating formatting that article so much...), leaving me with a feeling of "sooo... Nobody has this problem, but me. Nobody is interested in my stuff. So why did I even spend time for writing this?".

I still remember how it happened, that I wrote this article: I struggled massively building a facebook-timeline-like visualization of the history of an order in the web-based license-creation app for my employer. I just could not get the positioning of the elements to work correctly. Not by CSS (hey, that was 2012, so flexbox was unheard of), not by some javascript magic i could figure it out. Then it clicked. It had something to do this the browsers layouting engine. So if I just postponed the position calculation after the layouting has been done by the browser, I could calcalute all that stuff correctly and would not have to deal with some strange zero-pixel heights of divs.

So I wrote that article.

So have a comparison, how much this article stands out relative to other articles I wrote: In an all-time count, this article has over 7000 views. The second place, also an article about web development, has only 370 views.

But what surprised me today, that that AngularJS-related article is still being actively linked an clicked.
It seems, that I was absolutely wrong about with my thought about the uselessness of that article. I was horribly wring. This small article, although it was hard to learn, is now a help to others.

And that is just wonderful.

Wednesday, November 5, 2014

So, what did I learn?

Today, perhaps the part, the only thing, that comes to my mind about stuff which I learned today about programming, is that Select2 does support a timeout, which first waits for a user to stop typing and fires the ajax call after that timeout. This is a really neat feature, since it prevents flooding the backend with a bunch of highly unspecific queries.

But there is a feeling of not really having anything new. Why? Yesterday I bragged about the little stuff, that adds up over time. And I still believe this. The problem with such very small increments, is that it's not hard to learn such small stuff. It's not really rare and hence, not really too valuable.

The really valuable and rare stuff is always outside one's comfort zone. And that makes it so rare, because only a few are willing to step out their comfort zone to learn new stuff.

For me, next to the problem of willingness, my problem is time management. When shall I learn all this great new stuff? How should I handle all those commitments in personal life, church, in your career, in your self development? I guess, only by refusing new commitments and slowly stepping out of existing ones.

So again, (I know, I repeat myself), time is the only real currency in your life. Choose wisely.

Tuesday, November 4, 2014

Today I learned the meaning of preserve-3d

Today, I played around with some CSS animations and 3D transformations.

Something like that was my result (but a little bit cooler, with SVG background images, to resemble the corporate logo).

http://plnkr.co/edit/4KkYkviUIWMGaEPV65aC?p=preview (works in current Chrome, others browsers: I don't know.)

There was a thing, that irritated me: I could not get my 3D-cube to look like a cube, and not like a silly piece of art by an 8-grader. The magic lies in this small statement, I did not really understand before:

transform-style: preserve-3d;

I did not understand this.
But then I learned, that there is nothing complicated on this. There are basically only two values (besides stuff like "inherit") you should remember: preserve-3d and flat.
flat is the default setting, making the elements being positioned on the 2D plane, preserve-3d allows the elements to be positioned in 3D space. Wow.

So what do I do with this ground-breaking insight? I don't know. But I think that such small portions of understanding of minor details do sum up, resulting in a huge difference over time. So I will play some more with CSS 3D transformations, to learn even more stuff about CSS.

So long, keep on learning.
Lorenz

Monday, November 3, 2014

Today I learned: There are some people in this world, actually making money with clicking links.


I begin to hate this month's challenge. I am tired and have absolutely no interest in writing this article. But I have to.

So, let's talk about someone, who approached me with an idea for a web site. Something, that allows you to make money with ad selling, but is not a scam (like many current websites, that promise to make money by selling or even viewing ads.)

It works like this: You buy (with real money) some ads, by a company, which guarantees you, that real people will watch your ad (sometimes even for a guaranteed time). They want premium prices for that. And they pay those people. Sometimes even $0.0005 per view.

Realizing that, it's clear, that there must be a some sort of multiplier. Getting paid one bloody cent for filling at least 20 captchas, clicking through some odd landing pages (yes, seriously, the person approaching me with this idea exactly this), just to view twenty extremely boring ads, wasting at least 10 minutes of your life (that's how it would approximately take to view twenty ads), making 6 cents a hour is not really a luxury income. The person approaching me, uses automation tools for filling in forms. She said: "Filling all those captchas out manually, I don't do that. That's something for people for those who really have NOTHING to do.". Did I mention, that she is unemployed?

And there is a multiplier: multi-level marketing like downline, in which you get paid for the viewing actions of those "under" you, can make it a little bit more attractive, sometime even earning 100s of dollars a month.


So, what did I reply? I was not really interested in implementing something like that. By implementing this, I surely would learn a ton. Especially about money transfer APIs of banks. It may be a cool opportunity to acquire valuable new skills.
But I wondered: When should I do this? I am already stressed out chasing all those ideas in my head.

This world is full of great opportunies. Tempus fugit.  Choose wisely.

Sunday, November 2, 2014

Today I learned: People hate scrolling long websites on their smartphones.

Being the geek I am, I talked to my sister-in-law's husband about mobile design of websites. And while I was happily scrolling a mobile website on his smartphone (Yeah, I know, I like taking others' smartphones and scroll on them a little bit. For science, you know. Gloating over jank-free animations on websites and such stuff.), scrolling through a site (yeah, the scrolling was cool), he just told me:
"I hate scrolling long websites".

First, I though: Well, okay, nothing special. I also was already a little bit bored by scrolling around, so I kinda agreed. But then I thought: "Hold a moment. This might be a golden hint for a better user experience on mobile websites.".

Why does he thinks so, I wondered? Being already annoyed by still scrolling on that site, I started hating this site, also. So what was wrong?

I think I've got it. There are several reasons, why scrolling long page can suck so hard on mobile devices:

  1. It depends on what you're scrolling. I'm pretty sure, that Pintrest users love the never ending scrolling, filled with more and more and even more wonderful photos about the stuff that interest them. Walls of text, on the contrary are massively boring to scroll over.
  2. Do you really have to scroll all that boring content just to get to the content you are really interested in? That stinks.
So, if you design a new mobile website, avoid scrolling. Or make it awesome, at least.

Saturday, November 1, 2014

Plenty of Internet and Writing Every Day

Last month, I tried to reduced my internet time. To keep it short: It's didn't care. After some days I just saw no point in downloading YouTube videos to watch them offline. I saw no point in deactivating my wifi to read that specific article just from the browsers window without being able to click on a link. I hated it first, Then I didn't give a ..
What I've learned anyway: I am dependend on the internet in a very strong way. More than I realized before. So there's more than one reason for me to speak up for a free (free as in free speech) internet.

So... what will I do this month?
I will work. I will procrastinate. (Heck, I procrastined even writing this article. I played kingdom rush, I talked to my friend, helping him finding some verses from the bible about door-knocking, I showed a comedy video about the struggled of being a woman in our society to my wife, I played some more kingdom rush.) But I will also learn and create.

So here are my rules for this month.

I write everyday at least 200 words.
I write everyday about something you have learned today.
Everthing I write, must be written between 0:00 and 24:00 on that day. Pre-writing does not count.

To help me accomplish this, I will rewrite my BIBEL-lesen Web App to a mobile web app, using *drum rolls please*, AngularJS, Ionic and Cordova. I will have to implement some simple backend service, for user accounting and "cloud" syncronization. I will get bonus points, If I manage to make it work with some more motivation stuff like achievements. I will also get bonus points if I manage to set up a welcome page.

I will get in charted waters with those. But why I do this. It will be horrible. And awesome. Both. But horrible first.

So long,

Lorenz

Saturday, October 4, 2014

Spending More Time With Kids Yesterday and Spending Less Time On the Internet Today

So... Septermber, I planned to spend at least one hour a day with my kids.
That didn't work as expected: I did not spend that much time. I did not expect this to be a challenge. But it was.
But at least I tried to be more aware of the time I do spend time with them. And that was great.

It was great to get to know them a little more, like experience their thoughts. A great example of that:

My wife pointed my kids to see the full moon. And then my second son said, that he wants to touch the moon. And thus, he will use a very very very very ... ...very long ladder to achieve that goal. My oldest son said, that he will use a big rocket to get to the moon. And that he will put the moon into the trunk of that rocket. After that, both were debating, whether this rocket with the trunk has be bigger that our car or not.

Wonderful.

Spending time with kids is great. Even if it's short.
This month I will spend less than half an hour each day on the internet for private use.
But there are some problems, I already encountered:

It's not 1999 anymore, where you could clearly distinguish between being online or not: For being online, your computer had to be turned on and you had to dial the internet connection with the modem. If that successed, you were online (and you better use the connection, because you pay per minute). If not, or you closed the connection, you weren't.

Today, I even don't know whether I'm online: If my notebook has an active wi-fi connection, I'm technically online. Do I use it? I don't know. I don't know, whether my browser is upgrading in background, whether windows tries to download some updates, whether my smartphone (which is currently in my bedroom upstairs) is receiving some WhatsApp messages. Hard to decide.

I also struggle with the definition: private use. Is searching something for my friends private? Reading stuff online for educational purposes, which will affect my work quality at my job?

All I can say now, after four days of internet diet: I'm so much more aware how much my life relies upon the internet today. It's almost frightening.

Friday, September 12, 2014

Playing with my new 50mm/f1.8

Wow. I really underestimated how much fun portraits can be with this small lens.
And I underestimated how precise you have to focus to not total ruin the shot.

Here are some of the better shots I made yesterday and today.

My Son. See the blur, starting right behind his eyes.

I really like this one. I looooove the narrow focused area: Only the boys face are focused. The rest lives in a soft blur.


Some pseudo-macro.

Playing. It's kinda hard to shoot moving targets. But when it works, it works greatly.

One more try on macros.

Got a moving target.

Combination of movement and macro
Here, one more marco. What I really like about this lens, is it's great high aperture. Just take a look at this image.

These photos are not retouched in any way. Now compare these photos to the one below, shot last year with my normal 3.5 - 5.6f.

This is from an 3.5-5.6f lens

I just wanted to show how great the difference a low-aperture lens can make in every day.

Monday, September 1, 2014

A month with (almost) no video

So, I did not watch video and did not play games on the computer all of August. Almost.
I did watch four movies (I allowed myself two cheat days that month), several tutorials, clips of my children, maybe two or three less-than-interesting clips on YouTube, and countless animated GIFs.
I also played about 10 Minutes of 2048, before realizing, that I must not play computer games that month.

All in all, i was pretty relaxed about that challenge this month. But nonetheless, it was a challenge to force myself not to play boring and silly game on my smartphone while sitting bored in the train.

I realized, how much time I do spend with video entertainment every day. I realized how ubiquitous video has become in my life. I realized how silly it sounds to others confessing, that you are avoiding video this month. I realized, that I did not read more books than other months. It watch a lot more images and read more articles in various blogs.

It was a challenge not to just dive into watching some videos all by myself, but to waiting for something meaningful. And by meaningful, I mean making it either educational or making it an experience shared with others.

And so I removed games from my smartphone. And so I do not really have the desire to watch movies (although I would like to watch some episodes of Stargate, fully intentional, just enjoying it with my wife or some friends). I have the desire to spend my day in a more meaningful way.

And hey, isn't that, what life is about? Making it meaningful?

And thus, I am thrilled about this month's challenge: To spend at least one hour of quality time with at least one of my kids.
Yeah, I know, originally, it was scheduled for October, but I know, I won't be able to do it in October, so I'll do it now.

Things will be great.

Monday, August 4, 2014

A Month With Sleep Deprivation


So, last month I tried to wake up before 5:00 am. Oh how I underestimated the effects of sleep deprivation.

It did not work well for long: The first week was great. I achieved my goals and felt great working on stuff I loved early in the morning. It was truly awesome.
But there were many downsides to it, or at least one downside, which sabotaged it all: It does not really fit my lifestyle.

My wife and I use to stay up pretty late, working on some mandatory stuff when the children are asleep. This is also the most valuable time for two of us. We normally stay up to 11 pm. And go to bed pretty tired. During this time, we watch some movie, or talk to each other or do the stuff we could not do during daytime.

All that was missing. Reduced communication to your spouse? You don't want to do that for a long time. So I did not do that and stayed up late, too. But that made it almost impossible to rise early.

Another problem was the reduced performance when fighting sleep deprivation. A few times I plainly decided to sleep long, because I knew that I would have to rise at 7 am anyway and I had to steer the car. I did not want to risk my life just because of a challenge.

So, the bottom line of this challenge? I really liked to rise early. When I did, I was productive, efficient, content. But it does not really fit my current lifestyle. I have to figure it out, how I could make it a better fit.

So, this month I will not watch any video or play a video game for the sake of entertainment.
I will watch educational stuff. I will watch self-development videos.
But I will refuse to play video games or watch funny videos on the internet.

I will play more board games instead. I will read more books. I will use my time productively. At least I hope I will. ;)

Tuesday, July 1, 2014

No Car for short distances in June. And rising early in July.

So, last month I promised not to use a car for distances shorter than three kilometers. And I kept it.
It was no big deal, since most of the grocery shoping was handled by my wife. There was nearly no rain here in june, so there was not even much temptation to use a car. A fairly simple challenge, that was (to say it Yoda-style).

This month I decided to rise early. This means before 5 am. Some of my friends will say: but you said, that you won't watch videos for entertainment. Yes, I did. And will keep this promise, but not now but in august. Why this change? Because of the FIFA world cup. I just would like to watch some games.

And one more thing: In case of extreme sleep deprivation, I will allow myself of sleeping longer than 5 am. One time. And I have to announce it (at one the night before, at least to my wife).

So... I would like to go to bed. Now. (Yeah, it's only 9 pm, but I want to wake up early.)
I guess, this month will be a huge lifestyle shift from my lifestyle before.

Let's bring it on!

Sunday, June 1, 2014

No Coffein - OK. No hot beverages: Not cool.

Yeah, to make it short: Not drinking hot beverages for one entire month sucked. Hard.
Not eating chocolate sucked (It has caffeine in it, too)

And I had almost no withdrawal symptoms.

Wednesday, April 30, 2014

April is Over. May Is Coming.

April is over. One month filled with the duty to work out every day, or spend at least one hour outside is over. And I'm really glad about it.

I don't know what to say. I did not like to work out. I avoided it where it was possible. Instead of doing pushups, I pushed my wheelbarrow filled with mud. Instead of doing situps, I leveled the surfaces in my garden. Instead of running, I walked. Instead of some hard stuff, I chose other stuff.

I procrastinated. I even chose yesterday conciously not to workout at all. I had good excuses thorough: On some days I was sick, not feeling able to work out. Yesterday it was late, and I knew I had to rise early. I had absolutely no interest in losing half an hour of precious sleep just to fulfill this stupid commitment.

On the other hand: The only really hard choice was to work out now. Now.
I really liked to feel energized so much, that I could not hold it and starting running during my walking exercise. Now, back from an one-hour long walk outside in the dark in the middle of nowhere in Lower Saxony, (I walked today one hour, because I walked zero minutes yesterday, to compensate the mild feelings of guilt ^^), I feel tired, exhausted from this energy-draining day, but.. happy.

I also liked what happened to my self esteem. There were days, where I felt alpha-like. I enjoyed my improved posture, I enjoyed walking chin up. I felt great.

I had great stress this month. I hated it to go outside and walk for half an hour. It felt like a waste of time. But in retrospective, I'm not so sure anymore. I think I got more out walking outside than sitting in front of the computer all day.
I think, actually, intellectually, I know that half an hour of movement each day is good for me. But still I do not like it. Especially I do not like movement that seems pointless and boring. Push-ups are incredibly boring. Running on a treadmill is even more boring. I need distraction, I need diversion, I need some darn relief from the current pain. Not real pain, just boredom and discomfort. So running outside is way better for me than on a treadmill. And running outside is better for me than doing push-ups. Okay, maybe not really strictly better, but easier. And an fitness app helped me to motivate myself to run faster. (Gosh, I am easily manipulated.)

So what's the conclusion of this month?

It was, after January, in which I skipped dinner, a real challenge. I failed hard. But I still feel great. Why? Because my failure was so much better than not trying at all.

What's next? In ten minutes from now, I won't be allowed to drink caffeine during May. No coffee, no latte, no tea. No Cola, No vodka energy.
I believe, it will suck. (Writing last sentence, I went into the kitchen and filled my glass with an not particurlaly well tasting energy drink, just for the caffeine. Sounds a little bit like an addict. Ish.)

Additionally I will continue to either work physically for one hour or work out for half an hour each day.
Additionally I will drink at least two liters of water each day.

Let's roll!

Tuesday, April 1, 2014

March without alcohol and April's workout / being outside

Hi everybody,

the month called March is behind us, April Fools is also history, for the most parts.
So, I've drank absolutely no alcohol last month. Well, that's not really true. I drank some of that:
One sip of beer shortly after midnight on February 1st, just because I forgot that it was already after midnight.
And I had a sip of whiskey because I took a sip of coke, which my cousin place at my table. But because it was his coke, he drank it his way: refined with some classy whiskey.

So I did not drink alcohol because I wanted to drink alcohol. And although I expected at least some sort of detox effects, there weren't any. I had no cravings, I did not think "Oh boy, I wish, I could drink alcohol.". So it was really easy.

Benefits of refraining from alcohol:

  • You don't become drunk and make bad decisions
Downsides:
  • None
  • Really, no real downsides. You can go party and have a great time without. Really.


What wasn't easy was drinking only water and avoiding soft drinks:
Making two expections per month didn't work for me: From "most days" I went pretty quickly to "some days" to "every now an then". That's an aspect of me I didn't know too well before.

So what I've learnt so far about me (and probably everyone else, too):

TL;DR:
It's easy to keep performing an action for a limited time, based only on willpower. It's nearly impossible to do that forever. Forcing a permanent change in one own's behavior, but rely solely on willpower is a losing strategy.

This month, I will on each day either work out for at least half an hour or work outside for one hour.
Today, I was outside, preparing stuff for my garden. It was not that easy, but I did not expect it to be.

So, have a great April!

Saturday, March 1, 2014

Drinking in February And Not Drinking in March

Last month I drank at least two liters of water each day.

As far a I remember, not a single day was really easy: There was always some pressure on me. Sometimes I felt like I procrastinated drinking water, so that I rushed drinking all that water I needed to drink for that day in one take. Certainly not the best way to handle things.

Surprisingly, I did not miss drinking juices or softdrinks. I just did not need it. That part was really easy.

Upside

A benefit is, that digestion works better when you have enough water for it.

Downside

One downside of this process, is that it sometimes felt weird. I felt weird, when I walked in into the McDonalds, ordered a menu, but instead of cola, to take water. Another downside is, that my stomach makes slightly embarrasing sounds when filled with fluids only.

Despite all the negative aspects, I will keep it up, drinking two liters of water each day. No juices, no softdrinks. But I will allow myself two cheat days every month, where I can drink as much cola as I want, and do not have to drink any water.

March: No alcohol.

I expect this to be fairly easy. Alcohol is not much of a problem for me, so that should be no really a problem.

And yeah, thank you for all the support so far! It's a great self-challenge journey so far!

Let's bring it on.

Saturday, February 1, 2014

One Month Without Dinner and February's Two Liter Challenge

My new year's resolution started with skipping dinner in January. It was sometimes really easy, sometimes hard, but in general, it was not that though. Was I successful, you might ask. Yes, I was, at least in my terms of success. There was one time I took calories after 5:30 pm. But it was not intentional. There might have been an evening or two, where I did not look at the clock and hence ate calories at 5:32 pm (but I'm pretty sure that didn't happen). Here's what I have experiences and learned:

The neutral aspect:


  • Coke Zero actually has calories. This was my one-time where I did eat calories after 5:30 pm. I was tired, had to drive home for a long distance, so I was glad about some caffeine, a friends offered me in the form of "Coke Zero". Believing the ads, which said, that there is no sugar in this stuff, I concluded, that it did not contain calories, as well. As I later found out, I was wrong. Coke Zero contains 0.25 kcal per 100 ml. Not that much, but it contained calories. But now I know.


The positive aspects:


  • I sleep better. When eating dinner, and laying down to sleep, I get heartburn. This stopped this month.
  • It's easier to wake up early. When your last meal was at 5:30 pm, or even  4:30 pm, your body will crave for food in the morning. Hence it will be easier to wake early. For me, I rarely stood up before 8:00 am. But skipping dinner makes waking up at 7:00 am fun. I get more that early.
  • I've lost about 1.5 kilos of weight. It was not my intention to lose weight. But being "skinny fat", It's a quite nice side effect.
  • I drank way less alcohol. My drinking time for alcohol is usually the evening: Having a beer after work, or drinking a glass of wine with my wife. This month I drank wine with friends at lunch. And one time with my wife, at lunch. And funny thing is: The wine tasted better than usually.


The negative aspects:


  • Sometimes, I had a great appetite in the evening. Sometimes I wished, I wouldn't have to do this. The next morning the cravings were gone, and I just moved on with my normal life.
  • The worst feeling about not being allowed to eat in the evening, was when it's socially expected of you. For me, it was when having friends visit us. It just sucks, being hungry (or having at least lot of appetite), sitting with wonderful people at the table, ... and watching them eat the tasty pizza my wife created. These were the hardest moments this month.
  • Going to the cinema, and not buying tons of cola and nachos or popcorn, also felt weird. The smell of popcorn was very tempting, to give in. But on the other hand, I usually eat all nachos even before the movie starts, so I realized, I don't really need this, I'm just used to it.


Having experienced this all, I think I will set dinner skipping as my default. The benefits outweigh the negative aspects by far. But I will allow myself to eat dinner with friends. This is what I missed most.

And one meta-thing: Thank you guys for your support! All of the people, who read this, talked to me about this: Thank you! You're awesome. It helped me a lot to talk with you about my plans.

In February

I will drink at least two liters of fresh water each day. Coffee, Tea, Juices, Cola, Whatever, does not count. And additionally, I will not drink sweet, cold stuff, like cola or fruit juices (but I will put some sugar in my coffee). I hope it will be good for my health.

Let's bring it on!

Thursday, January 23, 2014

How to Code an Elegant Breadcrumb Navigation Menu With Arrows (using only CSS)

So, you want a great-looking, flat-design, arrow-like breadcrumb navigation? Something withoput images? Look no further!

This is what it will look like
Let's dive into:

Let's start with a simple navigation item, with links inside. We will need some extra HTML. Hence, we will insert three <span>s into each <a> element. One for the upper half of the link, one for the lower half, and one for the actual content.


<nav class="navigation">
    <a href="/start" class="active">
        <span class="upperArrowElement"></span>
        <span class="lowerArrowElement"></span>
        <span class="content">Getting Started</span>
    </a>
    <a href="/start/signup">
        <span class="upperArrowElement"></span>
        <span class="lowerArrowElement"></span>
        <span class="content">Sign Up</span>
    </a>
    <a href="/start/signup/enjoy">
        <span class="upperArrowElement"></span>
        <span class="lowerArrowElement"></span>
        <span class="content">Enjoy</span>
    </a>
</nav>

The magic happens, when we insert the right CSS. I would like first to describe, what actually happens:
We will use some fancy CSS properties to style first and second <span> to look like the arrow. The content will be displayed via span.content . The first element will need some extra style so that is has an straight vertical border.

So, let's start with the CSS:

nav {
    font-size: 13px;
}

.navigation a {
    display: block;
    position: relative;
    float: left;
    height: 32px;
    box-sizing: border-box;
  
    margin-right: 2px;
    margin-bottom: 5px;
  
    text-decoration: none;
    font-family: sans-serif;
    color: #333;
}

We will need to position the children elements by position:absolute. Because we don't want to position the arrows relative to the navigation menu, but relative to each link item, we need to set position: relative; . Another important value, that should be set is (suprprise!): height. If we set height so an uneven value, there might be ugly artifacts in some browsers (I will explain later).

Now let's go to the next point: The real arrow stuff (Hooray!)

.navigation a > .upperArrowElement {
    display: block;
    width: 100%;
    height: 50%;
    position: absolute;
    -webkit-transform: skewX(35deg);
    -ms-transform: skewX(35deg); /* IE 9 */
    transform: skewX(35deg);
    background-color: #E5E6E8;
}


This is the part where the real actions happens. We set the width to 100% and height to 50% and set the position to absolute (Therefore we need to set position of the parent element to relative).  We transform the the upper element by transform: skewX(35deg); This forms the upper part of the arrow. We really should set the height of the parent element to an even pixel number, because Firefox and Internet Explorer will leave some sort of half-pixel transparency on the top and bottom edge of the .upperArrowElement if you use skewX. The lower part, we handle analogously: We transform the bottom part in the opposite direction and position it at the bottom part of the link.

.navigation a > .lowerArrowElement {
  display: block;
  width: 100%;
  height: 50%;
  position: absolute;
  bottom: 0;
  -webkit-transform: skewX(-35deg);
  transform: skewX(-35deg);
  background-color: #E5E6E8;
}

We position also the content:

.navigation a > .content {
  display: block;
  padding: 0.5em 1.3em;
  position: relative;
  top: 0;
  left: 0;
}


When we look at the navigation bar, it looks like this:

Without straight vertical line
If you like it, you're done. But if want the vertical line, you need a little bit more CSS. But don't fear, you won't need any additional markup.

.navigation a:first-child > .content {
  left: -2px;
}

We should slightly move the content of the first link. It will look better. Trust me.

.navigation a:first-child::before {
    content: '';
    display: block;
    position: absolute;
    background-color: #E5E6E8;
    height: 100%;
    width: 50%;
    top: 0;
    left: -5px;
    z-index: -1;
}

Some explanation: We add an element to the first a. We position on the a little bit to over the left edge of the parent element and make it below the parent a (oh, yeah this is another reason we need to position the parent a: to make the z-index property work).

Aaaaand we're done! Here's the complete code, including live demo The beauty of this approach is manifold:
  • We need no images. Especially for people who don't know Photoshop, GIMP this is a big plus.
  • We need no images. Want the arrows a little bit shaper? Just change the angle. Move the ::before block a little bit to the left. Just some keystokes and you're done. Compare that to your Photoshop image replacement.
  • This is my favorite part: Hovering on the arrow links is pixel perfect. I haven't found that on the internet yet. Not even on hongkiat.com (which is usually great for such stuff).
  • Did is say, we need no images? Design in browser. Be awesome.