LUA Programming

All

Intro

Hey boy, just use this Lua script and everything will be ok on your game. It’s all embedded!

Lua

An interesting tutorial about Lua embedded is [1]. So cool to learn about embedding Lua in C and C++. The code below, from the same source, is so simple and prints:

The average is  30
The sum is      150
#include <stdio.h>

#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"

/* the Lua interpreter */
lua_State* L;

/* The function we'll call from the lua script */
static int average(lua_State *L)
{
        /* get number of arguments */
        int n = lua_gettop(L);
        double sum = 0;
        int i;

        /* loop through each argument */
        for (i = 1; i <= n; i++)
        {
                if (!lua_isnumber(L, i)) 
                {
                      lua_pushstring(L, "Incorrect argument to 'average'");
                      lua_error(L);
                }

                /* total the arguments */
                sum += lua_tonumber(L, i);
        }

        /* push the average */
        lua_pushnumber(L, sum / n);

        /* push the sum */
        lua_pushnumber(L, sum);

        /* return the number of results */
        return 2;
}


int main ( int argc, char *argv[] )
{
        /* initialize Lua */
        L = lua_open();

        /* load Lua base libraries */
        lua_baselibopen(L);

        /* register our function */
        lua_register(L, "average", average);

        /* run the script */
        lua_dofile(L, "average.lua");

        /* cleanup Lua */
        lua_close(L);

        return 0;
}

REFs

[1] https://debian-administration.org/article/264/Embedding_a_scripting_language_inside_your_C/C_code

Note taking (Do what I say, not what I do)

All

Intro

   I remember I taking notes on google docs and one collegue, just before leaving back to the UK, suggested BoostNote, which is quite interesting indeed.

BoostNode vs Google Docs

   I personally think BoostNote is great and everyone should use it actually, however, I myself will continue to work with my Google Docs, I just don’t want to bother about migrating one to another, all that thing. But here is a good tutorial [1]

Ref

[1]: https://www.youtube.com/watch?v=L0qNPLsvmyM

Information is useless without sharing

All

Intro

Listening to Seu Jorge, a Brazilian guy from Rio de Janeiro, I came to this song below. It’s called Ze do Caroco and talks about a guy in 70’s that actually developed a sound system in his Slum, aka favela, to broadcast good things of the people of their people. He used to broadcast exactly during the soap opera, aka novela, since those days these shows only used to portrait bad info about favela’s people. The song also claims there should be another person like this, going against bad reputation/news from the MAIN media groups.
Later Zeh do caroco was denounced by a neighbour since this person couldn’t watch the soap-opera!

Information is useless without sharing

I think one of the main reasons I created this blog was not to share some of the content I’ve been learning those last years in my field. From Performance to Paulo Freire, information is only knowledge when shared.

I would like also to thanks my college and close friend, Gabriel Alabarse, for all his all on our projects. Although since 2015 we don’t live in the same country, Canada vs Germany, we work close to spread this content for all the people.

REF

Extreme flexible word order

All

Intro

The English/pt/francais sentence structure is a bit rigid when you start learning languages with declination, like German, Russian or Arabic. They are extremely flexible, you can pretty much paint with each sentence. But at the same time, it makes the learning process more difficult.

Rules

A simple structure in German can have at least 4 ways to write:

Standard: SUBJ + OBJ + PRED Dir + PRED ind

German way:

SUBJ + VERB+ OBJ + PRED Dir + PRED ind

OBJ + VERB + SUBJ +PRED Dir + PRED ind

PRED Dir+VERB + SUBJ + OBJ + PRED ind

PRED ind + VERB + SUBJ + OBJ + PRED Dir +

regel 1:

If a modal verb is used – for future, past, or obligation – the main verb must be at the end: verbklasser.

regel 2:

if anything other than the subject comes on the first position, the pronoun must be in the third position!

So with those two rules, basic sentences can be built.

REFs

My German teacher, Lena.

TCL Language

All

Intro

Working a bit with TCL now and it’s actually a very interesting language and has a C like similar syntax. But is very powerful and you can define classes.

TCL

CLASS END_MILL_NON_INDEXABLE 
      {
        TYPE QRY
        QUERY  "[DB(SubType)] == [01]"
        FILE "qry=shank_mill_schema;rset=shank_mill_schema;" 
        DIALOG libref Diameter FluteLength CorRadMill TaperAngleB TaperedSDia Material Holder Descr
        RSET   libref Descr Diameter FluteLength CorRadMill TaperAngleB TaperedSDia MaterialDes HolderDes HolderRef
        UI_NAME "End Mill (non indexable)"
      }

Code from [2].

 

Ref

[1] https://www.tcl.tk/about/language.html

[2] https://docs.plm.automation.siemens.com/tdoc/nx/12.0.1/nx_help/#uid:xid390955

Event Tracing Windows or ETW

All

Intro

I remember when I went to a meeting on Google Montreal about ETW and tracing on Windows. The spearker was

ETW

It is the official tool for kernel tracing in windows platform developed by Microsoft. This allows the user to see call stacks and analysis system calls.
IU for ETW

It is the ETW but with some user interface features to improve ETW.

Tutorial

Bruce Dawson have done an amazing  tutorial, with videos al all here [2]

More info here

[1]here: https://msdn.microsoft.com/enus/library/windows/desktop/aa363668(v=vs.85).aspx

[2] https://randomascii.wordpress.com/2014/08/19/etw-training-videos-available-now/

Infinitive Clauses and Jenny

All

Intro

   I like to study German using Jenny’s materials at, Learn German With Jenny’s [1]. She explains very well and have many many examples! Sometimes I need to watch it several times to understand the content in full, but this is because it’s complicated and it’s difficult to memorize it actually. But I also use [2] for deep explanations.
So today in the morning I was reading a book, , and I found this zu lost in the sentence and I think that’s the reason

Infinitive Clauses 

The example below is from [2]. {From what I understood.} In infinitive clauses, it’s basically implied the grammar subject and therefore the verb can not vary! We need the first clause to understand the context and deduce it’s meaning. {I always put From what I understood because it might be a little different in the end}
Es wundert mich, meine Mutter hier zu sehen.
It surprises me to see my mother here.

The second sentence depends on the first, but they are combined in the infinitive form. The infinitive clause is in the infinitive because of the reasons already explained above.

Refs

[1]: https://www.youtube.com/watch?v=HwxJilMaCuU
[2] http://www.dartmouth.edu/~deutsch/Grammatik/WordOrder/Infinitives.html

Scientific Method

All

“The seeker after truth is not one who studies the writings of the ancients and, following his natural disposition, puts his trust in them,” the first scientist wrote, “but rather the one who suspects his faith in them and questions what he gathers from them, the one who submits to argument and demonstration and not the sayings of human beings whose nature is fraught with all kinds of imperfection and deficiency. Thus the duty of the man who investigates the writings of scientists, if learning the truth is his goal, is to make himself an enemy of all that he reads, and, applying his mind to the core and margins of of its content, attack it from every side. he should also suspect himself as he performs his critical examination of it, so that he may avoid falling into either prejudice or leniency.”
                                                                                                                         – Ibn al-Haytham

One of the fathers of the scientific method: 

1 – Observe an

2 – Ask a question
3 – Try to explain with an hypothesis (aka explanation)
4 – Design Experiment
5 – Test hypothesis using a prediciton – result of observation + hypothesis
6 – Abandon the hypothesis and create another OR keep testing

Ref

[1] https://www.khanacademy.org/science/high-school-biology/hs-biology-foundations/hs-biology-and-the-scientific-method/a/the-science-of-biology

Interviews/expectations

All

Intro

A close friend of mine recently got a job in a company that I was interviewed to work with. Actually, I managed to pass all the stages of the process and got to talk to the hiring manager in the last interview.

This was back in Sao Paulo, in 2014 and some days before this final interview I found more information about this Spanish company. Yup. Anyways, the process was in English but also in Spanish – mine is not good sorry. I found that the gap between a worker in Sao Paulo and another in Madrid, where the company has its HQ was huge. I mean, the difference was really undeniable.
With this information in hand when I started to talk with the hiring Manager, I explained to him that I thought it was not far and that we should earn the same amount of money. I knew the taxes are higher in back in Brazil but it does not explain that gap.
He argued saying that an average worker in Sao Paulo would have less productivity and therefore they pay less. I counter argue that it was not my case and they should, therefore, use a compensation scheme/bonus instead of paying less for the same employee in two different locations of the company. They do the same thing, they should be paid equally (taxes aside of course)

I remember I left the company that day knowing that they would not call me and this was confirmed later. But I disagree I should have accepted working for them for less.

I’m very glad we disagreed that day. Later on, that same year, I started working at Agile Solutions – which had projects with SAP – and was accepted to do my graduate studies at Dorsal Lab.

Your CV vs your profile 

The main point of this short history is to trust in your guts, work hard, make the difference and your profile will shine eventually. It does not matter the place, your profile will break through the invisible walls that divide people, e.g. citizenships and others non-meritocratic measurements of success.
Your CV is part of you but it does not represent you and all your skills as a person. Keep working hard.

Ref

[0] NRTT

MPX Project

All

Intro
After entering the university I quite realized that people didn’t have the same opportunities for getting into the not-paid universities the same way I did (Actually, I didn’t pass the <vestibular> I managed to enter a private institution with a scholarship).
But anyways, after realizing this I started a volunteer job as the teacher of physics in an NGO back in Sao Paulo, 2012. Uneafro, which was a dissident part of EduCAFRO.
MPX

So years later, while remembering all this situation I came to the conclusion that I could help people in some way. Therefore I developed the MPX Project, which is to give the public access to pre-university/university content to the common public without paying for it. You would need only to subscribe and that’s it.
MPX is, therefore, this initiative for creating a public platform for content with videos, tutorials, and exercises for people.
I started developing it using Moodle and created a WordPress web-blog to post more about its development. Although is slow nowadays I didn’t stop it actually. I tested for installations but I’m still developing the platform itself.

Later on/now the problem is to find reliable content to be uploaded not just for my field, computer science, but also for other fields. I contacted some NGO’s and they are open to MPX platform.
Moodle

Moodle is this online open source platform for teaching. It’s actually quite nice and it’s developed in modules. So your Moodle installation might have more or fewer modules according to your needs.
I hope to have it working, at least partially in 2019!

REFs

[1] Moodle