<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bugflux.org &#187; technology</title>
	<atom:link href="http://bugflux.org/tag/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://bugflux.org</link>
	<description>André Prata, nDray</description>
	<lastBuildDate>Fri, 23 Jul 2010 11:30:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>na crista da onda: anfíbio</title>
		<link>http://bugflux.org/blog/1317:na-crista-da-onda-anfibio/</link>
		<comments>http://bugflux.org/blog/1317:na-crista-da-onda-anfibio/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 11:24:05 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1317</guid>
		<description><![CDATA[depois do fracasso e do sucesso parcial do desenvolvimento para bada, procurei descobrir como seria desenvolver um widget para o telemóvel. surpresa! os widgets não passam de páginas web! apesar de já ter confessado não gostar de programação por eventos, &#8230; <a href="http://bugflux.org/blog/1317:na-crista-da-onda-anfibio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>depois do <a title="na crista da onda @ bugflux.org" href="/?p=1208" target="_self">fracasso</a> e do <a title="na crista da onda: parte 2 @ bugflux.org" href="/?p=1211" target="_self">sucesso parcial</a> do desenvolvimento para bada, procurei descobrir como seria desenvolver um <em>widget</em> para o <a title="uma nova onda @ bugflux.org" href="/?p=1087" target="_self">telemóvel</a>. surpresa! os widgets não passam de páginas web! apesar de já ter confessado não gostar de programação por eventos, por algum motivo, javascript e html são coisas totalmente diferentes, para mim. talvez por associar <em>scripting</em> tão potente a linguagem de marcação de forma tão simples. não sei, mas gosto!</p>
<p><span id="more-1317"></span>uma coisa que dava jeito era poder ter no ecrã principal atalhos para aplicações. más notícias. para a maioria, não é possível. a samsung implementa uma api <a title="bondi @ omtp.org" href="http://bondi.omtp.org/default.aspx" target="_blank">bondi</a>, mas esta permite o acesso a escassas aplicações. claro que a samsung tem acesso a todas, com widgets até para aceder à aplicação da loja, que nem sequer consta na <a title="samsung widget api reference @ innovator.samsungmobile.com" href="http://innovator.samsungmobile.com/cms/cnts/knowledge.detail.view.do?platformId=12&amp;cntsId=6720" target="_self">documentação</a>. para as aplicações que interessa não deixam aceder&#8230;</p>
<p>além de aceder ao telemóvel, também seria interessante o acesso directo à web. é muito fácil criar pequenos atalhos no ecrã, estilo bookmarks. tive a ideia de ir mais longe, procurando poupar espaço comparativamente a essa solução. um pequeno widget do estilo da google, que vem no telemóvel, mas com botões configuráveis, e potencialmente ilimitados. surge o <a title="all terrain search @ bugflux.org" href="/dev/all-terrain-search/" target="_blank">All Terrain Search</a>:</p>
<p>a ideia é simples. uma caixa de texto e botões. se existir texto nessa caixa, o botão faz uma pesquisa no site. se a caixa estiver em branco, o botão redirecciona para a homepage. 4 botões não são lá grande coisa, portanto um scroll permite ver mais 4, e mais 4, e mais 4, tantos quanto inserir.</p>
<p>a ideia foi estruturar o código de maneira a que fosse simples adicionar novos motores. numa pasta individual colocam-se os ícones dos motores. qualquer que seja o tamanho da imagem, será sempre apresentada a 84&#215;84 pixels. é recomendável redimensionar antes, uma vez que o rendering do browser estraga um pouco a qualidade das imagens.</p>
<p>as imagens são depois usadas num ficheiro javascript, onde o utilizador deve mexer para configurar a seu gosto. a lista de motores não passa de um array de variáveis com 3 propriedades: a homepage, a string para pesquisa e a localização da imagem. se o tamanho do array exceder o número de motores visíveis de uma vez, as restantes serão acedidas por scoll.</p>
<p>não queria usar um botão adicional e desperdiçar espaço, queria que um drag vertical no widget mudasse a lista de motores. o drag horizontal também seria interessante, mas esse será sempre apanhado primeiro pelo home screen, para mudar entre ecrãs. o scroll foi a maior perda de tempo. a samsung tem uma <a title="touch table @ quirksmode.org" href="http://www.quirksmode.org/mobile/tableTouch.html" target="_blank">má implementação</a> dos eventos touch no seu browser. a única coisa que me permitiu gerir com eficiência foi o evento <strong>onmousewheel</strong>, lançado aquando de arrastamentos do dedo. não funcionando como num computador, no entanto, o <strong>Event</strong> associado não tem a propriedade <strong>wheelDelta</strong>, que normalmente devolve a extensão/direcção do scroll. não consigo sequer saber se o scroll é para baixo ou para cima, só sei que houve scroll. ainda para mais, um arrastamento contínuo lança diversos eventos, o que provoca scrolls a mais, acidentais.</p>
<p>para solucionar os dois problemas, o scroll não faz bem scroll, mas faz <em>cycle</em> entre as páginas de motores. para evitar o lançamento consecutivo de vários scroll, quando capturo um primeiro deixo de ouvir o evento para só ouvir um quinto de segundo mais tarde:</p>
<pre class="brush: jscript;">scroll = function(e) { /* more like cycle through */
	page = (page + 1) % Math.ceil(engines.length / visibleEngines);

	/* disable scroll for a fifth of a sec */
	document.onmousewheel = null;
	setTimeout('document.onmousewheel = scroll', 200);

	changePage(page);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1317:na-crista-da-onda-anfibio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>na crista da onda: parte 2</title>
		<link>http://bugflux.org/blog/1211:na-crista-da-onda-parte-2/</link>
		<comments>http://bugflux.org/blog/1211:na-crista-da-onda-parte-2/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:57:33 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1211</guid>
		<description><![CDATA[o flash é uma tarefa impossível, mas nada motivo para baixar os braços. outra aplicação que me interessou desenvolver consistia em procurar routers nas redondezas e, com base em vulnerabilidades conhecidas, ligar-se a eles. claro que os algoritmos sobre as &#8230; <a href="http://bugflux.org/blog/1211:na-crista-da-onda-parte-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://bugflux.org/wp/wp-content/uploads/2010/07/WifiSmith.png"><img class="alignleft size-thumbnail wp-image-1303" title="WifiSmith" src="http://bugflux.org/wp/wp-content/uploads/2010/07/WifiSmith-150x150.png" alt="" width="150" height="150" /></a>o flash é uma <a title="na crista da onda @ bugflux.org" href="/?p=1208" target="_self">tarefa impossível</a>, mas nada motivo para baixar os braços. outra aplicação que me interessou desenvolver consistia em procurar routers nas redondezas e, com base em vulnerabilidades conhecidas, ligar-se a eles. claro que os algoritmos sobre as vulnerabilidades não são meus, não tenho a destreza para esse trabalho, mas é uma boa maneira de iniciar interfaces. chamei-lhe Wi-Fi Smith. =)</p>
<p><span id="more-1211"></span>desta vez custou um pouco mais começar, pois foi preciso ler um pouco sobre controlos e containers. no fundo não há muita diferença relativamente a outros toolkits gráficos. comparando com gtk, que foi o último que usei, para o bada também tenho duas hipóteses: posso programar e colocar os controlos todos no sítio com código, ou posso desenhar no ide e depois, no código, pedir para que sejam colocados no sítio e obter o handle. nada de especial.</p>
<p>o problema que há com este modo de programação do bada, para mim, é que as callbacks para os módulos geradores de eventos não são passadas explicitamente. o que é passado é uma classe que implemente (herde, em c++) uma interface IModuleEventListener. além disto não podemos definir argumentos para passar a essas funções. resultado: torna-se complicado gerir a partilha de recursos a serem utilizados na rotina de atendimento. o que é que eu fiz? o módulo principal herda tudo&#8230; felizmente não há colisões, mas neste caso não vi que fizesse sentido criar módulos diferentes. uma vez que vou tratar de eventos wifi, e da interface, bem como os genéricos das aplicações, isto é a classe criada:</p>
<pre class="brush: cpp; first-line: 18;">class WifiSmith :
	public Osp::App::Application,
	public Osp::System::IScreenEventListener,
	public Osp::Ui::IActionEventListener,
	public Osp::Net::Wifi::IWifiManagerEventListener,
	public Osp::Ui::IItemEventListener
{</pre>
<p>em vez de dar uma caixa de texto e um botão &#8220;do the magic&#8221; achei que seria mais interessante (e até mais simples) limitar-me a pegar no wi-fi, obter uma lista das redes disponíveis e listá-las. isto foi muito fácil de fazer. ao construir o manifest.xml no site, tive de adicionar privilégio WIFI. isto permite fazer todas as operações com o módulo wi-fi, excepto Connect(). para ligar é necessário permissões WIFI_MANAGER. infelizemente, só parceiros da samsung podem pertencer a este grupo, pois é necessário um nível de acesso SYSTEM. uma parvoíce, a meu ver. qualquer que seja a parte da api, não vejo motivo para que alguém que pague (ou receba?) tenha acesso e os outros não. no entanto esta limitação apenas impede publicação na loja; o grupo pode ser adicionado manualmente no ficheiro xml, mas a aplicação será certamente rejeitada na loja:</p>
<pre class="brush: xml; first-line: 6;">&lt;Privileges&gt;
	&lt;Privilege&gt;
		&lt;Name&gt;WIFI&lt;/Name&gt;
	&lt;/Privilege&gt;
	&lt;Privilege&gt;
		&lt;Name&gt;WIFI_MANAGER&lt;/Name&gt;
	&lt;/Privilege&gt;
&lt;/Privileges&gt;</pre>
<p>para compilar com permissões especiais é preciso, com frequência, adicionar uma biblioteca para linkagem, neste caso FNet. verdade para o simulador, para o telemóvel parece-me estar tudo na mesma biblioteca, FOsp.</p>
<p><a href="http://bugflux.org/wp/wp-content/uploads/2010/07/FNet-library.png"><img class="aligncenter size-full wp-image-1287" title="FNet-library" src="http://bugflux.org/wp/wp-content/uploads/2010/07/FNet-library.png" alt="" width="662" height="594" /></a></p>
<p>a interface da aplicação é muito simples. dois botões em baixo, um &#8220;refresh&#8221; e outro &#8220;back&#8221;. gosto das aplicações que têm botão de saída no ecrã, não gosto de usar o físico. no editor visual: as duas SOFTKEY activas e uma List que ocupa todo o ecrã. a List permite scroll se os elementos excederem o espaço reservado. a SlidableList serve para listas grandes, e alocação dinâmica dos elementos que interessam ver num dado momento apenas. no início desenho esta estrutura, associo as callbacks, e inicializo as variáveis necessárias:</p>
<pre class="brush: cpp; first-line: 31;">bool
WifiSmith::OnAppInitializing(AppRegistry&amp; appRegistry)
{
	// draw the form
	MainForm *pMainForm = new MainForm();
	pMainForm-&gt;Construct(L&quot;IDF_FORM1&quot;);
	Frame *pFrame = GetAppFrame()-&gt;GetFrame();
	pFrame-&gt;AddControl(*pMainForm);
	pFrame-&gt;SetCurrentForm(*pMainForm);
	pMainForm-&gt;SetSoftkeyActionId(SOFTKEY_1, SOFTKEY_1);
	pMainForm-&gt;AddSoftkeyActionListener(SOFTKEY_1, *this); // register back button event
	pMainForm-&gt;SetSoftkeyActionId(SOFTKEY_0, SOFTKEY_0);
	pMainForm-&gt;AddSoftkeyActionListener(SOFTKEY_0, *this); // register refresh button event
	pMainForm-&gt;RequestRedraw();

	// set the wifimanager
	pWifiManager.Construct(*this);

	// get the essid list control
	pEssidListControl = (List*)pMainForm-&gt;GetControl(&quot;IDC_LIST1&quot;);
	pEssidListControl-&gt;AddItemEventListener(*this);

	return true;
}</pre>
<p>que no fim liberto:</p>
<pre class="brush: cpp; first-line: 56;">bool
WifiSmith::OnAppTerminating(AppRegistry&amp; appRegistry, bool forcedTermination)
{
	// decided to use dynamic allocation for the WifiManager and the list of WifiBssInfo (networks)
	delete pEssidListControl;

	return true;
}</pre>
<p>sair da aplicação faz-se chamando o método Application::Terminate(). este método parece só estar acessível no módulo principal. tentei mesmo Application::GetInstance()-&gt;Terminate() noutros módulos, mas nem assim consegui compilar. azelhice minha, talvez. a cada refresh limpa-se e volta-se a preencher a lista de redes disponíveis:</p>
<pre class="brush: cpp; first-line: 136;">void
WifiSmith::OnWifiActivated(result r)
{
	pWifiManager.Scan();
}</pre>
<pre class="brush: cpp; first-line: 86;"> // SOFTKEYs
void
WifiSmith::OnActionPerformed(const Osp::Ui::Control &amp;source, int actionId)
{
	// SOFTKEY_0 is just the actionId I associated with it on line 42, it's not really the key.
	if(actionId == SOFTKEY_0) // refresh
	{
		RefreshList();
	}
	else
	{
		Application::Terminate();
	}
}</pre>
<pre class="brush: cpp; first-line: 163;">void
WifiSmith::RefreshList()
{
	// clear the essid list
	pEssidListControl-&gt;RemoveAllItems();
	pEssidListControl-&gt;RequestRedraw();

	// turn on wifi, if off
	if(!pWifiManager.IsActivated())
	{
		MessageBox vMessageBox;
		vMessageBox.Construct(&quot;Action required!&quot;, &quot;WiFi needs to be ON for scanning! Turn on?&quot;, MSGBOX_STYLE_YESNO, 0);
		int modalResult;
		vMessageBox.ShowAndWait(modalResult);

		if(modalResult == MSGBOX_RESULT_YES)
		{
			pWifiManager.Activate();
		}
		else
		{
			Application::Terminate();
		}
	}
	else
	{
		// get the available networks
		OnWifiActivated(E_SUCCESS);
	}
}</pre>
<p>quando o wi-fi está desligado é na função refresh que pergunto ao utilizador se pretende activar, com uma MessageBox. se não o fizer, a aplicação termina. faria sentido chamar a RefreshList() na inicialização. no entanto há um problema de concorrência. enquanto a aplicação está a arrancar é mostrada uma &#8220;imagem splash&#8221;. por algum motivo a aplicação bloqueia nesse splash se tentar abrir uma MessageBox algures na função OnAppInitializing(). provavelmente funcionaria na função OnForeground(), mas nesse caso tinha de controlar o estado da aplicação com uma nova variável, pois a função OnForeground() é chamada sempre que se volta ao foreground, e não apenas da primeira vez. continuo a achar que o problema é do sistema operativo, algo diferente devia acontecer.</p>
<p>findo o Scan(), preenche-se novamente a lista:</p>
<pre class="brush: cpp; first-line: 102;">
void
WifiSmith::OnWifiScanCompletedN(const Osp::Base::Collection::IList *pWifiBssInfoList, result r)
{
	pNetworkList.RemoveAll();
	pNetworkList.AddItems(*pWifiBssInfoList);

	for(int r = 0; r &lt; pNetworkList.GetCount(); r++)
	{
		WifiBssInfo *currentBssInfo = (WifiBssInfo*)pNetworkList.GetAt(r);
		pEssidListControl-&gt;AddItem(&amp;currentBssInfo-&gt;GetSsid(), null, null, null, r);
	}
	pEssidListControl-&gt;RequestRedraw(true);
}</pre>
<p>para quem não viu até aqui, é fácil perceber que não há muito tratamento de erros. esta função, por exemplo, indica com a variável r se o Scan() teve ou não sucesso. no entanto pouca diferença faz para o código que escrevi. mais, por motivos de eficiência, o mecanismo de controlo de excepções do c++ foi completamente ignorado pela samsung, não existem excepções no bada. o compilador até me avisou que, na linha 111, estou a passar um endereço de uma variável temporária. como nunca me deu problemas, não senti necessidade de copiar os nomes para uma lista.</p>
<p>depois de listadas as redes, é possível ver a listagem no telemóvel. clicando em qualquer rede, tenta-se ligar:</p>
<pre class="brush: cpp; first-line: 149;">void
WifiSmith::OnItemStateChanged(const Osp::Ui::Control &amp;source, int index, int itemId, Osp::Ui::ItemStatus status)
{
	WifiBssInfo *pWifiBssInfo = (WifiBssInfo*)pNetworkList.GetAt(itemId);
	const WifiSecurityInfo *pWifiSecurityInfo = pWifiBssInfo-&gt;GetSecurityInfo();

	// if open and no encryption, go right ahead!
	if(pWifiSecurityInfo-&gt;GetAuthenticationType() == WIFI_AUTHENTICATION_OPEN
			&amp;&amp; pWifiSecurityInfo-&gt;GetEncryptionType() == WIFI_ENCRYPTION_NONE)
	{
		pWifiManager.Connect(*pWifiBssInfo);
	}
}</pre>
<p>lembre-se que, na linha 111, dei um itemId a cada elemento da List igual ao índice dessa rede na lista de redes. no fim da tentativa de ligação à rede, posso informar o utilizador:</p>
<pre class="brush: cpp; first-line: 116;">void
WifiSmith::OnWifiConnected(const Osp::Base::String &amp;ssid, result r)
{
	MessageBox vMessageBox;
	int modalResult;

	if(r == E_SUCCESS)
	{
		vMessageBox.Construct(&quot;Connected:&quot;, ssid, MSGBOX_STYLE_OK, 0);
	}
	else
	{
		vMessageBox.Construct(&quot;Unable to connect:&quot;, ssid, MSGBOX_STYLE_OK, 0);
	}

	vMessageBox.ShowAndWait(modalResult);
}</pre>
<p>por vários motivos, neste código só me ligo a redes abertas. o primeiro é o facto de ainda não ter tratado disso. o segundo é que, quando fui a testar o caso dos routers thomson, por exemplo, acabei por descobrir que a resolução das chaves é um tanto ou quanto probabilística, e nem sequer funcionou para alguns casos que testei. o terceiro motivo é o facto de subscrever um aditivo internet, como faz todo o sentido, com este telemóvel, e até porque não frequento sítios atulhados de redes vulneráveis.</p>
<p>no entanto acrescentar esta funcionalidade, para mim, faz-se do seguinte modo: começa-se por criar uma classe que recebe um WifiBssInfo e, com essa informação (provavelmente só ssi e bssid), identifica o tipo de router com que está a lidar e devolve, de acordo, a chave a utilizar. pode ainda disponibilizar um método booleano do tipo CanSolve() o que permitirá, no tempo da listagem, mostrar apenas as redes com que é possível lidar. por último, uma vez que alguns algoritmos devolvem mais que uma chave, a função OnWifiConnected() deve implementar uma máquina de estados que permita tentar a chave seguinte para a mesma rede, caso a ligação tenha falhado, e até que não existam mais chaves. nada mais!</p>
<p>algumas capturas:</p>
<p style="text-align: center;"><a href="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205002.jpg"><img class="alignnone size-thumbnail wp-image-1294" title="20100716205002" src="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205002-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205019.jpg"><img class="alignnone size-thumbnail wp-image-1296" title="20100716205019" src="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205019-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205009.jpg"><img class="alignnone size-thumbnail wp-image-1295" title="20100716205009" src="http://bugflux.org/wp/wp-content/uploads/2010/07/20100716205009-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>(uau, this sucks! é preciso mesmo clicar nas imagens, parece que os thumbnails do wordpress cortam a imagem&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1211:na-crista-da-onda-parte-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>na crista da onda</title>
		<link>http://bugflux.org/blog/1208:na-crista-da-onda/</link>
		<comments>http://bugflux.org/blog/1208:na-crista-da-onda/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 20:49:07 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1208</guid>
		<description><![CDATA[uns dias depois, cá comecei a olhar para o bada numa perspectiva de utilizador avançado. o objectivo não passou de ver simplesmente se seria muito complicado desenvolver qualquer tipo de programa para a plataforma. o primeiro passo foi obter o &#8230; <a href="http://bugflux.org/blog/1208:na-crista-da-onda/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>uns dias depois, cá comecei a olhar para o bada numa perspectiva de utilizador avançado. o objectivo não passou de ver simplesmente se seria muito complicado desenvolver qualquer tipo de programa para a plataforma.</p>
<p><span id="more-1208"></span>o primeiro passo foi obter o <a title="bada sdk/ide @ bada.com" href="http://developer.bada.com/apis/tools/sdk/list.do?categoryID=FC02040100" target="_blank">ide/sdk</a>. nada a assinalar, trata-se do eclipse. o problema é que as tralhas da samsung exigem windows, e logo aqui desmoralizo fortemente. felizmente não estou sozinho, há <a title="linux favourite bada developmen platform @ badadev.com" href="http://www.badadev.com/poll-ends-linux-would-be-the-preffered-bada-development-platform/" target="_blank">mais</a> quem gostasse de desenvolver para bada em linux, vamos confiar nos rumores que tendem a nosso favor! é um pouco estranho ter de esperar, uma vez que o próprio bada é baseado em linux, e o eclipse é até dos poucos ambientes decentes para este sistema operativo.</p>
<p>ligeiramente relutante, lá avancei à descoberta da documentação. o primeiro projecto seria colmatar a falha da loja: não existe uma lanterna. melhor, existe, mas usa o ecrã para iluminar, com um led tão bom do outro lado, junto à câmara.</p>
<p>depressa relembro como não sou grande fã de programação por eventos. o que vale é que c++ permite herança múltipla, e então é mais fácil atulhar a classe principal de métodos para atender eventos desde a bateria ao flash. a minha ideia de aplicação seria que o próprio programa fosse o botão de flash. isto é, ligar o flash seria tão simples como ligar o programa, que saía de imediato. desligar seria iniciar novamente a aplicação. um <em>toggle</em>!</p>
<p>neste caso de utilização não precisava de mais do que criar um objecto de acesso à câmara, que me dá controlo sobre o flash. se o IsFlashOn(), SetFlash(false), senão SetFlash(true). o IsFlashOn() funciona, o problema é que o SetFlash(true) liga o flash, mas não inicia a iluminação, <em>per se</em>. a iluminação é feita apenas ao utilizar a câmara, provavelmente desde que se inicia a focagem até à captura. talvez por este motivo não tenha aparecido a aplicação na loja&#8230;</p>
<p>além desta característica do sistema, tive outro problema. se não libertar a câmara quando a aplicação terminar, azar, tenho de reiniciar o telemóvel! nas funções que o ide cria automaticamente têm o cuidado de dizer na rotina OnAppTerminating(), em comentário, que se deve libertar a memória e os recursos. pergunto-me se o sistema operativo limpa a memória não libertada pelo programador???, caso contrário seria muito problemático deixar qualquer pessoa programar para o bada!</p>
<p>sobre este aspecto, <a title="time until certification @ badadev.com" href="http://forums.badadev.com/viewtopic.php?f=3&amp;t=755&amp;start=0&amp;view=viewpoll" target="_blank">parece</a> que demora muito tempo até que uma aplicação seja admitida na loja. talvez seja esse o motivo para ainda não haver muitas aplicações (sinceramente não estou a ver lugar para muitas mais úteis&#8230;). por um lado é bom saber que as aplicações à disposição foram vistas e revistas, por outro deve ser altamente desmotivante para o programador&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1208:na-crista-da-onda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no comment</title>
		<link>http://bugflux.org/blog/1199:no-comment/</link>
		<comments>http://bugflux.org/blog/1199:no-comment/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:17:09 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1199</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://bugflux.org/wp/wp-content/uploads/2010/07/trends.png"><img class="aligncenter size-full wp-image-1200" title="trends" src="http://bugflux.org/wp/wp-content/uploads/2010/07/trends.png" alt="" width="585" height="217" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1199:no-comment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>inverse perspective mapping</title>
		<link>http://bugflux.org/blog/1103:inverse-perspective-mapping/</link>
		<comments>http://bugflux.org/blog/1103:inverse-perspective-mapping/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 18:55:35 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1103</guid>
		<description><![CDATA[one of this year&#8217;s projects, and also the subject of my mini-research scholarship, was automating the process of obtaining an inverse perspective map (ipm) for an autonomous driving robot. autonomous driving robots frequently use cameras for object and road detection. &#8230; <a href="http://bugflux.org/blog/1103:inverse-perspective-mapping/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>one of this year&#8217;s projects, and also the subject of my mini-research scholarship, was automating the process of obtaining an inverse perspective map (ipm) for an autonomous driving robot.</p>
<p>autonomous driving robots frequently use cameras for object and road detection. after detecting such elements in an image it must be able to locate them in the real world, or else the image serves no purpose. that&#8217;s the ipm: a means of associating points in an image to points in the car coordinate system. to do obtain it, one only has to understand the transformations that occur when points are projected in an image and undo all those steps, for each point of the image, thus obtaining the real coordinates of each pixel.</p>
<p><span id="more-1103"></span></p>
<h2>a little geometry:</h2>
<p>the first transformation to consider is the one relative to the mechanics of the camera, the way it was constructed. correction of these values comprehends the calibration of the focal distance and the alignment of the lens relative to the projective plane, the image sensor. this requires finding 4 unknowns, that are used in this way:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%5C%5C%20%20w%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bccc%7D%20%20f_x%20%26%200%20%26%20c_x%5C%5C%20%200%20%26%20f_y%20%26%20c_y%5C%5C%20%200%20%26%200%20%26%201%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20X%5C%5C%20%20Y%5C%5C%20%20Z%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x\\  y\\  w  \end{array} \right] = \left[ \begin{array}{ccc}  f_x &amp; 0 &amp; c_x\\  0 &amp; f_y &amp; c_y\\  0 &amp; 0 &amp; 1  \end{array} \right] \left[ \begin{array}{c}  X\\  Y\\  Z  \end{array} \right]' title='\left[ \begin{array}{c}  x\\  y\\  w  \end{array} \right] = \left[ \begin{array}{ccc}  f_x &amp; 0 &amp; c_x\\  0 &amp; f_y &amp; c_y\\  0 &amp; 0 &amp; 1  \end{array} \right] \left[ \begin{array}{c}  X\\  Y\\  Z  \end{array} \right]' class='latex' /></p>
<p>the left part contains the corrected points and the right part the original point coordinates in the real world, multiplied by a matrix. this matrix <a title="transformation matrix @ wikipedia.org" href="http://en.wikipedia.org/wiki/Transformation_matrix" target="_blank">describes</a> a change in scale as well as a translation. this operation gives us an image that is equivalent to the one obtained if we were using a pinhole camera.</p>
<p>the camera is now perfect, but the lens is still uncorrected. usually lenses produce radial distortion in the projection. this distortion is quite intense if using fisheye lenses. that&#8217;s actually the case in the considered robot. due to mechanical constraints, the camera is quite close to the road, and using a normal lens would yield a fairly small field of view. on top of that, some might consider that in practice it is hard to have the lens perfectly parallel to the image sensor, which is a requirement for an undistorted projection. these two problems are solved with 5 new parameters, as corrected by the first few terms of a taylor expansion around the center of the lens [<a title="learning opencv @ oreilly.com" href="http://oreilly.com/catalog/9780596516130" target="_blank">bradski, kaehler</a>]:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x_%7Bcorrected%7D%5C%5C%20%20y_%7Bcorrected%7D%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%281%20%2B%20k_1%20r%5E2%20%2B%20k_2%20r%5E4%20%2B%20k_3%20r%5E6%29%20%2B%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%202%20p_1%20xy%20%2B%20p_2%20%28r%5E2%20%2B%202%20x%5E2%29%5C%5C%20%20p_1%20%28r%5E2%20%2B%202%20y%5E2%29%20%2B%202%20p_2%20xy%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x_{corrected}\\  y_{corrected}  \end{array} \right] = \left[ \begin{array}{c}  x\\  y  \end{array} \right] (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + \left[ \begin{array}{c}  2 p_1 xy + p_2 (r^2 + 2 x^2)\\  p_1 (r^2 + 2 y^2) + 2 p_2 xy  \end{array} \right]' title='\left[ \begin{array}{c}  x_{corrected}\\  y_{corrected}  \end{array} \right] = \left[ \begin{array}{c}  x\\  y  \end{array} \right] (1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + \left[ \begin{array}{c}  2 p_1 xy + p_2 (r^2 + 2 x^2)\\  p_1 (r^2 + 2 y^2) + 2 p_2 xy  \end{array} \right]' class='latex' /></p>
<p>after these two transformations we say that the camera is calibrated for the intrinsic parameters. at this point, if we know the position of the camera relative to the floor, elementary geometry allows us to solve the position of each point. usually, though, it&#8217;s hard to mount a camera with a specific angle to the floor, at a fixed height. to find these parameters we need to solve for the perspective transformation. this transformation basically will allow us to obtain a bird&#8217;s eye view of whatever the camera is capturing. this transform is given by the following operation [<a title="automatic perspective calibration @ ieeexplore.ieee.org" href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4756061" target="_blank">bevilacqua, gherardi, carozza</a>]:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%27%5C%5C%20%20y%27%5C%5C%20%201%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%3D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bccc%7D%20%20h_%7B11%7D%20%26%20h_%7B12%7D%20%26%20h_%7B13%7D%5C%5C%20%20h_%7B21%7D%20%26%20h_%7B22%7D%20%26%20h_%7B23%7D%5C%5C%20%20h_%7B31%7D%20%26%20h_%7B32%7D%20%26%20h_%7B33%7D%20%20%5Cend%7Barray%7D%20%5Cright%5D%20%5Cleft%5B%20%5Cbegin%7Barray%7D%7Bc%7D%20%20x%5C%5C%20%20y%5C%5C%20%201%20%20%5Cend%7Barray%7D%20%5Cright%5D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\left[ \begin{array}{c}  x&#039;\\  y&#039;\\  1  \end{array} \right] = \left[ \begin{array}{ccc}  h_{11} &amp; h_{12} &amp; h_{13}\\  h_{21} &amp; h_{22} &amp; h_{23}\\  h_{31} &amp; h_{32} &amp; h_{33}  \end{array} \right] \left[ \begin{array}{c}  x\\  y\\  1  \end{array} \right]' title='\left[ \begin{array}{c}  x&#039;\\  y&#039;\\  1  \end{array} \right] = \left[ \begin{array}{ccc}  h_{11} &amp; h_{12} &amp; h_{13}\\  h_{21} &amp; h_{22} &amp; h_{23}\\  h_{31} &amp; h_{32} &amp; h_{33}  \end{array} \right] \left[ \begin{array}{c}  x\\  y\\  1  \end{array} \right]' class='latex' /></p>
<p>on the left we have the corrected image point, on the right the matrix that describes its rotations and translations, and the uncorrected image point. these rotations and translations are the unknowns, called the extrinsic parameters. once we have a bird&#8217;s eye view of the scene we can infer distances between points. we just need to locate one point, so we&#8217;ll be able to define a fixed coordinate for all points.</p>
<h2>a little code:</h2>
<p>when you don&#8217;t know these parameters, because cameras don&#8217;t have a datasheet stating the angle between the lens and the sensor, or how much the lens distorts the image, you can obtain them capturing know objects with identifiable points. chessboards are a good example. fortunately i had to do very little with this math introduction to calibrate the image, because <a title="opencv @ willowgarage.com" href="http://opencv.willowgarage.com/wiki/">opencv</a> solved most of these problems with just a few function calls. anyway, i didn&#8217;t know that until i studied image projection, and it eventually came handy to know the inner works.</p>
<p>so, opencv provides me: a way of detecting chessboard corners, those referred easily identifiable points; given a series of chessboards, the intrinsic parameters; given four image points and their corrected projection, the extrinsic parameters.</p>
<p>detecting chessboard corners is a call away from <strong>cvFindChessboardCorners()</strong>. this accepts an image and returns a list of points. this list of points can be used, along with the image that produced them, to call <strong>cvFindCornerSubPix()</strong>, and get subpixel accuracy on those same points.</p>
<p>given a series of captures of different images from chessboards, which will produce a series of lists of points, opencv provides <strong>cvCalibrateCamera2()</strong>, that calculates the rotations and translations of the chessboard between captures, thus fixing all 9 intrinsic parameters. it should be noted that, for better results, at least 10 chessboard captures should be done. using <strong>cvUndistort2()</strong> one is able to see the result of correcting an image for the intrinsic parameters. this is easily evaluated for fisheye lenses, since after the calibration no visible distortion should be noticed. straight lines should remain straight [<a title="straight lines have to be straight @ springerlink.com" href="http://www.springerlink.com/content/m9cx2b2au3eyj8gp/?p=6697af31dc5442cf8f391e11387d6e26" target="_blank">devernay, faugeras</a>]. <strong>cvUndistortPoints()</strong> corrects a sparse set of points instead of a whole image.</p>
<p>once calibrated for the intrinsic parameters, we can find all 8 extrinsic parameters (the matrix is normalized so that <img src='http://s.wordpress.com/latex.php?latex=h_%7B33%7D%20%3D%201&#038;bg=T&#038;fg=000000&#038;s=0' alt='h_{33} = 1' title='h_{33} = 1' class='latex' />) using 4 collinear points (their ideal and distorted positions). one can do this laying a chessboard on the road and detecting the outermost corners. we know that these form a rectangle, so we can fix 4 coordinates that form a rectangle where those corners should be projected. opencv allows us to do this using <strong>cvGetPerspectiveTransform()</strong>. the result can be observed with a call to <strong>cvWarpPerspective()</strong>, which yields the referred bird&#8217;s eye view (or the result of any other calculated perspective transform). <strong>cvPerspectiveTransform()</strong> corrects a sparse set of points instead of a whole image.</p>
<p>so, since we now have a bird&#8217;s eye view, we only need to locate two points in the image and indicate their real coordinates. this will allow us to both find the relation between distances in pixels and distances in the real world and also fix the location of all the points.</p>
<h2>conclusion:</h2>
<p>this is pretty much an overview what i&#8217;ve been doing, and is greatly based on &#8220;<a title="learning opencv @ oreilly.com" href="http://oreilly.com/catalog/9780596516130" target="_blank">learning opencv: computer vision with the opencv library</a>&#8220;, from o&#8217;reilly media. further steps include making use of this map to abstract algorithms such as &#8220;lane detection&#8221;, &#8220;car positioning&#8221;, to work at a car coordinate level, instead of image coordinates. this will not only make it easier for the programmer to produce algorithms but will also facilitate porting solutions to other architectures, and different camera mounts.</p>
<p>the project code is not public <em>per se</em>, but i&#8217;m free to disclose any requested parts.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1103:inverse-perspective-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uma nova onda</title>
		<link>http://bugflux.org/blog/1087:uma-nova-onda/</link>
		<comments>http://bugflux.org/blog/1087:uma-nova-onda/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 16:42:11 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1087</guid>
		<description><![CDATA[bem, com este post mudo o tema do site. agora estou a usar o twentyten, que veio com a última actualização do wordpress. o motivo para isto é o facto de estar farto do visual antigo, mas não estar com &#8230; <a href="http://bugflux.org/blog/1087:uma-nova-onda/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>bem, com este post mudo o tema do site. agora estou a usar o <a title="2010dev.wordpress.com" href="http://2010dev.wordpress.com/" target="_blank">twentyten</a>, que veio com a última actualização do <a title="wordpress.org" href="http://wordpress.org/" target="_blank">wordpress</a>. o motivo para isto é o facto de estar farto do visual antigo, mas não estar com <a title="a whole new mind @ danpink.com" href="http://www.danpink.com/whole-new-mind" target="_blank">cérebro direito</a> para inventar um novo. de qualquer das formas, senti-me na obrigação de lhe dar um toque pessoal por onde o criador sugere, e foi então que peguei no telemóvel e dei um requinte à ideia matinal de tirar uma foto a um molho de t-shirts. peguei no <a title="gimp.org" href="http://www.gimp.org/" target="_blank">gimp</a>, <em>posterize</em> seguido de <em>cartoonize</em> e o resultado até que me agradou sem grande esforço.</p>
<p><span id="more-1087"></span><br />
sobre as t-shirts, a ideia surgiu-me ao acordar, claro, talvez porque durante o sono estive a arrumar os acontecimentos dos últimos dias em aveiro, onde foi depositada muita atenção nas minhas cores.</p>
<p>sobre o telemóvel, tenho uma história mais longa. há já algum tempo que procurava um telemóvel que me permitisse uma maior e melhor sincronização de calendários, contactos, e-mail e redes sociais como bónus. apesar de ter surgido muito antes, esta ideia tornou-se mais forte com o aparecimento de um <a title="android.com" href="http://www.android.com/" target="_blank">android</a> acessível no mercado português, o <a title="magic @ htc.com" href="http://www.htc.com/www/product/magic/overview.html" target="_blank">htc magic</a>. acontece que, picuinhas como sou, não o comprei. o que se passava na altura, e ainda agora, é que todos os telemóveis da htc tinham um compromisso: ou era o ecrã, ou a memória, ou o processador, esquecendo o preço. enfim&#8230; não gosto de compromissos! graças ao empurrão na pesquisa dei para olhar para outros mercados, como o alguns <a title="symbian.org" href="http://www.symbian.org/" target="_blank">symbian</a> da <a title="nokia.com" href="http://www.nokia.com/" target="_blank">nokia</a>, e mesmo o <a title="iphone @ apple.com" href="http://www.apple.com/iphone/" target="_blank">iphone</a>. quanto aos symbian, apesar da instalação no mercado, dei-os como mortos, lentos, e mesmo com bugs. quanto aos iphone é fácil esquecer a paixão, pois o preço nunca se justifica.</p>
<p>a febre passou até que um dia, por engano, tropecei no <a title="wave @ samsungmobile.com" href="http://wave.samsungmobile.com/" target="_blank">samsung wave</a>. engraçado o preço ter sido a primeira coisa a reparar, 340€ na vodafone. até seria caro, dependendo do que tinha dentro. mas até fui ver o que tinha dentro. não descobri senão um <a title="super amoled @ wikipedia.org" href="http://en.wikipedia.org/wiki/Super_AMOLED" target="_blank">ecrã maravilhoso</a>, um <a title="cortex a8 @ arm.com" href="http://www.arm.com/products/processors/cortex-a/cortex-a8.php" target="_blank">processador potente</a>, e uma autonomia razoável. vi logo que seria um bom negócio, e já lá vai mais de um mês e muitas <em>reviews</em>. depois de muita espera na vodafone acabei por comprar na <a title="expansys.pt" href="http://www.expansys.pt/" target="_blank">expansys</a>, que fez um excelente serviço aos melhores preços.</p>
<p>o maior medo era o <a title="bada.com" href="http://www.bada.com/" target="_blank">bada</a>, o novo sistema operativo da samsung. olhando para os vídeos a interface notava-se muito fluida, e com todas as funcionalidades básicas. o defeito é a escassez de aplicações. dei por mim a ser desencorajado por colegas com android, e perguntei quantas aplicações já tinham descarregado, ao que me responderam centenas. perguntei se eram úteis, e disseram que sim, liam códigos de barras no supermercado. perguntei quantas vezes fizeram isso: uma. é verdade, uma. o telemóvel para mim, apesar de necessitar de funcionalidades avançadas, não necessita de <a title="durex baby app @ youtube.com" href="http://www.youtube.com/watch?v=_xEoqWuN1_8" target="_blank">acasalar com outros</a>, nem exprimir <a title="i am rich @ wikipedia.org" href="http://en.wikipedia.org/wiki/I_Am_Rich" target="_blank">o quanto sou pobre</a>. precisa de fazer o que disse inicialmente: sincronizar e comunicar.</p>
<p>acontece que este telemóvel faz isso na perfeição. há já muito tempo, na perspectiva de comprar um telemóvel novo, ou ser assaltado e perder o cartão, comecei a organizar os contactos no <a title="contacts @ google.com" href="http://www.google.com/contacts" target="_blank">google contacts</a>, com fotos, datas de nascimento, a história toda. uma das primeiras coisas que fiz com o novo wave foi sincronizar a conta do google et voilá, os contactos estavam no meu telemóvel, foto e tudo, o que não acontece em muitos clientes <a title="activesync @ wikipedia.org" href="http://en.wikipedia.org/wiki/ActiveSync" target="_blank">activesync</a>. configurei a <a title="andreprata @ facebook.com" href="http://www.facebook.com/andreprata" target="_blank">conta do facebook</a> e seleccionei uma série de contactos para importar. a maioria deles ficou associado com os do google, mas outros tive de associar manualmente. a associação automática é feita, parece-me, por campos de contacto comuns entre as pessoas, como o e-mail ou o número de telefone. para as pessoas que não têm estas informações no facebook é impossível adivinhar, e associar pelo nome seria até indesejável. infelizmente o telefone faz uma certa distinção entre os contactos das contas de sincronização, o cartão sim e o telefone, não sendo possível a cópia entre o primeiro e os dois últimos e vice versa.</p>
<p>tive há dias a oportunidade de mexer num <a title="droid @ motorola.com" href="http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/Motorola-DROID-US-EN?localeId=33" target="_blank">motorola droid</a>. achei extremamente esquisito que o android não forneça um mecanismo para terminar aplicações. por um lado faz sentido, só as termina quando for preciso (mas ao menos deixa o utilizador escolher?), por outro não faz sentido nenhum, pois as aplicações ficam em segundo plano a consumir recursos&#8230; oops, não! não ficam! ficam em memória, mas não lhe é concedido processamento! quer dizer, eu carrego uma página web mas entretanto gostava de verificar uma mensagem que recebi, quando volto à aplicação é que a página continua a carregar! isto não acontece com o wave. o wave tem verdadeiro <em>multitasking</em>, neste exemplo a página continua a carregar e, quando volto ao <em>browser</em>, tenho tudo arrumadinho para consulta. infelizmente, e na única situação que me apercebi de lentidão, um evento em segundo plano que encrava ligeiramente a fluidez são os avisos de nova mensagem, novo e-mail, etc. talvez um problema do escalonador, talvez uma necessidade enorme de processador.</p>
<p>sobre a câmara, o resultado não está propriamente à vista, mas estou satisfeito. é fácil encontrar exemplos de vídeos e fotos na net, mas sempre tendo em conta que são &#8220;apontar e disparar&#8221;, nada cuidado. apesar de tirar boas fotos e óptimo vídeo, acredito que a fotografia é muito mais do que perfeição de imagens. apesar de uns milhares de euros fornecerem um potencial enorme em termos comerciais, a fotografia amadora é mais acerca de captar momentos, e exprimir sensações, que está muito além de resoluções, sensibilidades, tempos de exposição&#8230; mesmo assim existem algumas possibilidades de manipulação destes parâmetros, nomeadamente a exposição, alguns efeitos de pós processamento, etc.</p>
<p>quanto à autonomia, claro que não é telemóvel para durar uma semana, mas isso também depende do uso que se lhe dá. isto é, durante a noite, em rede 2G e sem outras conectividades ligadas, a bateria desce cerca de 5%. feitas as contas, se o deixar assim, dura 6 dias, o que vai além de muitos telemóveis sem motivo para consumir mais. esta bateria aguenta seguramente dois dias cada um com duas horas de mensagens de texto, 10 minutos de conversação, meia hora de wi-fi, 15 minutos de <em>need for speed: shift</em>. talvez mais.</p>
<p>no final de contas não me arrependo do investimento. ao fim de tanto tempo foi o único telemóvel que me captou a atenção em termos de qualidade/características/preço e, até agora, ficou à altura. também não foi só a mim que captou a atenção. este telemóvel ainda não chegou a todos os mercados e já esgotou em muitas lojas. é fácil também encontrar pela internet muitos fóruns e conversas dedicadas ao telemóvel e ao sistema operativo; a <a title="gsmarena phone rankings (20100705)" href="http://bugflux.org/wp/wp-content/uploads/2010/07/rankings.png" target="_self">actividade no gsmarena</a> não deixa dúvidas; e o objectivo da samsung em <a title="samsung aims to double smartphone market share @ businessweek.com" href="http://www.businessweek.com/news/2010-06-21/samsung-aims-to-double-its-smartphone-market-share-update1-.html" target="_blank">duplicar a quota</a> no próximo ano parece-me <a title="200,000 galaxy s in 10 days @ gsmarena.com" href="http://www.gsmarena.com/200000_samsung_glaxy_s_phones_sold_in_south_korea_in_10_days-news-1786.php" target="_blank">já ter estado muito mais longe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1087:uma-nova-onda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ignorância, fonte de bem estar</title>
		<link>http://bugflux.org/blog/1064:ignorancia-fonte-de-bem-estar/</link>
		<comments>http://bugflux.org/blog/1064:ignorancia-fonte-de-bem-estar/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 20:58:56 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[pt]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[society]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1064</guid>
		<description><![CDATA[quantos de nós se apercebem das manobras sociais de que somos vítimas diaramente? um quinto da população portuguesa tem facebook. mais de metade da população islandesa também. quem é que ia gostar do facebook se recebesse um &#8220;dislike&#8221; numa coisa &#8230; <a href="http://bugflux.org/blog/1064:ignorancia-fonte-de-bem-estar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>quantos de nós se apercebem das manobras sociais de que somos vítimas diaramente? um quinto da população portuguesa tem <a title="facebook.com" href="http://www.facebook.com/" target="_blank">facebook</a>. mais de metade da população islandesa também. quem é que ia gostar do facebook se recebesse um &#8220;dislike&#8221; numa coisa que partilhasse? claro que o botão não existe, era o fim da rede&#8230;</p>
<p>ninguém me tira da cabeça o <a title="mybrute.com" href="http://www.mybrute.com/" target="_blank">my brute</a>, tamanhas as conversas que tive de aturar durante os almoços&#8230; quem é que voltaria a um site onde via o seu boneco levar porrada todos os dias? eu continuo a apostar que mais de metade dos adversários eram aleatórios do sistema, feitos só para levar na boca e deixar as pessoas felizes, para que voltassem.</p>
<p>mas e o preço a pagar pela lucidez?</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1064:ignorancia-fonte-de-bem-estar/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>now in full hd</title>
		<link>http://bugflux.org/blog/1023:now-in-full-hd/</link>
		<comments>http://bugflux.org/blog/1023:now-in-full-hd/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 09:40:57 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=1023</guid>
		<description><![CDATA[so maybe buying an ultra laptop is not the way to go. the specs i listed are already packed in at least one product series, except for the price tag, of course. i don&#8217;t see it coming down to 50% &#8230; <a href="http://bugflux.org/blog/1023:now-in-full-hd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>so maybe buying an ultra laptop is not the way to go. the specs i <a title="deti" href="/?p=974">listed</a> are already packed in at least one product series, except for the price tag, of course. i don&#8217;t see it coming down to 50% in just a couple of months so my way to go about an update was to first buy an external monitor, which i&#8217;m now using as primary with my laptop. this is an <a title="lg w2261vp @ lge.com" href="http://www.lge.com/sg/it-product/monitor/LG-entertainment-monitor-W2261VP-PF.jsp" target="_blank">lg flatron w2261vp</a>, full hd, with one of the best subjective image quality around the stores, nice reviews along the web, and just a minor leakage at the sides, instead of below, like most. at the stores i was too impressed with the quality of some other appliances: i might buy two asus eee computers sometime in the future. one <a title="eeebox @ engadget.com" href="http://www.engadget.com/tag/EeeBox/" target="_blank">for the room</a>, another <a title="eeepc @ engadget.com" href="http://www.engadget.com/tag/EeePc/" target="_blank">for the road</a>. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/1023:now-in-full-hd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>toilets and other platforms</title>
		<link>http://bugflux.org/blog/991:toilets-and-other-platforms/</link>
		<comments>http://bugflux.org/blog/991:toilets-and-other-platforms/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:45:27 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[society]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=991</guid>
		<description><![CDATA[i think it&#8217;s funny that most people think they should be worried after watching this. so what is the problem with privacy? we&#8217;re all entitled to it; we have rights over it; the right to ignore it, if that suits &#8230; <a href="http://bugflux.org/blog/991:toilets-and-other-platforms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" style="width:560px; height:340px;" data="http://www.youtube.com/v/hrontojPWEE&#038;hd=1"><param name="movie" value="http://www.youtube.com/v/hrontojPWEE&#038;hd=1" /></object></p>
<p>i think it&#8217;s funny that most people think they should be worried after watching this. so what is the problem with privacy? we&#8217;re all entitled to it; we have rights over it; the right to ignore it, if that suits us!<br />
<span id="more-991"></span><br />
no one likes being told that the government listens to our conversations or that car plates will have tracking chips in the future. why? because it invades our privacy. i don&#8217;t like it either! why? because i have no choice!</p>
<p>people worry, for example, about the outcomes of using <a title="google to provide free wifi in san francisco @ engadget.com" href="http://www.engadget.com/2007/01/06/its-official-san-francisco-to-get-free-wifi-blanket-courtesy-o/" target="_blank">free wifi</a> from google, because of the facilitated ability it will give the company to collect &#8220;personal&#8221; data. i don&#8217;t care that google, or any other company, for that matter, collects my data. why? because:</p>
<ul>
<li>my web browsing data is not private. it has never been. but if that worries me i just <a title="hidemyass.com" href="http://hidemyass.com" target="_blank">hide my ass</a> or use encryption. most people seem to worry about admins reading their mail, but <a title="gnupg.org" href="http://www.gnupg.org/" target="_blank">gnupg</a> is a great working tool; use it.</li>
<li>my routes are not private, they have never been; cute girls can stalk me all they want, nothing i can do about it. although, if i&#8217;m carrying a wifi equiped device and don&#8217;t want the service providers to know about my roaming activity, i can just turn the device off. simple as that.</li>
<li>though i usually leave the &#8220;collect data to provide feedback box&#8221; unchecked, i believe regular usage information can help service providers enhance their service, and i think it is good to know that your presence somehow has an effect in the ecosystem.</li>
<li>i have other options, there&#8217;s always an alternative service.</li>
<li>i get advertisements all the time, but i block them because they just don&#8217;t make sense. but imagine being around lunch time in a random street and get an ad about a delicious hamburger just the next street, hell *that* would be great!</li>
</ul>
<p>of course this last argument has a problem. two problems, actually. the first problem is that most people don&#8217;t have the right tools to decide their actions, but that is an education problem, it&#8217;s the world we&#8217;ve grown up in. it started with television.</p>
<p>the second problem is far more complicated, and the only reason i&#8217;m pissed at google. google makes money placing ads. google places ads on the internet. google wants people to go to the internet. so google sells people a phone that can put them on the internet anywhere at anytime. google nexus is a great phone, it is the best phone ever. for a couple of weeks before the launch i seriously considered buying one, and i was really fond of the idea that google would change the market. but they didn&#8217;t, all they did was give the consumer the ability to choose if they want the phone locked or unlocked, that&#8217;s not new, not even in the states.</p>
<p>my problem with this scheme is that google makes money twice: selling the phone, then placing ads in it. i think google is a large enough company to really change the market and give the user two completely new options: pay for the phone, stay private; or take a free phone, let us make money out of how you use it.</p>
<p>you saw the video, there&#8217;s nothing wrong about google. google didn&#8217;t invade your privacy, google is just a tool. if you know there&#8217;s no way of using that tool against you then there&#8217;s nothing to be afraid of. take advantage, use it wisely!</p>
<p><em>and, seriously, see what kind of stuff the guy in the video wants to hide. that does not apply to you, you hope!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/991:toilets-and-other-platforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>deti student seeking</title>
		<link>http://bugflux.org/blog/974:deti-student-seeking/</link>
		<comments>http://bugflux.org/blog/974:deti-student-seeking/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:24:19 +0000</pubDate>
		<dc:creator>nDray</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://bugflux.org/?p=974</guid>
		<description><![CDATA[as my a8js&#8217; backlight dims i&#8217;m officially seeking a new laptop still buying this year. top considerations: manufacturer: this has to be apple, sony, toshiba or asus, mixed order screen: 14.1&#8243; proved itself ideal. also considering 13.3&#8243;. pixel size from &#8230; <a href="http://bugflux.org/blog/974:deti-student-seeking/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>as my a8js&#8217; backlight dims i&#8217;m officially seeking a new laptop still buying this year. top considerations:</p>
<ul>
<li><strong>manufacturer</strong>: this <a title="laptop reliability study @ gizmodo.com" href="http://gizmodo.com/5406415/laptop-reliability-study-asus-and-toshiba-come-out-on-top" target="_blank">has to be</a> apple, sony, toshiba or asus, mixed order</li>
<li><strong>screen</strong>: 14.1&#8243; proved itself ideal. also considering 13.3&#8243;. pixel size from 1366&#215;768, definitely led backlit (or better?)</li>
<li><strong>processor</strong>: something <a title="2010 intel core family @ intel.com" href="http://www.intel.com/pressroom/archive/releases/20100107comp_sm.htm">2010 intel</a></li>
<li><strong>storage</strong>: <a title="ssd @ wikipedia.org" href="http://en.wikipedia.org/wiki/Solid-state_drive">ssd</a>!! when does it mass ship?</li>
<li><strong>graphics</strong>: something a bit more than &#8220;hd capable&#8221;, preferably dedicated</li>
<li><strong>price</strong>: up to 1100€, please?</li>
</ul>
<p>everything else is relevant, but not major. welcome things like apple mbp&#8217;s unibody, 7 hour battery, light sensors, illuminated keyboard&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bugflux.org/blog/974:deti-student-seeking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
