Blog | Diogo Peralta Cordeiro

Passionate about the surrounding nature.

Talk: IndieWeb and Decentralised Social Networks

March 29, 2021 — Diogo Peralta Cordeiro

Nesta palestra vamos introduzir a IndieWeb e os seus princípios chave. Será dado aqui um foco especial às redes sociais descentralizadas e distribuídas.


Slides: https://www.diogo.site/projects/talks/IndieWeb/IndieWeb_and_Decentralised_Social_Networks.pdf

Grande parte das pessoas com que falamos, da média que consumimos, e dos serviços que procuramos, são encontrados por meio de redes sociais. Aos utilizadores, essas plataformas oferecem serviços simples e usualmente gratuitos para o envio de mensagens públicas e privadas, a possibilidade de se manterem a par das notícias e de promoverem o seu negócio.

Mas os serviços corporativos e centralizados existem com um custo pessoal e social. Estas plataformas não são neutras como o resto da internet. Não lidam com todas as mensagens que recebem da mesma maneira. Parte do modelo de rede social corporativa é dar a algumas mensagens tratamento preferencial em relação a outras, ou seja, há um viés percetível em relação a quem paga.

As pessoas têm uma quota de atenção que podem dispensar todos os dias, e as empresas decidem o que elas não podem ignorar com base no que lucram.

A rede livre não se prende ao que uma única ou um conjunto de empresas deseja fazer - em todos os sentidos. Isso significa uma oferta mais ampla em termos de design, usabilidade e experiência do utilizador, em termos de tecnologia, ética e cultura.

As pessoas podem não só utilizar a rede livre como uma rede social tradicional, mas também podem integrá-la com outros serviços, como partilha de vídeo ou imagens. Tudo sem o receio de monetizarem os seus dados ou traçarem um perfil de atividade.

Mudar de redes sociais fechadas para a rede livre contribui para a privacidade e confiança, permitindo que os utilizadores entendam e controlem quem vê os seus dados. A rede livre é também mais resiliente do que uma única rede social centralizada pode ser.

  • Esta palestra foi dada no NuCC UPdate 2021-02-11 @ 10:00-11:00

Sobre a Oferta Formativa na área da Computação em Portugal

May 08, 2019 — Diogo Peralta Cordeiro

Este blog post é uma transcrição de uma mensagem que escrevi em resposta a algumas questões sobre a organização dos cursos na área da Computação em Portugal por parte de um estudante do secundário.

Então, a explicação que se segue é baseada nas definições da ACM (Association for Computing Machinery).

Cursos populares de primeiro-ciclo na área da Computação disponíveis em Portugal:

  • Computer Engineering = Engenharia Eletrotécnica e de Computadores
  • Computer Science = Ciência de Computadores
  • Computer Information Systems (USA) | Computing (UK) = Engenharia Informática (often referred as "Informatics" world wide)
  • Information Technology = Tecnologia de Informação
  • [Business] Information Systems = Informática e Gestão
  • Cybersecurity|Computer Information Security [Engineering] = Segurança da Informação

Pela ACM, Computing é o termo que se usa para englobar todas as "coisas" que dizem respeito à Computação (todos os cursos relacionados). Infelizmente, no UK usam Computing para isto e para Informática, which is unfortunate and confusing xb

Cursos não disponíveis no 1.º ciclo (licenciatura) em Portugal mas também populares:

  • Software Engineering = Engenharia de Software
  • Computational {Science,Engineering}|Scientific Computing = Engenharia Computacional

Cursos aparentemente já não disponíveis em Portugal (em qualquer ciclo):

  • Information Engineering = Engenharia da Informação

Objectivos destes cursos

Engenharia Eletrotécnica e de Computadores: Foca-se em engenharia de Hardware/Sistemas de Computadores. Inclui fundamentos de engenharia eléctrica, electrónica, telecomunicações e automação.

Ciência de Computadores: Teoria e Fundamentos de Software com rigor científico. Concentra-se em desenhar e construir software que seja correcto, seguro e eficiente. Este curso prepara-te para resolver os mais difíceis problemas algorítmicos da melhor forma possível. Muito resumidamente, aprende-se acerca dos fundamentos e modelos que tornam a computação possível, a complexidade que caracteriza os problemas que podemos formalizar num computador e as estruturas de dados e algoritmos mais indicados para os resolver.

Engenharia de Software: Desenvolvimento e Manutenção de Software em equipa conforme os requisitos especificados por uma empresa, o ênfase é dado ao frontend e à user experience.

Engenharia Informática: Foca-se em perceber/detectar as necessidades de uma empresa (processos que poderiam ser automatizados) e em integrar sistemas de informação existentes. Ensina-se programação, um pouco de gestão e marketing e fundamentos básicos de engenharia e computação. (A variação de gestão - Informática e Gestão - troca a engenharia por mais gestão)

Tecnologia da Informação: Este curso prepara as pessoas para trabalharem em departamentos de informática das empresas e em helpdesking.

Conclusões

Assim, por exemplo, na construção de um robô (supõe um humanoide com o objectivo de simular um humano):

  • O Cientista de Computadores e o Engenheiro de Informação desenvolvem o sistema inteligente (o primeiro mais dedicado à parte da inteligência artificial e o segundo à interpretação dos dados que recebe pelos sensores do humanóide);
  • O Engenheiro de Computadores desenha os circuitos integrados (processadores) e seus drivers;
  • Tipicamente, Engenheiros de Informação, Engenheiros Computacionais, Engenheiros Eletrotécnicos e de Computadores, [Engenheiros] Físicos e [Engenheiros] Matemáticos [Aplicados], em conjunto com os Cientistas de Computadores, desenvolvem o software para manter este humanoide equilibrado, executar seu movimento e receber informação do mundo real.
  • Os Cientistas Computacionais (percurso de Física) tratam depois de fazer a simulação destes robôs antes de estes realmente serem manufacturados, evitando-se assim custos desnecessários. Do mesmo modo, os Cientistas de Computadores provam a correção do código desenvolvido dentro do possível atendendo aos constraints implicitos pela natureza do sitema.
  • O Engenheiro de Software faz o app que permite controlar tal robô remotamente;
  • O Engenheiro Informático integra este robô nos sistemas de informação das empresas que o querem utilizar;
  • O Técnico de T.I. resolve problemas que possam surgir com o robô no contexto da sua utilização numa empresa.

Não falei sobre alguns dos cursos em detalhe porque, ou são self-explanatory, ou não estão disponíveis a nível de licenciatura em Portugal.

Podes dizer que: "Mas há claramente vários engenheiros informáticos que também fazem apps ou que trabalham no helpdesk de empresas", sim, é o caso de muitos, mas isto é porque os cursos costumam ter percursos de especialização e/ou minors. E um dos percursos de especialização mais populares em Portugal é precisamente Engenharia de Software. Nunca é igual a fazer um curso de Engenharia de Software - pois o major do curso é diferente - mas já permite exercer tal profissão.

Uma grande parte dos Cientistas de Computadores, depois da licenciatura, faz especialização e/ou mestrado em Engenharia de Software ou em Segurança da Informação. Alias, a maioria dos engenheiros de software e segurança são precisamente pessoas que realizaram este tipo de percurso académico (isto nos outros países, em Portugal a maioria é engenharia informática).

Assim, nota que, conforme as escolhas que fizeres de curso e no curso, podes seguir diferentes carreiras em função do que tiveres mais interesse, não é tudo preto e branco e isto só expõe o fundamental a ter em mente na escolha de um major a nível de licenciatura, o resto depois eventualmente descobres quando já estiveres dentro da área. Ou perguntas-me e eu escrevo mais um post ☺

Para te dar um exemplo de um percurso pouco comum em Portugal (mas possível): Eu estou a fazer a minha formação base (major) em Ciência de Computadores e minor em Matemática. E estou ainda a realizar um treino suplementar em Física, Robótica, Sistemas e Controlo. Assim, isto sugere que a minha actividade profissional futura seja dentro desta área.

Referência: https://www.acm.org/binaries/content/assets/education/computing-disciplines.pdf

Algumas notas finais

Science vs Engineering vs Technology

Science: Studies the underlying theory that models the world, unleashing its possibilities (through the interplay of theory and experiment).

Engineering: Designs and manufactures products using concepts of science and technology in a systematic way.

Technology: Addresses the society's needs with the integration of the available products. Implements the things that engineers designed.

Applied Science: When science is used to solve complex scientific and technical problems.

Universidade vs Politécnico

Universidade: Aglomerado de instituições de ensino superior onde se espera interdisciplinariedade e uma abordagem académica.

Politécnico: Aglomerado de instituições de ensino superior onde se espera interdisciplinariedade e uma abordagem orientada ao mercado.

Instituto vs Faculdade

Instituto: Local onde o ensino é feito de modo prático.

Faculdade: Local onde o ensino é feito de modo teórico.

HaP Seminar - A Tour of ActivityPub

May 08, 2019 — Diogo Peralta Cordeiro

UPDATE

I'll be doing a seminar on ActivityPub this 2019-05-17 starting at 15:00:42h in FC6-0.29 (Anf. 2), Department of Computer Science - Faculty of Sciences of the University of Porto, 4169-007, Rua do Campo Alegre 1021, Porto.

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and content.

In this Talks@DCC, we will go for a small tour through the history of the Fediverse, the context in which ActivityPub was introduced, the internals of its implementation among other challenges we find on the software and networks engineering of a federated social network.

Major topics to be covered during the seminar:

  • The IndieWeb
  • Briefing of OStatus
  • WebFinger
  • ActivityStreams
  • Overview of the Actor model
  • ActivityPub

At the end of this journey, we should be able to better understand some of the advantages of this kind of social platforms as well as some of the technical complications in their maintenance and conception.

What is the Fediverse?

January 19, 2019 — Diogo Peralta Cordeiro

The fediverse, a portmanteau of "federation" and "universe", is part of the IndieWeb and consists on a decentralized social network that started with GNU social. Nowadays there are various pieces of software, other than GNU social, in the fediverse, like Pleroma and Mastodon, (all of which can be installed on your own server).

The fediverse has grown to have its own culture and is relevant because, quoting IndieWeb.org: * When you post something on the web, it should belong to you, not a corporation; * Your articles and status messages can go to all services, not just one, allowing you to engage with everyone; * You can post anything you want, in any format you want, with no one monitoring you.

What does it mean to be decentralized in the fediverse context?

Before getting into that, let me just quickly familiarize you with the term Actor from the ActivityStreams 2.0 vocabulary, Actor is someone or something that makes an action: https://www.w3.org/TR/activitystreams-vocabulary/#actor-types.

Each node (a.k.a.: instance) of the network provides content and helps peers to see each other, content is available in the network as long, and to whom, its actor wishes, even if the actor (and/or the actor's node) is offline. In order to this be possible, each node hosts "all" the external nodes addresses and "all" their content (not really "all", just the relevant for the actors involved). Actors send their content to a node and this becomes immediately available to all actors connected to the node, and is distributed to "every" other node (again, not every, it is distributed through the fediverse as it makes sense).

When local actors (actors in the same node) participate in discussions with external actors (from other nodes) or simply subscribe to external actors' content, their node push that content to the relevant other nodes and eventually makes it available to all the connected actors. That selective node-based distribution creates, inside the global network, a more or less extended local aggregation that is called the fediverse.

If this arose your interest, there are various public GNU social nodes for you to try, I'm on LoadAverage!

A brief technical history

At present, there are three super-networks in the federated social communication space, and they run on different protocols. They are known as The Fediverse, The Federation and The ActivityWeb. While these super-networks function in similar ways and even have similar aims, they each come from a different history of development, and by extension, a different stack. The overlapping series of networks can be referred to in macro as The Free Network.

The Fediverse has historically operated as a micro-blogging network, and uses the OStatus protocol for servers to communicate with one another. It was introduced around 2010 and pulls together different platforms, namely: GNU social (and the fork postActiv), Friendica, Hubzilla and Pleroma. Mastodon used to support but has recently dropped. Pleroma won't maintain anymore and may drop in the future.

The Federation has begun in 2010 with servers that only ran Diaspora. Structurally, Diaspora functions more like Facebook: it supports long-form content rather than short-form, and every post has a designated thread for comments. It also supports private statuses and an inbox for direct messages. In all, it pulls together different platforms, namely: Diaspora, Friendica and Hubzilla.

The ActivityWeb was introduced with ActivityPub around 2018, based in Pump.io's ActivityPump protocol, it pulls together different platforms, namely: Pump.io, Mastodon, Pleroma, Pixelfed and Nextcloud. GNU social support for ActivityPub is in the works and is expected to be finished in the summer of 2019.

In time, every platform in The Free Network will likely be supporting ActivityPub and therefore these distinct super-networks will fold into one federated super-network containing everybody and maximizing interoperability between all the different systems. When they fold into one, we will call it fediverse because it all started with fediverse and subjectively sounds better and is easier and faster too say. On the other hand, in portuguese, to diminish confusion with Faits Divers (fé-divér), "Rede Livre" might be a better option. OStatus shouldn't be discarded though as it maximizes the compatibility between various different protocols. It would be nice to see ActivityPub being integrated in a newer version of OStatus, or at least have ActivityStreams 2 being adopted by OStatus.

If all those protocols allow the same why is ActivityPub being so widely adopted instead of the already existing ones?

It was essentially a matter of presentation. ActivityPub does solve some technical problems of the already existing alternatives. But, despite its problems and trade-offs (because it isn't perfect either), "ActivityPub is to HTTP what HTTP was to TCP/IP" (in the words of Riley Taylor) whereas older protocols, like OStatus, were shared as a complicated (because it requires implementing various different protocols - which actually is one of its advantages too as maximizes interoperability) solution to build a federated Twitter clone. This fact together with the simplicity claimed to be part of ActivityPub implementation lead to its large and fast adoption.

Final remarks

Some of this publication's content was adapted from Fliphodl's ep. 1 on Social Media Alternatives Series, Sean Tilley's Quick Guide to The Free Network and "Riley Taylor's post on why ActivityPub could be the future" (no longer available online). Even though their content has been heavily edited, that remains as a fact and they are still worth linking to (as I didn't include all of their relevant content).

There are various links in this post that weren't adapted and included as the three above mentioned, that's because, in my opinion, there was no need to either update, add or filter parts of their content in any way. This post is meant to be a, reasonably self contained, short sum up of what the fediverse is, while providing you with various links to good resources containing further details and more comprehensive histories of this amazing world.

Teaching Robotics to kids

December 22, 2018 — Diogo Peralta Cordeiro

Few days ago I've received an email from a professor asking if I was interested in giving a workshop on Robotics at Happy Code Maia. I naturally was, as it would be a great opportunity to share one of my passions with younger students :)

What is Happy Code?

Happy Code is a school focused in teaching programming to kids; Their goal: "Promote the teaching of programming and computational thinking in youth".

In Portugal's schools we are educated in natural sciences and specialize over time. Despite this, Computer Science, (whose name suggests being a science), is still not covered.

I believe the presence of CS in national school programs is as important as that of any other scientific subjects. There are a number of active initiatives to bring Computer Science to schools, but unfortunately, I believe they fail to grasp the essence of the subject and what ends up being taught is just programming with an apparent claim of being all there is to CS...

Computer Science is much more than just code. If there is interest in introducing students to this world, I would propose a program covering topics in discrete mathematics, the concept of computing, formal languages and just then algorithmic thinking using python (instead of a language like visual basic). Would it make sense to go through such topics at schools? Well, in my humble opinion, I think that would be somewhat similar to what is being done with the other subjects, if that's not appropriate, perhaps we should review the goals of the entire educational program about what tools and mental skills students are expected to have after school. At least this would make the program consistent.

How was the workshop?

The workshop I gave was not about CS nor Programming though. It was about Robotics, a theme vague enough to let me explore a variety of exciting and intriguing subjects. After explaining what automation and robots are about, I've talked about Systems Theory and described what a complex system is, with a special focus on network science. The Internet of Things (IoT) was obviously the best example of a complex graph I could approach as it was an opportunity to talk about how robots can use it to exchange data between them. Furthermore, I wanted to make a bridge between Systems, Control and Robotics, so complex systems was the way to expose some of the challenges faced in the field of Intelligent Robotics (like path planning) and Mobile Robotics (like dynamical systems). We have then moved to Digital Electronics and basic Physics, where principles like Ohm's law and Linear Momentum were covered to explain how Circuits and Photoresistors work, respectively.

"Education is the kindling of a flame, not the filling of a vessel." - Socrates

Although it may look like I spent 3 hours throwing advanced course material at the poor little kids, that was not the case. It is true that I have introduced a variety of hard academic modules. But I'm excited about those things and I believe I was able to share that enthusiasm with them. By the end, some of the students have both asked me to talk more about some things that I didn't originally intend to cover and where they could further learn about this. I've obviously suggested DCC-FCUP!

I think we shouldn't be selecting "the easy stuff" to captivate students, we can't forget what the subjects are about, we should pick the subject and show what it is and why so many people became passionate about it, otherwise we are basically saying people just enrolled because they didn't know what it really was about.

Computer Science is huge and I'm only sad for not being able to "take it all". I'm not following CompSci because it is easy, it's not easy at all. I am taking various elective modules and I choose those that covers "powerful stuff", stuff that will allow me to make change, not easy stuff that I could eventually learn in a work week. I believe this is what quality successful education does with students.

Final remarks

I've enjoyed the overall experience and I'm thankful I was given this opportunity. When teaching kids this young it is a challenge to keep them focused and still show the essence of a topic. Despite that, it was fun and they enjoyed toying with Arduino, sensors and actuators. Furthermore, at the end, when I quizzed them, they were able to explain how to build circuits we'd built and to propose solid solutions for somewhat different situations.

On the other hand, I would rather see them exploring Nature, Literature, Arts and Philosophy than locked in a room exploring science. Kids these days already have a lot of science at school and, IMHO, spend there far more hours than what they really need or should. There will be time for them to explore science, no need to rush things.

Arts, Literature and Philosophy are sometimes dismissed by those in the world of STEM and that's sad, but there are some initiatives working to change that. I really feel those are an essential part of me and play an important role in my life.

I'll be giving a more advanced version of this workshop in Hackers at Porto. I started HaP because I wanted to spend some of my free time, i.e. when not busy learning science in college, with colleagues exploring technology. I think this is a fun way of discovering more about what we want and helps expanding our horizons.

Happy hacking!

Download Workshop Materials