Amazing Xcode

Xcode is amazing. Of all the IDEs I’ve used (and this is, as always, a personal opinion, having used Visual Studio since version 6, Eclipse, Kdevelop and others) it’s the one I prefer. And today I found another reason to like it.

I’ve noticed this: when I use Xcode on a single-processor machine (such as a Powerbook G4) and I rebuild my master thesis project (in C++) I see this build window:

No big deal: each file is compiled, one after the other. However, it seems that when I run it on a dual-processor machine (both in my dual G5 desktop and my Intel Core Duo 2 MacBook) I get a boost in compiling time, with parallel compilations! See this:

Then, coupled with Bonjour networks, you can even go faster, using the processing time of your peers’ computers to have smaller compilation times.

ImageMagick

ImageMagick is a cool toolkit; not only it’s a complete set of command-line applications, ported to Windows, Mac and Linux, supporting hundreds of different image formats, it’s also a C++ library that you can use in your own applications!

On Mac OS X, I installed it via MacPorts using the all-time classic:

sudo port install ImageMagick

Then I created a C++ command-line application with Xcode, set the header and library paths in the target properties (/opt/local/include/ImageMagick and /opt/local/lib in this case) and I was ready to code. The API documentation and the tutorial give some hints, and using those examples I’ve cooked a quick image transformation utility to play with:

[source:c]

include

using Magick::Image; using Magick::Geometry; using Magick::Blob;

int main (int argc, char * const argv[]) { Blob blob;

Image png;
png.read("pic.png");
png.write(&blob);
Image jpg(blob);
jpg.magick("jpg");
jpg.zoom(Geometry(100, 200));
jpg.write("newpic.jpg");
Image tiff(blob);
tiff.magick("tiff");
tiff.zoom(Geometry(3000, 84000));
tiff.write("newpic.tiff");
Image gif(blob);
png.magick("pdf");
png.write("newpic.pdf");
return 0;

} [/source]

Interesting stuff indeed! The API provides a complete set of “Photoshop-like” operations on images, which I plan to study further in the near future.

Pourquoi pas?

Pourquoi ne peut-on pas avoir des conférences comme celle-ci, avec des mini-events comme celui-ci en parallèle en Romandie? Ou encore comme celle-ci? Ou bien comme cette autre! Ou celle-là!

Pourquoi pas? Est-ce que le marché est trop petit? Y a-t-il un manque d’intérêt général? Je pense que le problème est important, et qu’une grande partie de l’élan technologique local est étouffé par ce manque d’une grande conférence technique chez nous.

Après tout, le web a été inventé à Meyrin. Continue reading

Ojo con los Orozco, por León Gieco

Nosotros no somos como los Orozco, yo los conozco, son ocho los monos: Pocho, Toto, Cholo, Tom, Moncho, Rodolfo, Otto, Pololo. Yo pongo los votos sólo por Rodolfo, los otros son locos, yo los conozco, no los soporto. Stop. Stop.

Pocho Orozco: Odontólogo ortodoxo, doctor Como Borocotó Oncólogo jodón Morocho tordo Groncho jocoso Trosko Chocó con los montos Colocó Molotov. Bonzo. Continue reading

WWDC Schedules in iCal format

For those attending WWDC, and wanting to have the module complete schedule in iCal (as suggested by TUAW), I’ve created a small script (using Prototype) that will transform the JSON data of the official WWDC schedule into calendar files, which you can save and load into iCal.

This script was featured in another TUAW entry! Thanks to Mat for the link!

Enjoy! I hope this will be useful to you. By the way, if you’re attending WWDC, just leave a comment below.

Update, 2008-05-26: Thanks to Jeff LaMarche for posting a link to the calendars from the cocoadev mailing list, and to Second Gear for using the calendars with their own products! :)

Symfony con MAMP

estuve jugando un rato con symfony y MAMP, y esta bastante bueno, aunque hay un par de cosas que no me gustaron. aqui van unos comentarios que te podran ser utiles.

me puse a leer las instrucciones de instalacion, y despues encontre el tutorial, de donde saco gran parte de lo que escribire en este articulo.

ahi dice que hay un archivo tgz que podes bajar de aca. se llama “sandbox” (caja de arena) y tiene todo listo y esta especialmente destinado para principiantes.

lo baje y lo descomprimi (haciendo doble click) en el web root – yo lo tengo seteado en ~/Sites, mira esta pantalla de configuracion de MAMP:

entonces puse la carpeta sf_sandbox en ~/Sites/sf_sandbox.

como tengo el MAMP andando abris un browser y te vas a http://localhost/sf_sandbox/web/index.php/

primero no me anduvo porque tenia MAMP con la opcion “PHP 4″, y la cambie a “PHP 5″ y anduvo:

Continue reading

On the Need of Minimalist Polyglots

Many companies, at some point of their history, ask themselves a simple question: what programming language should I use? The answer to this question is tricky, and has big, big consequences, for every single line of code of your future products will be written, read and suffered by it. This single choice defines the level of salaries you will have to pay, the skills of programmers you will have to deal with, the relative length and performance of your systems, the availability of tools (or lack thereof), the kind of support you will get (or not), the number of operating systems your code will work in, etc.

Given the fact that Web Development equals Software Development, this discussion will be of interest to those building the smallest websites, as well as old desktop-intensive apps. It will not be a “Tell me what programming language you use, and I will tell you who you are” type of article, though it may look like one, because that is something you have to figure out all by yourself.

If you take a look at the list of programming languages, any business person would have an instant headache. There are lots of them. With the strangest names. You cannot possibly guess which one to pick from such a list, obviously. So, how do companies choose the languages they use? There are some straightforward methods that I have seen so far, in no particular order:

  • Looking at what other companies use (typically Google, Microsoft, Apple or Sun, but it could be 37signals too).
  • Following the advice of the CIO, the Lead Architect or some other politically-powered person, which might or might not have read this article ;)
  • Looking at what the current pool of programmers in the company know how to use. Rinse, wash, repeat.
  • Following hype.
  • Because there is a market plenty of available, cheap programmers that I could use for this project.
  • Taking into account the characteristics of the languages themselves (static vs. dynamic, etc).
  • Following the company’s history of past projects (successful or not).
  • Following what your the client suggests (or mandates).

I think that it is a very bad idea to take any of the above methods in isolation, without considering other factors. Doing so is a path to self-destruction in the medium to long term, even if you succeed in the short term.

Continue reading