Tuesday, March 23, 2010

To Err is Human

To err is inherent to human beings. Even the human being may be considered an error in itself.  Unfortunately, in these days nobody wants to recognize his/her errors. We just have to take a look at politicians making wrong decisions in government, managers loosing money due to bad strategical policies, referees in sports, our relatives and friends in their personal decissions, etc. And of course, ourselves in our daily context. The reason is that errors are usually perceived by a majority of people as a weak point of the person that caused the error, and... everybody wants to be/appear flawless.

But, IMHO, that attitude is also an error, because in every role we play in our lives (as managers, students, engineers, doctors, programmers, architects, etc.) we are supposed to err sometimes. No exceptions. So, to me it is very important to recognize the errors we make. So, in this post I'm going to post some references to resources that are related to errors in software.

First of all, it is good to know what are the most frequent errors we can make when developing software. This web page describes a catalogue of software weaknesses in source code and operational systems. It also offers the current list of the 25 most common errors in software that lead to most part of vulnerabilities in programs.

Once we are aware about what are the errors we can make, the next step is try to avoid them when developing. Test Driven Development (TDD) is a well-known technique to follow when reaching the development phase in software construction. It is encouraged by agilists, but of course it can be applied to any software development process. Basically, it consist on repeating the following development cycle:
  1. Write the necessary test cases that define a new functionality that is going to be added to the software in development;
  2. Implement the required functionality;
  3. Pass the test cases developed in the first step;
  4. Refactor the code to make it adequate with regard to code quality standards.

As we have seen in the fourth step of TDD, when trying to avoid errors in the development phase, it is a requirement to program in a professional way. Books such as Code Complete, The Pragmatic Programmer or Clean Code can teach you about how to program properly to produce quality code.

OK, after a lot of efforts, our program code compiles well and all the test cases are passed. So, it is ready to be deployed in (pre)production environments... However, after some use of the program, several anomalies use to arise in the form of unknown/unpredictable behaviors. Of course, these are our well-known "bugs". This book, guides the practitioner in the art of debugging code introducing techniques and tools used in the academia and the industry.

Finally, even when we think that we have smashed all the bugs in our programs, we have to deal with other kind of errors (e.g. in the form of hardware failures, such as power outages, hard disk failures etc.) That's the reason why we design fault-tolerant systems. However, I'll talk about them in other posts. In the meantime, I'll try to not make so many errors... But, you know... that's life!

P.S. How many errors are in this post?

Friday, March 19, 2010

"We don't know how to program anymore"

Some weeks ago a co-worker was telling us that we (including himself) don't know how to program anymore. We have got used to having plenty of memory, hard disk space... we don't think about the resources anymore. He was saying how in the old good times, people like Brian Kernighan, Ken Thompson, Dennis Ritchie really had to care about these issues. This made them think of efficient algorithms to handle the data to be processed.

I think my colleague was right. The hardware gets faster and faster but the programs eat more and more resources, giving the users always the same feeling: frustration. Imagine you want to edit a huge text file with your favorite text editor, it is very likely that it will become unresponsive.

We don't normally develop having performance in mind, we might not think what if the data to be processed gets 1000 times bigger. We will think that our program works pretty smooth until the data to be processed exceeds what we had initially thought, our program will sweat and we will have a frustrated user.

We have to think of scalability and of resource usage. These things are pretty difficult nowadays as most of the times we are developing on top of many software layers, giving us the feeling we are working on an abstract machine with unlimited resources.

Hardware is more powerful than yesterday but, the volume of data to be processed also increases, so it is always a good thing to think twice which data structures and algorithms to use.

P.S. [by Francisco Perez-Sorrosal] I've just found a recent blog entry that is somehow related to this one.

Monday, March 15, 2010

How To Apply for Research Internships

The following are some key steps while applying for Research Internships, answering the pattern formed by the what, why, how and where questions.

What is a Research Internship (RI)?
A RI is an opportunity to get your hands dirty by being involved in academic/industrial research projects. Typically a RI can last from a minimum of 3 months to one year long periods. It is a chance for students to investigate critical research problems arising in academia and the industry (Mechanical Eng., Computer Science, etc.) A RI in Computer Science offers a variety of things, which depends on the level of experience and expertise in a particular area. Literature survey, research paper reviews, programming, analysis and design of software architecture & algorithms, writing a research paper are the few things a candidate would end up doing during a RI. A research intern would typically work in a team or individually depending on the research assignment. In case of industrial research the intern may collaborate with other researchers, as opposed to academic research in which he may just work with the advisor.

Why do a RI?
A RI gives you a chance to get involved in research activities early in the academic career. It introduces you to the world of research and broadens the horizon in terms of understanding research methodologies, being updated with the latest techniques and trends in science and by exposing students to a new world other than a stereotypical bookish world. Doing research during undergrad or immediately after finishing the UG program lays a solid foundation for getting a Master's/PhD degree. Prior research experience is always beneficial before starting a Master's or a PhD programme since it helps the student in exploring a particular area and identifying his/her research interests along the way. It's a wonderful opportunity to work with industrial research labs, and work closely with advisors (professors) in Universities. Working with eminent professors helps in defining a certain way of thinking and attacking problems. Research work creates a whole new perspective and allows in-depth study in a particular area. Getting SOLID recommendations highlighting research experience from researchers is a boon while applying for advanced degrees.

How to apply for one?
Such applications are usually done via e-mail. Applying for RI's can get tricky at times. Tricky in the sense, it is very important to be precise while applying. While applying keep the body of the email short and simple, highlighting your research interests, any prior work / assignments done in that particular area, your long term plans (next 2-3 years), a list of technical reports. An effective strategy while applying for internships is to ensure bulk e-mailing to Professors in different Universities at the same time applying very carefully (A particular email which is meant to be addressed to Prof.ABC may be sent to Prof.XYZ, haha). Getting admitted for internships can be a long shot in the dark, but if you get it right, it is one of the best thing that can happen to your career. Especially foreign internships are fascinating in a way that it allows you to study (work) abroad and meet with people from different cultures and collaborate with smart academicians. It is very important to follow up with Professors at the time of application. If they do not reply to your email (that happens most of the times, do not get disheartened though), feel free to call them on their office telephone after a week and enquire about your application. Shortlisting professors is one of the most important thing while applying. You have to take a look at their web pages which can be found on the University listings. Study their webpages really well since many professors have their own "rules" defined for prospective students. Keep in mind that your research interests match with the professors interests and apply accordingly. Also make use of your current undergrad professor's contacts to find a suitable place for doing an internship.

Where to apply ?
Since I am a Computer Science professional, I would list a few places which look at hiring Computer Science students. Some places to look at in Europe and India include:
- IITs (Bombay, Delhi, Madras, KGP, etc.)
- IISc Bangalore
- EPFL Switzerland
- ETH Zurich
- TU Dresden
- Karlsruhe University
- RWTH Aachen
- TU Darmstadt
- DERI Ireland
- INRIA France
- TU Madrid
- TU Delft / Eindhoven

I hope this information has been useful in some way for your application. Feel free to ask any questions. Thank you.

Wednesday, March 10, 2010

Two Interesting Events in Madrid for the Next Few Days

Next saturday is the day selected to celebrate the RetroMadrid 2010 exhibition at the Facultad de Informática of the UCM in Madrid. This time it is for real guys ;-) It is time again to revive the old times of the Spectrum, Amstrad, MSX and Commodore...

...and next week, the 18th, there is the first Hackaton event ever held in Madrid. This one is related to Google Chrome. This event will be also hold at the Facultad de Informática of UCM. In order to go there, early registration is required.

Enjoy!