Thursday, September 24, 2009

New Course

After 3 years at Enormo, I have started to study a MSc in Economics. It will last 2 years. During these years I will focus on studying, so I will not work at the same time.

Why this change? After knowing how the monetary system works I realized that I didn't really know what money is! Besides, crisis made me see that the economic system is very important, but also far from perfection.

As a person interested in systems in general, I see the economic system as one of the most complex and important over the world.

Nuevo Rumbo

Después de haber estado trabajando 3 años en Enormo, finalmente he decidido dar un cambio de rumbo a mi vida. Los próximos dos años los voy a dedicar a estudiar un Máster en Economía en Madrid. Durante estos dos años me consagraré exclusivamente al máster, es decir, no trabajaré.

Este cambio se debe a un creciente interés por los asuntos de economía. Supongo que este interés surgió tras conocer cómo funciona el sistema monetario, lo que me causó un tremendo impacto. ¡No tenía ni idea de lo que era el dinero! Y sospecho que no mucha gente lo sabe.

Por otro lado, la crisis económica me ha mostrado cuán importante e imperfecto es el actual sistema económico.

Saturday, June 13, 2009

Propuesta para el gobierno: Facturación online sin necesidad de ser autónomo

Actualmente sólo hay dos modos legales para facturar:

  1. Tener una empresa
  2. Ser autónomo
Pero, ¿qué puedes hacer en caso de tener que facturar un trabajo esporádico? Ejemplos de estos trabajos podrían ser:
  • Estoy en paro y no encuentro trabajo. He encontrado una oportunidad para pintar las oficinas de una empresa. Pero no puedo hacerlo porque me exigen una factura.
  • Soy un profesional con trabajo estable y tengo cierta experiencia, lo cual hace que de vez en cuando me ofrezcan trabajos esporádicos de otras empresas. No puedo hacerlos porque tendría que emitir una factura.
  • Estoy trabajando como empleado de una empresa. Pero ahora estoy pensando en tener mi propio negocio y hacerme autónomo. El problema es que no estoy seguro del paso. Me vendría muy bien poder facturar unos cuantos trabajos sin darme de alta en autónomos para poder probar antes de dar el gran paso.
No hay manera legal de facturar si no eres autónomo o tienes una empresa. Existe cierto vacío legal con facturaciones menores de 3000€ a la misma empresa durante el mismo año. Este vacío es el que la gente suele usar para facturar esos trabajos esporádicos. Pero claro, esto forma parte de la economía sumergida y además la gente lo hace sin estar seguro de su legalidad.

Parece sensato que se pudiera facturar trabajos puntuales de modo legal y simple. Esta es la razón de mi propuesta.

Sistema oficial de facturación on-line para trabajos esporádicos

La idea es que Hacienda cree una página web donde hacer facturas usando tu DNI. En estas facturas deberías indicar los conceptos y su IVA. Una vez emitida la factura, está queda registrada en Hacienda, con lo cual el IVA cobrado será incluido en tu siguiente declaración de la renta.

Ejemplo: Quiero facturar 4000 € por pintar una oficina. Voy a la página web de hacienda, me autentifico, y pongo como concepto 4000 € por pintar la oficina más el 16% del IVA. Total, 4640 €. Grabo mi factura y la imprimo para presentársela a mi cliente. En la declaración de la renta del año siguiente Hacienda automáticamente incluirá en mi borrador los 640 € del IVA que tengo que devolver por la factura (No estoy seguro de la cantidad ya que no soy un experto en contabilidad).

El sistema, por simplicidad, no permitiría desgravarte el IVA de tus gastos. Por ejemplo, el IVA de las facturas por la pintura. Está sería una desventaja frente un autónomo, lo cual implica que si tus facturas no son esporádicas, te interesará darte de alta en autónomos.

Técnicamente el sistema no es nada complicado. Un posible problema es cómo autentificar que la persona que está realizando la factura es quien dice ser. Esto se podría hacer mediante certificado electrónico, DNI digital, o simplemente como hace Hacienda para los borradores de la declaración.

Incluso Hacienda no tendría por qué desarrollar el sistema. Ya hay empresas que ofrecen servicios de facturación para autónomos por internet, como Facturagen , que podrían ser fácilmente adaptados para este sistema. Podrían simplemente establecer acuerdos con estas empresas. (Disclaimer: Facturagen es parte de la empresa de un amigo mío.)

Posibles problemas

Un posible problema que veo tiene que ver con el uso fraudulento del sistema. Ciertas empresas podrían presionar a sus empleados para ser pagados a través de este sistema en lugar de ofrecerles un contrato de trabajo. Actualmente esto ya ocurre con los autónomos, pero con este sistema los obstáculos para hacerlo serían aún menores. En cualquier caso, seguro que algo se podría hacer para minimizar este efecto. Por ejemplo, quizá se podría establecer un límite máximo de facturación para la misma empresa por persona, pero superior a los 3000€ actuales.

En tiempos de crisis

Ahora que estamos en tiempos de crisis, es un momento magnífico para este sistema. Hay mucha gente en el paro que no encontrará trabajo y tendrá que subsistir con lo poco que consigan por trabajos de poca monta y chapucillas. Pero tendrán que hacerlo fuera de la legalidad, en la economía sumergida.

Esto les ayudaría a hacerlo de forma legal y permitiría a la administración reducir el tamaño de la economía sumergida. Es decir, podría ayudar a la gente en paro a pasar mejor el apuro.

La idea me parece buena. Ahora bien, yo no soy ningún experto en estos temas. Quizás hay algo que se me escapa que haga que no sea tan buena idea. Si a alguien se le ocurre algo que me lo diga.

He enviado esta idea a algunos emails que he encontrado del Ministerio de Economía por si sirve de algo.

Sunday, November 23, 2008

Properazzi.com is now Enormo.com

Properazzi is now Enormo.com!

As part as our constant evolution, we have changed the portal name. Now it is named Enormo.com with the aim of fitting better with the site aspirations.

Enormo is currently the properties search engine with more listings arround the world: more than 6 Million.

Sunday, September 14, 2008

Paper: "IRLbot: Scaling to 6 Billion Pages and Beyond"

Two of the most complex issues to deal with when developing a crawler are URL uniqueness and host politeness. When crawling, you need to visit new pages. In order to know which URL represents a new page, you have to do a look up over the list of already crawled URLs. That is easy when dealing with small amounts of URLs, but it is extremely hard when dealing with billions of pages.

In the paper "IRLbot: Scaling to 6 Billion Pages and Beyond" (PDF) by Hsin-Tsang Lee, Derek Leonard, Xiaoming Wang, and Dmitri Loguinov, the authors describe a memory and disk data structure named DRUM. It provides with an efficient storage of large collections of (key, value) pairs, and maximizes the amortized throughput of insertions, updates and lookups. In order to achieve maximum throughput, queries are done in batches: only when some structures in memory are full, all the queries are executed. So queries are answered asynchronously. Another advantage is that DRUM adapts to different combinations of memory/disk. The bigger the memory, the better the performance. And, with larger disk space, DRUM capacity gets increased. DRUM is a modification of the bucket sorting algorithm.

The paper also talks about the techniques for dealing with spam sites and a budget system to crawl more pages from sites that receive more inbound links.

DRUM is the best approach I have seen until now to solve the problem of URL uniqueness. The paper is a “must read” if you are working with crawlers.

Tuesday, July 8, 2008

Google Protocol Buffers released as Open Source

Google has released as open source its Protocol Buffers library, used for serializing structured data (documentation). Google has been massively using this library in their systems for storing and sharing data. I guess that most of the files stored in their internal GFS are encoded using Protocol Buffers.

It has several interesting features. First of all, the types support variable-length encoding. This fact can lead to big storage savings when dealing with big amounts of data.

The second characteristic is that it allows changes in the data schema at the same time that
forward compatibility is maintained. This point is really important due to the fact that
changes in the schema are something common in practice. Besides, forward compatibility allows old systems and data to cohabitate with new ones.

The third feature is its availability for C++, Java and Python, making it easy to share data between these three languages. Facebook has recently released Thrift, another approach to serialization and RPC.

More information about the topics in this post and the comparison with Hadoop serialization on Tom White blog

Monday, May 12, 2008

Paper: Detecting Near-Duplicates for Web Crawling

Three guys from Google have published the paper Detecting Near-Duplicates
for Web Crawling
at the 2007 WWW Conference with a technique for detecting near-duplicates over a set of web pages.

They have developed a method aimed at performing near-duplicate detection over a corpus of 8B pages with a dataset of hashes of only 64 GB (Wow!).

Interesting issues tackled within the paper:

  • A method (simhash) for hashing documents. It has a very interesting attribute: hashes of similar documents are very close. You could consider that 2 documents are duplicates if their Hamming distance is 3 or less. They say that 64 Bits hashes are enough for near-duplicate detection over 8B pages.
  • A way to compress the hashes so that all the data needed for performing near-duplicate detection over 8B pages fit within over 32GB
  • A fast way to look for duplicates at Hamming Distance of 3 or less.
  • A fast way to perform batch queries using MapReduce with a speed of 1M fingerprints every 100 seconds with 200 mappers.
  • A good review of the state of the art of the duplicate detection: it is shown what shingles are; the authors propose to use typical IR document vectors for document attribute extraction; some possible usages are also mentioned, as well as other algorithms for performing duplicate detection.