Tag Archives: culture

Calculating Your Level of Naughtiness

To motivate his students, a computer science teacher of the Federal University of Ceará has challenged his class to develop an algorithm to calculate how naughty you are based on your birth date. The challenge is very silly, but it became a Brazilian hit.

The teacher said his original intention was to teach students to call functions from other functions, which is as much silly as the goal of the challenge, but no doubt that the idea is pretty effective on motivating young students.

safadao_questao_materia

The problem consists on writing a function that calculates the percentage of naughtiness and the remaining level of innocence of a person based on his/er birth date. The formula to calculate the level of naughtiness is:

naughtiness = incremental_sum(month) + (year / 100) * (50 - day)

where incremental_sum is a function that, given a number, calculates de sum of all numbers from 1 to the informed number included. The solution below is written in Clojure:

(defn inc-sum [num]
  (reduce + (range (inc num))))

(defn naughtness [day month year]
  (let [naughty (+ (* (- 50 day) (/ year 100.0)) (inc-sum month)) 
        angel (-  100 naughty)] 
    {:naughty naughty 
     :angel angel}))

(naughtness 10 9 78)
=> {:naughty 76.2, :angel 23.8}

The formula has absolutely no sense and doesn’t have any scientific foundation, but the result of the function is great fun to play with friends! Maybe the subject can push you to learn Clojure, doesn’t it?! 😉

Great Experience at Frankfurt Airport and with Lufthansa

With all those crazy things going on all around the world these days, I believe sharing good news may help to compensate with good vibes all the negativity out there. It’s a good thing to recognize good actions made by people around us.

Having said that, I devote this post to send a big thanks to Frankfurt Airport and to Lufthansa Airlines. I don’t know how these companies are evaluated by their customers in general. Perhaps, we were simply lucky, but what has happened and the way we were treated are worth spreading.

We arrived at Frankfurt Airport in an United Airlines flight coming from the US (I have nothing to say about this company btw :-/). We were three: My wife, my one year old boy and I. The airport is enormous, but it couldn’t be easier to get directions inside. We experienced good accessibility carrying our baby’s stroller, with a negligible delay in comparison to other ways.

Everybody was genuinely gentle, from the immigration to the arrival in Brussels. No silly jokes, no excessive friendly behavior, just fine 🙂 That was the first contact we had with those people, thus they have no reason to exceed kindness, unless they were selling a false image of the company, which they didn’t. We actually felt relaxed dealing with those people. We needed that after a exhausting 8 hours flight from the US.

Our baby arrived at the airport sleeping and stayed like that until Brussels. That’s what I call the smoothest flight connection ever 🙂 The baby spaces are separated from the toilets and they are accessible within a range of 50 meters maximum. The security check has a special track for people with strollers and wheel chairs. We followed the procedure calmly and fast 🙂  All that is so convenient!

Even things that rarely work were working that day 🙂 We didn’t have our seats marked in the flight to Brussels due to some technical problems during the reservation. We were afraid to have seats far from each other and be forced to negotiate rearrangements within the airplane. Fortunately, the attendant managed to put us together. It never happened before! I may admit we were lucky 😉

It couldn’t be better until the boarding time when our expectations were exceeded! A lot of first and business class people around and the attendant called us to be the first ones to enter in the airplane. She called us out loud using the microphone and explained to other passengers that the baby would require some extra effort during boarding and it would help to gain some time after all. I call it intelligence and good judgment because that’s exactly what I would do in her shoes 🙂

Unfortunately, many airports out there banned such practice, which is the case of Brussels Airport and Washington Dulles, the ones we have been with our baby. Those airports following such stupid rule should give attention to families with babies and people with disabilities because this is not a privilege to a minority, but a necessity. They ignore the fact that it’s tough to travel with a little baby. Thanks to Lufthansa, we arrived very relaxed in Belgium, with a big smile on our faces 🙂

My Favorite Steve Jobs’ Lesson

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary” – Steve Jobs (1955 – 2011)

R.I.P. Steve Jobs.

Creative Solution to Keep Business Running Under Special Circumstances

Rue du Luxembourg, Brussels, around 7:20 in the morning, going to work. A drugstore was under complete renovation. It wouldn’t be open for customers… unless they put the drugstore in a special container and place it on the sidewalk just in front of it 🙂

If you are planning to renew your business, take some time to think about a creative solution to keep it running.

Real Social Values that We Can’t Find on Facebook

Every working day, my wife and I go walking from home to the train station very early in the morning. Sometime ago, there was a singular thing on the way that caught our attention: a litle “burnt yellow” pumpkim was beautifully growing in the garden of a house in the neighborhood. Over the next 3 months we patiently followed the growth of that pumpkim, which was slowly becoming gorgeous.

Day after day, the temptation to take that away was inevitably increasing. However, the romantism of that rare scene of mutual trust between the residents and passersby was bucolically charming, surrounded by a scenario of a calm small town on the countryside of Belgium.

When the pumpkim was finally looking ripe, the residents put a lovely message for those of us who resisted to that daily temptation.

The message translated from French was:

“Our pumpkim is ready to be eaten…. Thanks to all people who gave a benevolent look and resisted the temptation to take it. So, come and enjoy a good pumpkim soup among neighbors this Friday, August 19th, from 7 p.m.! Everyone is welcome.”

That’s a great example of social interaction that is rare to see nowadays. It comforts me, makes me believe that real social interaction is far more valuable for life than the digital ones, like Facebook and Google+.