Rodrigo Alves

Porto Alegre: a travel guide and experience report

Recently I travelled to one of Brazil’s finest cities: Porto Alegre (POA). The city is the further south state capital, it is the capital city of Rio Grande do Sul.

Rodrigo Alves, Porto Alegre. August 22, 2013

Me at the Bourbon Country Mall

The City

Porto Alegre is a very green city. You get to see trees everywhere, all-around 100 feet pine trees. People are generally very polite. Traffic is not so chaotic but drivers aren’t usually very respectful with pedestrians either.

Farroupilha Park Farroupilha Park

If you want to eat well, you will not be able to save that much money, just like in most Brazilian cities.

BTW, I guess the weather makes people wear themselves very elegantly.

If you’re into public transportation, the city is not bad at it. I have not seen many crowded buses there.

Monument in Farroupilha Park Monument in Farroupilha Park

Also, malls. Malls are all-the-fuck-around in the city. Which is good because its also where the movies are so often located and good food is easy to find.

Also, POA is one of the safest (low violence rates) city capitals in Brazil.

bedroom in Higienópolis View from my bedroom in a typical residential hood, Higienópolis

Weather

I’m pretty sure the best time to visit POA is during the winter. As a guy from a state in northeastern Brazil, I’m used to 27-30˚ Celsius degrees range so sometimes I just wish I could experience a 5˚C climate for a few days. Porto Alegre in the winter is the perfect city for that.

Food

If you are the carnivorous type you should go to the Churrascaria Galpão Crioulo, the finest steak house in the city, located in downtown. They serve you delicious types of meat endlessly for the amount of R$ 50,00. Plus you eat all the amazing food watching a local folk band with dancers all around.

Downtown POA Downtown POA

Nightlife

POA features some very nice nightclubs and a great bohemian neighborhood called Cidade Baixa (low city).

Saw this monument when I was heading back to the airport

Laçador Statue in POA Laçador Statue, the symbol of the Rio Grande do Sul people

Bye, POA. I hope to be back in 2014!

Competitive Programming - Getting Started

Competitive programming is something very worth doing in my opinion. The whole idea of spending time solving problems (ideally, complex ones) with a team, in a short amount of time is amazing.

The CS department (CIn/UFPE) where I study is one of the leading institutions in the Brazil-wide competitions and I realize that many (actually most of) the brightest minds in the department that I know are members of the department teams, and I obviously would like to be part of it.

To be honest, I’m not all that fond of the idea of competing with other teams for a prize. Instead, what is really appealing to me in all this is how much I can learn by working with these types of problems.

These programs offer a unique way of learning by doing and a great opportunity for developing your troubleshooting and problem solving skills, and I believe one can never be done with it.

So I started learning C++ in early this year and I’m enjoying it so far while ending my Introduction to Algorithms course.

To make me get going faster I bought a book called Competitive Programming 3, by two authors called Felix and Steven Halim and started doing some exercises from my favorite judge: UVa and I am placing my solved problems in github.com/rodrigoalvesvieira/UVa

For the next 3 or 4 years my main goal is to learn as much Computer Science as my brain supports. I guess this will help me a lot, specially with my Algorithms and problem-solving skills.

By the end of the year I’ll attempt to become a member of the department team!

From Industry to Academia, the tale of a young developer

Back in middle of 2010 - at 16 - I was a senior in High School and had been programming for the past couple years, for fun. I already found it all amazing, had been a member of the local Python community and really want to get deeper into Software development. Then in July I got offered my first job as a software developer intern at a local startup to build a new product for them.

I wasn’t much of a programmer back then and wasn’t sure if I should take the job, but I did. The experience was amazing, working in a company to deliver a real thing. Unfortunately the project did not get finished nor delivered and I dropped out in 3 months. But I had learned a few things and earned my own little money. It was enough to make me sure Software was the thing for me.

Then for the next couple years I worked at a consulting firm, then at a startup. Hacked in many projects, learned to use and master tools, delivered stuff. Everything is amazing when you’re starting, even when the job at the consulting firm got boring as hell, I managed to work it out. And a year ago, I even started my own - now failed - startup with my friends.

Going to Academia

I quit my normal job last year before starting college. I knew Computer Science might be very hard, my friends told me that, and I wouldn’t be able to continue working for fair amount of time - my friends were right. Unfortunately I didn’t take college as seriously as I should and, in one of the best CS schools in Brazil, it means you end up failing some disciplines.

But then I started dedicating myself more and I really enjoy college. UFPE is an amazing university and every day I find myself surrounded by many the brightest people I’ve ever met. Although I work my ass head off every day.

I got into a research project on Mining Software Repositories (unfortunately, it can’t be disclosed right now), under Professor Fernando Castor and I’m even working with doctorate candidates.

Another thing in particular that I’d like to point out is that (in my case at least) college forces me to learn much faster than my previous occupations did. And this can be good, sometimes I’m surprised that I’m learning so many things in so little time.

I believe that both the industry and academia are very competitive fields and they both allow you to be mediocre or brilliant, innovative. The two of them are hard to work with, and you can change the world in any of them, it’s only about your dedication and the specific field(s) that you choose.

Both areas can be extremely demanding and, although they usually demand different things, you should be dedicate in both.

For years, I’ve seen people say that young developers shouldn’t or didn’t need to go to college. I wouldn’t be so sure. It depends in a lot of things, your motivations, aspirations and inclinations, your short and long-term goals. It’s really about you and so I guess no person can say to you what you should do. BUT - and this is a notable but - if you’re in doubt, I think you should try college for some time to really know what you’ll like to do.

Looking back in the mirror, I’m glad of what happened. The chance I had to get to know the industry before going to college gave me a good opportunity to know the field I was going to dedicate my life to and even prepared my for college, in some ways.

I definitely don’t want to be an academic person, although I acknowledge the importance of academic research and education. I want to build and sell. Hope the future’s got plenty of work for me.

Java libs hard to live without

Since late 2012 I’m creating software with Java and there’s quite a few libs which I can’t forget anymore, because I’m constantly in need of them. Here they are listed, each with a brief explanation of what they’re for:

gson from Google

JSON has became the de-facto standard for data representation in the Web. As I’m always having to parse documents and build my Java objects with data coming from a JSON files this lib is the best for the job I’ve encountered so far.

Gson also lets you be briefer with your code by being able to build an object directly from the JSON input. For example, suppose you have the following class with two attributes in your program:

public class Song {
  private String title;
  private String author;

  ...
}

And suppose the JSON document your’re parsing is like:

{
  "title": "Under My Thumb",
  "author": "The Rolling Stones"
}

Then you can build your Song object directly (without having to set each attribute) from the JSON like this:

Song u = gson.fromJson(element, Song.class);

async-http-client from Ning

If you need to perform HTTP request in your Java program, then this is the lib for you. Besides the ability to easily perform asynchronous HTTP requests async-http-client allows you to easily set your request headers.

[guava] from Google

junit

Testing is an important step in the process of writing good, maintainable software. Whether you follow or not the TDD [1] practices, this lib is probably the right one for your unit tests. Junit offers an immense set of assertion methods and matchers. Another plus is that Junit is very mature (in fact, Junit is believed to be the first TDD lib to exist!) and thus there are a lot of IDE plugins and such helper tools to make our lives easier.

Meet Microtext.js

Simple text processing functions is something we write all the time. Often, these functions are the same, for example, for hiding full email addresses for prevent fetching from web bots. You get it.

If you finding yourself constantly needing these functions, Microtext.js is the JS micro lib for you!

Coming from a Rails background I am used to do much of this processing in the Helper’s level. However, Rails Helpers can be noticeably slow and often the bottleneck of many Rails apps is in the view rendering, where Helper works interfere a lot.

Well, if we can delegate this processing to the browser, making our app’s response time decrease and without slowing down the app in the user side (remember, a website slow for its scripts are too bad too) then we should do it.

I just wrote down the motivation for this very simple project. Now let’s go to the cool moment of the party, the code:

What about the good old string truncation operations? Here it is:

Microtext.truncate("Lewis Pirenne", 10) // "Lewis Pire..."

Can we get the initials for a name? Sure!

Microtext.getInitials("Bor Alurin"); // "B. A"

Need to hide an email address partially to prevent bots from fetching it?

Microtext.hideEmail("rodrigo@example.com"); // "rod...@example.com"

These are just a few examples. Currently, Microtext.js features 10 functions 1 but more should be added. Can you think of a text processing operation you do often? Send a Pull Request or send me an email and I’ll consider adding it.

Startup idea: inward bicycle transportation service

Bikes

All over the world we have these huge spaces like factories, construction sites, clubs, tech campuses and universities where people constantly need to move from a building to another and stuff like that.

I think there’s a good opportunity there for the emergence of a company offering an inward (restricted area), private bicycle transportation service to solve transportation issues in these places.

How would it work?

Imagine yourself as the administer of some university. Let’s say there are 10 thousand people everyday in campus, on average. Now you could ask for 2% the number of people in bicycle, just to begin with (later you could upgrade the number of bicycle, if needed).

There you have 200 bicycle, ready to be used and shared. Awesome, non-polluting, safe, healthy fuel-free transportation for everyone inside the university perimeter.

All bicycle and other equipment would not be purchased by the customer and would be owned by the startup. All things rented, and payment done in the good pay-as-you-go fashion.

How security would work for this idea I haven’t thought much. But one way could be not only restricting the use within the perimeter of the place but also restricting to “verified” people.

Maybe the bicycles could be slightly customized with the subscribing company logo and color.

The monthly subscription would be calculated for every customer. Based on the number of bicycles, parking stations and other equipment requested. Of course any damage done to any of the equipment would mean additional cost for the customer.

Bicycle transportation is becoming more and more popular (not to mention cool) - and represent the best alternative to transport in many situations - these days and this idea would make it way more practical for the possibly interested institutions to implement it.

You can join the discussion on Hacker News.

UPDATE: viacycle seems to be doing just that. However, we need this in Brazil too!