Jorge Pereira: 10° Encontro de Programadores de C & C++

3 de Junho de 2013, por Desconhecido - 0sem comentários ainda

Aconteceu no último dia 25 de maio o 10° Encontro de Programadores de C & C++, o evento foi muito bacana e contou com uma grade de palestras bem diversificada. abaixo segue lista completa de todas as palestras e os devidos artigos e materiais utilizados pelos palestrantes!

C/C++ Brasil

Explorando Windows 32 em Windows 64 — Fernando Roberto da Silva
Um sistema operacional Windows de 64 bits é capaz de executar programas de 32 bits de forma completamente transparente, mas para alguns, isso pode gerar comportamentos inesperados. Este artigo descreve de maneira prática como o Windows é capaz de realizar essa tarefa de forma a permitir que programas de 32 bits possam coexistir com programas de 64 bits, explicando tais estranhezas e justificando-as. Como drivers de kernel se encaixam nessa história e quais os possíveis problemas podem ser observados na migração de drivers 32 bits para 64 bits.
  
Programação em GPU utilizando OpenCL — André Tupinambá
O OpenCL é um padrão aberto, definido pelo Khronos Group, para programação em dispositivo genérico. Hoje ele é suportado pelos principais fornecedores de GPUs (Nvidia, AMD e, recentemente, Intel) e CPUs (Intel, AMD e IBM); e espera-se que outros processadores tenham suporte em breve, pois já existem chips para celulares homologados, como o CPU ARMv7 com Mali-T604 GPU, e outros chips, como o FPGA da empresa Altera, em desenvolvimento. O framework OpenCL é composto por uma linguagem, uma API, bibliotecas e um sistema de suporte para o desenvolvimento. A linguagem é baseada no padrão C99 com algumas extensões para suportar os modelos de memória e execução do OpenCL. Este artigo descreve o que é programação para GPU e apresenta a plataforma OpenCL, com um estudo de caso.

Interoperando C++ e Java usando meta-programação em C++ — Felipe Magno de Almeida
Construção de middlewares baseados na tecnologia Java exigem por muitas vezes a interação com recursos específicos da plataforma, interagindo normalmente com interfaces em linguagem C ou C++. Essas interações com código nativo precisam ser feitas através da Java Native Interface na implementação OpenJDK do Java, que trás diversas dificuldades para o programador e tornam a tarefa de desenvolvimento desnecessariamente árdua, e o resultado dificilmente livre de bugs. Abordarei sobre o uso e construção de uma biblioteca que ajudará o usuário a mitigar os problemas decorrentes do uso direto da Java Native Interface e será feita uma comparação dessa biblioteca com outras soluções de binding como as bibliotecas luabind e Boost.Python, assim como suas diferenças intrínsecas por conta da tipagem estática da linguagem Java.

Kernel Insecurity Vectors — Carlos Carvalho e Alan Silva
O estudo das falhas de segurança pode ser tão geral quanto um buffer overflow em qualquer programa ou tão específico quanto defeitos na implementação do módulo X na versão Y da máquina virtual Z do fabricante W. Neste trabalho demonstramos falhas de segurança e métodos de exploração no kernel do Linux, mostrando a arquitetura e revisando algumas técnicas já conhecidas, para com isso tentar encontrar um caminho que resulte em novos métodos para explorar essas falhas, que chamamos vetores de exploração.



Lucas Rocha: Introducing The Layout

17 de Maio de 2013, por Desconhecido - 0sem comentários ainda

As engineers, I believe the way we approach a problem is as important as the code we write. This is especially relevant in the context of UI engineering where design is such a vital element.

Unfortunately, it seems quite hard to find good content about everything that happens around us and inside our heads when we are building user interfaces. This is what The Layout is about.

My intent is to create a space for high quality content discussing the principles, mindset, and practices that I believe shape the craft of UI engineering. It is meant to be a shared space with many voices—so, expect some awesome guest authors.

I’ve just posted the very first article, Mind the Gap. My plan is to publish a new article every other week-ish. For now, subscribe to the RSS feed or simply follow The Layout on Twitter or Google+ to get future updates.

I really hope you enjoy it!



Jonh Wendell: Joining Intel

10 de Maio de 2013, por Desconhecido - 0sem comentários ainda

Today is my last day at Oi WiFi.

It has been 1 year and a half since I moved from my small city (Maceió) to the biggest, craziest Brazilian city, São Paulo. I don’t regret!

I’m lucky to have joined a great company (Vex at the time. Oi WiFi nowadays), with great people where I learnt a lot. I’m glad for the things I helped to improve, I’m sure we have better products than before and I’m proud to be part of that progress. I leave as legacy the spirit of the Free Software, where we can (and should) contribute back to projects we use and improve internally. Every improvement we made here we submitted back to projects like Openwrt, busybox, glib, etc.
However things and priorities in the company have changed a bit in the last few months. Time to look for a new challenge in my career.

What a challenge!

At Intel I’ll join the OTC – Intel Open Source Technology Center, and will work on Open Source projects such as Tizen, EFL, Webkit and hopefully GTK+ :)
The team I’ll work with is formed by the former Profusion company, acquired by Intel in the beginning of the year. Profusion was a company that I admired even before it was acquired by Intel :)

I’m very excited to join Intel. It’s a great opportunity in a great company and I don’t want to disappoint them!

I hope to publish here very soon the things I’m working on under the Intel umbrella. See you!



Lucas Rocha: UI polishing in Firefox for Android

29 de Abril de 2013, por Desconhecido - 0sem comentários ainda

Last week, we did our very first topic-oriented hackathon focused on UI polishing bugs. The UI changes we’ve done will make a substantial difference in the experience of using Firefox on Android. Here are some of my favourite fixes and improvements.

Tabs

Details in the tabs UI can make a big difference UX-wise. We changed the tabs button icon (see image) to provide better affordance. The new icon also features a much cooler animation when tabs are added or removed.

Last but not least, we added a subtle parallax effect when you the open/close the tabs panel giving it a more fluid feel.

Address bar

As Wes has already reported, you now have the option to show URLs instead of page titles in the address bar. The domain highlight (see image) is a nice touch and gives us feature parity with Firefox on desktop.

The reader and stop buttons now have properly sized hit areas to avoid tapping other parts of the toolbar by mistake—a long overdue issue.

That’s not all

Reader Mode will get some nice style updates for serif fonts, doorhanger notifications now have a more polished animation, text selection handles have a more consistent style, favicons in the awesomescreen will look fancier, some visual glitches in the awesomescreen and toolbar were fixed, and more.

Not all these changes are in Nightly just yet but they will show up in the next days. Firefox 23 has everything to be my favourite release ever. Download and install our Nightly build on your Android and let us know what you think.



Lucas Rocha: Multi-part items in Smoothie

22 de Abril de 2013, por Desconhecido - 0sem comentários ainda

Smoothie makes it really easy to load ListView/GridView items asynchronously, off the UI thread. It handles all the complexity from gestures, threads, scrolling state, preloading, and view recycling behind a simple API.

Up until now, one of the biggest limitations of the Smoothie API has been the lack of proper support for multi-part items. What is a multi-part item? It’s a ListView/GridView item composed by multiple parts that have to be loaded asynchronously with different priorities as you scroll.

Classic example: a list of photos with items composed by the photo image and the author’s avatar—both loaded from the cloud. With the existing API,  Smoothie would force you to load the whole content of each item in one go. This means you were forced to load both the main photo image and the avatar image for each item before loading the next item in the list.

What if you wanted to start loading the main photo image of all visible items before loading their respective avatars? The photos are probably the content your users are actually interested in after all. That’s what the multi-part item support is about. It allows you to split the loading of each item into multiple asynchronous operations with different global priorities.

So, how would you implement the above example assigning higher priority to the main photo image over the avatar using Smoothie? Assuming you’re already familiar with Smoothie’s API, just follow these steps:

  1. Override the getItemPartCount() method from ItemLoader. Return the number of parts the item in the given Adapter position has.
  2. Handle the new itemPart argument accordingly in loadItemPartFromMemory(), loadItemPart(), and displayItemPart(). These methods will be called once for each item part.

The item parts will have indexes starting from zero. e.g. for items with 2 parts, the part indexes will be 0 and 1. The indexes also define the relative priority between parts. Smoothie will load the part with index 0 for all visible items before loading part with index 1.

Important note: I had to break API backwards compatibility. If you don’t really need multi-part items, the only change you’ll have to make in your code is to subclass from SimpleItemLoader instead of ItemLoader. SimpleItemLoader is an ItemLoader specialized in single-part items that hides all the part-related bits from the API.

The updated documentation contains code samples and a more detailed overview of the new API. Grab the latest code while it’s hot. Feedback, bug reports, and patches are all very welcome as usual.



Lucas Rocha: Multi-part items in Smoothie

22 de Abril de 2013, por Desconhecido - 0sem comentários ainda

Smoothie makes it really easy to load ListView/GridView items asynchronously, off the UI thread. It handles all the complexity from gestures, threads, scrolling state, preloading, and view recycling behind a simple API.

Up until now, one of the biggest limitations of the Smoothie API has been the lack of proper support for multi-part items. What is a multi-part item? It’s a ListView/GridView item composed by multiple parts that have to be loaded asynchronously with different priorities as you scroll.

Classic example: a list of photos with items composed by the photo image and the author’s avatar—both loaded from the cloud. With the existing API,  Smoothie would force you to load the whole content of each item in one go. This means you were forced to load both the main photo image and the avatar image for each item before loading the next item in the list.

What if you wanted to start loading the main photo image of all visible items before loading their respective avatars? The photos are probably the content your users are actually interested in after all. That’s what the multi-part item support is about. It allows you to split the loading of each item into multiple asynchronous operations with different global priorities.

So, how would you implement the above example assigning higher priority to the main photo image over the avatar using Smoothie? Assuming you’re already familiar with Smoothie’s API, just follow these steps:

  1. Override the getItemPartCount() method from ItemLoader. Return the number of parts the item in the given Adapter position has.
  2. Handle the new itemPart argument accordingly in loadItemPartFromMemory(), loadItemPart(), and displayItemPart(). These methods will be called once for each item part.

The item parts will have indexes starting from zero. e.g. for items with 2 parts, the part indexes will be 0 and 1. The indexes also define the relative priority between parts. Smoothie will load the part with index 0 for all visible items before loading part with index 1.

Important note: I had to break API backwards compatibility. If you don’t really need multi-part items, the only change you’ll have to make in your code is to subclass from SimpleItemLoader instead of ItemLoader. SimpleItemLoader is an ItemLoader specialized in single-part items that hides all the part-related bits from the API.

The updated documentation contains code samples and a more detailed overview of the new API. Grab the latest code while it’s hot. Feedback, bug reports, and patches are all very welcome as usual.



Lucas Rocha: Firefox for Android’s UI polishing Hackathon

22 de Abril de 2013, por Desconhecido - 0sem comentários ainda

We’ve been discussing the idea of doing periodic topic-oriented hackathons in the front-end team. The idea is simple: pick a topic—a specific part or aspect of the product—and have the whole team focused on it for a couple days. The goal is to bring substantial and fast improvements on specific areas.

As an initial experiment, we’ll be doing the first hackathon this week from Wednesday to Friday and we’re going to focus on UI polishing bugs—those UI papercuts that are not so prominent in isolation but, when fixed en masse, make a whole lot of difference.

It’s important to have a good list of bugs before we begin. So, you can start nominating Fennec bugs for the hackathon now by tagging them with “ui-hackathon”. We’ll cleanup this list and maybe prioritize them a bit during the planning session on the first day of the hackathon.

As usual, everyone is welcome to participate. You can help us by tagging bugs, or better yet, fixing them. Have a look at the wiki page for more details on the agenda.



Vicente Aguiar: O mundo da Virtualidade Real

13 de Abril de 2013, por Desconhecido - 0sem comentários ainda

Em 2005, desnudando uma nova realidade social embrionária, Manuel Castells escreve sobre a "Cultura da Virtualidade Real", num dos mais interessantes capítulos da sua grande obra "A Sociedade em Rede". Confesso que, logo que li o livro, passei desapercebido sobre a relevância dessa questão. Porém, quando voltei para universidade para fazer doutorado, li sua palestra sobre “Redes sociais e transformação da sociedade”, eu pude perceber o quanto esse conceito é muito relevante ainda hoje, pois...      


"(…) Havia gente que dizia que a internet era um lugar alienante, onde as pessoas se ilhavam, mas, pelo contrário, onde há sociabilidade é na internet. Onde há cada vez menos sociabilidade é na vida física individual, porque as pessoas só correm, não têm tempo para nada. Há uma cultura individualista de competição no trabalho e na vida familiar, e onde as pessoas realmente se articulam socialmente é na internet e, a partir daí, desenvolvem sua própria vida. Passamos não ao mundo virtual, mas ao mundo do que chamo de virtualidade real. Não da realidade virtual, mas da virtualidade real.

A virtualidade é uma dimensão básica de nossa realidade, e é nesta articulação que se constrói nossa sociedade. E se constrói autonomamente. As pessoas constroem suas próprias redes sociais. Na internet, constroem seus próprios processos de ativação política e profissional. Não é um lugar para somente chat-chat. As redes sociais são para todos: para o profissional, político, intelectual, cientistas, acadêmicos. É aí que se as pessoas se expressam e articulam suas próprias relações." 1


1 Manuel Castells, em sua palestra “Redes sociais e transformação da sociedade”, proferida no Centro Ruth Cardoso em 16 de setembro de 2010.



Jonh Wendell: Shell script that updates itself

9 de Abril de 2013, por Desconhecido - 0sem comentários ainda

Recently I needed to write a shell script that updates itself, and, surprising, I found it an easy job to do. I will share the recipe here.

In my use case, I’m developing a kind of software updater and, before updating the system packages, I need to check if there is a new version of this software updater. If there is, then I update myself and run my new copy on-the-fly.

Enough talk, show me the code. I’ll paste here a simple shell script that talks by itself:

#!/bin/sh

SCRIPT_NAME="$0"
ARGS="$@"
NEW_FILE="/tmp/blog.sh"
VERSION="1.0"

check_upgrade () {

  # check if there is a new version of this file
  # here, hypothetically we check if a file exists in the disk.
  # it could be an apt/yum check or whatever...
  [ -f "$NEW_FILE" ] && {

    # install a new version of this file or package
    # again, in this example, this is done by just copying the new file
    echo "Found a new version of me, updating myself..."
    cp "$NEW_FILE" "$SCRIPT_NAME"
    rm -f "$NEW_FILE"

    # note that at this point this file was overwritten in the disk
    # now run this very own file, in its new version!
    echo "Running the new version..."
    $SCRIPT_NAME $ARGS

    # now exit this old instance
    exit 0
  }

  echo "I'm VERSION $VERSION, already the latest version."
}

main () {
  # main script stuff
  echo "Hello World! I'm the version $VERSION of the script"
}

check_upgrade
main

To try this script:
1) save it somewhere
2) save a copy of it at /tmp/blog.sh (as pointed at line 5)
3) modify the variable “VERSION” (line 6) of that copy, to, say, “2.0″.
4) run the original script (not the one at /tmp)

You will see that the script updated itself and ran the “new” 2.0 version.

Try running again the original script (step 4 above). See the difference? It doesn’t update itself anymore, because it is the “latest” version.

A small thing you might notice: at line 19, I deleted the “new file”. That’s merely for this educational example, that we check if there’s a new version of the script by just checking if a file exists in the disk. On real life (with apt/yum or any smarter process) this is not needed as our check for a new version (line 13) will naturally fail.

This was tested with bash, dash and busybox’s ash. Worked fine.

I hope it’s useful to someone. Comments are welcome!



Og Maciel: Castálio Podcast: Everaldo Canuto: Toca do Canuto

19 de Março de 2013, por Desconhecido - 0sem comentários ainda

image

Eu conheci o Everaldo em uma tarde super calorenta durante a abertura do evento GUADEC nas Ilhas Canárias. O mais interessante foi que não demorou mais que um dia para que nossa amizade se tornasse igual aquelas amizades que fazemos quando criança… aquelas pessoas que não importa o tempo ou a distância, você sempre fica feliz de encontrar e bater um papo!

O Everaldo teve uma das oportunidades que eu sempre sonhei em ter: trabalhar lado a lado com o Miguel de Icaza, um dos fundadores do Projeto GNOME, figura quase que mitológica do mundo do software livre e hoje empresário com várias companhias de sucesso em seu histórico! Ele também trabalhava com a tecnologia .NET numa época quando qualquer coisa que fosse remotamente relacianada à Microsoft era motivo para perseguição e “trollage” pelos apoiadores mais zelosos do Linux. Durante grande parte de nosso bate-papo, conversamos sobre como que ele foi parar na Novell trabalhando para a equipe do Miguel, como era o dia-a-dia lidando com o sentimento anti- Microsoft, quais tecnologias ele recomenda para quem está começando a trabalhar na área de TI, o “problema” do Java, e sobre seu mais novo projeto,Toca do Canuto.

Assista o vídeo da entrevista aara ver a nossa conversa na íntegra, sem edição e escutar algumas coisas que não foram incluídas no podcast.

Escute agora: [MP3] [Ogg] [AAC] [Youtube]