Last week, I gave a lecture on Basic .NET Development (focusing on C# and ASP.NET). To say the truth, I can’t count myself as an expert on these technologies (actually, I’m not an expert in any particular technology).

At the end of the course, I asked the students to fill a fairly simple form, which asked them what were the three worst problems and the three best things they experienced during the class. I decided to post it here because it can be useful for people preparing lectures who happen to stumble with this page. Helps to say: the form was anonymous.  The results (only for the three worst problems) are categorized below:

.NET Basic Development Course Feedback

.NET Basic Development Course Feedback (Bad Stuff)

Click here for the full responses (portuguese only). This link also includes the positive feedback.

Some interesting comments:

  • Short Timespan: That’s 100% my fault. Maybe I tried to squeeze as much content as I could in the fixed timespan we got. Doing this, you will always give people the feeling that you are out of time, and so are they.
  • Physical Infrastructure: If you are to prepare a course, don’t underestimate this. People don’t like to stay in an uncomfortable chair with wires all around. And this WILL affect the quality of the attention they will be able to pay on you.
  • The Technology Sucks: We encoutered some bugs when dealing with some examples/exercises and had to get workarounds for them. Truth is every technology/programming language/software have bugs.
  • Software Infrastructue: Some (few) machines were not ready for some steps of the course.

I suppose there aren’t any comments regarding the instructor because the instructor asked for the feedback :).

The interesting stuff to notice here is : If I had spent more time(4 hours would be more than enough) preparing everything to improve the quality of the environment we spent together, I could get 70% of this stuff solved. They were simple, easy-to-notice, easy-to-solve issues.

So, the lesson I learned was: Get yourself involved in every step of the course. Prepare the environment yourself (or at least check it early). Check the software. Get yourself prepared. It’s not so different from developing software, is it? If you let any aspect get out of control, it will hunt you and make you regret disregarding it.

Also, always get feedback. I spent 3 minutes to set up the google form to enable the students to answer the survey. Actually, it’s so simple it makes you feel bad about thinking of using anything else. And remember: The only thing worse than bad stuff you do is bad stuff you do and don’t know is bad, because you’ll do it again.

So, want to talk about situations you got feedback (class-related or not) that was useful later? Comment below.


This will be a (not so) brief walkthrough on how to create a basic wave robot and add custom functionality for it. Most of what is written below comes from Google App Engine (GAE) docs and Google Wave API . It was only a dummy project, but I’m looking forward to improving it further so, if you got any ideas, tell it in the comments!

This walkthrough will be divided in four steps:  An Introduction; Creating a GAE application; Creating and Testing a Google Wave Application; Sending Emails with Google Wave.

First Step: Introduction

First of all, you need to know that if you want to create Google Wave Robots, you have to host them using GAE. Google intends to let you host your own robot in the future, but for now… If you don’t have a GAE account yet, click here.

A Google Wave Robot is a GAE application that uses the Google Wave API to respond to events generated on Google Wave. GAE applications can be written in Java or Python, being Python the language of choice for this bot.

Second Step: Creating a GAE Application

Follow this tutorial to create a basic Hello World application. If you want to (and I STRONGLY suggest you to do it), go through the whole tutorial. Yet, for our purposes, you only need to get to the Hello World topic.

Checking the minimum set of skills you have developed in this step:

  • app.yaml syntax;
  • Uploading an application to GAE;
  • Checking for erros using the GAE console(click in your application and go to Log). If any errors happen, it will be logged here.

Third Step: Creating and Testing a Google Wave Application

Now, create a new folder for your new project. Import the Google Wave API to your application. Place it inside your project folder, so that it wil be deployed with the rest of the application. This link has a nice wave hello world. If you are developing a real application, please DON’T put the code which treat the events in the same file as the event handling class. It will make your handling code difficult to test locally, and will make you lose time by having to submit your code to GAE multiple times.

Now, you should be able to:

  • Develop code to treat wave events;
  • Add your robot to a wave;
  • See your robot interacting with you in the wave.

Last Step: Sending e-mails from your Google Wave application

You won’t be able to directly use an outside smtp server to do this. Your GAE application runs inside a sandbox that doesn’t give access to some python/java libraries (the socket library, for example).

But you can send emails using the GAE administrator account. You can refer to this to check the python email API. To use it in the previous application, you need to:

  • Get the wave participants;
  • Pass them to the API in the desired format;

The Google Wave API docs are not well documented/organized. So I’m gonna give more details here than I did before:

To get the the list of participants, you will have to call
This will return a set of participant ids. These ids are the google ids from the participants, plus “”. A simples string parsing function here transform this list in a list of emails. The emails should be in one string and separated by ‘;’. This gives us the ‘to’ field of the email.

The subject and body are your own choice.

That’s it

Check the code in the Google Code page for this project. If you have any suggestions, corrections, improvements you want to send, feel free to checkout and modify the code.

Invisible characters hell

January 18, 2010

After reading Whitespace: the silent killer and re-reading The Great  Newline Schism, both from Coding Horror, I remembered something I’d like to share here: When you write string literals in your code, NEVER type invisible characters (like spaces, or characters that can be misinterpreted by a bad text editor, or by one hat simply don’t support unicode).


In a project I worked sometime ago, we had a javascript code that was something like this:

var clearInvisibleCharacter = function(string) {
return string.replace(" ", '');


If you input a string which contains any number of whitespaces, the function will replace the first one with nothing, right? Wrong. The invisible character was NOT a whitespace. It was only shown as a space by the editor we were currently using.

The programmer who created the function probably ctrl+c’ed the character from somewhere else and ctrl+v’ed there. When we had to debug it to find out what was wrong, the behavior just didn’t fit.

The solution

So, how can we avoid this? It’s fairly straightforward, in this case: replace the ” ” literal with what you really wanted replaced, expressed in a unicode code, or a scape sequence if you’re dealing with regular expressions.

Trust me, you don’t want this blank-like characters running all over your code. It would drive you crazy. It drove our team crazy.

There is one good question beyond this, though:

  • Why would a blank-like, non-whitespace character show up in the code? The answer is copy and paste. We have to be extra careful everytime we copy and paste anything, because it will be copied again, and it will spread. Do not trust whitespaces are whitespaces, unless explicitly stated.

I plan on talking about why our editor couldn’t tell us why this was not a whitespace, as soon as I realize what really did happen. Any thoughts on this?

Thanks for Campinho and Gabriel, who’ve helped discovering the problem in the first place, ages ago.

killer gama

July 10, 2009

Today I received a visit in this blog for someone who was looking for ‘killer gama’ on a search engine.

Please, don’t kill gama. 🙂

Press FAIL

July 10, 2009

Can the press stop Google (and other news aggregators) from copying/indexing their news? They probably can. Sometime ago, major press companies begun to complaint about Google showing some of their texts (mainly headlines and a summary), at both google search AND google news.

But this will drive them crazy: People are making ‘press releases’ on their own. Brazilian soccer is beginning to move towards this. Vanderlei Luxemburgo,  former Real Madrid manager, announced he was fired before anyone could announce it. On twitter. Now Belluzo, Palmeiras president, announced he couldn’t get to an agreement with Muricy Ramalho, also on twitter(pt/BR).

As I already told some friends, the press as we know will have to reinvent itself in order to remain profitable. Become less pure-factual, more analyzer (eg.: After Luxemburgo being fired, some articles could be written about the possibilities for his future). People are begginning to know how to tell their own stories (or their own version), and this is one step further in the direction of  a less dumb and manipulating press.

According to Ars Technica, microsoft is now blocking messenger on Cuba, Syria, Iran, Sudan, and North Korea “due to US economic sanctions”. Call me old fashioned, but I’m really uncomfortable with restraining people on the internet.

Live Messenger is a way to communicate with other people. It’s rather disappointing that a company as Microsoft would bend to an economic sanction from its home country, restraining the ways people can talk to other people. Right now, it’s not clear if it was a government request or an independent decision.

Think about the role of communication on wars, like the Vietnam War (through press). Nowadays, it should be even simpler (and faster): We would know everything through twitter, live. But by restraining OUR access to information, microsoft is telling us that, as far as they’re concerned, we shouldn’t hear about it. This is the kind of behavior we expect from governments.

Internet is the best place for people who lives in freedom-limited countries to express themselves and get access to information outside the box. It’s the hardest medium of information to control. Thus, microsoft is actually helping the oppressing governments to keep the population uninformed and ignorant.

If it was an independent decision made by microsoft, I can’t understand what happened. The question here is: Why now? Why only messenger? What is the next free microsoft product embargoed?

But, if this was a request from the US government, this stuff is even more serious. Most of the world’s internet infrastructure is located in the US (take also a look here). Thus, they CAN restrain most of internet traffic if wanted. If they start believing this is a good path to follow, the internet as we know (the best place for freedom of speech) will probably be doomed (until we can set up a whole new infrastructure, what can take years).

I believe there is more behind it than we know right now. When I manage to get an update about this, I’ll post it here.


Well, if you have lived the last days on a cage, maybe you haven’t heard of Wolfram|Alpha.

People say it’s the latest Google Killer, but it doesn’t do the same thing as Google. Wolfram|Alpha targets to answer a query with information, knowledge, rather than with web pages. This means that if you search for a date (let’s say, ‘june 23, 1988‘), it should tell you about the day (duration of daylight, phase of the moon, important facts on this date, and any other data it finds useful), instead of getting you to a Wikipedia page that potentially have this information.

The main differences with Google (and 99,99% of the rest of the search engines) is the presentation (it shows useful data to you, not a page where you have to find the information) and the query reasoner (it shouldn’t work in a keyword-match basis). This is all we could want: You type what you want (in natural language) and the engine shows what you want to see (real information, real knowledge).

The news are great, I know. Wolfram|Alpha could change the world as we know. And maybe it has an incredible value for those who are looking for specific information about one source (generic information about Rio de Janeiro, for example). Or if you want to know something about some kind of data you know Wolfram|Alpha supports (they have TONS of input templates and functions that you can use. You can probably stay all night up just checking a small subset of the input types they support. Try Web and Computer Systems, for example).

But even with this range of valid inputs, it can never figure out what I’m talking about. This post’s title is the phrase I’m reading the most since I began testing this engine. If I look for ‘mexican restaurants in rio de janeiro’, I would like to see an automatic mashup, using google maps and live information on the web, locating all mexican restaurants in rio de janeiro. Right now, they simply cannot figure out what I want. It doesn’t know of ‘Brazil’s population growth rate’ either, and many others that I tried.

Most of this information can probably be retrieved from Wolfram|Alpha using better formed queries. But I don’t think web people are willing to learn how to make queries all over again. Don’t get me wrong: I’m not telling Wolfram|Alpha isn’t great. They already got extremely good results (and got around extremely difficult problems), but I think they have much to work on input pattern recognition and integration, to make the service useful for the standard web user. There is much work left for “making the world knowledge computable” (and available), as this is their objective.

I’ll be posting here some more queries I made that returned nothing (and others that returned great results), do you have some too? Any thoughts about the service? Post it on the comments!