The difference “” vs null vs 0

Recently as I was conversing with my young friend, he looked at some of my code and wondered why I was using a zero or null or empty string (“” or ‘ ‘ ) instead of using one wherever I wanted.

Programming is an interesting though weird or confusing discipline, especially to the novice things don’t mean a lot because most novices concentrate on the output than the efficiency and effectiveness of the output. For the mature programmers optimization is key, after all at the end of the day a user wants something working but requires less attention than something erroneous and slow.

So let’s get to it. How does null, empty string and zero differ?


First of all the similarity is of the three is that they are all values to variables and mostly used as the initial value of a variable.

Second the empty string and null will usually output nothing if printed on the screen.


Differences might be defined differently per programming language.

For example in Python there is no null but there is None which means the same as null in other programming languages.

To find out the datatype of None and other values in python use the type( ) function e.g type( None ), will return NoneType data type in python. While in JavaScript we use typeof value to find out the Data type of a value stored in a variable. i.e. console.log( typeof null ) will return object as the data type of null.

PHP 4+ we use gettype( ) function to find out the datatype of the value stored in the variable. For example gettype( null ) will return for NULL.

If you are a JavaScript novice it’s good to pay much attention to null values since they are of data type object. For example find out how object data types are treated in JavaScript before you hit a nail in your foot.


Almost all programming languages “” or ” is treated as a string and it occupies the space in memory of the size that is occupied by a string or char datatype. In fact in JavaScript if a value starts with ” even if it’s proceeded by a number or decimal it will be type cast to a string so that the resulting value will of data type string.

So be careful initializing variables with ” especially if they will be used in mathematical expressions.

In Java, Python and PHP 0 is treated as an integer whereas it’s treated as a number in JavaScript because in JavaScript integers and floats are number data types. I know most people might be wondering why not a Boolean?

Though 0 or 1 might represent false/true they are not treated boolean data types.

Why care?

It’s always good to code what a programmer and fellow programmers understand to avoid spending time in refactoring than improving functionality and optimization.

It’s also important to ship a software which will give more predictable results than not to avoid the users plucking hair out of their heads, assuming they’re wrong yet it’s the programmer is the calprit.

DataTypes determine how big your program will be and how it nay handle memory, avoid confusing by planing to code rightfully from the beginning.


This tutorial assumes you have some programming knowledge and some level of practice with the one or more of the programming languages cited in the tutorial.

The tutorial is dedicated to Were Calvin a Ugandan African motion graphics designer and emerging front-end developer practicing at Gagawala Graphics limited.

Die Sache mit Social Media, dem Profilfoto und der Bio

Ich habe nach längerer Zeit mein Profilfoto gewechselt. Das letzte Foto hat immerhin mehr als fünf Jahre gehalten. Bei der Gelegenheit habe ich auch meine „Bio“ verändert. Oh, und ein Hintergrundfoto braucht es ja auch … Auf dem Foto mit dem Kochlöffel rühre ich übrigens in einem Käsefondue, die Hintergrundbilder stammen aus Jordanien, aus Qatar …

The post Die Sache mit Social Media, dem Profilfoto und der Bio appeared first on Hagen Graf.

The Spirit of Cycling in Kenya.


Cycling in Kenya is becoming quite popular. Many people are quitting the gym for physical outdoor activities like jogging and cycling because of the allure they come with. The upside of cycling is that it comes along with fun activities such as bird watching, picnicking and traversing the country in general.

Listed below are some of the places you can go cycling in Kenya with friends and family:

1. Karura Forest
Located in the outskirts of Nairobi CBD, Karura Forest is one of the most popular joints for cycling in Kenya. Karura Forest offers a quiet clean and organised biking trail, away from oncoming cars and the hustle that the city life is.
Bring your mountain bike and join other Nairobi cyclists in the designated bike paths, which range from 5-15 km. You can alternatively hire a bike at Karura for KES 500 per hour, daily from 8 am – 5 pm, at the bike depot next to the tennis court. Karura Forest has other activities you can take part in once you are tired of cycling. Enjoy dog walking, nature exploration and tree building with the rest of the family.


2. Rusinga Island
One of the greatest perks of cycling in Kenya is you get to traverse the country. Rusinga Island is located in the legendary Lake Victoria. The island boasts breathtaking sunsets and quiet hills, what most cyclists will describe as a perfect cycling setting. A Rusinga Island cycling trip is perfect for those getaway trips you always plan with friends and family. Enjoy cycling, camping, island exploration, hiking and boat riding as you make lifetime memories. You can also explore the neighboring Mfangano Island and Mbita Town.


3. Hells Gate
There is no better way to explore the Hell’s Gate National Park than on a bike! Hell’s Gate National Park is located approximately 90 km from Nairobi. Don’t worry if you don’t own a bike of your own, there are bikes for hire at the gate. The riding trails cover from 15 to upto 40 km. Enjoy panoramic views of the gorges, towering cliffs and diverse wildlife as you test your fitness. Cycling at Hell’s Gate also offers amazing photo opportunities because of the background. You can do a little reinaction of the Lion Kingwhile you are at it! Hell’s Gate National Park also has a natural spa where you can dip yourselves and enjoy a swim after the ride.


4. Lake Magadi
This is for the starry-skyed lovers, the dreamers. Lake Magadi and its environs are characterised by untamed expansive savanna, shrubs, hot springs and the at-times pink lake. This biking trail ideally starts from the foot of Ngong Hills, all the way to Lake Magadi, approximately 80 km long, making it ideal for a weekend bike safari.
The trail is one of the most dusty ones you will come across while cycling in Kenya. We advise you to carry dust muffs. The upside of the trail is that it will be worth it once you are done, when you get to enjoy a therapeutic swim in one of the hot springs and some of the best nyama choma in the world!


5. The Forest
This is for the adrenaline junkies! If you haven’t yet visited The Forest, try cycling there this year. Located in Kereita, Nyandarua, The Forest is perfect for team building, whether for corporate, friends or family. Cycle through Kenya’s history (the mass grave of the 1952 Lari Massacre), magnificent waterfalls, caves, animals and birds, and of course, Aberdare’s very own forest canopy. Other activities offered at The Forest that you can take part in include zip-lining, paint balling, archery and fly fishing.

Join bikers who are cycling in Kenya and keep fit this year, as you enjoy the beautiful scenery our country has to offer. Miles and hope will be doing their yearly tour this year. You can follow us up on facebook extramilersicc or visit our website


Snow, family and a headache

This is going to be a short one cause I am currently having a headache and I should probably sleep it off. Also, how do people with regular headaches do this? I get a headache maybe once a year, twice max, and it is literally knocking me out and I am pretty sure it is…

Kölle alaaf

Here comes my short report on how I spent Karneval 2018 in Cologne. 

I tried to hide myself in my apartment the whole time, but had agreed to celebrate Karneval on Rosenmontag with my colleagues, that’s when the big carnival parade in Cologne takes place.

We met on Monday, 12th of February, for a late breakfast in the office to have a good start, a full belly and some beers before going out to the street carnival. We went as a group of 8 people, that means, my yellow M&M partner, me as a blue M&M, a strawberry, a frenchman, a man dressed as a woman, a frog lady, a computer nerd and a guy with a lot of accessories that made no sense together.

We went out into the cold at around 11.30 am to watch the parade…

(a little politics during the parade, the best part of it, in my opinion)

…and work our way through all the people to find a place to go inside, warm-up and have some more beers. Yes, drinking beer when celebrating Karneval is essential. No way around it.

(baguette telephone, very important)

We found a brewery and stayed there for a while and then headed to another bar a few kilometres away. When we started at the office, it was cold outside, but the sun was shining, but by the time we walked to the next bar, there was something like a snowstorm coming up, we couldn’t see properly and when we arrived at our destination, we were soaking wet.

We arrived at the bar at 4pm and stayed there until around 9pm, when all of us were drunk enough to call it a day.

Until then, there was a lot of dancing, drinking, crying, laughing and feeling nostalgic. Something I didn’t think it would happen for me, as Cologne is not my home town. But there was a reason that I wanted to celebrate this year, as it marks my tenth year in Cologne. So when listening to sentimental carnival music and holding onto the frog lady to your left and your M&M buddy to your right while having a little tear in your eye, maybe that makes you a Kölsche Mädche, a girl from Cologne.


Da brauchste Nerven wie Drahtseile

Die letzte Woche war vollgepackt mit so vielen unterschiedlichen Arbeiten, Tüdel und organisatorischem Kram, dass ich am Freitagabend nicht das Gefühl hatte irgendetwas wirklich geschafft zu haben. In solchen Momenten fällt es mir schwer freundlich zu sein. Die teilweise völlige Abwesenheit von Kundenorientierung in hiesigen Baumärkten wirkt da eher wie ein Katalysator für meine zunehmende ...

The post Da brauchste Nerven wie Drahtseile appeared first on Christine Graf.

Laatste nieuws omtrent verkeerswet Frankrijk

Hier geven we een opsomming van de laatste aanpassingen van de verkeerswet in Frankrijk!
In Frankrijk is de verkeerswet een beetje strenger geworden. Niet alleen het bellen of berichten versturen achter het stuur is verboden, automobilisten mogen vanaf nu helemaal geen telefoon meer in de hand houden. Ook niet langs de kant en met de motor uit.
De regel is ingegaan na een uitspraak van het Franse hooggerechtshof. De Franse krant Le Figaro meldt dat de uitspraak past in de strengere regelgeving in een poging om het stijgende aantal verkeersdoden in het land aan te pakken. De invoering van het puntenrijbewijs strengere snelheidscontroles gingen aan deze maatregel vooraf.
Volgens de rechtbank kan er maar één uitzondering zijn, en dat is het bellen van hulpdiensten na een ongeluk. Fransen die betrapt worden riskeren strafpunten en een boete van 135 euro. Deze boete wordt ook opgelegd aan buitenlanders die worden betrapt.
Frankrijk verlaagt de snelheidsbeperking buiten de bebouwde kom. Op wegen zonder middenberm geldt vanaf 1 juli 2018 een limiet van 80 km/h.
Ondanks grote weerstand bij de bevolking (60 procent is tegen) gaat de Franse regering de algemene snelheidsbeperking buiten de bebouwde komt verlagen. Vanaf 1 juli van dit jaar mag je er op secundaire wegen zonder middenberm niet harder dan 80 km/h. De nieuwe limiet geldt voor ongeveer 400.000 kilometer wegen. Eerste minister Édouard Philippe heeft nog niet verduidelijkt of de verlaging met nog eens 10 km/h bij regenweer ook op die wegen van kracht blijft. Hij belooft echter wel dat als de maatregel niet het verhoopte resultaat oplevert, ze in 2020 weer zou kunnen worden afgeschaft.
Lees ook nog even ons vorig bericht Belangrijke algemene verkeersregels in Frankrijk
Via onze blogs willen we onze gasten steeds zo goed mogelijk informeren!

Summary of the week from 05.02.2018

True Iron Bloggers:

Adedayo Adeniyi (@daydah) in {‘Decades’: ‘Chunks of Time’} :
David Opati Aswani (@susumunyu) :
Christine Graf (@christinegraf) :
Hagen Graf (@hagengraf) :
Dick Olsson (@dickolsson) :
Lena Roohnikan (@lerooco) :
Isa Schulz (@murgeys) :
Harry Tilley (@tilleyharry) in Tilley France Blog :

The lazy ones:

Eliminated because of excessive debt:


this week: 0 €
total: 140 €
payed: 0 €
spend: 0 €


  • Harry Tilley (@tilleyharry) – 30 € or 6 good deeds
  • Lena Roohnikan (@lerooco) – 25€ or 5 good deeds
  • Adedayo Adeniyi (@daydah) – 20 € or 4 good deed
  • David Opati Aswani (@susumunyu) -20€ or 4 good deeds
  • Hagen Graf (@hagengraf) – 20 € or 4 good deeds
  • Christine Graf (@christinegraf) – 10 € or 2good deeds
  • Isa Schulz – 10€ or 2 good deeds
  • Dick Olsson – 5€ or 1 good deed

Previously retired (all debts paid – can come back for free):

  • Juergen Rinck (since 26.06.2016)
  • Daniel Roohnikan (since 17.04.2017)

Previously retired (must pay 30 € for the re-entry):

  • Joeri Poesen (@jpoesen)  (since 10.07.2017)
  • Osbert Mwijukye (since 03.04.2017)
  • Moein Rezaei (since 26.06.2017)
  • Jonathan Rukundo (since 13.03.2017)
  • Shedy Serem (since 16.01.2017)
  • Manfred Gosch (@1aolivenoel) (since 23.10.2017)
  • David M.Wampamba (@idesignwebs) (since 29.01.2018)

Another MSG-free Sundaylunch served

via Instagram
Another #MSGfree #Sundaylunch served. Thanks @abosede.sobodu and @seuntaylor for the inspiration. That #goatmeat sauce though...wish I could lick the pan without raising eyebrows 😂 #FastRepost from @abosede.sobodu by @fastrepost_app ••• Feeling a little under the weather today but that didn't stop us from having an awesome lunch of crepes with some goat meat sauce. Thanks @jibirises . Join us pls.... #crepes #lunch #sunday #foodie #brunch #sunday #goodfood #goodafternoon #pasta #healthyfood #foodlover