simonpena.com Una mezcla heterogénea de tecnología y desvaríos

29Apr/101

Introducing Jamp: a Jamendo client.

This last weekend we had two very interesting sessions in the Destkop and Mobile development module. On Friday,  it was an introduction to Python, followed by a PyGTK app. While the app was very simple, it covered the basics: using containers to add widgets, handling signals, setting callback functions. I liked it so much that I'm seriously considering porting maevies (the maemo app a friend and I are developing, stalled for some months) to PyGTK. After all, all we needed was libRest, and I'm confident that Python has something similar.

But that was on Friday. On Saturday, we started with the first workshop. During the module, we are going to develop a Gnome desktop application, which will be later ported / adapted to Maemo: a Jamendo client called Jamp. The application has ben designed / is being designed with that port in mind, so hopefully we won't need too many changes to achieve it. We've been distributed between three teams: UI with PyGTK, web API connection with libsoup, and multimedia playback, with gstreamer. Wikipedia says

Jamendo is a music platform and community.

All music on Jamendo is free to download and licensed through one of several Creative Commons licenses or the Free Art License, making it legal to copy and share, as well as to modify and make commercial use of for some, depending on the license. Jamendo allows streaming of all of its thousands of albums in either Ogg Vorbis or MP3 format, and downloads through the BitTorrent and eDonkey networks.

So, while we learn, we'll be contributing to a Good Thing™ :) . I'm very motivated about using git, doing a team development, submitting patches, and enjoying such a collaborative environment.

I'll try to keep you updated :)

Tagged as: 1 Comment
12Apr/109

The importance of a good IDE: which one to choose (and why)?

A few months ago, when I was trying to start developing for maemo, I discovered a project called ESbox. ESbox is "an Eclipse Ganymede-based product that helps programmers to develop applications for Maemo platform using Scratchbox Apophis". It launches scratchbox transparently, includes wizards for different types of apps, lets you debug step by step and on device, and also uses C/C++ or Python plugins, so you can refactor code, jump to variable declarations, explore types, autocomplete...

I don't know exactly when it was, but I once came to maemo IRC channel to ask a specific (maybe too specific) question about ESbox. I was surprised that nobody was using it: people there were using nano, vi, Emacs... I asked them about all the features a "full IDE" offers: what about code refactoring? what about autocompletion? debugging? While some said that you can get emacs to auto-complete from a given dictionary, the other questions remained unanswered. In fact, I almost felt like we weren't talking the same language.

Our discussion wasn't constructive at all: I don't know if it was the language barrier, if it was me who said something inappropriate in the beginning, or if I met people too "Taliban". The thing is that I had to listen things like "real programmers know the name of the functions / methods they need: autocompletion is for dumbs". And no, it wasn't a joke like "real programmers develop their own device drivers". So I gave up and left the channel: I assumed that programmers would choose their IDEs according to the kind of development they were doing, so "hobbyists" would use nano, would copy & paste and wouldn't care too much about extras, and "professionals"  would use others, or at least would know and use the extras I wanted. And time went by.

As I was telling you in the last post, this Friday we've got our first session in the Desktop & Mobile development module of the master. After its presentation, we had a brainstorming to choose which app we will be developing during the workshops, and then... we started talking about IDEs. More specifically, Emacs.

That gave me the opportunity to confirm that there really was a difference between professional developers and non-professional, and that my worries were really shared by others. It was a really interesting chat, where we were explained the environment, from the basics (navigation a buffer, open, close, kill and yank...) to more complex things: debugger integration, syntax highlighting modules, autocompletion, macros...

After the session, I now can understand other people not using Eclipse or Netbeans, while still being productive. I'm not going to use Emacs, not yet, as it looked like some of the features that "just work" in Eclipse require some fiddling in Emacs; but at least I know that someone using Emacs and mastering it will be as efficient as an Eclipse user -or even more.

Still, when I think about the things I like to have working in Eclipse, the following comes:

  • Version control: I'd like to be able to check history, undo changes across revisions, commit changes, check "who did what" (blame)
  • Debugging: Set breakpoints, set conditional breakpoints, step by step debugging, variable inspection
  • Syntax highlighting, code folding, autocompletion (preferable if it can include code I've done, not only know APIs), code refactoring (variable names, methods, etc), comment & uncomment.
  • Compilation management: Make integration (or other options like ant or maven for Java). Build automatically, "live" syntax error detection.
  • Bug tracking system integration
  • GUI editor

I know that I can do all of the above using Eclipse, and since this Friday I know that some of them are also possible with Emacs, so now I'd like to have some feedback:

What do you expect in an IDE? Is your list similar to mine? What is your IDE of choice? Which special options of your IDE you use the most? Which options are you most proud of?

Tagged as: , , 9 Comments
11Apr/100

SmashTheStack: Juegos de guerra

Si tuviera que escoger mi aplicación o servicio web favorita, probablemente escogería Google Reader. Inicialmente se "vende" como un lector de RSS, para seguir blogs, noticias y demás. Sin embargo, la componente social es lo que lo convierte en indispensable: puedes leer los elementos que tus contactos compartan, compartir con ellos los que a ti te parecen interesantes, dejar y recibir comentarios… En ocasiones, se crean discusiones muy ricas: mucho más que las que puedas encontrar en un blog "normal", o en Meneame, puesto que te permiten enterarte de la opinión de personas a las que conoces, y no de desconocidos.

Últimamente me estoy aficionando a leer "planets" (agregadores de blogs de una misma temática, bien sea una empresa, una plataforma, o cualquier cosa). Sigo el de Gnome, el de Maemo, el del Máster en Software Libre, el de Igalia… Y fue gracias al de Igalia, aquí, que conocí Smash The Stack.

Ellos se definen como

The Smash the Stack Wargaming Network hosts several Wargames. A Wargame in our context can be described as an ethical hacking environment that supports the simulation of real world software vulnerability theories or concepts and allows for the legal execution of exploitation techniques. Software can be an Operating System, network protocol, or any userland application.

Tienen distintas máquinas, con juegos distintos en cada una. En algunos casos tendrás que hacer buffer overflow exploits, en otros romper una contraseña usando John The Ripper, explorar el contenido de un binario que sospechas almacena la contraseña que te está pidiendo... Lo más interesante es que no se limitan a plantear los desafíos, sino que también plantean pistas, dan documentación, y hasta tienen un foro y un canal de IRC donde responden dudas.

¿Qué hace tan atractiva a esta propuesta? Que estás en un entorno controlado, que no hay posibilidad de hacer daño (o no debería) , que te guían en el aprendizaje... ¡Y que resulta muy divertido! Por lo de pronto estoy jugando en dos de las máquinas: IO y BLOWFISH. En la primera solo jugué un día, y estoy en el nivel 5. En la segunda, nivel 7.

No sé si podréis superarme (:P), pero ¡seguro que os lo pasáis genial si lo intentáis!

Filed under: Tech No Comments
9Apr/100

Looking forward (and enjoying it)

This Friday we're starting the Desktop/Mobile module on the Free Software Master. One of the reasons that brought me here was that one: I wanted to jump into GTK and Qt development, learn new programming languages, and, specifically, learn to develop for mobile devices. What I think now, which really gets me motivated, is the idea that considering how much I've enjoyed the previous modules which in advance didn't look so great (to me), this one will be incredible.

But there's also another point: more than a half of the course is over, now. Summarizing, we've gone through Introduction to Libre Software, where we learnt the most important people in this movement, learnt about Business Models or Licensing stuff among other things; Dynamics of Libre Software Communities, where we analyzed and studied several important communities and learnt the process to apply those analysis to other ones; and now, just before Easter Holidays, we've got Systems Integration with Libre Software. In this last module, even if it almost shares the name with a 5º course subject in Ingeniería Informática at UDC, we didn't learn Web Technologies (there's a module for that!): we've done security, systems administration, scripting, servers configuration and management, version control with git...

And, at this point, I'd like to share with you some of the things we've been doing here. Fortunately, my mates and I -as previous editions' students did- are using a subversion repository hosted at Morfeo's Forge, where all the practices and assignments were developed (in the open, as the master's philosophy would suggest), so it's very interesting to share all of this work with anyone interested.

I'm grouping them by subject -I won't link my mates' works, but they can do it in this post's comments-. I'll point out those mistakes I found after I handed out the works, and also all known limitations, some possible improvements or even things which are already outdated. Here it goes:

Introduction to Libre Software:

  • Business Model: I presented a business model focused on service-oriented apps for mobile devices. Accounting numbers aren't that accurate, but sources and references should be very handful just in case you're interested. About the ideas (licensed Creative Commons Attribution Share-Alike unless otherwise stated), I didn't want to reinvent the wheel, but joining and mixing existing technologies so I would get something attractive.
  • Mobile Operating Systems Review: I wanted to give a look at current OSs in mobile devices world, around Christmas 2010. However, less than a month later, Maemo and Moblin merged, Symbian accelerated its transition to Libre Software, Samsung focused more clearly on Bada... Maybe this is the most outdated work, but will be funny to check out after a year time.

Dynamics of Libre Software Communities

  • Eye Of Gnome Mini-Review: This work was intended for training us with the use of Libresoft Tools. Source code repository and mailing list were used, so we could identify the most important contributors to the project.
  • WebKit Project Review: My original idea was quite ambitious, as I wanted to compare WebKit and Gecko, but soon I focused on WebKit. While this work is really interesting, the conclusions I reached are quite biased: my main measure to evaluate code collaboration was the committer id, while WebKit project stores the real author of a commit in the ChangeLog, which I ignored. The good thing here is that, provided that a ChangeLog parser is done, my scripts, tools and procedures can be used to get a very nice report. Besides, being Igalia a company so involved in WebKit development (specially in WebKitGtk+), this work has a lot of potential.

Systems Integration with Libre Software

  • (Bash) Scripting: We went through some common problems in systems' administration: daemons, regular expressions, using find, sed...
  • Perl development: With the "Learning by doing" moto, we got introduced to Perl. It was a brief and interesting tutorial which meant, at least for me, meeting a language with a very bad reputation, but really powerful. I really enjoyed the last two exercises, when we played a while with Last.fm's API.
  • Networking: Some networking stuff. It was nice, as I already knew some things, but haven't heard at all of others. I'd say that, rather than building complex networks and all that, we had to really understand how they work.

Of course, I'm missing lots of things. So if you want further info, you can browse the full repository to get my mates' works or other years', you can check the moodle for the theory, read the planet for other comments... Enjoy, and Happy Hacking!