Todos nós sabemos alguma coisa.
Todos nós ignoramos alguma coisa.
Por isso, aprendemos sempre.
(Evreryone knows something.
Everyone ignores something.
That's why we're always learning.)
Paulo Freire
The second part, “Extending the Calculator:
Types, Names, Strings”, of this challenge was a bit easier. Just a bit! Maybe
that’s because my brain already entered in a more mathematical mode. In this
module, the biggest task was related to one of my favorited topics in math: Set
Theory. But of course it came in a different way.
Firstly, were introduced the concept of Boolean
values: True or False. The application shown on this module of those non
numerical values is to check the validity of a statement.
Next, were explained some operations used
on Java, that is basically, Set Theory with another notation. At least for me
that only have studied math until high school, the shown notation is a whole
new world.
- Negation (!a): It takes a value and deliver the opposite value. I.e. !true = false
- Conjunction (&&): This operation is the same as intersection (∩).
- Disjunction (||): This case is correlated to the union (U) in set theory.
The assignments for this operations were similar
to the ones from the last post that involved the calculator machine. But in
this time we had added the Boolean values and the new operations.
Now, the problem involving numbers too.
Later, there was some operations just to review
if the students remember the precedence rules of operators.
Then came the most challenging part. It took too
long for me to figure out why the first, the third and the last statement was
not correct. The answer is simple: It’s a proper language with a proper syntax.
Of course I commit other mistakes due to mistranslation of the term “integer”.
The literal translation of the correspondent term from Portuguese to English,
would be “entire”, and I struggle a bit because I was not considering the
integer values, but all the interval. Therefore, I’m not learning only a
programming language, but English as well.
The next part explained how to name a variable
and what a “String” is and how to do operations involving Strings.
Then we had an assignment involving the addition
and concatenation operations
Then things got real. I started to program! Of course
It was very elementary tricks. But you have to start from the base.
This last part was really fun, because we were encouraged to guess the result of the code and I did it! Of course, later I was doing modifications on the code to see what happens.
Até mais!




